Mr-Mannequins-Tools icon indicating copy to clipboard operation
Mr-Mannequins-Tools copied to clipboard

Error adding mannequin template in Blender 3.4

Open theDesuDesu opened this issue 1 year ago • 1 comments

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.load_template(self, templates) File "C:\Users\nickc\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\MrMannequinsTools_functions_.py", line 278, in load_template chain.apply_transforms() 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.

theDesuDesu avatar Apr 10 '23 11:04 theDesuDesu

i had the same problem, i fixed it. open the "chains_spline_.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`

Rizzlord avatar Oct 13 '23 22:10 Rizzlord