Jump to content

Can't get vs.TrueTypeToPoly(text) to work

Recommended Posts

Hi all,


Coding question for those who write their own nodes. Every time I try to run a node with the (a,b) = vs.TrueTypeToPoly(text) the program crashes - has anyone run into this/has any suggestions? I've attached a simple sample node that creates text and then uses the above command to turn it into poly lines. It doesn't crash if I don't try to assign the output to the tuple (a,b), but also doesn't convert the text.





text test.vwx

Link to comment

TrueTypeToPoly take a handle pointing to the text name a block of text as a parameter.


This seems to run:


(a,b) = vs.TrueTypeToPoly(vs.FSActLayer())


This creates a group containing the polygonized text. You probably need a vs.Redraw or RedrawAll to get the display right.


Be careful about passing a nil handle. When I did it crashed VW to the finder.



Link to comment

Aha, didn't know there were different ways to grab the handle for the created text. The node would run once but crash on the second time for some reason with

(a,b) = vs.TrueTypeToPoly(vs.FSActLayer()). Did some playing, this combination seems to be the winner:


text = vs.CreateText('hello')   

(a,b) = vs.TrueTypeToPoly(vs.LNewObj() )

self.Params.out.value = b







Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...