Batch processing geo with python

   1418   1   0
User Avatar
Member
38 posts
Joined: Feb. 2018
Offline
Hello,

How can I build a top network to open a bunch of fbx files, read data off the geometry stream (e.g clipinfo and point attibute values), and then write the data from each of these data extractions to a single .json file? I can do this for one fbx file in sops with an fbx animation import sop and a python sop no problem, but am stuck trying to figure out how to batch this process with tops.

Is there a way for the python processor top to read geo data off of a sop geometry stream for each work item in the batch, or do I have to import the geo into tops and work on it there? I've tried reading geo data off nodes in the sop network with node.geo.attribValue() via the python processor in tops, but it doesnt seem to update the data correctly for each work item (fbx file), i.e the data it sends back is the same for every work item, instead of updating for each new fbx file that is loaded.

Cheers!
User Avatar
Member
38 posts
Joined: Feb. 2018
Offline
OK I got some clues from this thread:

https://www.sidefx.com/forum/topic/80528/ [www.sidefx.com]

Although I was not able to get the "geometry import" top to work (It locks up the UI indefinately with "Evaluate with Work Item Attributes" tured on, and more than one work item upstream). However, packaging the python sop in an HDA and calling it with an "HDA processor" top does work(i.e it will execute the python SOP code in the HDA on the geo stream loaded by each work item).

I can't seem to get the hou python module to read geometry attributes correctly for each workitem from tops, but can I think I can work around that.
  • Quick Links