Skip to content

Commit

Permalink
Import: rewrite mesh importer
Browse files Browse the repository at this point in the history
Mesh importer now uses numpy and foreach_set to create the mesh,
which usually gives a good speed boost :)

A few models do get slower though :(
  • Loading branch information
scurest committed Jul 17, 2020
1 parent ec0f286 commit c68c355
Show file tree
Hide file tree
Showing 3 changed files with 489 additions and 447 deletions.
4 changes: 2 additions & 2 deletions addons/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def _create(gltf):

@staticmethod
def set_convert_functions(gltf):
yup2zup = bpy.app.debug_value != 100
gltf.yup2zup = bpy.app.debug_value != 100

if yup2zup:
if gltf.yup2zup:
# glTF Y-Up space --> Blender Z-up space
# X,Y,Z --> X,-Z,Y
def convert_loc(x): return Vector([x[0], -x[2], x[1]])
Expand Down
Loading

0 comments on commit c68c355

Please sign in to comment.