revelationsr Posted August 2, 2021 Share Posted August 2, 2021 /grp_base_objects/pSphere1_001_001/pSphere1_001_00Shape1 I get a object from Maya. Here is the path. How do edit it from that to this. pSphere1_001 I will have a few hundered objects coming in. I need to be able to pull the name out. I am sure there are really handy tuts out there that will show in detail how to edit strings procedurally. But I cant find them for the life of me. Cheers 1 Quote Link to comment Share on other sites More sharing options...
Sepu Posted August 2, 2021 Share Posted August 2, 2021 Add this python code after you alembic (using the python sop) and it should strip out the "shape" from the abc and it should give you what you need. node = hou.pwd() geo = node.geometry() 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...
revelationsr Posted August 2, 2021 Author Share Posted August 2, 2021 Cheers! I will try it when I get into the office in the morning. 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.