bim.add_filled_opening - remove unused operator

This commit is contained in:
Andrej730
2025-01-16 15:27:00 +05:00
parent 133459faec
commit 61d68b74ca
4 changed files with 5 additions and 14 deletions
@@ -77,7 +77,6 @@ classes = (
wall.SplitWall,
wall.UnjoinWalls,
opening.AddBoolean,
opening.AddFilledOpening,
opening.AddPotentialHalfSpaceSolid,
opening.AddPotentialOpening,
opening.EditOpenings,
@@ -48,18 +48,6 @@ from gpu_extras.batch import batch_for_shader
from typing import Union, Optional, Any, cast, Sequence
class AddFilledOpening(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.add_filled_opening"
bl_label = "Add Filled Opening"
bl_options = {"REGISTER", "UNDO"}
voided_obj: bpy.props.StringProperty()
filling_obj: bpy.props.StringProperty()
def _execute(self, context):
FilledOpeningGenerator().generate(bpy.data.objects.get(self.filling_obj), bpy.data.objects.get(self.voided_obj))
return {"FINISHED"}
class FilledOpeningGenerator:
def generate(
self,
@@ -419,7 +419,7 @@ class AddConstrTypeInstance(bpy.types.Operator, tool.Ifc.Operator):
):
if instance_class in ["IfcWindow", "IfcDoor"]:
# TODO For now we are hardcoding windows and doors as a prototype
bpy.ops.bim.add_filled_opening(voided_obj=building_obj.name, filling_obj=obj.name)
tool.Model.add_filled_opening(building_obj, obj)
else:
if self.container_obj:
if props.rl_mode == "BOTTOM":
+4
View File
@@ -2038,3 +2038,7 @@ class Model(bonsai.core.tool.Model):
else:
geom_dict["edges"].append(el)
return geom_dict
@classmethod
def add_filled_opening(cls, voided_obj: bpy.types.Object, filling_obj: bpy.types.Object) -> None:
FilledOpeningGenerator().generate(filling_obj, voided_obj)