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

Pose bug when IK Kinematics choosed, and its commit. #222

Closed
TetoTheSquirrelFox opened this issue Jan 7, 2020 · 3 comments
Closed

Pose bug when IK Kinematics choosed, and its commit. #222

TetoTheSquirrelFox opened this issue Jan 7, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@TetoTheSquirrelFox
Copy link
Contributor

TetoTheSquirrelFox commented Jan 7, 2020

Describe the bug
When user wants to use IK kinematics, the poses don't work properly after character creation.
The case is expected but doesn't work properly, user should not be able to choose a pose, and he can actually. With MB-Lab-dev version at least.

Where is the problem + Screenshot
The guilty is function is_"ik_armature(armature=None)" in utils.py.
image
We can see that if armature != None, function always return false...

Commit by a screenshot
image

Commit in code
def is_ik_armature(armature=None):
if not armature:
armature = get_active_armature()
if armature and armature.type == 'ARMATURE':
for b in armature.data.bones:
if 'IK' in b.name:
return True
elif armature and armature.type != 'ARMATURE':
logger.warning("Cannot get the bones because the obj is not an armature")
return False
return False

See ya' ^^
(by the way, if someone can explain to me how to format correctly a code to allow it to be copy/pasted directly... On to pull requests maybe? I really don't know how to do that)

@ldo
Copy link

ldo commented Jan 7, 2020

Unfortunately, your posted code is corrupted by the loss of indentation. Try posting a patch as an attachment, or using Markdown formatting.

@TetoTheSquirrelFox
Copy link
Contributor Author

TetoTheSquirrelFox commented Jan 7, 2020

Let's try...
edit : much better... thanks for the help !

def is_ik_armature(armature=None):
    if not armature:
        armature = get_active_armature()
    if armature and armature.type == 'ARMATURE':
        for b in armature.data.bones:
            if 'IK' in b.name:
                return True
    elif armature and armature.type != 'ARMATURE':
        logger.warning("Cannot get the bones because the obj is not an armature")
        return False
    return False

@animate1978
Copy link
Owner

Wow. So simple it hurts lol.

I just changed this on my local system, will be committing this change to the repo soon.

@animate1978 animate1978 self-assigned this Jan 8, 2020
@animate1978 animate1978 added the bug Something isn't working label Jan 8, 2020
animate1978 added a commit that referenced this issue Jan 12, 2020
- Skin Shader now uses Principled BSDF
- Modified Albedo maps
- Bump maps now 4k resolution
- Sebum map are now more detailed
- Modified Freckle masks
- Dev version upgraded to 1.7.8
- Slight GUI change to Assets and Hair tab
- Modified Material Engine
- Fixed typos in JSON for Typo: Hands_Lenght #224
- Pose bug fixed when IK Kinematics chosen  #222
- Bug fixed in function generate_parameter #221
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants