Jim-Kroovy / Mr-Mannequins-Tools

Read the wiki installation instructions for sublime character rigging, intuitive Blender imports and easy Unreal exports!
Other
513 stars 62 forks source link

Error adding mannequin template in Blender 3.4 #44

Open theDesuDesu opened 1 year ago

theDesuDesu commented 1 year ago

When adding a mannequin template via the shift-A context menu I get this error message:

Python: Traceback (most recent call last): File "C:\Users\nickc\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\MrMannequinsTools_operators_.py", line 376, in execute functions.loadtemplate(self, templates) File "C:\Users\nickc\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\MrMannequinsTools_functions.py", line 278, in load_template chain.applytransforms() File "C:\Users\nickc\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\BLEND-ArmatureRiggingModules\modules\chains_spline.py", line 745, in apply_transforms parent_shape_scale = parent_pb.custom_shape_scale AttributeError: 'PoseBone' object has no attribute 'custom_shape_scale'. Did you mean: 'custom_shape_scale_xyz'?

It then just adds one of the templates titled "UE4_Mannequin_Skeleton" but not the pop-up menu to pick a template I saw in the explainer video.

Reading the error I think it's a change in blender's internal teminology since v3 causing this.

Rizzlord commented 1 year ago

i had the same problem, i fixed it. open the "chainsspline.py" in you favorite IDE and replace the code block from line 738 to 754 with this code block : `class JK_PG_ARM_Spline_Chain(bpy.types.PropertyGroup):

def apply_transforms(self):
    # when applying transforms we need to reset the pole distance...
    armature = self.id_data
    bbs, pbs = armature.data.bones, armature.pose.bones
    parent_pb = pbs.get(self.spline.parent)
    parent_shape_scale = parent_pb.custom_shape_scale_xyz
    # this will trigger a full update of the rigging and should apply all transform differences...
    source_bb, target_bb = bbs.get(self.targets[0].source), bbs.get(self.targets[0].bone)
    start, end = source_bb.head_local, target_bb.head_local
    distance = math.sqrt((end[0] - start[0])**2 + (end[1] - start[1])**2 + (end[2] - start[2])**2)
    self.spline.bevel_depth = (distance * 0.5) * 0.1
    self.spline.distance = abs(distance)
    # but the full update will remove all added bones... (so reset custom shape scales)
    parent_pb = pbs.get(self.spline.parent)
    parent_pb.custom_shape_scale_xyz = parent_shape_scale`
Somedigit commented 2 weeks ago

I'm experiencing the same issue as well, and I haven't been able to resolve it. Also, I'm missing the side panel for the add-on, and all the controls to switch between FK and IK are also not existing. Anyone else having the same issue? I just want to switch from IK to FK but I cannot find an option for that.