@@ -955,10 +955,20 @@ def chunk_initial_mesh_task(
955
955
draco_encoding_settings = get_draco_encoding_settings_for_chunk (
956
956
cg , chunk_id , mip , high_padding
957
957
)
958
+ ids_to_mesh = set ()
958
959
if node_id_subset is None :
959
960
seg = get_remapped_segmentation (
960
961
cg , chunk_id , mip , overlap_vx = high_padding , time_stamp = time_stamp
961
962
)
963
+ try :
964
+ ts = cg .meta .custom_data ["mesh" ]["initial_ts" ]
965
+ mesh_ts = datetime .datetime .fromtimestamp (ts )
966
+ except KeyError :
967
+ mesh_ts = None
968
+ range_read = cg .range_read_chunk (
969
+ chunk_id , properties = attributes .Hierarchy .Child , time_stamp = mesh_ts
970
+ )
971
+ ids_to_mesh = set ([int (x ) for x in range_read .keys ()])
962
972
else :
963
973
seg = get_remapped_seg_for_lvl2_nodes (
964
974
cg ,
@@ -979,16 +989,6 @@ def chunk_initial_mesh_task(
979
989
print ("cv path" , mesh_dst )
980
990
print ("num ids" , len (mesher .ids ()))
981
991
982
- try :
983
- ts = cg .meta .custom_data ["mesh" ]["initial_ts" ]
984
- mesh_ts = datetime .datetime .fromtimestamp (ts )
985
- except KeyError :
986
- mesh_ts = None
987
- range_read = cg .range_read_chunk (
988
- chunk_id , properties = attributes .Hierarchy .Child , time_stamp = mesh_ts
989
- )
990
- ids_to_mesh = set ([int (x ) for x in range_read .keys ()])
991
-
992
992
result .append (len (mesher .ids ()))
993
993
for obj_id in mesher .ids ():
994
994
mesh = mesher .get (obj_id , reduction_factor = 100 , max_error = max_err )
@@ -1009,8 +1009,8 @@ def chunk_initial_mesh_task(
1009
1009
compress = False
1010
1010
else :
1011
1011
file_contents = mesh .to_precomputed ()
1012
- ids_to_mesh .remove (int (obj_id ))
1013
1012
compress = True
1013
+ ids_to_mesh .discard (int (obj_id ))
1014
1014
if WRITING_TO_CLOUD :
1015
1015
if sharded :
1016
1016
merged_meshes [int (obj_id )] = file_contents
0 commit comments