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:
authorDalai Felinto <dfelinto@gmail.com>2019-01-02 15:37:02 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-01-02 15:48:34 +0300
commitc862c14339e4c3ccf660153a5589ceb3561112d8 (patch)
tree5d56ec3cd7c1d47420ae3fc54492b926a25d7e00 /release
parent6fdfa556678ec88231f21bd444e9f628a36008ce (diff)
Fix poll function for SelectPattern operator
Note this is also broken in 2.7x. This is not a big deal since the operator is exposed in the correct menus. But some users were accessing it via the search menu which would lead to issues.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/object.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index 14f55ef8fb0..d4085d70143 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -111,6 +111,11 @@ class SelectPattern(Operator):
row.prop(self, "case_sensitive")
row.prop(self, "extend")
+ @classmethod
+ def poll(cls, context):
+ obj = context.object
+ return (not obj) or (obj.mode == 'OBJECT') or (obj.type == 'ARMATURE')
+
class SelectCamera(Operator):
"""Select the active camera"""