bpy.ops.object.bake() #48693

Closed
opened 2016-06-21 02:59:04 +02:00 by Florian Meyer · 10 comments
Member

Ok writing it down for you :)

I wrote this:
https://github.com/florianfelix/render_bbake

I am calling object.bake in
https://github.com/florianfelix/render_bbake/blob/master/batch_bake_operators.py
on line 77.

I tried using save mode with 'EXTERNAL' and provided a filepath to filepath.
That doesn't seem to work?

Also when passing the name of a UVLayer to uv_layer it still renders on the active layer.

Third thing is more of a question:
What does pass_filter do? (There is no similar option exposed in regular vanilla baking?)

Thanks for looking and hoping not to have abused the bug reporting thing for this.
felix

Ok writing it down for you :) I wrote this: https://github.com/florianfelix/render_bbake I am calling object.bake in https://github.com/florianfelix/render_bbake/blob/master/batch_bake_operators.py on line 77. I tried using save mode with 'EXTERNAL' and provided a filepath to filepath. That doesn't seem to work? Also when passing the name of a UVLayer to uv_layer it still renders on the active layer. Third thing is more of a question: What does pass_filter do? (There is no similar option exposed in regular vanilla baking?) Thanks for looking and hoping not to have abused the bug reporting thing for this. felix
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Dalai Felinto was assigned by Florian Meyer 2016-06-21 02:59:04 +02:00
Author
Member

Added subscriber: @florianfelix

Added subscriber: @florianfelix

blender/blender#74245 was marked as duplicate of this issue

blender/blender#74245 was marked as duplicate of this issue

Added subscribers: @vitorbalbio-3, @VilemDuha

Added subscribers: @vitorbalbio-3, @VilemDuha

@florianfelix pass_filter is explained here: https:*wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.77/Cycles#Baking or in the Cycles manual: https:*www.blender.org/manual/render/cycles/baking.html#options

As for the bug, can you reproduce this in a simpler script? Those options are supposed to be working.

@vitorbalbio-3 is the API still working for your Addon?
@VilemDuha how about you?

@florianfelix pass_filter is explained here: https:*wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.77/Cycles#Baking or in the Cycles manual: https:*www.blender.org/manual/render/cycles/baking.html#options As for the bug, can you reproduce this in a simpler script? Those options are supposed to be working. @vitorbalbio-3 is the API still working for your Addon? @VilemDuha how about you?

Added subscriber: @JasonG

Added subscriber: @JasonG

I've just noticed this as well. I was writing some support scripts for a project and need to do some scripted baking.

From the default scene, unwrap the cube and run this with it selected:

bpy.ops.object.bake(type='COMBINED', filepath="/tmp/testbake.png", save_mode='EXTERNAL')

I get the following error:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/library/rez/ext_packages/app_blender/2.77/platform-linux/ext/2.77/scripts/modules/bpy/ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: No active image found, add a material or bake to an external file

I'm currently using the latest public build, nothing special.

I've just noticed this as well. I was writing some support scripts for a project and need to do some scripted baking. From the default scene, unwrap the cube and run this with it selected: ``` bpy.ops.object.bake(type='COMBINED', filepath="/tmp/testbake.png", save_mode='EXTERNAL') ``` I get the following error: ``` Traceback (most recent call last): File "<blender_console>", line 1, in <module> File "/library/rez/ext_packages/app_blender/2.77/platform-linux/ext/2.77/scripts/modules/bpy/ops.py", line 189, in __call__ ret = op_call(self.idname_py(), None, kw) RuntimeError: Error: No active image found, add a material or bake to an external file ``` I'm currently using the latest public build, nothing special.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Since day 1 (blender/blender@97641a0e) you can see that external saving was not really supported. The code explicitly forces the mode to be internal. I will mark it as a TODO and close the report for now.

Since day 1 (blender/blender@97641a0e) you can see that external saving was not really supported. The code explicitly forces the mode to be internal. I will mark it as a TODO and close the report for now.

Added subscribers: @KenzieMac130, @iss

Added subscribers: @KenzieMac130, @iss
Sign in to join this conversation.
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#48693
No description provided.