I had this post saved in my Reddit account, and wanted to reshare it here now that I’m moving off the platform. It’s helped me get out of a couple of pinches and hopefully it helps you, too.
Originally posted by
u/frizzil to r/blender.
Note: you can scale multiple objects’ contents simultaneously by selecting them all in Object mode, then swapping to Edit mode, selecting all vertices with
A, then scaling with
S. Be aware that you cannot edit both curves and meshes simultaneously, however.
For clarity, you may optionally disable then re-enable the Armature modifier for all objects, before and after this step. (To do so, select all Armature’d objects, then go
Properties -> Modifiers Properties (Wrench) -> Armature -> Alt-LMB on 'Realtime' (the Monitor))
Pose mode -> ‘A’ to select all -> Pose -> Clear Transforms -> All)
Object Data Properties, then mark all Layers visible by holding Shift then dragging LMB over them.
A, then scale with
your_rig -> Pose, then scale them. (
root -> VIS_thigh_ik_pole.L/Rare likely culprits!)
Don’t freak out if things look bad outside of Edit mode! That’s our next step.
Any unintended deformation in Pose mode, crazy or slight, shall be your guide. We’re now going to find every single Bone Constraint of type “Stretch to” and hit the “Reset” button on it.
Fortunately, Blender lets us accomplish this programmatically, saving us loads of time.
bone_count = 0 for b in bpy.context.active_object.pose.bones: for c in b.constraints: if c.type == "STRETCH_TO": c.rest_length = 0 bone_count += 1
Explanation: all Stretch To constraints in Rigify are generated with the “default” rest length of zero… which Blender interprets as needing to be immediately recalculated based on current distance. We effectively changed that distance earlier by scaling the bones, so now we reset to zero to have Blender calculate it once again.
Now, verify that the script worked by typing in
bone_count then hitting
Enter again, which will spit out the number of constraints we just changed. It should NOT be zero - if it is, then double check that your rig is selected and your 3D View is in Object mode, then try again. Your rig should look much better, though it may not be perfect yet.
If you can’t get this to change any bones, consider starting at step 1 of Manual Method; otherwise, skip to step 6 (sic, no step 6, move to step 5 instead).
Object Data Properties, select only the last Layer (i.e. the ‘ORG’ bone layer.)
The location channels for many of the bones in each animation will also need to be scaled by your value, lest your animations swing too short or too wide.
rescale = YOUR_SCALE_VALUEexcept with your scale value, and hit Enter.
rescale_actions = ['my_action1', 'my_action2']except with the exact names of all your desired actions, each inside two single-quotes, and separated by commas, between the two brackets. Then hit
for action_id in rescale_actions: for fcurve in bpy.data.actions[action_id].fcurves: data_path = fcurve.data_path if data_path.startswith('pose.bones[') and data_path.endswith('].location'): for p in fcurve.keyframe_points: p.co *= rescale
If you get an error, (e.g. you typed in an action’s name incorrectly), then Undo with
Ctrl+Z then repeat from step 2, until you get no errors and all your actions are scaled!
If you just can’t get this to work, or need to troubleshoot something, then you might consider the Manual Method… but it will be extremely tedious.
View -> Only Selected Keyframes Handles. (This will save you clicks.)
A -> S -> Yand immediately type in your scale value. Verify the Action is correct before moving onto the next, and you should be good to go.
Whew! If anyone has corrections or suggestions, please leave them! It took a lot to figure all this out, and I couldn’t find many resources myself, so hopefully this helps someone out there.
Good luck, you crazy rig scalers, you.