Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Create character -> IndexError: list index out of range #338

Closed
jaggzh opened this issue Mar 11, 2021 · 6 comments
Closed

Create character -> IndexError: list index out of range #338

jaggzh opened this issue Mar 11, 2021 · 6 comments

Comments

@jaggzh
Copy link

jaggzh commented Mar 11, 2021

I have one sort-of-finalized character (1.7.7 was erroring on finalize).
When creating a new character, with 1.7.8, I get:

  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/__init__.py", line 2492, in execute
    start_lab_session()
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/__init__.py", line 159, in start_lab_session
    mblab_humanoid.init_database(obj, character_identifier, rigging_type)
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/humanoid.py", line 276, in init_database
    self.morph_engine = morphengine.MorphingEngine(self.obj_name, self.characters_config[character_identifier])
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/morphengine.py", line 157, in __init__
    self.measures = self.calculate_measures()
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/morphengine.py", line 250, in calculate_measures
    measures[measure_name] = self.calculate_measures(measure_name, vert_coords)
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/morphengine.py", line 247, in calculate_measures
    return algorithms.length_of_strip(vert_coords, indices, axis) #check algorithms.py
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/algorithms.py", line 86, in length_of_strip
    v1 = vertices_coords[indices[x]]
IndexError: list index out of range
@Upliner
Copy link
Contributor

Upliner commented Mar 11, 2021

Does character creation on empty scene works well? If yes, can you please send a blend file with the "offending" character only?

@jaggzh
Copy link
Author

jaggzh commented Mar 12, 2021

Hi, thanks a lot.
Okay, so a fresh blend lets me create one or more characters.
To reproduce the error with this .blend:
https://pasteall.org/blend/5b98b8dc5b6c4b59913bd63c69df0ff5

  1. Load (accept or ignore the driver execution -- it's just a python adjustment of text objects)
  2. Finalize current char ("Finalize with textures and backup" button), accepting the automatic .png name
  3. After finalization is done, click Create Character.
location: <unknown location>:-1
Error: Python: Traceback (most recent call last):
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/__init__.py", line 2492, in execute
    start_lab_session()
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/__init__.py", line 159, in start_lab_session
    mblab_humanoid.init_database(obj, character_identifier, rigging_type)
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/humanoid.py", line 276, in init_database
    self.morph_engine = morphengine.MorphingEngine(self.obj_name, self.characters_config[character_identifier])
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/morphengine.py", line 157, in __init__
    self.measures = self.calculate_measures()
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/morphengine.py", line 250, in calculate_measures
    measures[measure_name] = self.calculate_measures(measure_name, vert_coords)
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/morphengine.py", line 247, in calculate_measures
    return algorithms.length_of_strip(vert_coords, indices, axis) #check algorithms.py
  File "/home/jaggz/.config/blender/2.91/scripts/addons/MB-Lab/algorithms.py", line 86, in length_of_strip
    v1 = vertices_coords[indices[x]]
IndexError: list index out of range

location: <unknown location>:-1

Upliner added a commit to Upliner/MB-Lab that referenced this issue Mar 12, 2021
@Upliner
Copy link
Contributor

Upliner commented Mar 12, 2021

OK here's patch to fix it:
Upliner@c60270a

@Upliner
Copy link
Contributor

Upliner commented Mar 12, 2021

@jaggzh also if you don't want to patch MB-Lab you can just workaround the problem by just deleting all manuellab_* properties from decimated version of the character (f_ca01.001)
mblab1

@jaggzh
Copy link
Author

jaggzh commented Mar 15, 2021 via email

animate1978 added a commit that referenced this issue Mar 16, 2021
Fix #338 prevent wrong objects to be returned from …
@animate1978
Copy link
Owner

I have applied the patch to the dev branch now

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

No branches or pull requests

3 participants