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.
This commit is contained in:
parent
6fdfa55667
commit
c862c14339
Notes:
blender-bot
2023-06-21 19:23:24 +02:00
Referenced by issue #60030, select pattern fails in some type/mode combinations Referenced by issue #60031, Joining two Grease Pencil objects sometimes crashes, sometimes fails silently.
|
@ -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"""
|
||||
|
|
Loading…
Reference in New Issue