Jump to content

Expanding Environment Variables?


Recommended Posts

Hey Edward,

On this topic:

Do you know if there is a method in the HDK to evaluate parameters to a certain depth?

Why? Often we make HDAs with, say, a File SOP or a ROP which refer to/channel-reference parameters on exposed by the HDA - which'd often contain $F4's and such - and what happens is that we'd like to follow the channel reference but not expand the $F4 in the destination string.

i.e.,

ropnet1/mantra1/picture: `chs("../../mypicture")`

mypicture : "/mydir/myfile.$F4.pic"

Performing a chsraw returns the string "`chs("../../mypicture")`

..and performing a chs returns the string: "/mydir/myfile.0001.pic"

..when I really want: "/mydir/myfile.$F4.pic"

We have workaround for this; and it's not pretty; and it's specific to how were submit things to the farm at DD, etc. A pretty large percentage of FX-related OTL systems have this need and the trick for getting it to work is like sacred knowledge.

In actual practice it would be fantastic to have the capability to specify evaluation depth and evaluation "features".

chseval( parm, depth, feature )

.eg.: chseval("../../picture", 1, EVAL_NO_VARIABLES )

..would be nice :)

Right now I'd settle for the knowledge if the HDK can handle this currently; any idea?

Link to comment
Share on other sites

In OP_Parameters, there's followChannelReferencesOneStep(). However, it only works for "pure" channel references (like those created by auto-linking HDA parameters).

That might suffice for most applications, thanks Edward. I'd think this would be useful function to expose in Houdini 9 since we do do this quite often - as I'm sure other people do.

Link to comment
Share on other sites

Personally i always split the path and the frame into two parameters on the rop - often more.

Like project path, shot path, camera path, filename, frame number.

The downside to that is you have to build the references inside the HDA yourself and string alll these things together, that plus there is no file picker for HDA's that only let you pick a folder and not an actual file.

So my rfe related to this topic would be to have a folder picker option for file paths.

Link to comment
Share on other sites

OPgetDirector()->getChannelManager()->expandString("$F $HIP", expanded);

Thanks Edward - that does it.

A general Odforce question to Jason, is it possible to have email notification of responses on by default? I couldn't find this in the personal settings ...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...