Hi!
I have a bunch of points and I would like a copy-to-point to place a number on each point (@ptnum) with the font Sop. I'm tring to find a way to convert my @ptnum to a string that I would place in a detail attribute and later pick that from info in a Font sop.
Any tips on doing this?
-Olivier
vex: int to string? (for Font sop)
12590 3 2- olivierth
- Member
- 1075 posts
- Joined: April 2017
- Offline
- N-G
- Member
- 209 posts
- Joined: March 2018
- Offline
- malbrecht
- Member
- 806 posts
- Joined: Oct. 2016
- Offline
Hi, Olivier,
you can convert an integer to a string using the “standard” itoa function (https://www.sidefx.com/docs/houdini/vex/functions/itoa.html) - you can set the detail attribute using setdetailattrib:
Note that this only makes sense if you have a single point per geometry … the detail-attribute name here is “point-id”.
I hope this helps,
Marc
you can convert an integer to a string using the “standard” itoa function (https://www.sidefx.com/docs/houdini/vex/functions/itoa.html) - you can set the detail attribute using setdetailattrib:
setdetailattrib(0, "point-id", itoa(@ptnum), "set");
Note that this only makes sense if you have a single point per geometry … the detail-attribute name here is “point-id”.
I hope this helps,
Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
- olivierth
- Member
- 1075 posts
- Joined: April 2017
- Offline
-
- Quick Links