Hi,

I am trying to set up a Tracker node in python reading the values from a
file. The code is very simple, I iterate over the lines of the file calling
the following:

*trackerNode = nuke.createNode('Tracker3)
trackerNode['enable1'].setValue(True)
trackerNode['use_for1'].setValue('all')
trackerNode['track1'].setAnimated(0, True)
trackerNode['track1'].setAnimated(1, True)
trackerNode['track1'].setValue(x_value, 0, frame_number)
trackerNode['track1'].setValue(y_value, 1, frame_number)
trackerNode['transform'].setValue(2) #this is to set the node to match-move*

I do the same for tracks 2, 3 and 4

I expected the node to work after this,  but I found out that the translate
x, y, rotate scale and center x, y boxes in the Transform tab of the
Tracker node's panel are all still gray,even though the transform mode has
been set to match-move successfully. If I change that value to any
other(None or stabilize,for example), then these boxes become deep blue and
the node behaves as expected. I assumed there is some calculation being
performed then, and only when the panel is visible, so I tried creating the
node now like this:

*trackerNode = nuke.createNode('Tracker3, inpanel=True)*

and in fact everything works fine now, except for the fact that it takes a
*long* time to run the script. I assume it's because whatever computation
nuke does on those fields I mentioned in the last paragraph, are now being
repeated for every single value I add to the tracker node as I read from
file.

So my  question is, how do I replicate in  python nuke's behaviour, that
is, to only calculate these boxes when all the values have already been
read from the file into the node, but without burdening the user with the
task of refreshing the transform box in  the Transform tab of the node,and
ideally, how do I make this work for both cases where I want the panel to
be visible or not upon node creation? And how would that behave in batch
mode(I know I should call de nuke.nodes.Tracker3() version in this case...)

Any help is much appreciated!
Fernando.
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to