1
$\begingroup$

I'm trying to rendering all scene at once

so i'm using this python script code but it won't work

import bpy

for s in bpy.data.scene:
   bpy.context.window.scene = s
   bpy.ops.render.render(animation = True)

but it's not working when i run this code my blender is just freezing

please help me

$\endgroup$
1
  • 1
    $\begingroup$ Should work, you just have to wait until the rendering is done. That blender "freezes" is expected when calling the render operator... I'd suggest create a minimal blend file (eg. cube and sphere in different scenes) and test against (monitor your output folder). BTW: Please take the tour to learn about how this site works, thanks. $\endgroup$
    – brockmann
    Commented Feb 22, 2021 at 13:44

1 Answer 1

3
$\begingroup$

The code probably is working as expected, but it’s doing something else you didn’t know it was doing: when blender runs Python code, the UI stops. This usually isn’t a problem since most code finishes within a few seconds, but in the case of this code, render times are being waited on. So until all the scenes finish rendering, the UI would be frozen. I agree with the commentor that suggested you run the code in a minimal blend file with just simple cubes and short frame ranges in each scene to test this diagnosis.

$\endgroup$
4
  • 1
    $\begingroup$ Thanks your right. $\endgroup$
    – user117474
    Commented Feb 23, 2021 at 13:33
  • 1
    $\begingroup$ Please consider to accept the answer in case it is "right", thanks. Please read: blender.stackexchange.com/help/someone-answers @user117474 $\endgroup$
    – brockmann
    Commented Feb 24, 2021 at 14:11
  • $\begingroup$ Your welcome! :-) $\endgroup$
    – TheLabCat
    Commented Feb 24, 2021 at 14:14
  • $\begingroup$ Phooey, we both wrote “your” instead of “you’re.” $\endgroup$
    – TheLabCat
    Commented Mar 3, 2023 at 11:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .