animate1978 / MB-Lab

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

Poses error on 1.7.8 Dev branch #252

Closed animate1978 closed 4 years ago

animate1978 commented 4 years ago

Describe the bug Poses fail when trying to apply to any character.

To Reproduce Steps to reproduce the behavior:

  1. Create and Finalize a character.
  2. Go to Poses and Animation tab
  3. Try to apply pose

Expected behavior Once finalized the character should be able to be posed.

Screenshots Screenshots not really required

Additional context Add any other context about the problem here.

Logs Traceback (most recent call last): File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/__init__.py", line 337, in femalepose_update mblab_retarget.load_pose(filepath, use_retarget=True) File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/animationengine.py", line 1337, in load_pose self.reset_pose(target_armature) File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/animationengine.py", line 1290, in reset_pose self.stop_animation() TypeError: stop_animation() takes 0 positional arguments but 1 was given File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/__init__.py", line 331, in femalepose_update

Not sure what I changed and why it is failing, this was functioning just fine recently.

TetoTheSquirrelFox commented 4 years ago

I think I got it. When you read the method load_pose in animationengine.py, you have this :

1st argument is self, 2nd is string, 3rd is an object and 4th a boolean.

In --init--, you have the method (line 331) femalepose_update(self, context) and last line is :

For me use_retarget=True is useless, as you can't mistake about arguments (no one shares the same type). So, maybe, mblab_retarget.load_pose(filepath, True) is good enough and you won't have error anymore.

If it works, and your Blender version is the newest, maybe means that Python in Blender is more strict than before.

animate1978 commented 4 years ago

No I've been using Blender 2.82.7, the release version.

TetoTheSquirrelFox commented 4 years ago

OK. Anyway, I also had the same kind of problem a couple of time, for my own tools.

animate1978 commented 4 years ago

I tried your suggestion, that was a no go.

I started to go through the commits, trying to see if I modified something recently. I had been working on a animation for a promotional video for later use and I had used the Pose tool to well pose the character, this was last month I made this, so based off the timeline (I had recently saved both files I had been working on so I cannot use time stamps) something changed between now and middle of Feb.

This is just a guess it may have something to do with the start and stop animation functions I moved from algorithms...

EDIT

The start and stop animation functions was the issue, I moved them BACK to the wretched algorithms file.

Will update soon