[Bf-blender-cvs] [c862c14339e] master: Fix poll function for SelectPattern operator
Dalai Felinto
noreply at git.blender.org
Wed Jan 2 13:49:19 CET 2019
Commit: c862c14339e4c3ccf660153a5589ceb3561112d8
Author: Dalai Felinto
Date: Wed Jan 2 10:37:02 2019 -0200
Branches: master
https://developer.blender.org/rBc862c14339e4c3ccf660153a5589ceb3561112d8
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.
===================================================================
M release/scripts/startup/bl_operators/object.py
===================================================================
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"""
More information about the Bf-blender-cvs
mailing list