Data is not passing in 'Static' workitem generation

   196   2   1
User Avatar
Member
14 posts
Joined: Dec. 2018
Offline
Hi SideFX,

Can you please explain, why do we have different data behaviour with static and dynamic generation?

For example:
We have ‘Python_Processor1’ and ‘Python_Processor2’, both are static work item generation.
'Python_Processor2' is connected to ‘Python_Processor1’.
'Python_Processor1' contains:
for i in [1]:
  new_item = item_holder.addWorkItem()
  new_item.data.setString('TEST','test_value',0)
'Python_Processor2' contains:
for i in [1]:
  new_item = item_holder.addWorkItem()

So if we middle clicks on workitem from ‘Python_Processor2’ we don't see any data from ‘Python_Processor1’ but if switch ‘Python_Processor2’ to Dynamic generation then we see ‘TEST’ data present.

Can you explain it, please?

Thanks
Ostap
User Avatar
Staff
141 posts
Joined: May 2014
Offline
When work items statically, your node has access to the full list of upstream work items. You need to tell PDG which upstream item is the parent of the item you're creating. For example:

for item in upstream_items:
  new_item = item_holder.addWorkItem(parent=item)

When generating dynamically there's always exactly 1 upstream item, so PDG is able to determine the parent item on its own.
Edited by tpetrick - March 15, 2019 11:03:31
User Avatar
Member
14 posts
Joined: Dec. 2018
Offline
Thanks!
  • Quick Links