Add overrides on the same usd layer

   107   0   0
User Avatar
Member
20 posts
Joined: March 2019
Offline
Maybe someone would be able to clear my workflow a bit and if I am missing something obvious.

I am trying to do the following using 1 Python LOP:
- I get
node.editableStage()
- Using
layer = loputils.createPythonLayer(node) 
I added int primvar on a few component prims high in the hierarchy with values: 0,1,2
- I apply primvars with
node.addSubLayer(layer.identifier)
- I create Usd.PrimRange iterator, and from editableStage retrieve Gprims much deeper in the hierarchy based on values of component primvars found using FindPrimvarWithInheritance. I write gathered prim paths to 3 lists.
- then I loop through prims in 3 lists and would like to add camera visibility primvars on Gprims to the same layer as the first set of primvars, is that even possible or I am misunderstanding?

I tried to retrieve active layer using:
layer = editableStage.GetEditTarget().GetLayer()
but as soon as I do that I get new sublayer identifier and see second sublayer in Scene Graph Layers.

Isn't it what LOP nodes do all the time when they keep adding overrides to the same active layer?

Any suggestions would be helpful
Edited by daveborck - Dec. 23, 2024 22:58:50
  • Quick Links