Hi, thanks everyone, especially Frank for your method! Then I'm not stupid, that couldn't find a way to set the character selection in python, that was what I was trying to do. BTW the global scale knob sounds really useful.
Thanks, Gabor On Thu, Apr 16, 2015 at 12:14 PM, Peter Crossley <cross...@thefoundry.co.uk> wrote: > Hi all, > > As Frank has worked out, this currently isn't possible (in a nice way), > due to the current character selection not being stored in a knob (so not > being accessible via python). There is a plan to address this in the > future, but for the time being Frank's workaround is the only way to do it. > > It's worth mentioning that we do have a new knob in our local builds that > allows you to scale the font size on a global level (so, the characters > will retain their relative scale, but you can make the whole thing x times > bigger). This is currently in QA and we hope to release it in a future > maintenance release. > > Hope that helps, > > Peter. > > > On 15/04/2015 20:09, Frank Rueter|OHUfx 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 <glt...@gmail.com> 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 listnuke-pyt...@support.thefoundry.co.uk, > 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 listnuke-pyt...@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