Is it possible to require each new F12 render to appear in a new render slot thereby not overwriting the one I wanted to compare it against?
Asked
Active
Viewed 1,631 times
1 Answers
7
here is a script that switch the render slot automatically after each render
-This is for blender 2.72 and earlier versions :
import bpy
from bpy.app.handlers import persistent
@persistent
def PostRender(self):
bpy.data.images['Render Result'].render_slot += 1
bpy.data.images['Render Result'].render_slot %= 7
bpy.app.handlers.render_complete.append(PostRender)
paste and run inside blender
as Ray Mairlot noted the changes in blender 2.73 and later versions require replacing render_slot with render_slots.active_index as follows :
import bpy
from bpy.app.handlers import persistent
@persistent
def PostRender(self):
bpy.data.images['Render Result'].render_slots.active_index += 1
bpy.data.images['Render Result'].render_slots.active_index %= 7
bpy.app.handlers.render_complete.append(PostRender)
Chebhou
- 19,533
- 51
- 98
-
This is the right direction. But
render_slotcannot take anintit needs a render slot type. – Ray Mairlot Feb 24 '15 at 18:34 -
@RayMairlot so how should i do it ? also is there more convenient way to loop through the slots instead of this like slot.next() or something like that ? – Chebhou Feb 24 '15 at 18:35
-
2
-
@RayMairlot I did and it's running fine, I thought you can help me out make it better than this ? – Chebhou Feb 24 '15 at 18:37
-
You can't be running that code because it should be
render_slotsnotrender_slot– Ray Mairlot Feb 24 '15 at 18:46 -
-
-
This works perfectly, no errors or unexpected behavior. just run the script and you are good to go! – J Sargent Feb 24 '15 at 19:12
-
1The script works for me! Renders and immediately hops into next slot. Very cool, and thank you! – rcgauer Feb 24 '15 at 19:36
-
1@Chebhou Actually, I forgot, you can do just
bpy.data.images['Render Result'].render_slot %= 8– someonewithpc Feb 24 '15 at 20:13 -
1Is it possible to change the slot before (at the same time) the render is launched, not after? – Bithur Feb 24 '15 at 22:39
-
@Bithur there is a handler render_pre() that can do that i will try with it – Chebhou Feb 24 '15 at 22:40
-
This does not work in blender 2.77a on a Mac as of 1 September 2016. No error, no render, no change. Command line reports only: bpy.ops.text.run_script() – Sep 01 '16 at 16:04
F12and changing features is more time-consuming. – J Sargent Feb 24 '15 at 18:14