Worked perfectly! Thank you guys, as you said there should be an easier way.
2014-11-11 18:26 GMT-05:00 Carl Schröter <ad...@l-rac.de>: > This question came up a couple of times already. > (For example here: > http://forums.thefoundry.co.uk/phpBB2/viewtopic.php?t=9745). > > > > Short answer: there is no real clean solution for this at the moment. > > > > The common work-around method is to create a dummy curve-tool, execute it > on every frame to force a refresh and then do your stuff. > Afterwards do not forget to delete the curve-tool again. > > > > ########## > temp = nuke.nodes.CurveTool() > for frame in range(1100,1150): > nuke.execute(temp, frame, frame) > nuke.frame(frame) > > print #your code here > > > nuke.delete(temp) > ########## > > Ben Dickson is definitely right in saying, that having a > nuke.frame(framenum, refresh=True) or nuke.refresh() would be the best > solution for this. I totally agree. > > Ask the support team about this, so the feature-request gets a +1 and > maybe ends up in a future release of nuke. > > > > Cheers, > Carl > > > > *Von:* nuke-python-boun...@support.thefoundry.co.uk [mailto: > nuke-python-boun...@support.thefoundry.co.uk] *Im Auftrag von *José Alejandro > Enríquez > *Gesendet:* Mittwoch, 12. November 2014 00:00 > *An:* Nuke Python discussion > *Betreff:* [Nuke-python] Get node data every frame and add it to a list > > > > Hi, I'm new with python for nuke and relative new in python, I want to get > information every frame from a tracking node. The translate knob. > > This is my code: > > trans = [ ] > > > > range = nuke.FrameRange(nuke.root().firstFrame(), nuke.root().lastFrame(), > 1) > > > > for i in range: > > global trans > > nuke.Root().setFrame(i) > > print i > > curframe = nuke.frame() > > > > b = nuke.selectedNode()["translate"].value() > > trans.append(b) > > > > > > print trans > > > > But I keep getting the information of the first frame every iteration and > not the information of the current frame. > > > > Any idea? 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