Jump to content
Sign in to follow this  
saca

set expression by orderMenu value

Recommended Posts

Posted (edited)

hi,

the orderManu "Type" has "Asset" and "Sequence" and so on.
and I want to set "directory path" from elements.
but each "Type" bring different expression directory path from some elements.

example,in python
-------
if `chi("Type")` == 0:
    theFilePath = `chs("BaseDir")`/`chs("AssetName")`/`chs("fileName")`;
elif `chi("Type")` == 1:
    theFilePath = `chs("BaseDir")`/`chs("SceneName")`/`chs("CutName")`/`chs("fileName")`;
else:

-------
this expression error occursion.

how to set expression in this case?

 

thanks

DirctoryMaker_v001.001.hip

selector.png

Edited by saca

Share this post


Link to post
Share on other sites

hi,

this problem was fixed with this expression bellow.

in Python (theFilePath)

---

if (`ch("Type")`) == "0":
  return (ch("BaseDir")+"/"+ch("AssetName")+"/"+ch("fileName"))
elif (`ch("Type")`) == "1":
  return (ch("BaseDir")+"/"+ch("SceneName")+"/"+ch("CutName")+"/"+ch("fileName"))
else:
  return (ch("BaseDir"))

---

DirctoryMaker_v001.002.hip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×