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

expoet Z-Anatomy to gltf/glb has IndexError: list out of range, this is why? #2367

Open
weili96 opened this issue Oct 4, 2024 · 17 comments
Open
Labels
question Further information is requested

Comments

@weili96
Copy link

weili96 commented Oct 4, 2024

image

@weili96
Copy link
Author

weili96 commented Oct 4, 2024

image

@julienduroure
Copy link
Collaborator

Hello,
As requested in the issue template that you deleted, please provide the .blend file.
I can't investigate without it.
Thanks!

@julienduroure julienduroure added the question Further information is requested label Oct 4, 2024
@weili96
Copy link
Author

weili96 commented Oct 5, 2024

@weili96
Copy link
Author

weili96 commented Oct 5, 2024

Z-Anatomy_Template.zip, load it into blender of application template, then open a file from it , then export some thing to gltf, but has indexerror

@weili96
Copy link
Author

weili96 commented Oct 5, 2024

@weili96
Copy link
Author

weili96 commented Oct 5, 2024

Python: Traceback (most recent call last):
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2_init_.py", line 1288, in execute
res = gltf2_blender_export.save(context, export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 37, in save
json, buffer = __export(export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 55, in __export
__gather_gltf(exporter, export_settings)
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 202, in __gather_gltf
active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 31, in gather_gltf2
scenes.append(__gather_scene(blender_scene, export_settings))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 37, in wrapper_cached
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 94, in __gather_scene
node = gltf2_blender_gather_nodes.gather_node(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 48, in gather_node
children=__gather_children(vnode, export_settings),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 104, in __gather_children
node = gather_node(c, export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 48, in gather_node
children=__gather_children(vnode, export_settings),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 104, in __gather_children
node = gather_node(c, export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 42, in gather_node
mesh = __gather_mesh(vnode, blender_object, export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 335, in __gather_mesh
result = gltf2_blender_gather_mesh.gather_mesh(blender_mesh,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 37, in wrapper_cached
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_mesh.py", line 59, in gather_mesh
blender_mesh, vertex_groups, modifiers, export_settings), primitives=__gather_primitives(
^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_mesh.py", line 136, in __gather_primitives
return gltf2_blender_gather_primitives.gather_primitives(blender_mesh,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 37, in wrapper_cached
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_primitives.py", line 57, in gather_primitives
blender_primitives, addional_materials_udim = __gather_cache_primitives(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 37, in wrapper_cached
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_primitives.py", line 140, in __gather_cache_primitives
blender_primitives, additional_materials_udim, shared_attributes = gltf2_blender_gather_primitives_extract.extract_primitives(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_primitives_extract.py", line 41, in extract_primitives
primitive_creator.manage_material_info() # UVMap & Vertex Color
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_primitives_extract.py", line 436, in manage_material_info
base_material, material_info = get_base_material(material_idx, self.materials, self.export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_gather_materials.py", line 697, in get_base_material
material, material_info = gather_material(
^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 37, in wrapper_cached
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_gather_materials.py", line 89, in gather_material
pbr_metallic_roughness, uvmap_info_pbr_metallic_roughness, vc_info, udim_info_prb_mr = __gather_pbr_metallic_roughness(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_gather_materials.py", line 465, in __gather_pbr_metallic_roughness
return gltf2_blender_gather_materials_pbr_metallic_roughness.gather_material_pbr_metallic_roughness(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 37, in wrapper_cached
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_gather_materials_pbr_metallic_roughness.py", line 30, in gather_material_pbr_metallic_roughness
base_color_texture, uvmap_info, udim_info_bc, _ = __gather_base_color_texture(blender_material, export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_gather_materials_pbr_metallic_roughness.py", line 143, in __gather_base_color_texture
inputs = tuple(
^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_gather_materials_pbr_metallic_roughness.py", line 145, in
if socket.socket is not None and has_image_node_from_socket(socket, export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_search_node_tree.py", line 142, in has_image_node_from_socket
result = get_texture_node_from_socket(socket, export_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 37, in wrapper_cached
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_search_node_tree.py", line 131, in get_texture_node_from_socket
result = from_socket(
^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_search_node_tree.py", line 126, in from_socket
return __search_from_socket(start_socket.socket, shader_node_filter, [], start_socket.group_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_search_node_tree.py", line 110, in __search_from_socket
linked_results = __search_from_socket(
^^^^^^^^^^^^^^^^^^^^^
File "D:\software\blender\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_search_node_tree.py", line 97, in __search_from_socket
socket = [sock for sock in group_path[-1].inputs if sock.name == link.from_socket.name][0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

@weili96
Copy link
Author

weili96 commented Oct 7, 2024

Hello, As requested in the issue template that you deleted, please provide the .blend file. I can't investigate without it. Thanks!

hi, can have some solution to this problem? thanks very much!

@julienduroure
Copy link
Collaborator

I am currently not able to reproduce it on Blender 4.2.2 or current main branch (Blender 4.4 alpha).
Do you use some non default option at export?

@weili96
Copy link
Author

weili96 commented Oct 7, 2024

I am currently not able to reproduce it on Blender 4.2.2 or current main branch (Blender 4.4 alpha). Do you use some non default option at export?

yes,i only export selected things

@weili96
Copy link
Author

weili96 commented Oct 7, 2024

i install 4.4.2 to try, now i am in 4.2.1

@weili96
Copy link
Author

weili96 commented Oct 7, 2024

install 4.2.2

@weili96
Copy link
Author

weili96 commented Oct 7, 2024

I am currently not able to reproduce it on Blender 4.2.2 or current main branch (Blender 4.4 alpha). Do you use some non default option at export?

when i am in 4.2.2,and default option also has this error ! so i not know what to do and I feel very downhearted

@weili96
Copy link
Author

weili96 commented Oct 7, 2024

how are you export ,can you tell me

@weili96
Copy link
Author

weili96 commented Oct 7, 2024

image

@weili96
Copy link
Author

weili96 commented Oct 8, 2024

I am currently not able to reproduce it on Blender 4.2.2 or current main branch (Blender 4.4 alpha). Do you use some non default option at export?

pleases, i am try may times but alse has this error, can you tell me how you export https://drive.google.com/drive/folders/18M7IuH2ai2fl21Ud0YH1mSlNEPPmcZzq of Z-Anatomy_Template.zip to gltf data, thanks very much.

@weili96
Copy link
Author

weili96 commented Oct 8, 2024

I am currently not able to reproduce it on Blender 4.2.2 or current main branch (Blender 4.4 alpha). Do you use some non default option at export?

hi, are you see my need help, i am waiting your replay, pleases!

@julienduroure
Copy link
Collaborator

Still not able to reproduce with the 2 provided .blend files on current main

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

No branches or pull requests

2 participants