def conversion():
#setCamera Parameters
st = nuke.nodes.NoOp(name='LE RULERo')
IS = nuke.Int_Knob("yResult", "RESULT_PIXEL")
CV1 = nuke.XY_Knob("right_pos", "RIGHTPOS")
CV2 = nuke.XY_Knob("left_pos", "LEFTPOS")
st.addKnob(IS)
st.addKnob(CV1)
st.addKnob(CV2)
CV1.setValue(1132, 0)
CV1.setValue(546, 1)
CV2.setValue(1356, 0)
CV2.setValue(546, 1)
IS.setExpression("[value right_pos.1] - [value left_pos.1]")
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
not sure what exactly you're trying to do, but this gives the Y
difference between the two points. note that the integerKnob
will round the result to the nearest integer, so you might want
to change that if you need more accuracy. also note that you
don't need to import the math module.
- [Nuke-users] XY_KNOBS (sorry for being persistent) Matias Volonte
- Re: [Nuke-users] XY_KNOBS (sorry for being persistent) chris
