mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
unit - remove unnecessary ifc operators
This commit is contained in:
@@ -54,24 +54,26 @@ class UnassignUnit(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
core.unassign_unit(tool.Ifc, tool.Unit, unit=tool.Ifc.get().by_id(self.unit))
|
core.unassign_unit(tool.Ifc, tool.Unit, unit=tool.Ifc.get().by_id(self.unit))
|
||||||
|
|
||||||
|
|
||||||
class LoadUnits(bpy.types.Operator, tool.Ifc.Operator):
|
class LoadUnits(bpy.types.Operator):
|
||||||
bl_idname = "bim.load_units"
|
bl_idname = "bim.load_units"
|
||||||
bl_label = "Load Units"
|
bl_label = "Load Units"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
bl_description = "Open the loaded units"
|
bl_description = "Open the loaded units"
|
||||||
|
|
||||||
def _execute(self, context):
|
def execute(self, context):
|
||||||
core.load_units(tool.Unit)
|
core.load_units(tool.Unit)
|
||||||
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
class DisableUnitEditingUI(bpy.types.Operator, tool.Ifc.Operator):
|
class DisableUnitEditingUI(bpy.types.Operator):
|
||||||
bl_idname = "bim.disable_unit_editing_ui"
|
bl_idname = "bim.disable_unit_editing_ui"
|
||||||
bl_label = "Disable Unit Editing UI"
|
bl_label = "Disable Unit Editing UI"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
bl_description = "Close the editing units mode"
|
bl_description = "Close the editing units mode"
|
||||||
|
|
||||||
def _execute(self, context):
|
def execute(self, context):
|
||||||
core.disable_unit_editing_ui(tool.Unit)
|
core.disable_unit_editing_ui(tool.Unit)
|
||||||
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
class RemoveUnit(bpy.types.Operator, tool.Ifc.Operator):
|
class RemoveUnit(bpy.types.Operator, tool.Ifc.Operator):
|
||||||
@@ -124,23 +126,25 @@ class AddContextDependentUnit(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
core.add_context_dependent_unit(tool.Ifc, tool.Unit, unit_type=self.unit_type, name=self.name)
|
core.add_context_dependent_unit(tool.Ifc, tool.Unit, unit_type=self.unit_type, name=self.name)
|
||||||
|
|
||||||
|
|
||||||
class EnableEditingUnit(bpy.types.Operator, tool.Ifc.Operator):
|
class EnableEditingUnit(bpy.types.Operator):
|
||||||
bl_idname = "bim.enable_editing_unit"
|
bl_idname = "bim.enable_editing_unit"
|
||||||
bl_label = "Enable Editing Unit"
|
bl_label = "Enable Editing Unit"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
unit: bpy.props.IntProperty()
|
unit: bpy.props.IntProperty()
|
||||||
|
|
||||||
def _execute(self, context):
|
def execute(self, context):
|
||||||
core.enable_editing_unit(tool.Unit, unit=tool.Ifc.get().by_id(self.unit))
|
core.enable_editing_unit(tool.Unit, unit=tool.Ifc.get().by_id(self.unit))
|
||||||
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
class DisableEditingUnit(bpy.types.Operator, tool.Ifc.Operator):
|
class DisableEditingUnit(bpy.types.Operator):
|
||||||
bl_idname = "bim.disable_editing_unit"
|
bl_idname = "bim.disable_editing_unit"
|
||||||
bl_label = "Disable Editing Unit"
|
bl_label = "Disable Editing Unit"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def _execute(self, context):
|
def execute(self, context):
|
||||||
core.disable_editing_unit(tool.Unit)
|
core.disable_editing_unit(tool.Unit)
|
||||||
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
class EditUnit(bpy.types.Operator, tool.Ifc.Operator):
|
class EditUnit(bpy.types.Operator, tool.Ifc.Operator):
|
||||||
|
|||||||
Reference in New Issue
Block a user