diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-06-23 09:17:47 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-06-23 09:17:47 +0300 |
commit | a3ebbe7309932950024d426516bbb4f4aca62270 (patch) | |
tree | fc6eca18acfb5a8eb40fd479c716a4c7d6b5c49e /io_scene_gltf2/blender | |
parent | ef5f9c3291ffec316e1d0a380ca2357351104a8d (diff) |
glTF exporter: fix depsgraph evaluation after blender API changes
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py index e6a93553..ae228eb9 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py @@ -224,7 +224,7 @@ def __gather_mesh(blender_object, export_settings): depsgraph = bpy.context.evaluated_depsgraph_get() blender_mesh_owner = blender_object.evaluated_get(depsgraph) - blender_mesh = blender_mesh_owner.to_mesh() + blender_mesh = blender_mesh_owner.to_mesh(preserve_all_data_layers=True, depsgraph=depsgraph) for prop in blender_object.data.keys(): blender_mesh[prop] = blender_object.data[prop] skip_filter = True @@ -311,8 +311,8 @@ def __gather_skin(blender_object, export_settings): # check if any vertices in the mesh are part of a vertex group depsgraph = bpy.context.evaluated_depsgraph_get() - # XXX: ... - blender_mesh = blender_object.evaluated_get(depsgraph).to_mesh() + blender_mesh_owner = blender_object.evaluated_get(depsgraph) + blender_mesh = blender_mesh_owner.to_mesh(preserve_all_data_layers=True, depsgraph=depsgraph) if not any(vertex.groups is not None and len(vertex.groups) > 0 for vertex in blender_mesh.vertices): return None |