Out of curiosity, has anyone been able to set a callback (say, onCreate) to set a 'font' default on the new Text node? While we could set it by running the code by hand, we can't get that to work through a callback.
On Wed, Apr 15, 2015 at 12:09 PM, Frank Rueter|OHUfx <[email protected]> wrote: > not very elegant but works: > > n = nuke.selectedNode() > > n['message'].setValue('test') > > k = n['font_size_values'] > > k.fromScript('{0 100 1 50 2 30 3 20}') > > > Where the assigned value in the last line is a tcl list of index and > size pairs. > I hope this is not the prescribed way of doing this though cause you'd > have to do somethign like this to change the entire message's size: > > constantSize = 100 > > indexValuePairs = ["{0} {1}".format(i, constantSize) for i in > xrange(len(n['message'].value()))] > > k.fromScript("{" + ' '.join(indexValuePairs) + "}") > > > yuk > > > On 15/04/15 10:31 am, Gabor L. Toth wrote: > > Hi, I can't figure this out, any thoughts on this? I'm sure the letters > need to be selected to change the size of the whole text... > > Thanks, > Gabor > > > On Tue, Apr 14, 2015 at 7:24 PM, Gabor L. Toth <[email protected]> wrote: > >> Hi, may be an easy one, but can you tell me how to set the text2 node >> text size in python? And how to set the selection (letters) of the text? >> >> Thanks, >> Gabor >> >> > > > > _______________________________________________ > Nuke-python mailing [email protected], > http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > > -- > > Vfx Supervisor | Lumen > o: 747-200-2063 > c: 818-433-9056 > > > [image: ohufxLogo 50x50] <http://www.ohufx.com> > > *vfx for storytellers <http://www.ohufx.com> * > > *vfx compositing <http://ohufx.com/index.php/vfx-compositing> | workflow > customisation & consulting <http://ohufx.com/index.php/vfx-customising> * > > _______________________________________________ > Nuke-python mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > -- "Attention, attention. Here and now, boys," the mynah repeated. "Here and now, boys."
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
