GlennimusPrime Posted April 17, 2024 Share Posted April 17, 2024 (edited) Hello! I'm trying to animate the Carve SOP's 'Second U' channel by using the expression: fit($FF,1,25,0,1) This works fine to animate from frame 1 to 25, but as soon as I try to read previously set detail attributes as part of the expression, I get an error. So I've made sure to first create the detail attributes, then This is what I'm trying to use: fit($FF,`detail(0,"start_frame",0)`,`detail(0,"end_frame",0)`,0,1) What am I not understanding about accessing detail attributes in an expression? File attached. carve_read_detail_attribute.hiplc Edited April 18, 2024 by GlennimusPrime Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted April 17, 2024 Share Posted April 17, 2024 Hi, just clear backticks in expression. Use them with expression when parameter has a string type. 1 Quote Link to comment Share on other sites More sharing options...
GlennimusPrime Posted April 17, 2024 Author Share Posted April 17, 2024 (edited) Backticks are only needed when working with a string expression? OK got it thanks! I removed the backticks and now it seems to work ok. i@start_frame = chi("start_frame"); i@end_frame = chi("end_frame"); Then using this on the Carve SOP: fit($FF,detail(0,"start_frame",0),detail(0,"end_frame",0),0,1) Here's the updated .hip file if anyone needs it. carve_read_detail_attribute_v3.hiplc Edited April 17, 2024 by GlennimusPrime Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted April 18, 2024 Share Posted April 18, 2024 7 hours ago, GlennimusPrime said: Backticks are only needed when working with a string expression? No, usually we are using expressions in parameters of nodes. Parameters such as file path, group, attributes name etc. are string parameters and in these parameters when result of an expression should be text you must use backticks with that expression. For example in "Group" parameter to get last point number of the incoming geo use `npoints(0)-1`. If you want to create copies of the geo as much as incoming geo contains points with copy and transform sop use npoints(0) without backticks in "Total Number" parameter of the node because this is numeric parameter. 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.