I just am just working on a model with a loot of bones. Now I want to lock the bones location of multiple Bones at once. How could I do that?
Thanks in Advance.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
With the armature selected and in pose mode this will set the location lock for every bone. You may also want to lock the rotation by setting
import bpy for b in bpy.context.active_object.pose.bones: b.lock_location = True # x b.lock_location = True # y b.lock_location = True # z
If you want to do it using a preset list of bone names -
bone_list = ['upper_arm.L','upper_arm.R','thigh.L','thigh.R'] for bn in bone_list: bone = bpy.context.active_object.pose.bones[bn] bone.lock_location = True # x bone.lock_location = True # y bone.lock_location = True # z