Declared Path variables

   3083   4   0
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
After scanning the various threads on this subject and not finding an answer I am having to start a new thread.

Is there a good way of creating an a string variable that a user can alter on the fly. I am using a attribute create SOP to overide my texture map on my sprites . Of course this is a string which is a path to a sequences of textures.
I have not been able to channel ref the paths in my attribute create string path as they are not declared variables.
The only way I have got it to work is to create the variable in the aliases and vars window or hard code the full path into the attribute create SOP. Of course this is not ideal as I would like the user to define what textures he needs from a collection. So is there a more user friendly work flow I can use to create path variables.


r
Gone fishing
User Avatar
Member
7720 posts
Joined: July 2005
Online
I don't understand. Can't you just have a string parm that the user puts in their directory and then use chs() to reference it? What does this have to do with variables at all?
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
I hope this image helps , This shows the string to a sequence of textures. if I channel reference into this string I get the error “ undeclared variable ” stringpathfull.


ie `chs(“../../ControlSpriteCrowdPoints/stringpathfull”)`

if I create the variable $STRINGFULLPATH , giving the path to my textures from within the aliases and variables window , I can then enter $STRINGPATHFULL/sprites_crowd_mid_front_256_v001.`padzero(4, wrap( $F + (rand($ID)*2597),1,2597 ))`.tif as my attribute string . This works in the attribute without errors.
So as you can see I am looking for a more user friendly way where an operator can enter a path to a set of textures , without the whole need to start creating variables.

Attachments:
attributeCreate.jpeg (37.7 KB)

Gone fishing
User Avatar
Member
7720 posts
Joined: July 2005
Online
So why can't you use (all on one line)

`chs(“../../ControlSpriteCrowdPoints/stringpathfull”)`/sprites_crowd_mid_front_256_v001.`padzero(4, wrap( $F + (rand($ID)*2597),1,2597 ))`.tif
User Avatar
Member
941 posts
Joined: July 2005
Offline
Could it just be a typo?

$STRINGFULLPATH != $STRINGPATHFULL

?
Mario Marengo
Senior Developer at Folks VFX [folksvfx.com] in Toronto, Canada.
  • Quick Links