Replace freestyle extension warning with poll message #5472

This commit is contained in:
Andrej730
2024-10-01 16:20:54 +05:00
parent f63a7d420e
commit a4ac71f9f7
2 changed files with 7 additions and 3 deletions
@@ -207,6 +207,13 @@ class CreateDrawing(bpy.types.Operator):
if not tool.Drawing.is_drawing_active():
cls.poll_message_set("No active drawing.")
return False
if context.scene.camera.data.BIMCameraProperties.linework_mode == "FREESTYLE" and not hasattr(
context.scene, "svg_export"
):
cls.poll_message_set(
"Freestyle SVG Exporter extension is not installed (required for 'Freestyle' linework mode)."
)
return False
return True
def invoke(self, context, event):
@@ -70,9 +70,6 @@ class BIM_PT_camera(Panel):
row.prop(props, "fill_mode")
row = self.layout.row()
row.prop(props, "cut_mode")
elif not hasattr(context.scene, "svg_export"):
row = self.layout.row()
row.label(text="Freestyle SVG Exporter Not Installed", icon="ERROR")
row = self.layout.row()
row.prop(props, "width")