monomind 2 Posted March 25, 2020 I'm trying to get the active switch input op name - how is that possible? Share this post Link to post Share on other sites
ikoon 261 Posted March 25, 2020 Hi Mono, something like this, in Python? If you want the result inside a String parm, you have to Add a keyframe to that parm and then change the language to Python. The file is attached. switch = hou.node("../switch") inputs = switch.inputs() active = switch.parm("input").eval() return inputs[active] switch.hiplc Share this post Link to post Share on other sites
monomind 2 Posted March 25, 2020 How about doing this in COP Share this post Link to post Share on other sites
ikoon 261 Posted March 25, 2020 Do you have a sample scene? Share this post Link to post Share on other sites
monomind 2 Posted March 25, 2020 I can prepare - that'd be creating an empty scene and creating a cop network - I just don't know how to script in COPs basically, there is no wrangle in that concept. Share this post Link to post Share on other sites
ikoon 261 Posted March 25, 2020 I am not sure what exactly do you need, but that python can be run in any String parm. Even in a new custom string parm in any node. Btw in Switch COP, the parm is called "index", not "input". So the third line will be this: active = switch.parm("index").eval() Share this post Link to post Share on other sites
monomind 2 Posted March 25, 2020 How/where do you run python? Share this post Link to post Share on other sites
ikoon 261 Posted March 25, 2020 This is great Masterclass: https://vimeo.com/14612897 You don't need to see the whole video, first hour (or less) should help you do amazing things. Share this post Link to post Share on other sites