diff options
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_scene.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_scene.py b/io_scene_gltf2/blender/imp/gltf2_blender_scene.py index 2bd58162..d2d63760 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_scene.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_scene.py @@ -157,6 +157,10 @@ class BlenderScene(): bpy.data.collections[gltf.blender_active_collection].hide_viewport = gltf.collection_hide_viewport # TODO restore visibility when expose in bpy + # Make first root object the new active one + if list_nodes is not None: + bpy.context.scene.objects.active = bpy.data.objects[gltf.data.nodes[list_nodes[0]].blender_object] + @staticmethod def get_root_nodes(gltf): if gltf.data.nodes is None: |