mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
See #3880. Freestyle support for perspective vector linework.
This commit is contained in:
@@ -272,6 +272,8 @@ class CreateDrawing(bpy.types.Operator):
|
|||||||
linework_svg = self.generate_linework(context)
|
linework_svg = self.generate_linework(context)
|
||||||
elif self.camera.data.BIMCameraProperties.linework_mode == "FREESTYLE":
|
elif self.camera.data.BIMCameraProperties.linework_mode == "FREESTYLE":
|
||||||
linework_svg = self.generate_freestyle_linework(context)
|
linework_svg = self.generate_freestyle_linework(context)
|
||||||
|
elif self.camera.data.BIMCameraProperties.linework_mode == "FREESTYLE":
|
||||||
|
linework_svg = self.generate_freestyle_linework(context)
|
||||||
|
|
||||||
with profile("Generate annotation"):
|
with profile("Generate annotation"):
|
||||||
if tool.Drawing.is_camera_orthographic():
|
if tool.Drawing.is_camera_orthographic():
|
||||||
@@ -651,7 +653,7 @@ class CreateDrawing(bpy.types.Operator):
|
|||||||
context.scene.render.filepath = svg_path[0:-4]
|
context.scene.render.filepath = svg_path[0:-4]
|
||||||
bpy.ops.render.render(write_still=False)
|
bpy.ops.render.render(write_still=False)
|
||||||
|
|
||||||
os.rename(actual_path, svg_path)
|
os.replace(actual_path, svg_path)
|
||||||
|
|
||||||
bpy.data.objects.remove(edge_obj)
|
bpy.data.objects.remove(edge_obj)
|
||||||
bpy.data.meshes.remove(edge_mesh)
|
bpy.data.meshes.remove(edge_mesh)
|
||||||
@@ -1813,7 +1815,9 @@ class ActivateDrawing(bpy.types.Operator):
|
|||||||
if ifcopenshell.util.element.get_pset(drawing, "EPset_Drawing", "HasUnderlay"):
|
if ifcopenshell.util.element.get_pset(drawing, "EPset_Drawing", "HasUnderlay"):
|
||||||
bpy.ops.bim.reload_drawing_styles()
|
bpy.ops.bim.reload_drawing_styles()
|
||||||
bpy.ops.bim.activate_drawing_style()
|
bpy.ops.bim.activate_drawing_style()
|
||||||
core.sync_references(tool.Ifc, tool.Collector, tool.Drawing, drawing=tool.Ifc.get().by_id(self.drawing))
|
|
||||||
|
if tool.Drawing.is_camera_orthographic():
|
||||||
|
core.sync_references(tool.Ifc, tool.Collector, tool.Drawing, drawing=tool.Ifc.get().by_id(self.drawing))
|
||||||
CutDecorator.install(context)
|
CutDecorator.install(context)
|
||||||
tool.Drawing.show_decorations()
|
tool.Drawing.show_decorations()
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ class BIM_PT_camera(Panel):
|
|||||||
row.prop(props, "fill_mode")
|
row.prop(props, "fill_mode")
|
||||||
row = self.layout.row()
|
row = self.layout.row()
|
||||||
row.prop(props, "cut_mode")
|
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 = self.layout.row()
|
||||||
row.prop(props, "width")
|
row.prop(props, "width")
|
||||||
|
|||||||
Reference in New Issue
Block a user