Jump to content

Python and VOP


borisb2

Recommended Posts

Hi,

 

.. doing some pipeline work at the moment.

 

I'm struggeling to connect the input of a created node to the global node. This all works fine:

VOPLength = VOPNode.createNode('length','length_' + rnodeUpName)
VOPFit = VOPNode.createNode('fit', 'fit_' + rnodeUpName)
VOPFit.setInput(0,VOPLength)

So far, so good. But this:

VOPLength.setInput(0,'global1',2)

doesnt work at all, no matter what I set there. I can't get my created nodes connected to the global node.

 

What would be the propper way for connecting in VOP? .. same I will need later for connecting to 'output1' I guess

 

Thanks

 

Link to comment
Share on other sites

sorted!

 

 

if anybody is interested:

# VOP SOP -------------------------------------------
# ---------------------------------------------------

VOPNode = rnodeUp.createNode('vopsop','vel_' + rnodeUpName)
VOPNode.setFirstInput(switchNode)
newPosX = pos[0] + 4.5
newPosY = pos[1] - 4
VOPNode.setPosition([newPosX,newPosY])

VOPGlobals = VOPNode.node('global1')

VOPLength = VOPNode.createNode('length','length_' + rnodeUpName)
VOPLength.setInput(0,VOPGlobals,2)

VOPFit = VOPNode.createNode('fit', 'fit_' + rnodeUpName)
VOPFit.setInput(0,VOPLength)

srcMin = VOPNode.createNode('parameter', 'velMin')
srcMin.parm('parmname').set('$OS')
srcMin.parm('parmlabel').set('$OS')
VOPFit.setInput(1,srcMin)

srcMax = VOPNode.createNode('parameter', 'velMax')
srcMax.parm('parmname').set('$OS')
srcMax.parm('parmlabel').set('$OS')
srcMax.parm('floatdef').set(10)
VOPFit.setInput(2,srcMax)

rampNode = VOPNode.createNode('rampparm', 'velRamp')
rampNode.parm('parmname').set('$OS')
rampNode.parm('parmlabel').set('$OS')
rampNode.setInput(0,VOPFit)

#VOPNode.parm('velRamp1cr').set(0)
#VOPNode.parm('velRamp1cg').set(.3)
#VOPNode.parm('velRamp1cb').set(1)

VOPOutput = VOPNode.node('output1')
VOPOutput.setInput(8,rampNode)

# ---------------------------------------------------
# ---------------------------------------------------
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...