Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def add_channel(tagname, tagchannel):
- buffer = c4d.BaseList2D(c4d.Zmultipass)
- buffer.GetDataInstance()[c4d.MULTIPASSOBJECT_TYPE] = c4d.MULTIPASSOBJECT_OBJECTBUFFER
- # check nach vorhandenen MPs
- rd = doc.GetActiveRenderData()
- vp = rd.GetFirstMultipass()
- exist_buffer = 0
- while vp:
- if vp.GetTypeName() == "Object Buffer":
- if vp[c4d.MULTIPASSOBJECT_OBJECTBUFFER] == tagchannel:
- print "channel "+ str(tagchannel) + " vorhanden"
- exist_buffer = 1
- vp = vp.GetNext()
- if exist_buffer == 0:
- buffer.SetName ( tagname )
- buffer[c4d.MULTIPASSOBJECT_OBJECTBUFFER] = tagchannel
- rd.InsertMultipass (buffer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement