Paste Code
Paste Blends
Paste Images
#############################################
'''
Selected bones to keying set A script by blenderprops.altervista.org
'''
#############################################

# Keying Set: KeyingSet
import bpy

scene = bpy.context.scene

# Keying Set Level declarations
ks = scene.keying_sets.new(idname="KeyingSet", name="Rename_KeyingSet")
ks.bl_description = ""

ks.bl_options = {'INSERTKEY_XYZ_TO_RGB'}

# ID's that are commonly used (nome dell'armatura)
id_0 = bpy.context.selected_pose_bones[0].id_data

#Elenco delle bones
selected_bones = bpy.context.selected_pose_bones


for bo in selected_bones:
bonename = bo.name
if bo.lock_location[0] == False or bo.lock_location[1] == False or bo.lock_location[2] == False:
ksp = ks.paths.add(id_0, 'pose.bones["'+bonename+'"].location', index=-1)

if bo.lock_rotation_w == False or bo.lock_rotation[0] == False or bo.lock_rotation[1] == False or bo.lock_rotation[2] == False:
ksp = ks.paths.add(id_0, 'pose.bones["'+bonename+'"].rotation_euler', index=-1)

if bo.lock_scale[0] == False or bo.lock_scale[1] == False or bo.lock_scale[2] == False:
ksp = ks.paths.add(id_0, 'pose.bones["'+bonename+'"].scale', index=-1)
  1. #############################################
  2. '''
  3. Selected bones to keying set A script by blenderprops.altervista.org
  4. '''
  5. #############################################
  6.  
  7. # Keying Set: KeyingSet
  8. import bpy
  9.  
  10. scene = bpy.context.scene
  11.  
  12. # Keying Set Level declarations
  13. ks = scene.keying_sets.new(idname="KeyingSet", name="Rename_KeyingSet")
  14. ks.bl_description = ""
  15.  
  16. ks.bl_options = {'INSERTKEY_XYZ_TO_RGB'}
  17.  
  18. # ID's that are commonly used (nome dell'armatura)
  19. id_0 = bpy.context.selected_pose_bones[0].id_data
  20.  
  21. #Elenco delle bones
  22. selected_bones = bpy.context.selected_pose_bones
  23.  
  24.  
  25. for bo in selected_bones:
  26.     bonename = bo.name
  27.     if bo.lock_location[0] == False or bo.lock_location[1] == False or bo.lock_location[2] == False:
  28.         ksp = ks.paths.add(id_0, 'pose.bones["'+bonename+'"].location', index=-1)
  29.        
  30.     if bo.lock_rotation_w == False or bo.lock_rotation[0] == False or bo.lock_rotation[1] == False or bo.lock_rotation[2] == False:
  31.         ksp = ks.paths.add(id_0, 'pose.bones["'+bonename+'"].rotation_euler', index=-1)
  32.        
  33.     if bo.lock_scale[0] == False or bo.lock_scale[1] == False or bo.lock_scale[2] == False:
  34.         ksp = ks.paths.add(id_0, 'pose.bones["'+bonename+'"].scale', index=-1)
go to heaven