0

I need to save both the 'Combined' pass and the 'indexOB' pass. Is there a simple way to use it with Python? I set the path to save my render -

bpy.context.scene.render.filepath

I can also set the image mode:

bpy.data.scenes['Scene'].render.image_settings.color_mode = 'BW'

enter image description here

But how can I select the render pass?

Mapper720
  • 15
  • 2
  • 7
  • If you want to save the passes, create a file output node in the compositor, done. Related: https://blender.stackexchange.com/a/215487/31447, one of our famous q&a's: Controling compositor by python – brockmann Aug 27 '21 at 19:09
  • How to create the file output node: Output Node with Python – brockmann Aug 27 '21 at 19:16
  • If I use the File output nodes, I can't set the File Subpath value with Python. This means I can't set a propper name for the file. – Mapper720 Aug 28 '21 at 08:55
  • You can do whatever you want with the file output node. I'd suggest add more details to your question and what exactly you'd like to do - sounds like a XY question to me. Recommend the following post to understand the concept: https://blender.stackexchange.com/questions/16152/save-all-render-passes-to-exr-image/18406#18406 – brockmann Aug 28 '21 at 10:14
  • I want to automatize the render process. At every frame Blender should: 0. Render the frame
    1. Save the render
    2. Save the IndexOB pass
    3. Save the 'Normal' matcap view;
    4. And every image should have the propper name. I think the list of names will be stored in a text file.
    – Mapper720 Aug 28 '21 at 11:40
  • Here is a demo on how to create a new file output node and render all the passes you mentioned into a new 'render' folder automatically: https://pasteall.org/QWvo/raw Does this answer your question? – brockmann Aug 28 '21 at 11:56
  • I'm afraid no. Still can't understand, how to set my own names for rendered images. The script from pasteall.org/QWvo/raw generates images 'Normal0001.jpg', 'Mist0001.jpg' etc. – Mapper720 Aug 28 '21 at 12:16
  • By naming the slot, as I did with the beauty pass (see the for-loop ). What's your issue with those names? The frame suffix "0001"? If so, there is no way around that. You'd have to re-name the files using python afterwards. – brockmann Aug 28 '21 at 12:20

0 Answers0