Skip to content
Snippets Groups Projects
Commit ade13102 authored by Julien Duroure's avatar Julien Duroure
Browse files

glTF exporter: export object from linked library

parent 2bbc4c72
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (0, 9, 41),
"version": (0, 9, 42),
'blender': (2, 80, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
......
......@@ -91,6 +91,11 @@ def __filter_node(blender_object, blender_scene, export_settings):
if blender_scene is not None:
instanced = any([blender_object.name in layer.objects for layer in blender_scene.view_layers])
if instanced is False:
# Check if object is from a linked collection
if any([blender_object.name in coll.objects for coll in bpy.data.collections if coll.library is not None]):
pass
else:
# Not instanced, not linked -> We don't keep this object
return False
if export_settings[gltf2_blender_export_keys.SELECTED] and blender_object.select_get() is False:
return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment