@@ -2450,21 +2450,24 @@ def load_scenario(context, path_to_nav_json, path_to_output_obj_file, mesh_type,
24502450 else :
24512451 mesh_hash = hash_and_entity ['primHash' ]
24522452
2453- room_folder_name = hash_and_entity ["roomFolderName" ]
2453+ room_folder_name = hash_and_entity ["roomFolderName" ][: 63 ]
24542454 if room_folder_name not in bpy .data .collections :
24552455 coll = bpy .data .collections .new (room_folder_name )
24562456 bpy .context .scene .collection .children .link (coll )
24572457 coll .color_tag = "COLOR_0" + str (room_folder_color_index % 8 + 1 )
24582458 room_folder_color_index += 1
2459+ log ("INFO" , "Adding new collection for room folder name: " + room_folder_name , "load_scenario" )
2460+
24592461 room_folder_coll = bpy .data .collections .get (room_folder_name )
2460-
2461- room_name = hash_and_entity ["roomName" ]
2462+
2463+ room_name = hash_and_entity ["roomName" ][: 63 ]
24622464 if room_name not in bpy .data .collections :
24632465 coll = bpy .data .collections .new (room_name )
24642466 room_folder_coll .children .link (coll )
2465- coll .color_tag = "COLOR_0" + str (room_color_index % 8 + 1 )
2467+ coll .color_tag = "COLOR_0" + str (room_color_index % 8 + 1 )
24662468 room_color_index += 1
2467-
2469+ log ("INFO" , "Adding new collection for room name: " + room_name , "load_scenario" )
2470+
24682471 entity = hash_and_entity ['entity' ]
24692472 transform = {"position" : entity ["position" ], "rotate" : entity ["rotation" ],
24702473 "scale" : entity ["scale" ]["data" ], "id" : entity ["id" ]}
@@ -2554,7 +2557,7 @@ def load_scenario(context, path_to_nav_json, path_to_output_obj_file, mesh_type,
25542557 p = mesh_transform ["position" ]
25552558 r = mesh_transform ["rotate" ]
25562559 s = mesh_transform ["scale" ]
2557- log ("INFO" , "Transforming " + mesh_type + " [" + str (current_mesh_in_scene_index ) + "/" + str (meshes_in_scenario_count ) + "]: " + mesh_hash + " #" + str (i ) + " Mesh: [" + str (mesh_i + 1 ) + "/" + str (mesh_count ) + "]" , "load_scenario" )
2560+ log ("INFO" , "Transforming " + mesh_type + " [" + str (current_mesh_in_scene_index ) + "/" + str (meshes_in_scenario_count ) + "]: " + mesh_hash + " #" + str (i ) + " Mesh: [" + str (mesh_i + 1 ) + "/" + str (mesh_count ) + "] Room name: " + room_name , "load_scenario" )
25582561 mesh_i += 1
25592562 for obj in objects :
25602563 if i != 0 :
0 commit comments