Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on exporting instanced collections #225

Closed
joergjaeckel opened this issue Jan 10, 2019 · 5 comments
Closed

Error on exporting instanced collections #225

joergjaeckel opened this issue Jan 10, 2019 · 5 comments
Labels
bug Something isn't working enhancement New feature or request exporter This involves or affects the export process Mesh_&_Object

Comments

@joergjaeckel
Copy link

joergjaeckel commented Jan 10, 2019

Hi,
there is an issue with exporting instanced collections. The instanced_collection has obviously no attribute layers.

image

Steps to reproduce:
(latest blender 2.80 and latest exporter)

  • load startup file
  • create new collection
  • put the cube inside the new collection
  • create empty
  • at instancing choose the new collection
  • try to export

cheers
(thanks a lot for your efforts!)

@joergjaeckel
Copy link
Author

I just realized, that instancing isn't handled anyways. Are there any plans on exporting empties with instancing?

@julienduroure julienduroure added bug Something isn't working enhancement New feature or request exporter This involves or affects the export process labels Jan 10, 2019
@UX3D-nopper UX3D-nopper added this to the Community milestone Jan 17, 2019
@capnm
Copy link
Contributor

capnm commented Apr 8, 2019

v2.80 Testfile:

i225-instanced-collections.zip

Crash output text:

11:44:31 | INFO: Starting glTF 2.0 export
11:44:31 | INFO: Extracting primitive: Cube
11:44:31 | DEBUG: Adding primitive without splitting. Indices: 36 Vertices: 24
11:44:31 | INFO: Primitives created: 1
11:44:31 | INFO: Extracting primitive: Cube.001
11:44:31 | DEBUG: Adding primitive without splitting. Indices: 36 Vertices: 24
11:44:31 | INFO: Primitives created: 1
Traceback (most recent call last):
  File "bin/2.80/scripts/addons/io_scene_gltf2/__init__.py", line 407, in execute
    return gltf2_blender_export.save(context, export_settings)
  File "bin/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 40, in save
    json, buffer = __export(export_settings)
  File "bin/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 54, in __export
    __gather_gltf(exporter, export_settings)
  File "bin/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 69, in __gather_gltf
    scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
  File "bin/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather.py", line 34, in gather_gltf2
    scenes.append(__gather_scene(blender_scene, export_settings))
  File "bin/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "bin/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather.py", line 52, in __gather_scene
    node = gltf2_blender_gather_nodes.gather_node(blender_object, export_settings)
  File "bin/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_cache.py", line 51, in wrapper_cached
    result = func(*args)
  File "bin/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py", line 35, in gather_node
    if not __filter_node(blender_object, export_settings):
  File "bin/2.80/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py", line 76, in __filter_node
    if blender_object.instance_collection is not None and not blender_object.instance_collection.layers[0]:
AttributeError: 'Collection' object has no attribute 'layers'

location: <unknown location>:-1

@emackey
Copy link
Member

emackey commented Apr 11, 2019

Also reported in https://developer.blender.org/T63479

@julienduroure julienduroure removed this from the Maintenance & Community milestone Sep 26, 2019
@Franckapik
Copy link

Franckapik commented Jun 6, 2020

Hi!
I would like to know if this issue is resolved now ? I use blender 2.83 and it seems that we don't see instanced collection from another scene in gltf view ...

Strangely, it's working if i open a new blend file and link the collections inside it and then export to gltf.

Thank you for your beautiful work !

F.

@julienduroure
Copy link
Collaborator

Yes, this is now solved.
Note that nested linked are not fully implemented yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request exporter This involves or affects the export process Mesh_&_Object
Projects
None yet
Development

No branches or pull requests

6 participants