Closed animate1978 closed 4 years ago
Further investigation reveals that Age , Mass and Tone all create the same bug.
I went back to Blender 2.79 and MB-Lab 1.6.5 for a test to see if this bug has been present before, I found out that no it's fairly new BUT the terminal output provided some insight on what it does when you update the Age, Mass or Tone.
DEBUG: Turn the visibility of f_ca01_skeleton ON DEBUG: Fitting armature f_ca01_skeleton DEBUG: Turn the visibility of f_ca01_skeleton ON DEBUG: Select and change mode of f_ca01_skeleton = EDIT DEBUG: Turn the visibility of f_ca01_skeleton ON DEBUG: Select and change mode of f_ca01_skeleton = OBJECT DEBUG: Turn the visibility of f_ca01_skeleton ON DEBUG: Select and change mode of f_ca01_skeleton = EDIT DEBUG: Turn the visibility of f_ca01_skeleton ON DEBUG: Select and change mode of f_ca01_skeleton = POSE DEBUG: Turn the visibility of f_ca01_skeleton ON DEBUG: Select and change mode of f_ca01_skeleton = EDIT DEBUG: Turn the visibility of f_ca01_skeleton ON DEBUG: Select and change mode of f_ca01_skeleton = POSE DEBUG: Turn the visibility of f_ca01_skeleton ON DEBUG: Select and change mode of f_ca01_skeleton = POSE
Not sure what to fix in the code just yet though
The function set_object_visible(obj) { ... }
in algorithms.py
is using an outdated function.
Replace obj.hide_select = False
with obj.hide_set(False)
to fix it.
Also, the function recursive_collection_delete() { ... }
in facerig.py
is using the same outdated function. Although not tested, it MIGHT fix something.
Replace head.hide_select = False
with head.hide_set(False)
Currently working on it.
Have algorithms.py fixed, working on facerig.py
Describe the bug When updating the age of character, ONLY AFTER hiding the skeleton in the Outliner. After un-hiding the skeleton the error does not occur in same session. This was seen on Ubuntu 16.04, in the terminal window by chance.
To Reproduce Steps to reproduce the behavior:
Create a new character.
Hide the skeleton in the Outliner.
Set to an age + 0.0 (example : 0.90)
See log
Expected behavior No error.
Screenshots Screenshots don't really expose the issue.
Additional context When clicking on Reset Character in MB-Lab this WILL throw up an error in Blender.
Aside from this bug being present and not understanding why it does not seem to affect the performance of MB-Lab nor Blender, characters don't break and again this only appears when the skeleton is hidden from view.
Logs
Traceback (most recent call last): File "/home/farishta/.config/blender/2.80/scripts/addons/MB-Lab/__init__.py", line 201, in age_update mblab_humanoid.calculate_transformation("AGE") File "/home/farishta/.config/blender/2.80/scripts/addons/MB-Lab/humanoid.py", line 915, in calculate_transformation self.update_character(mode = "update_metadata") File "/home/farishta/.config/blender/2.80/scripts/addons/MB-Lab/humanoid.py", line 784, in update_character self.sk_engine.fit_joints() File "/home/farishta/.config/blender/2.80/scripts/addons/MB-Lab/skeletonengine.py", line 208, in fit_joints algorithms.select_and_change_mode(armat, "EDIT") File "/home/farishta/.config/blender/2.80/scripts/addons/MB-Lab/algorithms.py", line 746, in select_and_change_mode bpy.ops.object.mode_set(mode=obj_mode) File "/home/farishta/blender-2.80.74/2.80/scripts/modules/bpy/ops.py", line 201, in __call__ ret = op_call(self.idname_py(), None, kw) TypeError: Converting py args to operator properties: enum "EDIT" not found in ('OBJECT') File "/home/farishta/.config/blender/2.80/scripts/addons/MB-Lab/__init__.py", line 196, in age_update