Hi guys,
I couldn’t find a Toxik/Composite forum on the site so I’, posting it here in the pad instead because I know that a lot of people are reading it. Basically I got a python scripting problem in Toxik/Composite (the compositor that ships as a free bundle together with Autodesk Maya nowadays). OK, so here goes:
I’m writing a script exporter for Toxik/Composite 2011 and have come quite far already. The biggest problem I got now is that I can’t find the node user settings/parameters via python. Basically I’m trying this (some cut&pasted sections from my script below):
Code:
comp = ui.Workspace.getCurrentComposition()
for srcNode in comp.getToolNodes():
toolName = srcNode.getTool().getName()
nodeIDName = str(srcNode.getId())
nodeIDName = nodeIDName.replace("-", "_")
valueList = srcNode.getValues()
for x in range(len(valueList)):
print "Node: %s (%s), Parameter: %s = %s" % (toolName, nodeIDName, valueList[x].getName(), str(valueList[x].getValue()))
This code prints this output for a "Rewire" node in a script:
Node: Rewire (1991), Parameter: Affect = 1
Node: Rewire (1991), Parameter: Mute = False
Node: Rewire (1991), Parameter: svPos x = -74.4756011963
Node: Rewire (1991), Parameter: svPos y = 0.236625671387
Node: Rewire (1991), Parameter: svImage format-0 = 4
This does indeed give me the nodes I’m interested in and also some parameters (like the x and y coordinates in the DAG), but NOT the actual user parameters for the node that I’m mostly interested in. I want to get the user parameters "Red", "Green", "Blue" and "Alpha" so I know what the node is actually doing to the image when it’s rewiring/shuffling around/reordering the channels in the stream. I hope that this is a clear example and description of my problem.
I’ve been searching loads on the net, digging in the help and examples but can’t seem to find anything about this which surprises me a lot. I though that setting and getting the user parameters would be one of the easiest things. I must be missing something obvious here…?
I would appreciate any help I could get!
Cheers,
David
PS. Either reply here or mail me directly at david.wahlberg "at" ilpvfx.com