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 get Multipass selected in Render Settings

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 335 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 20/03/2016 at 11:50, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   17 
      Platform:   Windows  ;   
      Language(s) :       PYTHON  ;

      ---------
      Hi, guys!
      How to get Multipass selected in Render Settings?
      i try this code, but it don't works. What's wrong?

      import c4d
        
      def main() :
          rd = doc.GetActiveRenderData()
          vp = rd.GetFirstMultipass()
          while vp:
              if vp.GetTypeName() == 'Object Buffer' and vp.GetBit(c4d.BIT_ACTIVE) :
                  print vp.GetName()
              vp = vp.GetNext()
        
      if __name__=='__main__':
          main()
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 20/03/2016 at 18:14, xxxxxxxx wrote:

        Have you simply checked to see if vp.GetBit(c4d.BIT_ACTIVE) works (without name checking)?
        If not, it is possible that this state is not set for MultipassObjects.

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

          On 21/03/2016 at 06:33, xxxxxxxx wrote:

          Hi,

          the bit you are looking for is actually BIT_VPDISABLED instead of BIT_ACTIVE. Also note the inverted logic of that bit (true means "not enabled").

          Hope you don't mind, I have moved the thread into the Python subforum.

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

            On 24/03/2016 at 15:25, xxxxxxxx wrote:

            Thanks, guys!

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