While looking for the solution,I found out there is function in the knob class 
"fromScript()".
If one is able to input right script to the function it may do the trick for 
old Paint node.After quite trial and error,i figured format for Paint node.The 
knob for paint node is "srcgrid".

n = nuke.createNode('Paint')
n ['srcgrid'].fromScript(your script)

The format for script is something like this.

3 0 0 0
{ 1 noOfStrokes 0 0
 { 1 noOfShapeKeys noAttKeys 0 0
  { 1 noOfPoints 0 
   posX posY pressure leftTangentX leftTangentY rightTangentX rightTangentY 0
  }
  {view color opacity brushSize brushHardness pressureAlters  0 source compMode 
offsetU offsetV opacitytHide}
  shapeKeyframeNo{1 noOfPoints 0
  posX posY pressure leftTangentX leftTangentY rightTangentX rightTangentY 0
  }
  AttributekeyFrameNo{view colorR colorG colorB colorA opacity brushSize 
brushHardness pressureAlters  0 source compMode offsetU offsetV opacitytHide}
 }
                ....more strokes....
}


where ever there is number thats the numbers,which i can't figure out what it 
stands for.If u can figure out what they stand for then it will be complete.



_______________________________________________
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