Author Topic: Return resolved filepaths from batchtools or SAT tools?  (Read 4580 times)

I'm setting up a thread pool per UDIM which processes tasks in the following order:
 [cook thread]
[bake threads]
           | <-----wait for bake completion
[render thread]

In order to process the correct baked maps in sbsrender(via setentry) I have to manually resolve the bake paths and return the value via Queue.queue.put(resolved_filepath), which then gets added to a paths dictionary (in my queue manager) for the associated baker.
The same happens to the sbsar once it's cooked.

The paths dictionary is then grabbed from the queue manager, into the sbsrender task, in order to associate the baked maps with the correct input and the cooked sbsar.

Although this works for the baker and cooker, it's far more difficult for the render, as I have no way of predicting which outputs will be available and therefore can't resolve the output usage/identifier easily.
The process of resolving the filepath manually from a bunch of function arguments, and any other production related "default" arguments stored in configs, and now possibly also via pysbs, makes this process tedious and bloats up the task function unnecessarily.

Is there a way to retrieve the resolved filepath from the batchtools processes or sbsbaker, sbscooker, sbsrender tools?
I can't seem to find a way.
If not, it would be extremely useful if both batchtools and SAT tools returned the resolved filepath at the end.
Last Edit: June 16, 2019, 10:49:10 pm