KillianDS Posted August 23, 2022 Share Posted August 23, 2022 Hello I want to take an attribute to put it in a node parameter how could I do? I calculate a value with the node attribute wrangle and I would like to put this value in a switch If you have doc / examples that would be cool Thank you, Killian Quote Link to comment Share on other sites More sharing options...
Alain2131 Posted August 24, 2022 Share Posted August 24, 2022 Hello Killian, For a detail attribute, you can refer to the attribute with detail(surface_node, attrib_name, attrib_index) https://www.sidefx.com/docs/houdini/expressions/detail.html Here's an example for fetching the detail attribute "stop". surface_node 0 refers to the node connected to your switch, and attrib_index 0 is for attributes with more than one item (vector, array, etc). For integer/float, use 0. detail(0, "stop", 0); For any other attribute type, there is the matching point, prim and vertex functions, although I strongly recommend to use detail for node parameter stuff. A parameter can only have one value (you generally cannot refer to an attribute and expect a different result for each point). Also, note that to get a string attribute, you need the matching details(), points(), prims(), vertexs() function. Read : detail string, point string, etc. Quote Link to comment Share on other sites More sharing options...
KillianDS Posted August 24, 2022 Author Share Posted August 24, 2022 Many thanks it works perfectly Have a good day 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.