Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error adding mannequin template in Blender 3.4 #44

Open
theDesuDesu opened this issue Apr 10, 2023 · 1 comment
Open

Error adding mannequin template in Blender 3.4 #44

theDesuDesu opened this issue Apr 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@theDesuDesu
Copy link

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 theDesuDesu added the bug Something isn't working label Apr 10, 2023
@Rizzlord
Copy link

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`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants