Jump to content

How Do You Ref $pt At Root Level Of Otl (da)


Recommended Posts

Hi Folks,

How do you reference $PT, from a node inside a digital asset, at the top level through the promoted parameters?

Seems like it would be a natural thing to do but it doesn't pass through using the ch or chs function.

Any ideas or corrections?

:David

Edited by davo
Link to comment
Share on other sites

You can try using the point() expression...

I tried that, no good. Doesn't error the node, but doesn't pass it. Plus in my case it would require me to use the $PT variable, which is the

problem to begin with.

;D

Edited by davo
Link to comment
Share on other sites

what are you trying to do?

you could create a parameter at the top level and then use that as a reference down in SOPs or where ever...

check out this example file...

the myPoint parameter will tell the rivet object inside what point on the curve to attach to...

HTH

Hi,

I know you are trying to help, but the example is just the same as standard promoted parameter, it is just created through the type properties

dialog box and then manually referenced, no?

What I am trying to do is, is animate at the top level based on an inside node's value of $PT, without having to go into the asset, to manually change it (just for convenience). So it would be like promoting one of the curve's parameters and typing in $PT or some arbitrary expressions based upon $PT.

You would think someone has run into this sometime before.

:D

Edited by davo
Link to comment
Share on other sites

Local variables are only when evaluated inside the appropriate parameter of the appropriate SOP. Doing a ch() expression will cause the referenced parameter to be evaluated relative to the referenced parameter's owner, not the ch() expression's owner node. So to do what you want, you need to evaluate the raw expression of your referenced parameter inside a parameter that can use local variables, eg. using eval(chs()) or eval(chsraw()). I've attached an example.

promote_localvars.hip

Link to comment
Share on other sites

Local variables are only when evaluated inside the appropriate parameter of the appropriate SOP. Doing a ch() expression will cause the referenced parameter to be evaluated relative to the referenced parameter's owner, not the ch() expression's owner node. So to do what you want, you need to evaluate the raw expression of your referenced parameter inside a parameter that can use local variables, eg. using eval(chs()) or eval(chsraw()). I've attached an example.

Hi Edward,

Didn't have time to check out your file, but the eval() worked great in combination with chsraw().

I have a clearer understanding now.

Thanks!

D

Edited by davo
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...