Nathan! Thank you, I tried and worked correctly ( keys.append(k.getValueAt(f)) ), It did my life easier!, sorry for the late response, I was out of town these days.
2014-11-11 20:48 GMT-05:00 Nathan Rusch <nathan_ru...@hotmail.com>: > I don't know if you missed the earlier emails, but I just want to > reiterate that this is NOT a case where the CurveTool hack needs to be used. > > -Nathan > > > *From:* José Alejandro Enríquez <zaban...@gmail.com> > *Sent:* Tuesday, November 11, 2014 5:36 PM > *To:* Nuke Python discussion <nuke-python@support.thefoundry.co.uk> > *Subject:* Re: [Nuke-python] Get node data every frame and add it to a > list > > 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 > > > _______________________________________________ > 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