import bpy
obj = bpy.context.active_object
bnSel= bpy.context.selected_pose_bones
bnAct = bpy.context.active_pose_bone
#print ("----------------")
#print (obj)
#print (bnAct)
#INFLUENCIA DE LOS HUESOS
inf = 0.75
inf2 = 0.25
dir = True #direction of the constraint
for bn in bnSel:
#print ("--" + bn.name)
if bnAct != bn:
cn = bnAct.constraints.new('COPY_LOCATION')
cn.target = obj
cn.subtarget = bn.name
cn.use_offset = True
cn.target_space = 'LOCAL_WITH_PARENT'
cn.owner_space = 'LOCAL'
if dir:
cn.influence = inf
dir = False
else:
cn.influence = inf2
dir = True
Add a location constraint in three bones selected whidth de active is where create the constraints
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.