Feedback

What's your question?

By: [ Editor ] Asked

How to evaluate and print the value of an attribute that changes over time?

Greetings everyone and thanks ins advance

Well I am new to Nuke and recently a I did my first script, and something strange happens(at least for me). I use a for to print all the scale values of one transform node. My script is:

t=nuke.selectedNode()

for i in range(100):

    scale=t['scale'].value()
    print scale
    nuke.activeViewer().frameControl(4)

or

for i in range(100):

    nuke.frame(i)
    scale=t['scale'].value()
    print scale

The big problem is that it prints the same value 100 times, but I created 100 different key frames. so I really do not know what is going on.

Add comment viewed 138 times Latest activity 11 months ago

NN comments
vfxoverflow_317
-

Thank you michal I did not notice the typo, but Still it does not solve the problem :(, I got the same value over and over again

or Cancel

2 answers

  • 0

badger

The problem is the frame is not updating thus returning the same value. Try something like this:

for i in range(1001,1017):
    p = nuke.selectedNode()['scale'].getValueAt(i)
    print p 
or Cancel