fix: crash on changing workspace change

This commit is contained in:
Swann 2021-07-06 15:39:19 +02:00
parent f0cc63b6f0
commit 297639e80f
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB

View File

@ -41,7 +41,8 @@ this.registry = dict()
def is_annotating(context: bpy.types.Context): def is_annotating(context: bpy.types.Context):
""" Check if the annotate mode is enabled """ Check if the annotate mode is enabled
""" """
return bpy.context.workspace.tools.from_space_view3d_mode('OBJECT', create=False).idname == 'builtin.annotate' active_tool = bpy.context.workspace.tools.from_space_view3d_mode('OBJECT', create=False)
return (active_tool and active_tool.idname == 'builtin.annotate')
class Timer(object): class Timer(object):