Author Topic: How to use "createIterationOnNode"?  (Read 236 times)

Hi,

I'm trying to use the "graph.createIterationOnNode()" command, with the argument "aCompNodeUIDs_NextPatternInput". However I can't seem to get it to work correctly, and the documentation/samples are pretty vague regarding this, as it magically puts in mUID's out of nowhere.

Current code snippet:
Code: [Select]
inputNode = mygraph2.createInputNode(aIdentifier='Input', aColorMode=sbsenum.ColorModeEnum.GRAYSCALE)
instanceNode = mygraph2.createCompInstanceNode(aSBSDocument=sbsDoc, aGraph=mygraph1)
blendNode = mygraph2.createCompFilterNode(aFilter=sbsenum.FilterEnum.BLEND, aParameters={sbsenum.CompNodeParamEnum.BLENDING_MODE: sbsenum.BlendBlendingModeEnum.SWITCH, sbsenum.CompNodeParamEnum.OPACITY: 0.67})

mygraph2.connectNodes(aLeftNode=inputNode, aRightNode=instanceNode)
mygraph2.connectNodes(aLeftNode=inputNode, aRightNode=blendNode, aRightNodeInput=sbsenum.InputEnum.DESTINATION)
mygraph2.connectNodes(aLeftNode=instanceNode, aRightNode=blendNode, aRightNodeInput=sbsenum.InputEnum.SOURCE)

createdNodes = mygraph2.createIterationOnPattern(aNbIteration=4, aNodeUIDs=[blendNode, instanceNode], aNodeUIDs_NextPattern=[blendNode, instanceNode])

outPutNode = mygraph2.createOutputNode(aIdentifier='Output')

What I want to get:
https://imgur.com/a/ftDDndn

Anyone has an idea how to use the "graph.createIterationOnNode()" function?
Thanks!