[Bf-blender-cvs] [b5477f6] bake-cycles: Cycles-Bake: operator is only valid if the object is editable

Dalai Felinto noreply at git.blender.org
Wed Apr 23 02:46:47 CEST 2014


Commit: b5477f6591b75d25893a32eece2f5a4837091425
Author: Dalai Felinto
Date:   Wed Jan 22 17:17:15 2014 -0200
https://developer.blender.org/rBb5477f6591b75d25893a32eece2f5a4837091425

Cycles-Bake: operator is only valid if the object is editable

(we should also make sure there is a UV, but we do it later)

===================================================================

M	source/blender/editors/object/object_bake_new.c

===================================================================

diff --git a/source/blender/editors/object/object_bake_new.c b/source/blender/editors/object/object_bake_new.c
index 5fde4a5..f3b588d 100644
--- a/source/blender/editors/object/object_bake_new.c
+++ b/source/blender/editors/object/object_bake_new.c
@@ -85,6 +85,7 @@
 #include "WM_types.h"
 
 #include "ED_object.h"
+#include "ED_screen.h"
 
 #include "RE_bake.h"
 
@@ -348,6 +349,7 @@ void OBJECT_OT_bake(wmOperatorType *ot)
 	ot->exec = bake_exec;
 	ot->invoke = bake_invoke;
 	ot->modal = bake_modal;
+	ot->poll = ED_operator_object_active_editable_mesh;
 
 	ot->prop = RNA_def_enum(ot->srna, "type", render_pass_type_items, SCE_PASS_COMBINED, "Type",
 	                        "Type of pass to bake, some of them may not be supported by the current render engine");




More information about the Bf-blender-cvs mailing list