3.5 Can not import .glb(gtlf) file #104415

Closed
opened 2023-02-16 18:30:28 +01:00 by Pratik Borhade · 6 comments
Member

System Information
Operating system: Windows 11 22H2 22621.1265
Graphics card: NVIDIA 1050 Ti/Intel UHD630

PYTHON INTERACTIVE CONSOLE 3.10.9 (main, Dec 8 2022, 14:09:03) [MSC v.1928 64 bit (AMD64)]

Blender Version
Broken: (3.5.0 beta, 4CB119F5339F, master, 2023.02.15 23:48)
Worked: (3.4.1 version of Blender that worked as expected)

Short description of error
can not import .glb(gtlf) file as normal
Exact steps for others to reproduce the error

Python: Traceback (most recent call last):
  File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\__init__.py", line 1272, in execute
    return self.import_gltf2(context)
  File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\__init__.py", line 1300, in import_gltf2
    if self.unit_import(path, import_settings) == {'FINISHED'}:
  File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\__init__.py", line 1320, in unit_import
    BlenderGlTF.create(gltf_importer)
  File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_gltf.py", line 37, in create
    BlenderGlTF._create(gltf)
  File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_gltf.py", line 44, in _create
    BlenderScene.create(gltf)
  File "G:\blender\blende```
r35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_scene.py", line 36, in create
    BlenderNode.create_vnode(gltf, 'root')
  File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 44, in create_vnode
    BlenderNode.create_vnode(gltf, child)
  File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 30, in create_vnode
    obj = BlenderNode.create_object(gltf, vnode_id)
  File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 111, in create_object
    bpy.data.scenes[gltf.blender_scene].collection.objects.link(obj)
KeyError: 'bpy_prop_collection[key]: key "" not found'

fileimage

**System Information** Operating system: Windows 11 22H2 22621.1265 Graphics card: NVIDIA 1050 Ti/Intel UHD630 PYTHON INTERACTIVE CONSOLE 3.10.9 (main, Dec 8 2022, 14:09:03) [MSC v.1928 64 bit (AMD64)] **Blender Version** Broken: (3.5.0 beta, 4CB119F5339F, master, 2023.02.15 23:48) Worked: (3.4.1 version of Blender that worked as expected) **Short description of error** can not import .glb(gtlf) file as normal **Exact steps for others to reproduce the error** ``` Python: Traceback (most recent call last): File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\__init__.py", line 1272, in execute return self.import_gltf2(context) File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\__init__.py", line 1300, in import_gltf2 if self.unit_import(path, import_settings) == {'FINISHED'}: File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\__init__.py", line 1320, in unit_import BlenderGlTF.create(gltf_importer) File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_gltf.py", line 37, in create BlenderGlTF._create(gltf) File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_gltf.py", line 44, in _create BlenderScene.create(gltf) File "G:\blender\blende``` r35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_scene.py", line 36, in create BlenderNode.create_vnode(gltf, 'root') File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 44, in create_vnode BlenderNode.create_vnode(gltf, child) File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 30, in create_vnode obj = BlenderNode.create_object(gltf, vnode_id) File "G:\blender\blender35\3.5\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 111, in create_object bpy.data.scenes[gltf.blender_scene].collection.objects.link(obj) KeyError: 'bpy_prop_collection[key]: key "" not found' ``` file![image](/attachments/72e303b7-38f4-4b95-8c24-bc5dff60104d)
Pratik Borhade added the
Type
Report
label 2023-02-16 18:30:28 +01:00
Author
Member

blender/blender#104822

Hello,
I can not reproduce with our test CI: https://github.com/KhronosGroup/glTF-Blender-IO/actions/runs/4187783967/jobs/7274790585

As requested, please provide a sample .gltf or .glb file you can't import.

cc @JulienDuroure
cc @system-system

https://projects.blender.org/blender/blender/issues/104822 > Hello, > I can not reproduce with our test CI: https://github.com/KhronosGroup/glTF-Blender-IO/actions/runs/4187783967/jobs/7274790585 > > As requested, please provide a sample .gltf or .glb file you can't import. cc @JulienDuroure cc @system-system
Julien Duroure added the
Status
Needs Information from User
label 2023-02-16 19:34:21 +01:00

Like this:
They are normal in blender3.4
image

Like this: They are normal in blender3.4 ![image](/attachments/00318daf-2156-472a-ae35-66bd0042f439)
1.9 KiB
62 KiB

It don't think the .glb you're importing has any effect on this, the cause is somewhere else.

gltf.blender_scene is assigned here:

scene = bpy.context.scene
gltf.blender_scene = scene.name

So bpy.context.scene.name is somehow "". Or maybe it gets clobbered by a user extension or something.

It don't think the .glb you're importing has any effect on this, the cause is somewhere else. `gltf.blender_scene` is assigned here: https://projects.blender.org/blender/blender-addons/src/commit/89347caf1b8e3ecae86118800f99c58e0d1f6a7d/io_scene_gltf2/blender/imp/gltf2_blender_scene.py#L21-L22 So `bpy.context.scene.name` is somehow `""`. Or maybe it gets clobbered by a user extension or something.
Member

I confirm that I can not reproduce.
Can you try reset to factory settings?

I confirm that I can not reproduce. Can you try reset to factory settings?

Yes. It was banned because of my python debug mode
Many addons cannot use if exchange the default python path of blender

Yes. It was banned because of my python debug mode Many addons cannot use if exchange the default python path of blender
Member

Ok, seems there is no bug with default Blender. Closing this ticket.
Thanks!

Ok, seems there is no bug with default Blender. Closing this ticket. Thanks!
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2023-02-17 18:01:38 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104415
No description provided.