Show info message using annotation tool hotkeys without drawing loaded

This commit is contained in:
Andrej730
2024-09-09 11:22:50 +05:00
parent 09b8c4482f
commit a3c5c334f1
@@ -274,6 +274,10 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator):
return operator.description or ""
def _execute(self, context):
if not (camera := context.scene.camera) or not tool.Ifc.get_entity(camera):
self.report({"ERROR"}, "No drawing active for annotation hotkeys.")
return {"CANCELLED"}
self.props = context.scene.BIMAnnotationProperties
getattr(self, f"hotkey_{self.hotkey}")()