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
    • Recent
    • Tags
    • Users
    • Login

    Render Settings

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 291 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 19/03/2014 at 13:33, xxxxxxxx wrote:

      Working with render settings, I cannot figure out how to send information to the renderer settings. I am trying to get this to work with Vray and Octane. I can drag and drop the settings into the Script manager and the name of the attribute appears such like:

      [c4d.VP_VRAYBRIDGE_DISP]
      

      or

      VrayBridge[c4d.VP_VRAYBRIDGE_DISP]
      

      However if i use GetActiveRenderData with the code

      RDATA[c4d.VP_VRAYBRIDGE_DISP]
      

      Then I get 'obj has no attribute'

      How can I get and set renderer render settings?

      Thanks in advance!

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

        On 20/03/2014 at 01:35, xxxxxxxx wrote:

        Hi, the __setitem__ operator has some internal checks to ensure that you don't overwrite stuff by accident. In this case you can access the data container directly via RenderData.GetDataInstance().

        In your specific case you don't send the settings to the vray/octane node. They must be retrieved by calling:

        vp = doc.GetActiveRenderData().GetFirstVideoPost()
        while vp:
                if vp.GetType() == 1234567: # ID of your needed renderer
                        vp[ID] = value
                        break
        	vp = vp.GetNext()
        

        Hope this helps.

        Cheers, s_rath

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

          On 20/03/2014 at 07:05, xxxxxxxx wrote:

          Thanks s_rath!

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