j m

wjm

About Me

Connect

LOCATION
u, Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Adding schemas Nov. 27, 2023, 12:48 p.m.

Thanks! I can't believe i missed that right at the bottom!

I see that there are PhysicsCollisionAPI and PhysicsMeshCollisionAPI listed in the drop-down.
When i try to add PhysxCollisionAPI and PhysxTriangleMeshCollisionAPI in the string manually, only PhysicsCollisionAPI and PhysicsMeshCollisionAPI are listed in the schemas with PhysxCollisionAPI and PhysxTriangleMeshCollisionAPI being left out. Are we unable to specify schemas that aren't on the list?

Adding schemas Nov. 24, 2023, 6:11 a.m.

Hi
I can see within the documentation in the Solaris glossary relating to Schema and API Schema. But is there a node within Houdini which provides the ability to add schemas to meshes?

Snippet from a usda file which only contains a box.

    def Mesh "Cube" (
        prepend apiSchemas = ["PhysicsCollisionAPI", "PhysxCollisionAPI", "PhysxTriangleMeshCollisionAPI", "PhysicsMeshCollisionAPI"]
    )

The apiSchemas was added by Nvidia Isaac Sim. I assume we can add this using Python but wanted to know if there were tools already for this so we're not reinventing the wheel.

edited: Sorry i didn't realise the forums didn't like lists and hide the text.

Thanks

python - script to edit python module within HDA July 21, 2022, 8:46 a.m.

took a day and a half to find this but here's the answer for others looking


import hou

node = hou.selectedNodes()[0] #get node

nodeTypeData= node.type().definition().sections()#dict of available info from the hda sections.
pycode = node.type().definition().sections()["PythonModule"].contents() #this gets the contents on the python module

node.type().definition().addSection("PythonModule","Test string goes here")#overwrite the python module here. you can use a file read in place of the string.