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

objects from linked collections fail on export #9

Open
s-light opened this issue Apr 8, 2021 · 5 comments
Open

objects from linked collections fail on export #9

s-light opened this issue Apr 8, 2021 · 5 comments

Comments

@s-light
Copy link

s-light commented Apr 8, 2021

if i link a collection from another file the export crashes at contained objects:

$ ./blender
Read prefs: /home/stefan/.config/blender/2.90/config/userpref.blend
found bundled python: /home/stefan/mydata/tools/blender/blender-2.90.1-linux64/2.90/python
Read blend: /home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection.blend
Info: Saved "test_linked_collection.blend"

Info: Saved "test_linked_collection.blend"

[AFRAME EXPORTER] Exporting project...
[AFRAME EXPORTER] Target Dir = /home/stefan/mydata/github/blender/aframe_blender_exporter
--- DEST [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection] [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection/.] {.}
--- DEST [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection] [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection/assets/] {assets/}
--- DEST [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection] [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection/resources/] {resources/}
--- DEST [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection] [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection/media/] {media/}
--- DEST [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection] [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection/env/] {env/}
--- DEST [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection] [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection/js/] {js/}
--- DEST [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection] [/home/stefan/mydata/blender/tests/aframe_exporter/test_linked_collection/lightmaps/] {lightmaps/}
[AFRAME EXPORTER] loop object CollectionTorus
Warning: 1 object(s) not centered, 0 changed:
Warning: |1 linked library object(s)
[AFRAME EXPORTER] loop object Cube
[LIGHTMAP] Searching Lightmap for object [Cube_baked]
'/home/stefan/mydata/tools/blender/blender-2.90.1-linux64/2.90/python/lib/python3.7/site-packages/libextern_draco.so' exists, draco mesh compression is available
12:26:50 | INFO: Starting glTF 2.0 export
12:26:50 | INFO: Extracting primitive: Cube
12:26:50 | INFO: Primitives created: 1
12:26:50 | INFO: Finished glTF 2.0 export in 0.0018973350524902344 s

[AFRAME EXPORTER] loop object Light
[AFRAME EXPORTER] loop object Torus
Traceback (most recent call last):
  File "/home/stefan/.config/blender/scripts/addons/aframe_blender_exporter/__init__.py", line 575, in execute
    obj.select_set(state=True)
RuntimeError: Error: Object 'Torus' can't be selected because it is not in View Layer 'View Layer'!


location: <unknown location>:-1

location: <unknown location>:-1
Error: Traceback (most recent call last):
  File "/home/stefan/.config/blender/scripts/addons/aframe_blender_exporter/__init__.py", line 575, in execute
    obj.select_set(state=True)
RuntimeError: Error: Object 'Torus' can't be selected because it is not in View Layer 'View Layer'!


location: <unknown location>:-1

on a quick search i found some maybe related thinks:

with linked objects this does not happen.
so somehow this seems to be only happening with linked collection / child things...

i have attached the two test files.

test_linked_collection.zip

@s-light
Copy link
Author

s-light commented Feb 28, 2022

should be fixed with #17 - in combination with blender 3.1. - if it contains the vtree branch of the gltf exporter.

@julienduroure
Copy link

@s-light vtree branch will not be on 3.1, but in 3.2

@s-light
Copy link
Author

s-light commented Mar 2, 2022

hmm ok! thanks for the heads up.

@s-light
Copy link
Author

s-light commented Mar 16, 2022

just tested this -
fixed with official blender 3.1.0 and #17

@phil123456
Copy link

still have the issue with 3.1.2

Error: Object 'Bridge' can't be selected because it is not in View Layer 'View Layer'!

obj.select_set(obj.type == "MESH")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants