Jump to content

Setting SOP Path in Python


Mikal

Recommended Posts

I'd like to set the SDF SOP PATH for a Fluid Object in Python to "/obj/geo1/platonic1". Currently I'm doing this with the following expression.

myFluidObject.parm('surface_soppath').set("/obj/" + str(myNode) + "/" + str(myPlatonicNode))

But, I imagine there must be a cleaner way of setting this final path. Given Houdini knows that myPlatonicNode = <hou.SopNode of type platonic at /obj/geo1/platonic1> - I'm hoping there's a way to extract path at the end, instead of the cumbersome string formatting process I'm using... In my imaginary world, something like:-

myFluidObject.parm('surface_soppath').set(path(myPlatonicNode))

Be there anything magical like that?

CHeers!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...