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

    Setting the format options of an OpenEXR [SOLVED]

    PYTHON Development
    0
    3
    510
    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
      Helper
      last edited by

      On 11/05/2015 at 09:04, xxxxxxxx wrote:

      Hi,

      I'm trying to automate the setting of the render preferences, but I got stuck at the following.
      I can't seem to find out how to put the openEXR format to "Lossy 16-Bit float, Zip, in blocks of 16 scan lines"

      I found out that you can access the options menu using [c4d.RDATA_SAVEOPTIONS]. But after that i'm at a loss.

      I hope someone can help me.

      Cheers,

      Bas

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

        On 12/05/2015 at 07:39, xxxxxxxx wrote:

        Hello and welcome,

        the documentation does not contain the information on the proper IDs. To set the format settings you have to acess the RDATA_SAVEOPTIONS BaseContainer and add a new subcontainer with the details:

          
        rd = doc.GetActiveRenderData()  
        container = rd.GetData()  
          
        # OpenEXR  
        container[c4d.RDATA_FORMAT] = c4d.FILTER_EXR  
          
        saveOptions = container.GetContainerInstance(c4d.RDATA_SAVEOPTIONS)  
          
        # OpenEXR options  
        bc = c4d.BaseContainer()  
        bc[0] = 3 # ZIP  
        bc[1] = True # clamp to half float  
          
        # save OpenEXR options  
        saveOptions.SetContainer(0,bc)  
          
        # save render data  
        rd.SetData(container)  
          
        c4d.EventAdd()  
        

        best wishes,
        Sebastian

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

          On 12/05/2015 at 07:55, xxxxxxxx wrote:

          That is exactly the thing.
          Just started learning python, and like you said, I couldn't find the format settings in the documentation.

          Thanks a million!

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