@@ -800,7 +800,8 @@ def create_grid_axes(self, axes, grid_collection, grid_obj):
800
800
for axis in axes :
801
801
shape = self .create_generic_shape (axis .AxisCurve )
802
802
mesh = self .create_mesh (axis , shape )
803
- obj = bpy .data .objects .new (f"IfcGridAxis/{ axis .AxisTag } " , mesh )
803
+ obj_name = tool .Loader .get_name_layout ("IfcGridAxis" , axis .AxisTag )
804
+ obj = bpy .data .objects .new (obj_name , mesh )
804
805
if bpy .context .preferences .addons ["blenderbim" ].preferences .lock_grids_on_import :
805
806
obj .lock_location = (True , True , True )
806
807
obj .lock_rotation = (True , True , True )
@@ -1059,11 +1060,11 @@ def create_structural_point_connections(self):
1059
1060
if not vertex or not context or not representation :
1060
1061
continue # TODO implement non cartesian point vertexes
1061
1062
1062
- mesh_name = f" { context .id ()} / { representation .id ()} "
1063
+ mesh_name = tool . Loader . get_name_layout ( context .id (), representation .id ())
1063
1064
mesh = bpy .data .meshes .new (mesh_name )
1064
1065
mesh .from_pydata ([mathutils .Vector (vertex ) * self .unit_scale ], [], [])
1065
1066
1066
- obj = bpy .data .objects .new ("{}/{}" . format ( product . is_a (), product . Name ), mesh )
1067
+ obj = bpy .data .objects .new (tool . Loader . get_name ( product ), mesh )
1067
1068
self .set_matrix_world (obj , self .apply_blender_offset_to_matrix_world (obj , placement_matrix ))
1068
1069
self .link_element (product , obj )
1069
1070
@@ -1124,12 +1125,12 @@ def create_pointcloud(
1124
1125
if len (vertex_list ) == 0 :
1125
1126
return None
1126
1127
1127
- mesh_name = f" { representation .ContextOfItems .id ()} / { representation .id ()} "
1128
+ mesh_name = tool . Loader . get_name_layout ( representation .ContextOfItems .id (), representation .id ())
1128
1129
mesh = bpy .data .meshes .new (mesh_name )
1129
1130
mesh .from_pydata (vertex_list , [], [])
1130
1131
tool .Ifc .link (representation , mesh )
1131
1132
1132
- obj = bpy .data .objects .new ("{}/{}" . format ( product . is_a (), product . Name ), mesh )
1133
+ obj = bpy .data .objects .new (tool . Loader . get_name ( product ), mesh )
1133
1134
self .set_matrix_world (obj , self .apply_blender_offset_to_matrix_world (obj , placement_matrix ))
1134
1135
self .link_element (product , obj )
1135
1136
return product
@@ -1592,9 +1593,7 @@ def create_project(self):
1592
1593
self .project ["blender" ] = obj .BIMObjectProperties .collection
1593
1594
self .has_existing_project = True
1594
1595
return
1595
- self .project ["blender" ] = bpy .data .collections .new (
1596
- "{}/{}" .format (self .project ["ifc" ].is_a (), self .project ["ifc" ].Name )
1597
- )
1596
+ self .project ["blender" ] = bpy .data .collections .new (tool .Loader .get_name (self .project ["ifc" ]))
1598
1597
obj = self .create_product (self .project ["ifc" ])
1599
1598
obj .hide_select = True
1600
1599
self .project ["blender" ].objects .link (obj )
0 commit comments