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

    Setting Preferences via script

    Cinema 4D SDK
    python 2025 2026
    2
    3
    7
    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.
    • P
      pyr
      last edited by

      Hey everyone,

      I’m trying to roll out a few default preference settings across all company workstations, but I can’t find any solid reference or example on how to do it properly through Python.

      Basically, I’d like to change things like:

      • some Memory settings (Picture Viewer cache, etc.)
      • a few File options (Autosave paths and intervals)
      • certain Redshift preferences
      • and enable the Verify Script check

      My goal is to make sure every workstation starts with the same defaults, ideally via a startup script or a deployed config.

      Unfortunately, I haven’t found any working example in the documentation or SDK that shows how to access and write these preferences in C4D 2025 / 2026

      Does anyone have a current example or best practice for setting preferences programmatically in recent C4D versions?

      Thanks a lot!
      — Tobias

      P 1 Reply Last reply Reply Quote 0
      • P
        pyr @pyr
        last edited by

        After digging through some older threads and testing things, I found that this approach works — based on the discussion here:
        https://developers.maxon.net/forum/topic/13555/python-how-to-get-axis-scale-from-the-preference-settings/2

        import c4d
        
        doc: c4d.documents.BaseDocument  # The currently active document.
        op: c4d.BaseObject | None  # The primary selected object in `doc`. Can be `None`.
        
        def main() -> None:
        
            # get preferences
            pref = c4d.plugins.FindPlugin(465001632) 
            # Memory ((465001628, 1, 465001632), (888, 133, 465001632))
            desc = c4d.DescID(
                c4d.DescLevel(465001628, 1, 465001632),
                c4d.DescLevel(888, 133, 465001632)
            )
            
            
            memoryPref = pref[desc]
            
            memoryPref[c4d.PREF_MEMORY_PVHARDFOLDER] = "c:\\blubb"
            c4d.EventAdd()
            
            
        
        
        if __name__ == '__main__':
            main()
        

        To discover all available IDs inside a preference node, you can list them like this:

            for bc, descid, _ in pref.GetDescription(0):
                name = bc[c4d.DESC_NAME]
                
                print(name,descid)
        

        So this topic is solved 🙂

        ferdinandF 1 Reply Last reply Reply Quote 0
        • ferdinandF
          ferdinand @pyr
          last edited by ferdinand

          Hey @pyr,

          yes, that your own answer is correct, thank you for sharing it! But since 2026.0.0 there exist better ways to discover symbols and container values. Have a look at the mxutils change notes for 2026.0 for an overview.

          With g_c4d_symbol_translation_cache you can discover the symbol for a plugin ID such as 465001632 and with GetParameterTreeString you can inspect node parameters in a human readable form.

          Cheers,
          Ferdinand

          MAXON SDK Specialist
          developers.maxon.net

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