mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 11:46:33 +00:00
use delete_ifc_object removing a type
It was acting a bit different - e.g. leaving mesh representation from type on occurrences leaving to lots of errors. Though there is still #3931
This commit is contained in:
@@ -512,10 +512,7 @@ class RemoveType(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
element = tool.Ifc.get().by_id(self.element)
|
element = tool.Ifc.get().by_id(self.element)
|
||||||
obj = tool.Ifc.get_object(element)
|
obj = tool.Ifc.get_object(element)
|
||||||
ifcopenshell.api.run("root.remove_product", tool.Ifc.get(), product=element)
|
tool.Geometry.delete_ifc_object(obj)
|
||||||
if obj:
|
|
||||||
tool.Ifc.unlink(obj=obj)
|
|
||||||
bpy.data.objects.remove(obj)
|
|
||||||
|
|
||||||
|
|
||||||
class RenameType(bpy.types.Operator, tool.Ifc.Operator):
|
class RenameType(bpy.types.Operator, tool.Ifc.Operator):
|
||||||
|
|||||||
Reference in New Issue
Block a user