mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
operator to quickly restart blender
This commit is contained in:
@@ -36,6 +36,7 @@ classes = (
|
|||||||
operator.ProfileImportIFC,
|
operator.ProfileImportIFC,
|
||||||
operator.PurgeHdf5Cache,
|
operator.PurgeHdf5Cache,
|
||||||
operator.PurgeUnusedElementsByClass,
|
operator.PurgeUnusedElementsByClass,
|
||||||
|
operator.RestartBlender,
|
||||||
operator.RewindInspector,
|
operator.RewindInspector,
|
||||||
operator.SelectExpressFile,
|
operator.SelectExpressFile,
|
||||||
operator.SelectHighPolygonMeshes,
|
operator.SelectHighPolygonMeshes,
|
||||||
|
|||||||
@@ -770,3 +770,15 @@ class ToggleDetailedIOSLogs(bpy.types.Operator):
|
|||||||
wrapper.turn_off_detailed_logging()
|
wrapper.turn_off_detailed_logging()
|
||||||
self.report({"INFO"}, "Detailed IfcOpenShell logs turned off.")
|
self.report({"INFO"}, "Detailed IfcOpenShell logs turned off.")
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
class RestartBlender(bpy.types.Operator):
|
||||||
|
bl_idname = "bim.restart_blender"
|
||||||
|
bl_label = "Restart Blender"
|
||||||
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
|
def execute(self, context):
|
||||||
|
import os
|
||||||
|
|
||||||
|
path = bpy.app.binary_path
|
||||||
|
os.execv(path, sys.argv)
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ class BIM_PT_debug(Panel):
|
|||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator("bim.toggle_detailed_ios_logs")
|
row.operator("bim.toggle_detailed_ios_logs")
|
||||||
|
|
||||||
|
row = layout.row()
|
||||||
|
row.operator("bim.restart_blender")
|
||||||
|
|
||||||
row = layout.split(factor=0.5, align=True)
|
row = layout.split(factor=0.5, align=True)
|
||||||
row.operator("bim.create_shape_from_step_id").should_include_curves = False
|
row.operator("bim.create_shape_from_step_id").should_include_curves = False
|
||||||
row.operator("bim.create_shape_from_step_id", text="", icon="IPO_ELASTIC").should_include_curves = True
|
row.operator("bim.create_shape_from_step_id", text="", icon="IPO_ELASTIC").should_include_curves = True
|
||||||
|
|||||||
Reference in New Issue
Block a user