Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Set parameters Project Settings

    SDK Help
    0
    2
    218
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post