animate1978 / MB-Lab

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

Wrong menu sub-panel drawing (sub-panel contains following parent buttons) #173

Closed mklemarczyk closed 4 years ago

mklemarczyk commented 4 years ago

Describe the bug Menu drawing errors. The toolbox menu is drawn in wrong sections. Example: Opened new Blender without any project have correct menu if all sections opened. Opening "Face Expressions" disable buttons below, that should be still available like for example "Assets library".

To Reproduce Steps to reproduce the behavior:

  1. Open Blender
  2. Install and enable MB-Lab addon
  3. Open MB-Lab toolbox
  4. Open "Face Expression" section
  5. Unable to open "Assets library" section (due to disabled controls)

Expected behavior Able to open "Assets library" section

Screenshots menu_bad1_LI menu_bad2_LI

Additional context The opened section panel contains expand/collapse buttons, it should not contain them.

Logs Blender version 2.80.75 MB-Lab version 1.7.6

mklemarczyk commented 4 years ago

The PR #176 contains cleanup and fix for the problem.

mklemarczyk commented 4 years ago

Fix introduced bug after wrong merge with feature Humanoid Rotations. I'm working on it. @animate1978 Do you know what is progress on that feature?

I see new menu position, but the classes for this feature are not loaded.

animate1978 commented 4 years ago

Not at all, I assumed incorrectly if it was functioning

mklemarczyk commented 4 years ago

According to log. It is not the fix that introduced problem.

Problem is missing import in algorithms.py:

C:\Users\mklem\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\MB-Lab-1_7_6\__init__.py:2000
Traceback (most recent call last):
  File "C:\Users\mklem\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\MB-Lab-1_7_6\__init__.py", line 2008, in draw
    mblab_shapekeys.update_expressions_data()
  File "C:\Users\mklem\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\MB-Lab-1_7_6\animationengine.py", line 1497, in update_expressions_data
    self.identify_model_type()
  File "C:\Users\mklem\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\MB-Lab-1_7_6\animationengine.py", line 1427, in identify_model_type
    obj = algorithms.get_active_body()
  File "C:\Users\mklem\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\MB-Lab-1_7_6\algorithms.py", line 724, in get_active_body
    obj_id = get_template_model(c_obj)
  File "C:\Users\mklem\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\MB-Lab-1_7_6\algorithms.py", line 698, in get_template_model
    template = identify_template(obj)
  File "C:\Users\mklem\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\MB-Lab-1_7_6\algorithms.py", line 686, in identify_template
    config_data = get_configuration()
NameError: name 'get_configuration' is not defined
mklemarczyk commented 4 years ago

I will update algorithms.py within the branch of the menus and create new PR.

mklemarczyk commented 4 years ago

PR #178 created to address minor menu adjustments and import error in algorithms.py.

mklemarczyk commented 4 years ago

@animate1978 Please cross-check if the problem is resolved. It is fixed in my Blender. Once confirmed, it can be closed. 😄