UuuNyaa / blender_mmd_tools

MMD Tools is a blender addon for importing/exporting Models and Motions of MikuMikuDance.
GNU General Public License v3.0
1.91k stars 91 forks source link

Change IK constrain default value #122

Closed fmnijk closed 7 months ago

fmnijk commented 7 months ago

I think the Rotation should be turned on and set it as low as possible. Hence it should be set to 0.01, this is the lowest allowed value.

Besides IK, are there others things make motions looks different between MMD and Blender? I would like to solve it, but I need to know the current status.

Screenshot 2023-12-02 19-12-59

Screenshot 2023-12-02 19-13-02

1544
fmnijk commented 7 months ago

It seems like 0.01 is not low enough, but sometimes the motion will looks better than MMD.

I also tried mmd_ik_limit_override mentioned in #59. In my case it should be 110d when IK Rotation is off.

2
fmnijk commented 7 months ago

I am wrong. It's not good to turn on Rotation of IK constrain. It's better to adjust mmd_ik_limit_override.

import bpy
context = bpy.context

import math

def fix():
    for obj in context.selected_objects:
        if obj.type == 'ARMATURE':
            for bone in obj.pose.bones:
                for constraint in bone.constraints:
                    if constraint.name =='mmd_ik_limit_override':
                        constraint.min_x = math.radians(110)
fix()