Hello, I have imported a fbx file as a simple geo (File > Import > Geo ). Then attached a bound node so that I can choose an object from the group list to bound ( using parm().eval()).
I can see from the group dropdown list that there are multiple actors to choose from ( e.g @name=InstancedFoliageActor_0/0 ) I want to store all items present in this drop as a list.
What's the python command to make that happen ?
I have tried using this snippet but I'm getting an empty list.
those are not explicit groups, you can middle click on the node and see there are no groups those are automatically generated groups from the values of name attribute, hence they start with @name=
to get all values of the name attribute and generate such ad-hoc groups in python you can do
tamte those are not explicit groups, you can middle click on the node and see there are no groups those are automatically generated groups from the values of name attribute, hence they start with @name=
Thank you for the clarification Tomas. This works as described by you on the file node but not on the bounds node.
What if I want to query the Bounds node and perhaps even change / set it to a certain string value. Am I then forced to query the file node instead ? Running the code on the Bounds node gives me nothing obviously since the data is coming from up - stream.
Pic attached.
I'm new to python scripting in Houdini so I Appreciate your help here.
behram_patel This works as described by you on the file node but not on the bounds node.
again, middle click on the node to see what attributes or groups are available the bounds node will not keep your input geo, therefore no attributes or groups, it will create a new bounding box geo, so if you are getting geometry of the bounds1 node you will not get any attributes (just P) or groups
so yes, if you want original geo, you either get the input geo of the bound1 node (node.inputGeometry(0)) so you dont need to explicitly know whats connected to it or you can get the content of that menu directly if that's more helpful (parm.menuItems() or parm.menuLabels()) which is also built internally by looking at the input geo