1
$\begingroup$

I'm trying to write a script that creates a texture of the shadows on an object. It's supposed to create a new image texture, set the selected object to edit mode, perform a UV smart project, then bake the shadows using " bpy.ops.object.bake(type='SHADOW') "

However, when blender gets to this line, it gives the error " Current render engine does not support baking ". Even though if I omit this line, and click the bake button under the Render properties menu, it works fine.

Also, calling the line " print(bpy.data.scenes["Scene"].render.engine) " just prior to the bake function call prints "BLENDER RENDER", which to me implies that the expected engine is in fact selected.

What should I do to fix this?

$\endgroup$
3
  • 1
    $\begingroup$ A quick look shows that the operator you might need is bpy.ops.object.bake_image. Have a look if it's giving you the same trouble. $\endgroup$
    – TLousky
    Jun 5, 2016 at 13:01
  • $\begingroup$ That is helpful, but now I have another issue with setting the destination image, receiving an error message "No valid images found to bake to." Any help with this one? $\endgroup$
    – Kruglord
    Jun 6, 2016 at 13:44
  • $\begingroup$ I am encountering the exact same problem of no valid images found. Were u able to solve it? $\endgroup$
    – Sum-Al
    Aug 16, 2016 at 12:48

0

You must log in to answer this question.

Browse other questions tagged .