mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 16:22:53 +00:00
Handle scenarios where the data block name is the name for meshes and curves
This commit is contained in:
@@ -753,8 +753,15 @@ class IfcParser():
|
|||||||
for product in self.selected_products \
|
for product in self.selected_products \
|
||||||
+ self.type_products \
|
+ self.type_products \
|
||||||
+ self.selected_spatial_structure_elements:
|
+ self.selected_spatial_structure_elements:
|
||||||
|
self.prevent_data_name_duplicates(product)
|
||||||
self.load_product_representations(product)
|
self.load_product_representations(product)
|
||||||
|
|
||||||
|
def prevent_data_name_duplicates(self, product):
|
||||||
|
if product['raw'].data \
|
||||||
|
and bpy.data.meshes.get(product['raw'].data.name) \
|
||||||
|
and bpy.data.curves.get(product['raw'].data.name):
|
||||||
|
product['raw'].data.name += '~'
|
||||||
|
|
||||||
def load_product_representations(self, product):
|
def load_product_representations(self, product):
|
||||||
obj = product['raw']
|
obj = product['raw']
|
||||||
if obj.data and obj.data.name in self.representations:
|
if obj.data and obj.data.name in self.representations:
|
||||||
|
|||||||
Reference in New Issue
Block a user