maybe, I did not test it at all, so really, maybe...
the fromScript() method could be more usefull than using a setExpression()
toScript() and fromScrit should have consistent string formating behaviours
/ needs
and you should'nt have too much things to do to your string expression to
send it back
to the knob as an expression, without the offending ".left" bit.

cheers.





--
Aurélyen DAUDET - Enseignant Nuke et Compositing
adau...@artfx.fr    -     www.artfx.fr     -     blog.artfx.fr



On 4 June 2015 at 11:43, Howard Jones <mrhowardjo...@yahoo.com> wrote:

> Perfect thanks.
>
> Now  I need to figure out how to get to the ‘tracks’ part of a tracker :0
>
> H
>
>
>
> On 4 Jun 2015, at 10:31, Aurélyen Daudet <adau...@artfx.fr> wrote:
>
> Hi,
>
> I think that you can use the toScript() method to get the expression as a
> string
> t = nuke.toNode("TR_Node")
> print t['translate'].toScript()
> >> {"(!invert) ? Tracker1.translate.x : -Tracker1.translate.x"}
> {"(!invert) ? Tracker1.translate.y : -Tracker1.translate.y"}
>
> hope that helps.
>
>
>
>
>
> --
> Aurélyen DAUDET - Enseignant Nuke et Compositing
> adau...@artfx.fr    -     www.artfx.fr     -     blog.artfx.fr
>
>
>
> On 4 June 2015 at 11:23, Howard Jones <mrhowardjo...@yahoo.com> wrote:
>
>> Hi
>>
>> I’m trying to fix a bug in nuke where any cornerpins and trackers created
>> by planarTracker in a stereo project are broken.
>> the fix is to go through and manually remove the ‘.left’ bit in the
>> expressions.
>>
>> So I was hoping to be able pythonically grab the expression, remove the
>> offending bit and the setExpression() it back.
>>
>> But I can’t find a way to get the original expression, ony the value of
>> the result. ie  an getExpression() equivalent.
>>
>>
>> *Howard **Jones*
>> Visual Effects Supervisor
>> m: 07973 265624 | e: how...@axis-vfx.com | w: www.axis-vfx.com
>>
>>
>> _______________________________________________
>> 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

Reply via email to