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

    How do I access general settings?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 573 Views
    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 Offline
      Helper
      last edited by

      On 12/12/2017 at 06:57, xxxxxxxx wrote:

      ???[c4d.PREF_RENDERER_THREADCUSTOM] = 7

      Simply, I do not know how to write the ???part.
      I just want to create a tool button to change the number of threads.
      It is necessary because it changes frequently.

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

        On 13/12/2017 at 02:58, xxxxxxxx wrote:

        Hello,

        the application settings are stored in the so called world container. You can obtain this container with GetWorldContainer() or GetWorldContainerInstance(). The IDs to access the data in this container are NOT the parameter IDs but the IDs starting with WPREF. You find a list of these IDs in the C++ documentation: WPREF.

        Using this IDs you can easily change the thread count:

          
        worldContainer = c4d.GetWorldContainerInstance()  
        worldContainer.SetInt32(c4d.WPREF_CPUCOUNT, 5)  
        c4d.EventAdd()  
        

        best wishes,
        Sebastian

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

          On 13/12/2017 at 05:28, xxxxxxxx wrote:

          it is complete!
          I felt like finely managing the case of doing other work with this and the case of concentrating only on rendering.
          And you can freely change the general setting.
          Thank you.

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