pin select bones
1.6.1 - changed: `on select` options using `pin feet` target selected bones instead (wuthout the option only target bones with `foot` in name)master
parent
b13c5204b8
commit
b698f003d9
|
@ -1,5 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
1.6.1
|
||||||
|
|
||||||
|
- changed: `on select` options using `pin feet` target selected bones instead (wuthout the option only target bones with `foot` in name)
|
||||||
|
|
||||||
1.6.0
|
1.6.0
|
||||||
|
|
||||||
- added: World space copy/paste from `Pin tool` panel can now copy/paste multiple selected posebones positions
|
- added: World space copy/paste from `Pin tool` panel can now copy/paste multiple selected posebones positions
|
||||||
|
|
|
@ -273,8 +273,11 @@ def pin_down_feets():
|
||||||
if obj.type != 'ARMATURE':
|
if obj.type != 'ARMATURE':
|
||||||
print('ERROR', 'active is not an armature type')
|
print('ERROR', 'active is not an armature type')
|
||||||
return
|
return
|
||||||
|
|
||||||
debug = fn.get_addon_prefs().debug
|
debug = fn.get_addon_prefs().debug
|
||||||
|
|
||||||
scn = bpy.context.scene
|
scn = bpy.context.scene
|
||||||
|
on_selected = scn.anim_cycle_settings.expand_on_selected_bones
|
||||||
# Delete current action if its not the main one
|
# Delete current action if its not the main one
|
||||||
# create a new '_pinned' one
|
# create a new '_pinned' one
|
||||||
act = fn.set_generated_action(obj)
|
act = fn.set_generated_action(obj)
|
||||||
|
@ -346,8 +349,8 @@ def pin_down_feets():
|
||||||
|
|
||||||
b_name = fcu.data_path.split('"')[1] # print('b_name: ', b_name, fcu.is_valid)
|
b_name = fcu.data_path.split('"')[1] # print('b_name: ', b_name, fcu.is_valid)
|
||||||
|
|
||||||
## TEST : only foot bones
|
## if working without selection, target only foot bones.
|
||||||
if not 'foot' in b_name:
|
if not on_selected and not 'foot' in b_name:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
pb = obj.pose.bones.get(b_name)
|
pb = obj.pose.bones.get(b_name)
|
||||||
|
@ -355,6 +358,10 @@ def pin_down_feets():
|
||||||
print(f'{b_name} is invalid')
|
print(f'{b_name} is invalid')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if on_selected and not pb.bone.select:
|
||||||
|
# filter selection
|
||||||
|
continue
|
||||||
|
|
||||||
contact_ranges = []
|
contact_ranges = []
|
||||||
start_contact = None
|
start_contact = None
|
||||||
prev = None
|
prev = None
|
||||||
|
|
|
@ -4,7 +4,7 @@ bl_info = {
|
||||||
"name": "Auto Walk",
|
"name": "Auto Walk",
|
||||||
"description": "Develop a walk/run cycles along a curve and pin feets",
|
"description": "Develop a walk/run cycles along a curve and pin feets",
|
||||||
"author": "Samuel Bernou",
|
"author": "Samuel Bernou",
|
||||||
"version": (1, 6, 0),
|
"version": (1, 6, 1),
|
||||||
"blender": (3, 0, 0),
|
"blender": (3, 0, 0),
|
||||||
"location": "View3D",
|
"location": "View3D",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
|
Loading…
Reference in New Issue