I have this script where I will get different behaviours at random times. 
executing the same exact script at different times

for example. I am setting the time to frame 1 then setting key frames 
some times it will do it in this order but most times it will execute the 
command and key frames and then change time.

the problem only occurs when the k.execute() command is executed.. this has to 
be some sort of bug.  please help 


See code:

startFrame = 1
endFrame = 5

nuke.frame(startFrame)
variable1 = nuke.toNode( 'LensDistortion1' )
variable1_attribute = variable1["distortion1"]
variable1_attribute.setAnimated()
variable1_attribute.setValueAt(0, startFrame)

n=nuke.toNode("LensDistortion1")
k=n.knob("analyzeGrid")
k.execute()

nuke.frame(startFrame)





example script:

set cut_paste_input [stack 0]
version 6.3 v8
CheckerBoard2 {
 inputs 0
 color0 {0 0 0 1}
 color2 {0 0 0 1}
 name CheckerBoard1
 selected true
 xpos -227
 ypos 56
}
LensDistortion1_0 {
 serializeKnob ""
 serialiseKnob "22 serialization::archive 4 0 0 0 0 0 0 0 0 0 0 0 0"
 distortion1 {0.01000109036}
 distortion2 -0.2
 distortionCenter {0.0006240643561 0.0003534502757}
 invertDistortion true
 "Card Parameters" 1
 cardScale {1.234550714 1.234550714 1}
 a -0.3745822608
 b -0.01785149612
 c 0.002239251742
 name LensDistortion1
 selected true
 xpos -227
 ypos 165
}
push $cut_paste_input
Group {
 name test
 selected true
 xpos -131
 ypos 167
 lock_connections {{curve x1 0 x100 0}}
 addUserKnob {20 User}
 addUserKnob {22 analyzeButton T "startFrame = 1\nendFrame = 
5\n\nnuke.frame(startFrame)\nvariable1 = nuke.toNode( 'LensDistortion1' 
)\nvariable1_attribute = 
variable1\[\"distortion1\"]\nvariable1_attribute.setAnimated()\nvariable1_attribute.setValueAt(0,
 startFrame)\nvariable2 = nuke.toNode( 'LensDistortion1' )\nvariable2_attribute 
= 
variable2\[\"distortion2\"]\nvariable2_attribute.setAnimated()\nvariable2_attribute.setValueAt(0,
 startFrame)\nvariable3 = nuke.toNode( 'LensDistortion1' )\nvariable3_attribute 
= 
variable3\[\"distortionCenter\"]\nvariable3_attribute.setAnimated()\nvariable3_attribute.setValueAt(0,
 startFrame, 0)\nvariable3_attribute.setValueAt(0, startFrame, 
1)\n\nn=nuke.toNode(\"LensDistortion1\")\nk=n.knob(\"analyzeGrid\")\nk.execute()\nnuke.frame(startFrame)"
 +STARTLINE}
}
 Input {
  inputs 0
  name Input1
  xpos 0
 }
 Output {
  name Output1
  xpos 0
  ypos 300
 }
end_group

Thanks a lot!



_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to