Hi ! I found a workaround a while ago to update the viewer to the next frame. You want to use a *curveTool *node. In your python script before the loop create your node then execute it for frame "i" in your loop.
I don't have access to my scripts but you can refere to the Nuke python api. Don't forget to delete your CurveTool node at the end of your script. Cheers, Justin 2014-08-09 12:21 GMT+01:00 Wouter Gilsing <shufflec...@hotmail.com>: > Hi there, > > I'm kinda stuck with a script, and though I think its probably an easy > fix, I haven't found the solution yet. > > A very simplified version of what I want: > > - grab the 3d position of a selected vertex, > - print this value > - move to the next frame and repeat. > > The script I came up with : > > import nukescripts.snap3d > > for i in range (0,100): > nuke.frame(i) > > vertex = nukescripts.snap3d.getSelection() > for v in vertex: > vertexXpos = v.position[0] > > print vertexXpos > > > The problem is that, when executed in a loop, the vertexposition is > identical for every frame (it always uses the values of the first frame). > If I remove the forloop and just execute the script manually on every frame > it works as it should. > > My guess would be that I have to force the 3dviewer to refresh on every > frame so it updates the vertexpostion. Am I right, and if yes how can I > achieve this. > > Thanks! > > _______________________________________________ > 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 > >
_______________________________________________ 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