expression in file path
5545 6 1- X_H_N
- Member
- 31 posts
- Joined: 8月 2015
- Offline
- tamte
- Member
- 8555 posts
- Joined: 7月 2007
- Offline
- Manuloti
- Member
- 26 posts
- Joined: 11月 2021
- Offline
Hello, I'd like to ask something along this same line. May you can help me out in this case too.
So my situation is the following:
I'm trying to feed a number of pre-made curves into a File node. In order to do so, I thought I could build a string array in an attribute (detail) wrangle, with the paths to the .ai files, and then extract each file path by feeding a chi to select each array item. So far so good.
What I've noticed is that File nodes don't store data. Is that correct? I connected the attrib wrangle and I couldn't see any attributes (I tested on other node in case was a coding mistake, but they worked fine). So... that's when I land in this same question of how to import data in the file path of a File node (Geometry File is the name).
I attach 2 snapshots. One with the mentioned nodes,a second one with the the array (I've only included one file path xD, just testing) and a last one with the error showed in the File node.
I tried adding the "`"
"to_feed" is the attribute wrangle
"ref_string" the attribute
"0" as... I'm retriving the the index = 0 of the array? That one I don't have it clear
Anyways, doesn't work : /
Is there a way to make it work? Can I retrieve a non-connected attribute into a File node geo path?
Alternatives?
Thanks in advance!
So my situation is the following:
I'm trying to feed a number of pre-made curves into a File node. In order to do so, I thought I could build a string array in an attribute (detail) wrangle, with the paths to the .ai files, and then extract each file path by feeding a chi to select each array item. So far so good.
What I've noticed is that File nodes don't store data. Is that correct? I connected the attrib wrangle and I couldn't see any attributes (I tested on other node in case was a coding mistake, but they worked fine). So... that's when I land in this same question of how to import data in the file path of a File node (Geometry File is the name).
I attach 2 snapshots. One with the mentioned nodes,a second one with the the array (I've only included one file path xD, just testing) and a last one with the error showed in the File node.
I tried adding the "`"
`detail("op:../to_feed", "ref_string", 0)`
"to_feed" is the attribute wrangle
"ref_string" the attribute
"0" as... I'm retriving the the index = 0 of the array? That one I don't have it clear
Anyways, doesn't work : /
Is there a way to make it work? Can I retrieve a non-connected attribute into a File node geo path?
Alternatives?
Thanks in advance!
- tamte
- Member
- 8555 posts
- Joined: 7月 2007
- Offline
for strings you have to use details() [www.sidefx.com] function as in the example or in the help
also no op:necessary as detail/details hscript functions are expecting path to sop node directly
so yours would be something like
also no op:necessary as detail/details hscript functions are expecting path to sop node directly
so yours would be something like
`details("../to_feed", "ref_string")`
Edited by tamte - 2022年3月30日 15:33:39
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Manuloti
- Member
- 26 posts
- Joined: 11月 2021
- Offline
Ohhh, so it was "details()" not "detail()" for string values. This should make me remember it : ).
About the "op:" call... I might have get an error (and read the doc in consequence) several times more in order to guess, more or less, when it's required.
Anyhow, problem fixed. I don't know if I can @tamte here, but I do it anyway in order to thank you.
Best.
About the "op:" call... I might have get an error (and read the doc in consequence) several times more in order to guess, more or less, when it's required.
Anyhow, problem fixed. I don't know if I can @tamte here, but I do it anyway in order to thank you.
Best.
- jsmack
- Member
- 7771 posts
- Joined: 9月 2011
- Offline
- tamte
- Member
- 8555 posts
- Joined: 7月 2007
- Offline
it may definitely be confusing as detail()/details() expression function and detail() VEX function are a little different
expression version expects operator path (or input index)
VEX version expects geometry as filepath on disk (or input index) so as jmack said that one needs op: hint to interpret it as operator path
so its very likely you were reading the docs for VEX version
expression version expects operator path (or input index)
VEX version expects geometry as filepath on disk (or input index) so as jmack said that one needs op: hint to interpret it as operator path
so its very likely you were reading the docs for VEX version
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links