setting font text WITHOUT copy stamp?
4300 5 0- aoakenfoArchiact
- Member
- 65 posts
- Joined: Feb. 2017
- Offline
I copy a font to a line of points. I'd like to set the font text to the corresponding point number. Is there a way to do this with VEX/python that doesn't involve a copy stamp? Or is this one of those times were copy stamp is really the only tool that can do the job?
Edited by aoakenfoArchiact - April 10, 2017 14:26:01
- jlait
- Staff
- 6242 posts
- Joined: July 2005
- Online
You could do this with Python, but I wouldn't recommend it. It is merely theoritically possible in VEX, I certainly would not recommend that.
However, that does not mean copy-stamp is the best answer. With 16 especially, we are encouraging a move away from Copy-Stamp to directly using attribute lookup. For example, if you run a For Each point SOP loop you can use the point() expression setup your font text.
Attached shows a few examples building this up. The final one compiles the foreach loop, letting the font sop be computed in a parallel across all your points.
However, that does not mean copy-stamp is the best answer. With 16 especially, we are encouraging a move away from Copy-Stamp to directly using attribute lookup. For example, if you run a For Each point SOP loop you can use the point() expression setup your font text.
Attached shows a few examples building this up. The final one compiles the foreach loop, letting the font sop be computed in a parallel across all your points.
- aoakenfoArchiact
- Member
- 65 posts
- Joined: Feb. 2017
- Offline
- aoakenfoArchiact
- Member
- 65 posts
- Joined: Feb. 2017
- Offline
- aoakenfo
- Member
- 28 posts
- Joined: Nov. 2015
- Offline
- jlait
- Staff
- 6242 posts
- Joined: July 2005
- Online
I tend to start with a Copy to Points, as shown in the attached. Then, when I realized I want to vary the copy on each point, I wrap the copy to points in a For Each loop. I set the loop to each point and remove the name attribute. I need a way to identify which point I'm working with. If it is particles, I already have ‘id’, but generic stuff like this I throw in an enumerate SOP to give me ids.
Now when I want to have an expression be “stamped” I just use the point() function to read the point “id” value. What is nice is I can also read any other attributes, I don't have to setup any atamping explicitly.
In this case I'd also not use a timeshift, but instead bake the time offset directly in the sin() expression in the transform. But that is more a stylistic thing…
Now when I want to have an expression be “stamped” I just use the point() function to read the point “id” value. What is nice is I can also read any other attributes, I don't have to setup any atamping explicitly.
In this case I'd also not use a timeshift, but instead bake the time offset directly in the sin() expression in the transform. But that is more a stylistic thing…
-
- Quick Links