Hi,
I would like to automatically change the "Pass" mode in Blender to render only specific AOV - please see also my question on BlenderStackexchange: https://blender.stackexchange.com/quest ... hon-script . It's possible to select it with mouse click, but I couldn't find a way to change it programatically (from answers I got there, it seems that it's not accessible trough PythonAPI).
Even if I store the .blend project with this setting selected, when running blender in background, program doesn't detect the selection.
Did you have any similar problem or you maybe have an idea how to access this variable programmarically? Is there maybe a workaround? If there are none, also a solution with recompiling Blender would be OK for me if I would know what to change...
Select pass mode (AOV for rendering) in Blender using python
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: Select pass mode (AOV for rendering) in Blender using python
It does not matter which AOV is selected in the image editor, Blender/LuxCore will always render all of the requested AOVs. The same is true for Cycles by the way.
You can enable/disable AOVs in the render layer settings, but the "Combined" and "Default Lightgroup" AOVs will always be enabled (they are enabled in LuxCore itself and I think there's no way to disable them).
If you want full control over the AOVs from BlendLuxCore, you could edit this file: https://github.com/LuxCoreRender/BlendL ... rt/aovs.py
However, as I said, "Combined" aka RGB_IMAGEPIPELINE and "Default Lightgroup" aka RADIANCE_GROUP 0 will always be enabled internally in LuxCore if I remember correctly.
For a list of the names LuxCore uses internally for the AOVs, see https://wiki.luxcorerender.org/LuxCore_ ... ka_AOVs.29
P.S. The comments on stackexchange are right by the way, you can't change the selected pass from Python in Blender (I have looked into this for the denoiser UI). But you don't need to change this setting anyway because it doesn't matter for the rendering which pass is selected.
You can enable/disable AOVs in the render layer settings, but the "Combined" and "Default Lightgroup" AOVs will always be enabled (they are enabled in LuxCore itself and I think there's no way to disable them).
If you want full control over the AOVs from BlendLuxCore, you could edit this file: https://github.com/LuxCoreRender/BlendL ... rt/aovs.py
However, as I said, "Combined" aka RGB_IMAGEPIPELINE and "Default Lightgroup" aka RADIANCE_GROUP 0 will always be enabled internally in LuxCore if I remember correctly.
For a list of the names LuxCore uses internally for the AOVs, see https://wiki.luxcorerender.org/LuxCore_ ... ka_AOVs.29
P.S. The comments on stackexchange are right by the way, you can't change the selected pass from Python in Blender (I have looked into this for the denoiser UI). But you don't need to change this setting anyway because it doesn't matter for the rendering which pass is selected.
Re: Select pass mode (AOV for rendering) in Blender using python
Thank you B.Y.O.B. for this detailed and fast answer - after reading it, I understood that I only need to create a script, which creates and correctly links "composition nodes" in Blender (my final goal was to automatically set up the rendering to output irradiance only).B.Y.O.B. wrote: ↑Mon Jan 28, 2019 10:09 am It does not matter which AOV is selected in the image editor, Blender/LuxCore will always render all of the requested AOVs. The same is true for Cycles by the way.
You can enable/disable AOVs in the render layer settings, but the "Combined" and "Default Lightgroup" AOVs will always be enabled (they are enabled in LuxCore itself and I think there's no way to disable them).
If you want full control over the AOVs from BlendLuxCore, you could edit this file: https://github.com/LuxCoreRender/BlendL ... rt/aovs.py
However, as I said, "Combined" aka RGB_IMAGEPIPELINE and "Default Lightgroup" aka RADIANCE_GROUP 0 will always be enabled internally in LuxCore if I remember correctly.
For a list of the names LuxCore uses internally for the AOVs, see https://wiki.luxcorerender.org/LuxCore_ ... ka_AOVs.29
P.S. The comments on stackexchange are right by the way, you can't change the selected pass from Python in Blender (I have looked into this for the denoiser UI). But you don't need to change this setting anyway because it doesn't matter for the rendering which pass is selected.
Re: Select pass mode (AOV for rendering) in Blender using python
Yes, you can use the file output node for this:
https://docs.blender.org/manual/en/late ... /file.html
https://docs.blender.org/manual/en/late ... /file.html