File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ trimesh = [
6767
6868# this is the base extra most users will want
6969easy = [
70+ " DracoPy" ,
7071 " colorlog" ,
7172 " manifold3d>=2.3.0" ,
7273 " charset-normalizer" ,
Original file line number Diff line number Diff line change 1414
1515from ...caching import hash_fast
1616from ...constants import log
17+ from ...exceptions import ExceptionWrapper
18+
19+ try :
20+ import DracoPy as dpy
21+ except BaseException as E :
22+ dpy = exceptions .ExceptionWrapper (E )
1723
1824# GL geometry modes
1925_GL_TRIANGLES = 4
@@ -299,7 +305,6 @@ def _draco_mesh_compression(context: PrimitivePreprocessContext) -> None:
299305 context
300306 PrimitivePreprocessContext with extension data.
301307 """
302- import DracoPy as dpy
303308 primitive = context ["primitive" ]
304309
305310 if primitive .get ("mode" ) not in [_GL_STRIP , _GL_TRIANGLES ]:
@@ -344,12 +349,6 @@ def _draco_mesh_compression(context: PrimitiveExportContext) -> None:
344349 context
345350 PrimitiveExportContext with extension data.
346351 """
347- import DracoPy as dpy
348-
349- # For index accessor + attribute accessors:
350- # - Replace the accessor information
351- # - Extract data from buffers
352-
353352 primitive = context .get ("primitive" )
354353 if not primitive :
355354 return
@@ -418,8 +417,8 @@ def _draco_mesh_compression(context: PrimitiveExportContext) -> None:
418417 tex_coord = tex_coord ,
419418 normals = normals ,
420419 generic_attributes = generic_attributes or None ,
421- quantization_bits = 14 ,
422- compression_level = 2 ,
420+ quantization_bits = 14 , # blender defaults
421+ compression_level = 6 , # blender defaults
423422 )
424423 dpy_mesh = dpy .decode_buffer_to_mesh (buf )
425424
You can’t perform that action at this time.
0 commit comments