How to get a work item count in the File Pattern node?

   Views 522   Replies 3   Subscribers 1
User Avatar
Member
54 posts
Joined: Dec. 2016
Offline
The Wedge Node creates "wedgetotal" and "wedgecount, The File Pattern node does not create an attribute of the total number of work items. Is there a smart way to create this? is it only possible with Python?

Attachments:
Screenshot 2025-01-27 125114.png (128.5 KB)
Screenshot 2025-01-27 125022.png (101.4 KB)

User Avatar
Member
9087 posts
Joined: July 2007
Offline
you can for example append Python Processor:
count = len(upstream_items)
for upstream_item in upstream_items:
    new_item = item_holder.addWorkItem(parent=upstream_item)
    new_item.setIntAttrib( "file_count", count )
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
54 posts
Joined: Dec. 2016
Offline
Answer found in this post: Your text to link here... [www.sidefx.com]
User Avatar
Member
54 posts
Joined: Dec. 2016
Offline
tamte
you can for example append Python Processor:
count = len(upstream_items)
for upstream_item in upstream_items:
    new_item = item_holder.addWorkItem(parent=upstream_item)
    new_item.setIntAttrib( "file_count", count )
Thank you!
  • Quick Links