infinity_spiral Posted March 11, 2014 Share Posted March 11, 2014 Can someone tell me how to return the primType on any selected node in Python? I saw the hou.primType() in the docs but not sure how to use it on selection. What I want is for example to select some curves or geometry and the script to return what is the prim type of each selected node (NURBS, Bezier,Polygon ,Mesh,NURBSSurface, etc) Thank you! , Quote Link to comment Share on other sites More sharing options...
infinity_spiral Posted March 11, 2014 Author Share Posted March 11, 2014 Sorry if my question is unclear . Please let me know if it's so I can try to explain it better . Thank you! Quote Link to comment Share on other sites More sharing options...
infinity_spiral Posted March 11, 2014 Author Share Posted March 11, 2014 (edited) Anyway I think I figured it out .If there is another way I will be happy to see it. def primType(): sel = hou.selectedNodes() nodes = [] types = [] for node in sel: nodes.append(node.name()) prim = node.geometry().prims() for i in prim: types.append(i.type().name()) return dict(zip(nodes,types)) Cheers Edited March 11, 2014 by T.I.M. 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.