Multi part rendering using putImage

I am trying to render multi part exr using module’s putImage but not sure how it works exactly and how to get the renderParts() mentioned in the wiki

My goal here is to render out a multi part exr with layers in a roto node as layers in the exr output file.
Is this possible with the approach i mentioned?

Have you looked in resources/scripts/tools/ That contains the entire rendering loop for a typical Silhouette render, including managing of Multi-Part output nodes.
Basically you create an EXR output module, create the file, and call module.putImage() multiple times, each with a different “part” name.
Look for “for part in” in to see how Silhouette does it.

Thanks! I have now managed to create the multi part node and managed to add some inputs but looks like i am doing something wrong when i try to add the code to actions.

I am referring to the actions “LayersToSeparateFiles” and similar ones for help but even when i create a new class inheriting actions, and have the execution code in the execute function, i can see the option being added to the actions but cant seem to launch a ui from there.
The code executes but does not launch a new custom gui .

I am using a QMainWindow instance, maybe this is causing issues?

Oh, you’re getting pretty complicated there. I don’t know if that would be supported.
Maybe try a QDialog instead?

I was actually trying to avoid that since i may have to modify how we are using some similar tools in different DCCs.
Will try a few different things and see if i can get it working without having to use QDialog.
Would dock serve better if i just happen to attach a custom widget into a new dock?
I am trying to avoid that way as of now but maybe a valid other option instead of popping new window.
Its just that i will have to destroy the dock when i am done with the tool since its possible for someone to click multiple times by mistake and trigger multiple jobs.

Yes, it should be possible to create and add/remove custom docks.