mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Add a preference for particular app to open sheet layout
This commit is contained in:
@@ -132,6 +132,7 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
description='E.g. [["inkscape", "svg", "-o", "eps"], ["pstoedit", "-dt", "-f", "dxf:-polyaslines -mm", "eps", "dxf", "-psarg", "-dNOSAFER"]]',
|
description='E.g. [["inkscape", "svg", "-o", "eps"], ["pstoedit", "-dt", "-f", "dxf:-polyaslines -mm", "eps", "dxf", "-psarg", "-dNOSAFER"]]',
|
||||||
)
|
)
|
||||||
svg_command: StringProperty(name="SVG Command", description='E.g. [["firefox", "path"]]')
|
svg_command: StringProperty(name="SVG Command", description='E.g. [["firefox", "path"]]')
|
||||||
|
layout_svg_command: StringProperty(name="Layout SVG Command", description='E.g. [["firefox", "path"]]')
|
||||||
pdf_command: StringProperty(name="PDF Command", description='E.g. [["firefox", "path"]]')
|
pdf_command: StringProperty(name="PDF Command", description='E.g. [["firefox", "path"]]')
|
||||||
spreadsheet_command: StringProperty(name="Spreadsheet Command", description='E.g. [["libreoffice", "path"]]')
|
spreadsheet_command: StringProperty(name="Spreadsheet Command", description='E.g. [["libreoffice", "path"]]')
|
||||||
openlca_port: IntProperty(name="OpenLCA IPC Port", default=8080)
|
openlca_port: IntProperty(name="OpenLCA IPC Port", default=8080)
|
||||||
@@ -205,6 +206,8 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(self, "svg_command")
|
row.prop(self, "svg_command")
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
|
row.prop(self, "layout_svg_command")
|
||||||
|
row = layout.row()
|
||||||
row.prop(self, "pdf_command")
|
row.prop(self, "pdf_command")
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(self, "spreadsheet_command")
|
row.prop(self, "spreadsheet_command")
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ def add_sheet(ifc, drawing, titleblock=None):
|
|||||||
|
|
||||||
|
|
||||||
def open_sheet(drawing, sheet=None):
|
def open_sheet(drawing, sheet=None):
|
||||||
drawing.open_svg(drawing.get_document_uri(sheet, "LAYOUT"))
|
drawing.open_layout_svg(drawing.get_document_uri(sheet, "LAYOUT"))
|
||||||
|
|
||||||
|
|
||||||
def remove_sheet(ifc, drawing, sheet=None):
|
def remove_sheet(ifc, drawing, sheet=None):
|
||||||
|
|||||||
@@ -848,6 +848,10 @@ class Drawing(blenderbim.core.tool.Drawing):
|
|||||||
def open_svg(cls, uri):
|
def open_svg(cls, uri):
|
||||||
cls.open_with_user_command(bpy.context.preferences.addons["blenderbim"].preferences.svg_command, uri)
|
cls.open_with_user_command(bpy.context.preferences.addons["blenderbim"].preferences.svg_command, uri)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def open_layout_svg(cls, uri):
|
||||||
|
cls.open_with_user_command(bpy.context.preferences.addons["blenderbim"].preferences.layout_svg_command, uri)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run_root_assign_class(
|
def run_root_assign_class(
|
||||||
cls,
|
cls,
|
||||||
|
|||||||
Reference in New Issue
Block a user