glTF exporter: export object from linked library

This commit is contained in:
Julien Duroure 2019-08-04 17:51:45 +02:00
parent 2bbc4c7264
commit ade1310234
2 changed files with 7 additions and 2 deletions

View File

@ -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',

View File

@ -91,7 +91,12 @@ 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:
return 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