Cook LOP node with work_items attributes and query return?

   654   1   1
User Avatar
Member
20 posts
Joined: March 2020
Offline
Heyja,

I'm trying to query attributes with a python script top from a lop node. I've got a simplified setup at the moment where I'm flipping a switch lop to 1 if @pdg_index > 2 which will add an additional prim to the stage.

For now in my pythonscript I'm then just running this
node = self.topNode().node("../LOPNET/OUT")
stage = node.stage()
work_item.setIntAttrib("prims", len(stage.GetPseudoRoot().GetChildren()))

The returned value is the same on all items though. Is there a way to invoke a cook on the node respecting the incoming work item attributes?

Thanks,
Florens
User Avatar
Member
20 posts
Joined: March 2020
Offline
I found a solution that works for me.

I'm pulling the attributes I'm interested in into SOPs with a wrangle and then reading those using the geometry import TOP.

This does the trick for me.

Cheers,
Florens
  • Quick Links