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

    How to load Rendersettings from an external file?

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 399 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 29/11/2015 at 09:17, xxxxxxxx wrote:

      Hey there,

      so I got around the Idea to insert rendersettings from an external file, wich is located in the res folder of my plugin. 
      I tried it with Mergedocument but this doesn't merge the rendersettings.
      I also tried some other things, but no one worked
      And I don't want it to load a new file either.

      So is there a way?

      greetings, 
      neon

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

        On 30/11/2015 at 01:37, xxxxxxxx wrote:

        Hello,

        could you explain what exactly do you mean with "from an external file"? Do you mean another *.c4d file?

        Then you could use LoadDocument() to load that file to memory and read its render settings with  GetActiveRenderData(). With that settings you can synchronize the settings of the target document.

        Best wishes,
        Sebastian

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

          On 04/12/2015 at 08:08, xxxxxxxx wrote:

          What about creating a new render setting via Python and setting the parameters you want in the script?

          Here is a sample of one I created as part of another script.  newDoc at the end is the new document I had created that I was inserting the render settings into.  You might use doc instead if the current document you are inserting the render settings into.

          def renderSettings() :
              dNewRD = documents.RenderData() # create new render setting 
              dNewRD.SetName("Render Library Preview")
              sketch = c4d.BaseList2D(1011015) #object id found by GetType()
              dNewRD.InsertVideoPostLast(sketch)# add S&T to render setting
              dNewRD[c4d.RDATA_FORMAT] = c4d.FILTER_JPG
              dNewRD[c4d.RDATA_ANTIALIASING] = c4d.RDATA_ANTIALIASING_BEST
              dNewRD[c4d.RDATA_AAMAXLEVEL] = c4d.RDATA_AAMAXLEVEL_2
              dNewRD[c4d.RDATA_AATHRESHOLD] = .04
              dNewRD[c4d.RDATA_PATH] = targetPath + "/" + objName + ".c4d"
              newDoc.InsertRenderData(dNewRD) # insert new render setting into document
              newDoc.SetActiveRenderData(dNewRD) #set new setting as the active render setting
            
          
          
          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 11/12/2015 at 08:30, xxxxxxxx wrote:

            Hello Neon,

            was your question answered?

            Best wishes,
            Sebastian

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