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>2010-01-15 09:10:05 +0300
committerMatt Ebb <matt@mke3.net>2010-01-15 09:10:05 +0300
commit87c5ed37a5aee2b9d5db3408add9d9254f032b3f (patch)
treefa04d7dfacc9168982dd7ea91137f8aafd464e52 /source/blender/editors/armature
parent085795e356c2f8a7701c842735ca4f163ff75058 (diff)
Tweaked/added poll functions to prevent operators that require
a 3D View from being used outside the 3D View (i.e. the info header search button)
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 1b6b489488c..42ac4b8b6b5 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -1486,6 +1486,11 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *ev
return OPERATOR_FINISHED;
}
+static int pose_select_linked_poll(bContext *C)
+{
+ return ( ED_operator_view3d_active(C) && ED_operator_posemode(C) );
+}
+
void POSE_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
@@ -1495,7 +1500,7 @@ void POSE_OT_select_linked(wmOperatorType *ot)
/* api callbacks */
ot->exec= NULL;
ot->invoke= pose_select_connected_invoke;
- ot->poll= ED_operator_posemode;
+ ot->poll= select_linked_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1580,6 +1585,11 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
return OPERATOR_FINISHED;
}
+static int armature_select_linked_poll(bContext *C)
+{
+ return ( ED_operator_view3d_active(C) && ED_operator_editarmature(C) );
+}
+
void ARMATURE_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */