Here is some test code I'm using to try and understand whats going on:
import hou from pxr import UsdGeom node = hou.node('/stage/redshift_rendervars/HDRI_Diff') ## this node exists stage=node.stage() nodePath = hou.LopNode.path(node) ## getting Lop node selected but I think this is pointless? prim = stage.GetPrimAtPath(nodePath) ## thinking I need the path of the Lopnode to actually get the prim print (prim)
This returns "invalid null prim)
Now I assume part of the problem is I'm combining the use of hou.node and USD, or something. Maybe USD doesn't update based on the existence of nodes in the heirarchy? But it is plugged in, the scene graph sees it, it's all there. I tried force cooking it as well, that didn't do anything.
In the long run what I'm trying to do is create light select rendervars based on the upstream created lights. I have the rendervars creating, naming, and assigning the sourceName appropriately so they can be diff and spec etc. But I've gotten hung up on the LightGroup part, where I change the 'driver:paramaters:aov:RS_LightGroup' (that might be typo'd) to be "Set or Create", but for the life of me I can't figure out how to actually access that attribute and change it.
Any help is greatly appreciated, no matter how small!