Search - User list
Full Version: Cook LOP node with work_items attributes and query return?
Root » PDG/TOPs » Cook LOP node with work_items attributes and query return?

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?

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.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB