animate1978 / MB-Lab

MB-Lab is a character creation tool for Blender 4.0 and above, based off ManuelBastioniLAB
Other
1.76k stars 308 forks source link

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

Closed jaggzh closed 3 years ago

jaggzh commented 3 years ago

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 commented 3 years ago

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

jaggzh commented 3 years ago

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 commented 3 years ago

OK here's patch to fix it: https://github.com/Upliner/MB-Lab/commit/c60270a5481462f927b1c837be1bb3b50c3cfecd

Upliner commented 3 years ago

@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 commented 3 years ago

Thank you! It's good to know the different methods. I can probably handle patching the thing, or just checking it out from github if it's committed. Thanks again, I'll try to try it soon. :)

On Fri, Mar 12, 2021 at 3:59 AM Upliner Mikhalych @.***> wrote:

@jaggzh https://github.com/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) [image: mblab1] https://user-images.githubusercontent.com/180094/110937543-2dd25400-833b-11eb-9925-36c78fe4c84e.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/animate1978/MB-Lab/issues/338#issuecomment-797446121, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3AV7MDT3UKMN6EYPBE4XLTDH63ZANCNFSM4ZAB2IDQ .

animate1978 commented 3 years ago

I have applied the patch to the dev branch now