Accessing Multipass layers

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 21/02/2012 at 17:49, xxxxxxxx wrote:

Hey Guys(and gals?)! ran into a bit of a problem with the new script I'm working on. I'm sure the solution is simple, but I cant seem to find where the multipass render's layers are stored at(in the docs active renderdata as a c4d.BaseContainer... right?).

I found the command [RenderData.GetFirstMultipass()](file:///C:/Users/AVDesign/Downloads/C4DR13051PYTHONSDKHTML05012012/modules/c4d.documents/RenderData/index.html#RenderData.GetFirstMultipass)  which seems to work fine for retrieving whatever the very first render pass is, but how exactly can a create a list of all my render passes if i only have a command to get the first one?

I also tried getting the base container of the Active RenderData in my document, and explored which container houses the multipass layers, but it doesn't seem that there is one... am i missing something here?

here is an example of my code:

rd = doc.GetActiveRenderData()

multiPass = rd.GetFirstMultipass              #this works! but i need to get other passes... 
           
           for i,o in rd.GetData() :
               if isinstance(o,c4d.BaseContainer) : #find all BaseContainers...
                   print "container found!"               #print container found! 
                   print i,o                                         #print whats inside! 
                   print o.GetData(i)                           #get any further data for my own checking
  #none of this yields the multipass renders...

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 21/02/2012 at 18:27, xxxxxxxx wrote:

Figured it out. i hate when i do this.. sorry guys.

rd = docs.GetActiveDocument().GetActiveRenderData()               
   MP = rd.GetFirstMultipass()
   RP = RenderPasses = []
   RP.append(MP)
   
   print MP
   while MP.GetNext() and MP.GetNext() not in RP:
       MP = MP.GetNext()
       RP.append(MP)
   
   print RP