Handle scenarios where the data block name is the name for meshes and curves

This commit is contained in:
Dion Moult
2020-02-04 11:56:39 +11:00
parent 2d53c691f5
commit b449f8afaa
@@ -753,8 +753,15 @@ class IfcParser():
for product in self.selected_products \
+ self.type_products \
+ self.selected_spatial_structure_elements:
self.prevent_data_name_duplicates(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):
obj = product['raw']
if obj.data and obj.data.name in self.representations: