davo Posted March 4, 2008 Share Posted March 4, 2008 (edited) 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 March 4, 2008 by davo Quote Link to comment Share on other sites More sharing options...
Marc Posted March 4, 2008 Share Posted March 4, 2008 You can try using the point() expression... Quote Link to comment Share on other sites More sharing options...
davo Posted March 4, 2008 Author Share Posted March 4, 2008 (edited) 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 March 4, 2008 by davo Quote Link to comment Share on other sites More sharing options...
michael Posted March 4, 2008 Share Posted March 4, 2008 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 pointExample.otl Quote Link to comment Share on other sites More sharing options...
davo Posted March 4, 2008 Author Share Posted March 4, 2008 (edited) 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. Edited March 4, 2008 by davo Quote Link to comment Share on other sites More sharing options...
edward Posted March 4, 2008 Share Posted March 4, 2008 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 Quote Link to comment Share on other sites More sharing options...
davo Posted March 5, 2008 Author Share Posted March 5, 2008 (edited) 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 March 5, 2008 by davo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.