mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 12:09:51 +00:00
Fix bug where duplicating a curve (which would result in a new curve) didn't go in the same collection nor was linked to the right item due to a typo
This commit is contained in:
@@ -19,7 +19,6 @@
|
|||||||
import re
|
import re
|
||||||
import bpy
|
import bpy
|
||||||
import bmesh
|
import bmesh
|
||||||
import logging
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import numpy.typing as npt
|
import numpy.typing as npt
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
@@ -2309,12 +2308,13 @@ class OverrideModeSetObject(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
mesh = bpy.data.meshes.new(name)
|
mesh = bpy.data.meshes.new(name)
|
||||||
new_obj = bpy.data.objects.new(name, mesh)
|
new_obj = bpy.data.objects.new(name, mesh)
|
||||||
new_obj.data.BIMMeshProperties.ifc_definition_id = item.id()
|
new_obj.data.BIMMeshProperties.ifc_definition_id = item.id()
|
||||||
scene = bpy.context.scene
|
bpy.context.collection.objects.link(new_obj)
|
||||||
scene.collection.objects.link(new_obj)
|
props.add_item_object(new_obj, item)
|
||||||
props.add_item_object(obj, item)
|
|
||||||
new_obj.matrix_world = obj.matrix_world
|
new_obj.matrix_world = obj.matrix_world
|
||||||
tool.Geometry.import_item(new_obj)
|
tool.Geometry.import_item(new_obj)
|
||||||
|
|
||||||
|
if additional_curves:
|
||||||
|
tool.Root.reload_item_decorator()
|
||||||
tool.Geometry.reload_representation(props.representation_obj)
|
tool.Geometry.reload_representation(props.representation_obj)
|
||||||
|
|
||||||
def enable_edit_mode(self, context):
|
def enable_edit_mode(self, context):
|
||||||
|
|||||||
Reference in New Issue
Block a user