teddy28 Posted November 17, 2020 Share Posted November 17, 2020 (edited) Hi there, I am working with alembic files from maya which I want to use as packed rbd inside Houdini. I want to specify some groups in maya to mark as same path attribute so I can pack it by name. For example I got 2 obj from maya which the hierarchy path is /aaa/bbb/cc/dShape /aaa/bbb/ee/fShape How can I only get the /aaa/bbb/ as the name attribute to make them as one. Or there is other better method for that? Thank you very much! Edited November 17, 2020 by teddy28 solved Quote Link to comment Share on other sites More sharing options...
teddy28 Posted November 17, 2020 Author Share Posted November 17, 2020 I solved this problem by using split function. Quote Link to comment Share on other sites More sharing options...
Ultraman Posted November 17, 2020 Share Posted November 17, 2020 python code / drop it in the text editor node = hou.pwd() geo = node.geometry() for count in range(2): for prim in geo.prims(): path=prim.attribValue("path") newPath=path[:path.rfind("/")] prim.setAttribValue("path",newPath) 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.