Create text from Attribute.?

   4560   5   0
User Avatar
Member
21 posts
Joined: July 2019
Offline
Hi all,

I'm trying to create text from a string in an attribute I have created, I can't see any code functionality on the Font node. Any ideas how one might create this?

Thanks
User Avatar
Member
1736 posts
Joined: May 2006
Offline
you'll need to use hscript with backticks. I have an example here:

http://www.tokeru.com/cgwiki/index.php?title=ForLoops#Loop_over_names [www.tokeru.com]
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
1736 posts
Joined: May 2006
Offline
Had to go remind myself how to do it, been a while.

Eg, you've setup a @name attribute in a pointwrangle, and what to get what @name is on point 0:

`points('../pointwrangle1',0,'name')`
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
21 posts
Joined: July 2019
Offline
Yup figured it out, was a tricky (but obvious) one as font node has no input or vex functionality.!

Cheers Matt
User Avatar
Member
21 posts
Joined: July 2019
Offline
Actually no, I've got detail attributes created in Python, I can return a float or integer value with the Font SOP but I can't return a String.. It just prints the number 0..

Any ideas?
Edited by Visco - Nov. 13, 2019 09:44:20

Attachments:
floatYesStringNo.png (146.0 KB)

User Avatar
Member
21 posts
Joined: July 2019
Offline
Got it, I found you should be using DETAILS not DETAIL.
  • Quick Links