Follyx Posted February 10, 2020 Share Posted February 10, 2020 Hi, is there a way to change the node color depending on my choice in an attribute wrangle? I.e: an attribut wrangle with the possibility to set an object to active/inactive (i@active=chi(active");). Depending on the choice from the slider (1/0), the node should change the color, i.e. red/green. Quote Link to comment Share on other sites More sharing options...
animatrix Posted February 10, 2020 Share Posted February 10, 2020 Hi, You can set a Python callback for that active parameter in Edit Parameters Interface window like this: hou.pwd().setColor([hou.Color(1,0,0), hou.Color(0,1,0)][hou.pwd().evalParm("active")]) 1 Quote Link to comment Share on other sites More sharing options...
anim Posted February 11, 2020 Share Posted February 11, 2020 just be aware that parameter callbacks are not evaluated if the parameter is driven by expressions, they are triggered upon manual value change or upon calling parm.pressButton() function Quote Link to comment Share on other sites More sharing options...
Follyx Posted February 12, 2020 Author Share Posted February 12, 2020 hm, so what would be a better way to realice it? 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.