Registration code being run in After Effects
-
We have a customer here who installed one of our plugins successfully in Cinema 4D 2023, but now a dialog we bring up when the plugin is not registered also comes up in After Effects.
I don't think this was a thing in previous versions or it hasn't come up before, but I guess the plugin in question maybe just shouldn't load in After Effects at all? What is the expected behavior in such cases and how would I detect them?
Any help greatly appreciated!
Best
Timm -
Hello Timm,
You are saying dialog appears when
plugin is not registered
, which could be interpreted as plugin registration function call inside PluginStart function. If that's the case, please elaborate on your issue.Assuming that you mean some custom dialog functionality implemented in your plugin, which has rather something to do with licensing, there are several things to notice:
- Cineware is loaded within After Effects and it is expected that the same set of plugins available in cinema is loaded as well. (Otherwise the behavior could be inconsistent between C4D and AE, for example when there's some generator implemented in the plugin).
- There are separate configuration files for Cinema 4D and Cineware that control search paths for the plugins. You can find them in resource folder: resource/config.cinema4d.txt and resource/config.cineware_dll.txt. The flag you'd be interested in is
g_modulePath
.- You can remove your plugin installation path from the search paths for the cineware config file, while keeping it for cinema4d config file. This way cineware would not load your plugin (!!! as well as all other plugins residing in this directory !!!)
- You can use custom installation path for the plugin and add it to the cinema4d config file, while keeping cineware config untouched.
- Another option would be to handle different application IDs programmatically. A simple if-check for GetApplicationId():
maxon::System::GetApplicationId() != maxon::APPLICATIONID::CINEWARE_DLL
would do the trick.
Cheers,
Ilia -
Hi Ilia,
You are assuming correctly, that with "not registered" refers to our licensing. I am struggling a little with figuring out what our correct behavior would be. Is Cineware a fully useably version of Cinema 4D? Would we perhaps want to have registered customers to be able to use their license in Cineware as well? What does this Cineware integration even look like? Are there examples? I have a hard time figuring out how it would even present itself to the user. Is there any guide on what it would look like and what the expected behavior is?
Also to get the licensing to work, we use information from
GetGeneralLicensingInformation()
. Would the result from that function look similar (especially the machine id) or different? We are then creating a licensing hash and store that in the world settings. Would those settings be shared between Cineware and a regular Cinema 4D installation or would they be different?Thanks for your help!
Timm -
Hi Timm,
You can familiarize yourself with cineware integrations on our documentation webpage Maxon Cineware User Guides. Specifically for the After Effects integration there's a compact but rather informative description (as well as pointers to a corresponding video footages at Maxon's Youtube channel) on a dedicated webpage Cineware for After Effects:
Adobe After Effects includes a free installation of Cinema 4D Lite – a limited but feature rich version of Maxon’s award-winning 3D software package. Cinema 4D Lite can be accessed directly from within After Effects in the File ⇒ New menu, or by clicking Edit Footage on a Cinema 4D layer in your composition.
The question about proper licensing behavior of your plugin lies outside of scope of knowledge and highly depends on the goals you're trying to achieve. As I already pointed out, say, the scene with some object defined in the external plugin would require this plugin to be loaded by cineware as well to function the same way as in C4D.
Cineware integrations use preferences folder different from the one that is used by Cinema 4D (it uses the same folder name with suffix
_w
). Hence, all the preferences (including the world container) are not shared between C4D and Cineware. The behavior of some function call can also differ, includingGetGeneralLicensingInformation()
. However, the system identifier systemId is independent of the APPLICATIONID and will be the same in both cases.Let me know if you have any further questions.
Cheers,
Ilia