How do I change the Unreal Engine AppleARKitLiveLink Settings via user input? - c++

After compiling the Unreal Engine FaceARSample project the user can send the iPhone's facial blendshape data via the AppleARKitLiveLink plugin to a computer on their network with an IP address they define. I want to change it so the user can edit other LiveLink settings as well. Most importantly, the Subject Name.
So I found in the FaceARSample where the LiveLink source is created, inside of AppleARKitFaceSupportlmpl.cpp. The console command "LiveLinkFaceAR SendTo= [IP Address] " is used to change where LiveLink is publishing to. Upon pressing a button in the compiled app this console command is triggered which uses the line of code below to send the data over the network:
RemoteLiveLinkPublisher = FAppleARKitLiveLinkSourceFactory::CreateLiveLinkRemotePublisher(RemoteIp);
I've tried to make my own AppleARKitLiveLinkSourceFactory through blueprints but I couldn't figure it out. I found that I could edit the default subject name in the AppleARKit Project Settings. Is it possible to give the user access to these project settings via blueprints?
I'm confused about where to start. I've taken a look at the Maya LiveLink plugin, read the Unreal Engine documentation,and studied C++ for about 4 weeks now but I'm still confused. Do I need to somehow create an Unreal Engine module and #include the AppleARKit plugin then derive my own class from the AppleARKitLiveLinkSourceFactory? Do I need to create my own AppleARKit plugin from scratch?
Here's the documentation I read:
https://docs.unrealengine.com/en-US/Engine/Animation/LiveLinkPlugin/LiveLinkPluginDevelopment/index.html

You need to create your own plugin or game code, there you need to include the AppleARKit module editing your Build.cs then you can use their exported classes.
By instance all settings you can see in the project settings are driven by static UObjects, you can access all them if they are expose using something like this:
class* myclass = GetMutableDefault<>();
In this case you want to look for UAppleARkitSettings, now that been said, looks like that variable is protected, so you will not be able to modify it at all. if you really want to modify it through custom nodes in blueprints, you have 2 options, if you have the source, just change it to public, second option is remove the plugin from your engine, and paste it in your per project plugin folder and edit it there.
that's the closest you can go, nevertheless I suggest you changing that from the settings, looking to the architecture I can't see a valid reason to change that via BP, but it is up to you
Cheers and hope that helps

Related

Command Line Interface for C++ Server

I have been working on this C++ chat server for Linux for a while and I have all the basic stuff down. I now need to make a user interface for it. I want to make a command-line interface but I'm having trouble figuring out what I should use to do so. I basically want it so there is a place at the bottom of the terminal for the admin to type and above that I want all messages, information, and etc to be displayed. What happens above the admin's input box should not affect the admin's input box. What would be the best way to accomplish this? I have tried using Ncurses but I am not sure if it is the best option.
Since you have done a chat server anyway why not just have another 'chat' connection on a different port as the admin interface? Then the interface for the admin is whatever you use as the chat client and you can admin it remotely or easily automate tt
You can have a look at this lib too : http://alexis.royer.free.fr/CLI/
(cli = command line interface)
I think that the CLI toolkit (http://alexis.royer.free.fr/CLI/) can help for your bottom terminal, the one managing the admin interface.
You may just have to define your own IODevice so that outputs do not affect the whole screen.
This IODevice may be based on ncurses for instance as you started (get inspiration from ncurses_console.h/.cpp for that).

windows api to create shortcut and put application in start menu

I have a client application in C++. For that I want to create a shortcut on the desktop and an entry in the start menu while installing. Is there any C++ windows api for that? I tried searching for it but couldn't find it. Can anyone tell me how it can be done?
You'll have to get your hands a bit dirty, and use COM to access the Shell. You can read here about Shell Links. Also, this project might provide you the code you need.
To get the location of the desktop and the start menu folders, you can use the appropriate System Variables.

Qt - How to open a website in a particular browser

I am coding one project, which needs to launch some webbrowsers with the given url.
I saw some QT examples, but they explained how to launch the default browser, not a particular browser.
Any helping suggestions will be appreciated.
Edit1:
Below is the code I use currently
QString temp="C:/Program Files/Internet Explorer/iexplore.exe";
process->start(temp.toStdString().c_str());
Edit2
Hi, I found that the problem is not in QProcess->start, Because it works perfectly for "explorer.exe", But not works, for executables which are in Program Files.
So I post a new question about it.
If you know which browser you want to start and where they are located on the system (such as the default installation directories). You should be able to use QProcess
This can usually be done as the following:
iexplore.exe http://www.locationOfUrl.com
or
//path/to/app/firefox.exe http://www.locationOfUrl.com
system("/path/to/the/browser \"http://www.the.com/url\"");
or spawn instead of system (gives you control over environment variables, etc.)

IE ActiveX plugin cannot create file

I wrote an IE plugin using MFC activex. The plugin actually creates a file in CLSID_APPDATA folder and writes some data inside it. But the problem is that file which is created cannot be seen (i mean i cant see any file in CLSID_APPDATA folder on windows vista) whereas I am actually writing data inside it. The plugin is not signed.
I have the code from http://support.microsoft.com/kb/161873 to mark my activex component as safe.
Please let me know if I need to do something more to make it possible for file creation. I hope I was clear. Do let me know if I need to provide more details.
regards,
Pradip.B
It sounds like you're falling foul of IE's "Protected Mode" which redirects file writes made from IE from \Users\UserName\Local\ to \Users\Username\LocalLow (or something very similar to that).
Take a look at the following links as they should point you in the right direction:
More details on Protected Mode IE in Windows Vista
The difference between Local and LocalLow folders

How to host licensed .Net controls in unmanaged C++ app?

I need to host and run managed controls inside of a purely unmanaged C++ app. How to do this?
To run unlicensed controls is typically simple:
if (SUCCEEDED(ClrCreateManagedInstance(type, iid, &obj)))
{
// do something with obj
}
When using a licensed control however, we need to somehow embed a .licx file into the project (ref application licensing). In an unmanaged C++ app, the requisite glue does not seem to work. The lc.exe tool is supposed to be able to embed the license as an assembly resource but either we were not waving the correct invocation, or it failed silently. Any help would be appreciated.
The answer depends on the particular component you're using. Contact your component help desk OR read up the documentation on what it takes to deploy their component.
Basically component developers are free to implement licensing as they deem fit. With the .licx file the component needs to be able to do whatever the developer wished via GetKey and IsValidKey (explained in the link you posted).
So if GetKey checks for a .licx file in the component directory - you just need to make sure its there.
AFAIK the client assembly doesn't need to do anything except instantiate the control.
Also if you post the name of the component and the lc.exe command you're using, people could take a look..