glTF importer: Make the first root node the active object at end of import process
This commit is contained in:
parent
447abeb9be
commit
b82ea71146
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue