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

    RDATA_PATH not working with Render Settings

    Cinema 4D SDK
    r23 python
    2
    3
    423
    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.
    • ?
      A Former User
      last edited by A Former User

      Hello,
      I'm trying to set the RDATA_PATH of the active RenderData, but it's not working. It prints the correct path and sets all of the other data, but it doesn't set the File... path in the Render Settings dialog. Am I missing anything? Thank you!

      import c4d,os
      from c4d import storage
      
      def main(doc):
          activeRenderData = doc.GetActiveRenderData()
          rd = activeRenderData.GetData()
          rd[c4d.RDATA_XRES] = 2048
          rd[c4d.RDATA_YRES] = 1080
          rd[c4d.RDATA_FORMAT] = c4d.FILTER_MOVIE
          rd[c4d.RDATA_LOCKRATIO] = True
          docName = doc.GetDocumentName()
          fileName, ext = os.path.splitext(docName)
          fileName = "%s.mp4"%fileName
          fileName = os.path.join(storage.GeGetC4DPath(c4d.C4D_PATH_DESKTOP),fileName)
          rd[c4d.RDATA_PATH] = fileName
          print(rd[c4d.RDATA_PATH])
          doc.GetActiveRenderData().SetData(rd)
          c4d.EventAdd()
      
      if __name__=='__main__':
          main(doc)
      

      802d4e95-1fdb-410b-bbb6-85dce273c2e8-image.png

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by A Former User

        I found success using the BaseContainer.SetFilename method instead of using the = assignment operator.

        rd.SetFilename(c4d.RDATA_PATH, str(fileName))
        
        1 Reply Last reply Reply Quote 0
        • M
          m_adam
          last edited by

          Hi @blastframe as demonstrated in tokensystem_render_r17.py you should always operate on the BaseContainer.

          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

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