Hello,
In this thread [www.sidefx.com], I learned how to remove the end characters of a string using VEX.
How would I go about deleting the beginning characters of a string?
I have a KineFX rig in my scene and, as an example, I want to rename the name attribute of my joints from this:
ManSkeleton_Complete:Joint_1
ManSkeleton_Complete:Joint_2
ManSkeleton_Complete:Joint_3
to this:
Joint_1
Joint_2
Joint_3
Any help would be appreciated.
Thanks!
Deleting the beginning characters of a string
6206 3 1-
- Nico_M
- Member
- 3 posts
- Joined: Feb. 2017
- Offline
-
- goldfarb
- Staff
- 3459 posts
- Joined: July 2005
- Offline
you could try split()
https://www.sidefx.com/docs/houdini/vex/functions/split.html [www.sidefx.com]
and use the string ":" as the separator
https://www.sidefx.com/docs/houdini/vex/functions/split.html [www.sidefx.com]
and use the string ":" as the separator
-
- simt
- Member
- 2 posts
- Joined: Aug. 2019
- Offline
goldfarb
you could try split()
https://www.sidefx.com/docs/houdini/vex/functions/split.html [www.sidefx.com]
and use the string ":" as the separator
Hey thanks Mike, that worked great. I have exactly the same issue as Nico. The characters are coming from Maya with a namespace at the front of every joint. I need to remove that namespace so the constraints and hand controls work.
This is the code in an attribWrangle that worked for me (got the idea for the code from: https://vimeo.com/193825912):
string parts[] = split(s@name, ":"); s@name = parts[-1];
Now the problem is that I can't get all my edited animation back onto the character using the bone deform. Removing the namespace is creating a difference somewhere that stops the animation... If I figure it out, I'll post here.
Edited by simt - Feb. 24, 2022 06:36:37
-
- edward
- Member
- 7855 posts
- Joined: July 2005
- Offline
-
- Quick Links