Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2009-12-04 09:33:01 +0300
committerMatt Ebb <matt@mke3.net>2009-12-04 09:33:01 +0300
commite299798bbf71959b372fd12c0567bad3ed8c116a (patch)
treecd7359182f2656efde81f77babf1e682a03d2fc3 /source/blender/editors/object/object_edit.c
parentd828062f1b4e14f1457978da57fda5be7d86e60a (diff)
Fix for [#20203] Linked objects - A few bugs
Did a lot of cleaning Object operator poll functions to check if the object's linked or not. For this, added the function ED_operator_object_active_editable() as opposed to ED_operator_object_active()
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r--source/blender/editors/object/object_edit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 4678ee35fcd..4fed6108f86 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -553,7 +553,7 @@ void OBJECT_OT_posemode_toggle(wmOperatorType *ot)
/* api callbacks */
ot->exec= posemode_exec;
- ot->poll= ED_operator_object_active;
+ ot->poll= ED_operator_object_active_editable;
/* flag */
ot->flag= OPTYPE_REGISTER;
@@ -1651,6 +1651,7 @@ void OBJECT_OT_shade_flat(wmOperatorType *ot)
ot->idname= "OBJECT_OT_shade_flat";
/* api callbacks */
+ ot->poll= ED_operator_object_active_editable;
ot->exec= shade_smooth_exec;
/* flags */
@@ -1664,8 +1665,9 @@ void OBJECT_OT_shade_smooth(wmOperatorType *ot)
ot->idname= "OBJECT_OT_shade_smooth";
/* api callbacks */
+ ot->poll= ED_operator_object_active_editable;
ot->exec= shade_smooth_exec;
-
+
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1958,7 +1960,7 @@ void OBJECT_OT_mode_set(wmOperatorType *ot)
/* api callbacks */
ot->exec= object_mode_set_exec;
- ot->poll= ED_operator_object_active;
+ ot->poll= ED_operator_object_active_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -2013,6 +2015,7 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot)
/* api callbacks */
ot->exec= game_property_new;
+ ot->poll= ED_operator_object_active_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -2049,6 +2052,7 @@ void OBJECT_OT_game_property_remove(wmOperatorType *ot)
/* api callbacks */
ot->exec= game_property_remove;
+ ot->poll= ED_operator_object_active_editable;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;