How to retrieve pass object channel ID [SOLVED]
-
On 12/01/2016 at 12:17, xxxxxxxx wrote:
Hi
I have multiple object channel passes.
How do I get the group ID that you can set for the pass in render settings? -
On 13/01/2016 at 01:31, xxxxxxxx wrote:
Hello,
what exactly do you mean? Do you want to access the Group ID of the Render Buffer objects in the render settings? This can be done by accessing the render settings (GetActiveRenderData()) and then the multipass objects (GetFirstMultipass()) :
renderData = doc.GetActiveRenderData() mp = renderData.GetFirstMultipass() while mp is not None: passType = mp[c4d.MULTIPASSOBJECT_TYPE] if passType == c4d.VPBUFFER_OBJECTBUFFER: bufferID = mp[c4d.MULTIPASSOBJECT_OBJECTBUFFER] print("Buffer ID: "+str(bufferID)) mp = mp.GetNext()
best wishes,
Sebastian -
On 13/01/2016 at 08:48, xxxxxxxx wrote:
Yes, mp[c4d.MULTIPASSOBJECT_OBJECTBUFFER] is what i was searching for.
While we are at the pass topic, the whole reason for these questions is to get the output name for a pass.Is there a way to get the pass name as it is written to disk?
The value of the render token $pass?Or do I have to manually create a list like:
if type=VPBUFFER_RGBA:
name= "rgb"
elif type=VPBUFFER_SHADOW
name = "shadow" -
On 14/01/2016 at 04:12, xxxxxxxx wrote:
Hello,
these strings are only handled internally in the core and it is not possible to directly obtain them. But you could simply read the name of the multipass object with GetName():
renderData = doc.GetActiveRenderData() mp = renderData.GetFirstMultipass() while mp is not None: print(mp.GetName()) mp = mp.GetNext()
best wishes,
Sebastian -
On 14/01/2016 at 05:06, xxxxxxxx wrote:
Hi
Ok, then I have to use the workaround with the if type=.
mp.GetName() returns the display name ($userpass) and not the internal name that is written to disk ($pass).
thanks