Within a SOP_Modify I'm using a python node to access the usdmaterialpath attribute of imported geo. This gives me the material path as a lop/usd path (/materials/materialName).
I would like to access that material (within this SOP_Modify) to query a few parameters of that material.
How do I resolve that path to that node within a SOP_Modify? How do I access that LOP material node's attributes via python within a SOP_Modify?
Here's the simple/basic code to get the usd path. This is in a Python SOP inside a SOP Modify node. This is after a Material Library and Assign Material.
node = hou.pwd() geo = node.geometry()
prims = geo.prims() for primN in prims: val = primN.attribValue('usdmaterialpath') print( 'val', val )