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

    Regarding change on render setting [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 249 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 16/06/2015 at 13:16, xxxxxxxx wrote:

      Hello,

      The purpose is to increment save and load the latest document, and update the render name based on the document's name. However, if I ran LoadFile, the render setting would not get updated. Is there any ways to update the render name after loading the latest file? Thanks!!

      save document and load the latest one

      c4d.documents.SaveDocument(doc, newProjectName, c4d.SAVEPROJECT_DIALOGSALLOWED, c4d.FORMAT_C4DEXPORT)
      c4d.documents.LoadDocument(newProjectName, c4d.SCENEFILTER_DIALOGSALLOWED)
      c4d.documents.LoadFile(newProjectName)

      set output render image name

      rd = doc.GetActiveRenderData()
      rd[c4d.RDATA_PATH] = renderName

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

        On 16/06/2015 at 14:17, xxxxxxxx wrote:

        I found the other way round to achieve what I want. Below is my code:

        save document and load the latest one

        c4d.documents.SaveDocument(doc, newProjectName, c4d.SAVEPROJECT_DIALOGSALLOWED, c4d.FORMAT_C4DEXPORT)
        c4d.documents.LoadDocument(newProjectName, c4d.SCENEFILTER_DIALOGSALLOWED)
        c4d.documents.LoadFile(newProjectName)
        doc.SetDocumentName(newProjectName)

        set output render image name

        rd = doc.GetActiveRenderData()
        rd[c4d.RDATA_PATH] = renderName

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