mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +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 \
|
||||
+ 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:
|
||||
|
||||
Reference in New Issue
Block a user