Set parameters Project Settings



  • On 26/10/2015 at 13:47, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   17 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello.

    How can i set the parameters in Project Settings  (Edit > Project Settings) ?
    Can i set them to different values in my plugin's initialization ?

    Thank you for your time.



  • On 27/10/2015 at 06:18, xxxxxxxx wrote:

    Hi,

    BaseDocument has the functions GetData(), SetData() and GetDataInstance(), which can be used to access and modify project settings.
    For example like this:

    BaseContainer* settings = doc->GetSettingsInstance(DOCUMENTSETTINGS_DOCUMENT);
    if (!settings)
      return false;
    settings->SetString(DOCUMENT_INFO_AUTHOR, "User");
    EventAdd();
    

    If it's a good idea to modify the project settings in your plugin's init, probably highly depends. I guess, some user's won't appreciate to get their project settings modified. And for example with an ObjectData plugin, why should it modify the project settings on every generated object? But that's just some thoughts, as I don't know your plugin or its type.


Log in to reply