Hi, I'm using TOP to batch process some animations.
I'm using File Pattern with Recursive turned on to get all the animations in source folder, and I also want the output to be separated by subfolders.
So I'm trying to use split(@directory, "/") in the ROP_AnimationOutput node. However an error comes with "unable to evaluate expression".
What did I miss/mistake here?
How to split @directory in VEXpressions
1877 6 1- scareley
- Member
- 5 posts
- Joined: 2月 2022
- Offline
- tamte
- Member
- 8766 posts
- Joined: 7月 2007
- Offline
- scareley
- Member
- 5 posts
- Joined: 2月 2022
- Offline
- tamte
- Member
- 8766 posts
- Joined: 7月 2007
- Offline
you can use this for example
however it may be easier to generate PDG attributes in TOPs with subdir names you need and they use simple @subdirname references in your path
you can use Attribute From String TOP for that to either split your @directory attribute into string array attribute by delimiter
or split into separate named attributes based on pattern
`pythonexprs("pdg.workItem().attribValue('directory').split('/')[-1]")`
however it may be easier to generate PDG attributes in TOPs with subdir names you need and they use simple @subdirname references in your path
you can use Attribute From String TOP for that to either split your @directory attribute into string array attribute by delimiter
or split into separate named attributes based on pattern
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- scareley
- Member
- 5 posts
- Joined: 2月 2022
- Offline
Appreciate it!
Attribute From String [www.sidefx.com] definitely solves the problem.
For those who is also struggling with this:
In my case I simply used
But yeah for a more complex fold structure, even with various subfolder depth, we will need regex to get what we want
Attribute From String [www.sidefx.com] definitely solves the problem.
For those who is also struggling with this:
In my case I simply used
{}:/{}/{}/{}/{}/{subfolder}
in Simple Pattern.But yeah for a more complex fold structure, even with various subfolder depth, we will need regex to get what we want
- tamte
- Member
- 8766 posts
- Joined: 7月 2007
- Offline
- scareley
- Member
- 5 posts
- Joined: 2月 2022
- Offline
-
- Quick Links