diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-05-17 13:36:11 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-05-17 15:18:02 +0300 |
commit | 222969e3805359444579d7ab96d75b93c73212fe (patch) | |
tree | 6b9985a4fc81544b428ce6d03d713ca11f9498ed /io_scene_gltf2/blender | |
parent | b455cbf6b1074074c45cb365721b2d61a8004320 (diff) |
Update for Depsgraph API changes
Reviewers: sergey
Differential Revision: https://developer.blender.org/D4883
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_node.py | 2 |
2 files changed, 2 insertions, 2 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 d74a5c1d..0d344136 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py @@ -216,7 +216,7 @@ def __gather_mesh(blender_object, export_settings): edge_split.split_angle = blender_object.data.auto_smooth_angle edge_split.use_edge_angle = not blender_object.data.has_custom_normals blender_object.data.use_auto_smooth = False - bpy.context.scene.update() + bpy.context.view_layer.update() armature_modifiers = {} if export_settings[gltf2_blender_export_keys.SKINS]: diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_node.py b/io_scene_gltf2/blender/imp/gltf2_blender_node.py index 76dadcc1..d0c1ad58 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_node.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_node.py @@ -189,7 +189,7 @@ class BlenderNode(): obj.select_set(True) bpy.data.objects[node.blender_armature_name].select_set(True) bpy.context.view_layer.objects.active = bpy.data.objects[node.blender_armature_name] - bpy.context.scene.update() + bpy.context.view_layer.update() bpy.ops.object.parent_set(type='BONE_RELATIVE', keep_transform=True) # From world transform to local (-armature transform -bone transform) bone_trans = bpy.data.objects[node.blender_armature_name] \ |