SetWorldPluginData & updates...

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 07/04/2010 at 07:26, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   11 
Platform:      Mac OSX  ; 
Language(s) :     C++  ;

---------
I'm setting an importer pref using SetWorldPluginData(pluginId, copyContainer, FALSE); - however the value is not updated in the preference.

The method returns TRUE, so the container should have been stored.

Do I have to send a message after changing the prefs this way?

Note that pluginId is the id of an importer, not that of my plugin. I can read out the settings just fine, but I would like to write them to make sure that certain settings are used.

Any hints?

Edit:
I can read out the original settings, then write the new ones.
If I now read out the settings again, I get the new ones as expected.

The new settings are neither saved, nor is the change reflected in the Preference dialog...

Thanks

Kabe

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 08/04/2010 at 02:56, xxxxxxxx wrote:

I can confirm this and have asked the developers what is going on.

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/04/2010 at 02:16, xxxxxxxx wrote:

Any news on this?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/04/2010 at 07:17, xxxxxxxx wrote:

No yet, I will inform you as soon as I got an answer from the developers (which are very busy).

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/07/2011 at 15:31, xxxxxxxx wrote:

Sorry for bumping an old thread but was this actually ever resolved because i am having exactly the same problem.

Is it really impossible to retrieve the CURRENT settings of import/export filters as shown in the preference dialogue?

As it still seems that using  GetWorldPluginData only retrieves the initial state of import/export filters when c4d first loads not the current state and  SetWorldPluginData has absolutely no effect on them.

I need a way to get the current state/settings of the import export filters (FBX,OBJ....ect) as shown in the  preference dialogue. But so far nothing seems to get the current values. 😞 If there is any way to do this or even any workaround please give me a hint to how to do it.

Thanks

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/09/2012 at 02:13, xxxxxxxx wrote:

Here's an up-to-date information on this.

To get/set an exporter settings we don't have to use GetWorldPluginData()/SetWorldPluginData(), we have to send a MSG_RETRIEVEPRIVATEDATA message to the exporter instead. We can then access and change the exporter settings retrieving its container instance.
Here's an example of how to setup an FBX export in C++:

BaseList2D* exporter;
BasePlugin* plug = FindPlugin(1026370, PLUGINTYPE_SCENESAVER);
if (plug && plug->Message(MSG_RETRIEVEPRIVATEDATA, &exporter))
{
    BaseContainer *data = exporter->GetDataInstance();
  
    data->SetLong(FBXEXPORT_ASCII, FALSE);
    data->SetLong(FBXEXPORT_BAKE_ALL_FRAMES, FALSE);
  
    data->SetLong(FBXEXPORT_SAVE_NORMALS, TRUE);
    data->SetLong(FBXEXPORT_ANIMATION, TRUE);
    data->SetLong(FBXEXPORT_TEXTURES, TRUE);
    data->SetLong(FBXEXPORT_EMBED_TEXTURES, TRUE);
  
    SaveDocument(doc, "C:\\model.fbx", SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, 1026370);
}