Hi,
With a lot of files I also experience the same issue. @eirannejad any news on this ? It’s quite important for us. Here is my output log (I added time information for opening the file)
Exported C:\Users\loicg\geomill_temp_files\41887.gltf Iteration 0 opened=True in 1.8956573009490967s, total : 1.9176533222198486s
Exported C:\Users\loicg\geomill_temp_files\41886.gltf Iteration 1 opened=True in 0.1691133975982666s, total : 0.19026684761047363s
Exported C:\Users\loicg\geomill_temp_files\41885.gltf Iteration 2 opened=True in 0.19170761108398438s, total : 0.21267104148864746s
Exported C:\Users\loicg\geomill_temp_files\41884.gltf Iteration 3 opened=True in 0.23329544067382812s, total : 0.2540161609649658s
Exported C:\Users\loicg\geomill_temp_files\41883.gltf Iteration 4 opened=True in 0.17435002326965332s, total : 0.19799423217773438s
Exported C:\Users\loicg\geomill_temp_files\41882.gltf Iteration 5 opened=True in 0.20513534545898438s, total : 0.2671365737915039s
Exported C:\Users\loicg\geomill_temp_files\41881.gltf Iteration 6 opened=True in 0.24000120162963867s, total : 0.26399946212768555s
Exported C:\Users\loicg\geomill_temp_files\41847.gltf Iteration 7 opened=True in 0.20113539695739746s, total : 0.22763586044311523s
Exported C:\Users\loicg\geomill_temp_files\41846.gltf Iteration 8 opened=True in 0.26110124588012695s, total : 0.30609130859375s
Exported C:\Users\loicg\geomill_temp_files\41880.gltf Iteration 9 opened=True in 0.2818615436553955s, total : 0.30881667137145996s
Exported C:\Users\loicg\geomill_temp_files\41879.gltf Iteration 10 opened=True in 0.22298574447631836s, total : 0.24763846397399902s
Exported C:\Users\loicg\geomill_temp_files\41878.gltf Iteration 11 opened=True in 0.2081141471862793s, total : 0.23011422157287598s
Exported C:\Users\loicg\geomill_temp_files\41830.gltf Iteration 12 opened=True in 0.20585203170776367s, total : 0.2428750991821289s
Exported C:\Users\loicg\geomill_temp_files\41827.gltf Iteration 13 opened=True in 0.19064545631408691s, total : 0.21334385871887207s
Exported C:\Users\loicg\geomill_temp_files\41819.gltf Iteration 14 opened=True in 0.20859408378601074s, total : 0.237595796585083s
Exported C:\Users\loicg\geomill_temp_files\41807.gltf Iteration 15 opened=True in 0.2230229377746582s, total : 0.2490229606628418s
Exported C:\Users\loicg\geomill_temp_files\41798.gltf Iteration 16 opened=True in 0.1918654441833496s, total : 0.21387577056884766s
Exported C:\Users\loicg\geomill_temp_files\41877.gltf Iteration 17 opened=True in 0.17009234428405762s, total : 0.19030451774597168s
Exported C:\Users\loicg\geomill_temp_files\41876.gltf Iteration 18 opened=True in 0.19418907165527344s, total : 0.22816920280456543s
Exported C:\Users\loicg\geomill_temp_files\41875.gltf Iteration 19 opened=True in 0.23900461196899414s, total : 0.27478814125061035s
Exported C:\Users\loicg\geomill_temp_files\41874.gltf Iteration 20 opened=True in 0.232468843460083s, total : 0.32002782821655273s
Exported C:\Users\loicg\geomill_temp_files\41873.gltf Iteration 21 opened=True in 0.20055866241455078s, total : 0.22057843208312988s
Exported C:\Users\loicg\geomill_temp_files\41872.gltf Iteration 22 opened=True in 0.1912527084350586s, total : 0.2133331298828125s
Exported C:\Users\loicg\geomill_temp_files\41871.gltf Iteration 23 opened=True in 0.21716547012329102s, total : 0.23817086219787598s
Exported C:\Users\loicg\geomill_temp_files\41870.gltf Iteration 24 opened=True in 0.18969964981079102s, total : 0.21869778633117676s
Exported C:\Users\loicg\geomill_temp_files\41869.gltf Iteration 25 opened=True in 0.17700839042663574s, total : 0.19696426391601562s
Exported C:\Users\loicg\geomill_temp_files\41868.gltf Iteration 26 opened=True in 0.1701498031616211s, total : 0.18856382369995117s
Exported C:\Users\loicg\geomill_temp_files\41867.gltf Iteration 27 opened=True in 0.16227364540100098s, total : 0.1883249282836914s
Exported C:\Users\loicg\geomill_temp_files\41866.gltf Iteration 28 opened=True in 0.17594361305236816s, total : 0.1990053653717041s
Exported C:\Users\loicg\geomill_temp_files\41865.gltf Iteration 29 opened=True in 0.22813057899475098s, total : 0.2511308193206787s
Exported C:\Users\loicg\geomill_temp_files\41864.gltf Iteration 30 opened=True in 0.19602322578430176s, total : 0.2309858798980713s
...
Exported C:\Users\loicg\geomill_temp_files\42052.gltf Iteration 532 opened=True in 1.0334393978118896s, total : 1.0612361431121826s
Exported C:\Users\loicg\geomill_temp_files\42051.gltf Iteration 533 opened=True in 1.0810620784759521s, total : 1.1060950756072998s
Exported C:\Users\loicg\geomill_temp_files\42050.gltf Iteration 534 opened=True in 1.1369562149047852s, total : 1.1660888195037842s
Exported C:\Users\loicg\geomill_temp_files\42049.gltf Iteration 535 opened=True in 1.1469354629516602s, total : 1.1679110527038574s
Exported C:\Users\loicg\geomill_temp_files\42048.gltf Iteration 536 opened=True in 1.5522980690002441s, total : 1.5917160511016846s
Exported C:\Users\loicg\geomill_temp_files\42047.gltf Iteration 537 opened=True in 1.8277180194854736s, total : 1.8748047351837158s
Exported C:\Users\loicg\geomill_temp_files\42046.gltf Iteration 538 opened=True in 1.674370288848877s, total : 1.6964311599731445s
Exported C:\Users\loicg\geomill_temp_files\42044.gltf Iteration 539 opened=True in 1.43300461769104s, total : 1.456005573272705s
Exported C:\Users\loicg\geomill_temp_files\42045.gltf Iteration 540 opened=True in 1.1895942687988281s, total : 1.2080893516540527s
Exported C:\Users\loicg\geomill_temp_files\42043.gltf Iteration 541 opened=True in 1.367720127105713s, total : 1.3956351280212402s
Exported C:\Users\loicg\geomill_temp_files\42042.gltf Iteration 542 opened=True in 1.4251000881195068s, total : 1.4542620182037354s
Exported C:\Users\loicg\geomill_temp_files\42041.gltf Iteration 543 opened=True in 1.3778932094573975s, total : 1.3998639583587646s
Exported C:\Users\loicg\geomill_temp_files\42040.gltf Iteration 544 opened=True in 1.1881380081176758s, total : 1.2771377563476562s
#! python 3
import scriptcontext as sc
import Rhino
import time
from datetime import datetime
options = Rhino.FileIO.FileGltfWriteOptions()
options.UseDisplayColorForUnsetMaterials = False
options.MapZToY = True
exported_files = []
if enabled is not None:
if enabled is not False:
if done is not None:
for i,source in enumerate(sources):
start = time.time()
doc = Rhino.RhinoDoc.OpenHeadless(source)
opened = doc is not None
if opened:
opening_time = time.time()
Rhino.FileIO.FileGltf.Write(destinations[i],doc,options)
exported_files.append(destinations[i])
doc.Dispose()
end = time.time()
print(f"Exported {destinations[i]} Iteration {i} {opened=} in {opening_time - start}s, total : {end - start}s")