Hi guys,
Im relativly new to expressions in houdini, i come from a maya and mel script background so im not to sure how this works.
Basically im wanting to generate a custom path from some group names.
I have entered this expression into an attributeCreate string. Im really not sure if this is the correct way of writing expressions in houdini. I cant find much in the way of tutorials or examples based on string based expressions.
When i check the geometry spreadSheet it basically outputs the expression and not a result is that normal?
string paths =$ASSETS/locationDressing/level/texture/source
string groupNames =chs(\“../each1/group\”)
groupNames = `strreplace (groupNames, “sgGrp”, “”)`
string compiledPath = paths+groupNames+“_d.rat”
return compiledPath
any help with this would be great, its my first time trying todo this sort of expression.
Thanks
Nick
expression issue
4528 7 1-
- niko3d
- Member
- 338 posts
- Joined: Sept. 2006
- Offline
-
- wolfwood
- Member
- 4270 posts
- Joined: July 2005
- Offline
niko3d
string paths =$ASSETS/locationDressing/level/texture/source
string groupNames =chs(\“../each1/group\”)
groupNames = `strreplace (groupNames, “sgGrp”, “”)`
string compiledPath = paths+groupNames+“_d.rat”
return compiledPath
Try….
`{
string paths =“$ASSETS/locationDressing/level/texture/source”;
string groupNames =chs(\“../each1/group\”);
groupNames = strreplace (groupNames, “sgGrp”, “”);
string compiledPath = paths+groupNames+“_d.rat”;
return compiledPath;
}`
if(coffees<2,round(float),float)
-
- niko3d
- Member
- 338 posts
- Joined: Sept. 2006
- Offline
-
- niko3d
- Member
- 338 posts
- Joined: Sept. 2006
- Offline
-
- niko3d
- Member
- 338 posts
- Joined: Sept. 2006
- Offline
-
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
-
- wolfwood
- Member
- 4270 posts
- Joined: July 2005
- Offline
Hahha… Yea you don't need those \'s. I didn't even see em.
I think this would work too…
$ASSETS/locationDressing/level/texture/source/`strreplace(chs(“../each1/group”),“sgGrp”, “”)`_d.rat
or
`“$ASSETS/locationDressing/level/texture/source/”+strreplace(chs(“../each1/group”),“sgGrp”, “”)+“_d.rat”`
I think this would work too…
$ASSETS/locationDressing/level/texture/source/`strreplace(chs(“../each1/group”),“sgGrp”, “”)`_d.rat
or
`“$ASSETS/locationDressing/level/texture/source/”+strreplace(chs(“../each1/group”),“sgGrp”, “”)+“_d.rat”`
if(coffees<2,round(float),float)
-
- niko3d
- Member
- 338 posts
- Joined: Sept. 2006
- Offline
Thanks guys :¬) $ASSETS/locationDressing/level/texture/source/`strreplace(chs(“../each1/group”),“sgGrp”, “”)`_d.rat
this one works great
i thought it was calculating the channel reference properly as my groups didnt appear. But as soon as i jumped out of the for each node it worked fine Nice one guys :¬)
A weird one this..
string groupNames =chs(\“../each1/group\”) i never added those slashes manually. they appeared when i copied and pasted them?? lol :¬D
Cheers
Nick
this one works great
![](/static/djangobb_forum/img/smilies/smile.png)
A weird one this..
string groupNames =chs(\“../each1/group\”) i never added those slashes manually. they appeared when i copied and pasted them?? lol :¬D
Cheers
Nick
-
- Quick Links