Check Full BFA shortcuts: Map Pose

Draise's picture
Project: 
Bforartists Tracker
### Needs Work
# Map Pose
km = kc.keymaps.new('Pose', space_type='EMPTY', region_type='WINDOW', modal=False)
 
kmi = km.keymap_items.new('object.parent_set', 'P', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('pose.hide', 'H', 'PRESS')
kmi_props_setattr(kmi.properties, 'unselected', False)
kmi = km.keymap_items.new('pose.hide_unselected', 'H', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.reveal', 'H', 'PRESS', alt=True)
kmi = km.keymap_items.new('pose.copy', 'C', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', ctrl=True)
kmi_props_setattr(kmi.properties, 'flipped', False)
kmi = km.keymap_items.new('pose.select_all', 'A', 'PRESS')
kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
kmi = km.keymap_items.new('pose.select_all_inverse', 'I', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('pose.select_linked', 'L', 'PRESS')
    ##Added from Blender - by Draise
#kmi = km.keymap_items.new('wm.call_menu', 'C', 'PRESS', ctrl=True) - has a conflicting hotkey, may be replaced with BFA Pie Menu
#kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_posecopypopup')
kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', ctrl=True)
kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_apply')
kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
kmi_props_setattr(kmi.properties, 'name', 'INFO_MT_add')
kmi = km.keymap_items.new('pose.rot_clear', 'E', 'PRESS', alt=True) # modified to be like BFA - by Draise
kmi = km.keymap_items.new('pose.loc_clear', 'W', 'PRESS', alt=True) # modified to be like BFA - by Draise
kmi = km.keymap_items.new('pose.scale_clear', 'R', 'PRESS', alt=True) # modified to be like BFA - by Draise
kmi = km.keymap_items.new('pose.quaternions_flip', 'F', 'PRESS', alt=True)
kmi = km.keymap_items.new('pose.rotation_mode_set', 'R', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', shift=True, ctrl=True)
kmi_props_setattr(kmi.properties, 'flipped', True)
kmi = km.keymap_items.new('pose.select_parent', 'P', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.select_hierarchy', 'LEFT_BRACKET', 'PRESS')
kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
kmi_props_setattr(kmi.properties, 'extend', False)
kmi = km.keymap_items.new('pose.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)
kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
kmi_props_setattr(kmi.properties, 'extend', True)
kmi = km.keymap_items.new('pose.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')
kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
kmi_props_setattr(kmi.properties, 'extend', False)
kmi = km.keymap_items.new('pose.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)
kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
kmi_props_setattr(kmi.properties, 'extend', True)
kmi = km.keymap_items.new('pose.select_grouped', 'W', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.select_mirror', 'F', 'PRESS', shift=True, ctrl=True)
kmi = km.keymap_items.new('pose.constraint_add_with_targets', 'C', 'PRESS', shift=True, ctrl=True)
kmi = km.keymap_items.new('pose.constraints_clear', 'C', 'PRESS', ctrl=True, alt=True)
kmi = km.keymap_items.new('pose.ik_add', 'I', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.ik_clear', 'I', 'PRESS', ctrl=True, alt=True)
#kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', ctrl=True) # - may be replaced with BFA Pie Menu
#kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_group')
#kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', shift=True) # - may be replaced with BFA Pie Menu
#kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_toggle')
#kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', shift=True, ctrl=True) # - may be replaced with BFA Pie Menu
#kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_enable')
#kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', alt=True) # - may be replaced with BFA Pie Menu
#kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_disable')
kmi = km.keymap_items.new('armature.layers_show_all', 'ACCENT_GRAVE', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('armature.armature_layers', 'M', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.bone_layers', 'M', 'PRESS')
kmi = km.keymap_items.new('transform.transform', 'W', 'PRESS', ctrl=True, alt=True) #not sure why this exists? - Draise
kmi_props_setattr(kmi.properties, 'mode', 'BONE_SIZE')
kmi = km.keymap_items.new('anim.keyframe_insert_menu', 'I', 'PRESS')
kmi = km.keymap_items.new('anim.keyframe_delete_v3d', 'I', 'PRESS', alt=True)
kmi = km.keymap_items.new('anim.keying_set_active_set', 'I', 'PRESS', shift=True, ctrl=True, alt=True)
kmi = km.keymap_items.new('poselib.browse_interactive', 'L', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('poselib.pose_add', 'L', 'PRESS', shift=True)
kmi = km.keymap_items.new('poselib.pose_remove', 'L', 'PRESS', alt=True)
kmi = km.keymap_items.new('poselib.pose_rename', 'L', 'PRESS', shift=True, ctrl=True)
kmi = km.keymap_items.new('pose.push', 'E', 'PRESS', ctrl=True)
#kmi = km.keymap_items.new('pose.relax', 'E', 'PRESS', alt=True) # has a conflicting hotkey
kmi = km.keymap_items.new('pose.breakdown', 'E', 'PRESS', shift=True)
#kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS') ##- useless menu removed from BFA
#kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_specials')
kmi = km.keymap_items.new('wm.call_menu', 'P', 'PRESS', alt=True)
kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_propagate')
kmi = km.keymap_items.new('transform.transform', 'W', 'PRESS') #Added back by Draise to make the transform work in BFA, issue due to Factory Reset and newer test builds of BFA
kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS') #Added back by Draise to make the transform work in BFA, issue due to Factory Reset and newer test builds of BFA
kmi_props_setattr(kmi.properties, 'mode', 'ROTATION')
kmi = km.keymap_items.new('transform.transform', 'R', 'PRESS') #Added back by Draise to make the transform work in BFA, issue due to Factory Reset and newer test builds of BFA
kmi_props_setattr(kmi.properties, 'mode', 'RESIZE')

Corresponding Full BFA shortcuts needs to be checked, reviewed, tested and resolved with new tasks or within this one.

Status: 
Closed (fixed)
Priority: 
Normal
Category: 
Task
Component: 
Code
Assigned: 
Reporter: 
Created: 
Mon, 02/12/2018 - 01:05
Updated: 
Tue, 03/06/2018 - 15:06

Comments

6
Draise's picture

Changes and Fixes:

  • Re-enabled the CTRL+C popup menu (though works fine without)
  • Modified pose.rot_clear, pose.loc_clear, pose.scale_clear to be consistent with WER for BFA
  • Re-enabled other floating menus
  • Changed ALT+W to CTRL+ALT+SHIFT+W (opposite function of SHIFT+CTRL+W for VIEW3D_MT_bone_options_enable)
  • Changed BB bone size shortcut to be CTRL+ALT+S to be consistent with BFA
  • Changed pose.relax to ALT+E to CTRL+ALT+E to be compatible with BFA and found issue. Task here
  • Added back old code WER controls to make former WER controls functional. This changed between versions.
  • Double checked Blener shortcuts

 

New Code

### Practically Done
# Map Pose
km = kc.keymaps.new('Pose', space_type='EMPTY', region_type='WINDOW', modal=False)
 
kmi = km.keymap_items.new('object.parent_set', 'P', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('pose.hide', 'H', 'PRESS')
kmi_props_setattr(kmi.properties, 'unselected', False)
kmi = km.keymap_items.new('pose.hide_unselected', 'H', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.reveal', 'H', 'PRESS', alt=True)
kmi = km.keymap_items.new('pose.copy', 'C', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', ctrl=True)
kmi_props_setattr(kmi.properties, 'flipped', False)
kmi = km.keymap_items.new('pose.select_all', 'A', 'PRESS')
kmi_props_setattr(kmi.properties, 'action', 'TOGGLE')
kmi = km.keymap_items.new('pose.select_all_inverse', 'I', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('pose.select_linked', 'L', 'PRESS')
    ##Added from Blender - by Draise
kmi = km.keymap_items.new('wm.call_menu', 'C', 'PRESS', ctrl=True) #- has a conflicting hotkey with Copy Attribute addon, may be replaced with BFA Pie Menu, redundant menu - by Draise
kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_posecopypopup')
kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', ctrl=True)
kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_apply')
kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
kmi_props_setattr(kmi.properties, 'name', 'INFO_MT_add')
kmi = km.keymap_items.new('pose.rot_clear', 'E', 'PRESS', alt=True) # modified to be like BFA - by Draise
kmi = km.keymap_items.new('pose.loc_clear', 'W', 'PRESS', alt=True) # modified to be like BFA - by Draise
kmi = km.keymap_items.new('pose.scale_clear', 'R', 'PRESS', alt=True) # modified to be like BFA - by Draise
kmi = km.keymap_items.new('pose.quaternions_flip', 'F', 'PRESS', alt=True)
kmi = km.keymap_items.new('pose.rotation_mode_set', 'R', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', shift=True, ctrl=True)
kmi_props_setattr(kmi.properties, 'flipped', True)
kmi = km.keymap_items.new('pose.select_parent', 'P', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.select_hierarchy', 'LEFT_BRACKET', 'PRESS')
kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
kmi_props_setattr(kmi.properties, 'extend', False)
kmi = km.keymap_items.new('pose.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)
kmi_props_setattr(kmi.properties, 'direction', 'PARENT')
kmi_props_setattr(kmi.properties, 'extend', True)
kmi = km.keymap_items.new('pose.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')
kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
kmi_props_setattr(kmi.properties, 'extend', False)
kmi = km.keymap_items.new('pose.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)
kmi_props_setattr(kmi.properties, 'direction', 'CHILD')
kmi_props_setattr(kmi.properties, 'extend', True)
kmi = km.keymap_items.new('pose.select_grouped', 'G', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.select_mirror', 'F', 'PRESS', shift=True, ctrl=True)
kmi = km.keymap_items.new('pose.constraint_add_with_targets', 'C', 'PRESS', shift=True, ctrl=True)
kmi = km.keymap_items.new('pose.constraints_clear', 'C', 'PRESS', ctrl=True, alt=True)
kmi = km.keymap_items.new('pose.ik_add', 'I', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.ik_clear', 'I', 'PRESS', ctrl=True, alt=True)
kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS', ctrl=True) # - may be replaced with BFA Pie Menu
kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_group')
kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', shift=True) # - may be replaced with BFA Pie Menu
kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_toggle')
kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', shift=True, ctrl=True) # - may be replaced with BFA Pie Menu
kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_enable')
kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', ctrl=True, shift=True, alt=True) # - may be replaced with BFA Pie Menu, has a conflict with BFA ALT+W, so changed to CTRL+ALT+SHIFT+W
kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_bone_options_disable')
kmi = km.keymap_items.new('armature.layers_show_all', 'ACCENT_GRAVE', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('armature.armature_layers', 'M', 'PRESS', shift=True)
kmi = km.keymap_items.new('pose.bone_layers', 'M', 'PRESS')
kmi = km.keymap_items.new('transform.transform', 'S', 'PRESS', ctrl=True, alt=True) #changed to S to be consistent with BB bonse size hotkey - Draise
kmi_props_setattr(kmi.properties, 'mode', 'BONE_SIZE')
kmi = km.keymap_items.new('anim.keyframe_insert_menu', 'I', 'PRESS')
kmi = km.keymap_items.new('anim.keyframe_delete_v3d', 'I', 'PRESS', alt=True)
kmi = km.keymap_items.new('anim.keying_set_active_set', 'I', 'PRESS', shift=True, ctrl=True, alt=True)
kmi = km.keymap_items.new('poselib.browse_interactive', 'L', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('poselib.pose_add', 'L', 'PRESS', shift=True)
kmi = km.keymap_items.new('poselib.pose_remove', 'L', 'PRESS', alt=True)
kmi = km.keymap_items.new('poselib.pose_rename', 'L', 'PRESS', shift=True, ctrl=True)
kmi = km.keymap_items.new('pose.push', 'E', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('pose.relax', 'E', 'PRESS', ctrl=True, alt=True) # has a conflicting hotkey with BFA, so changed to CTRL+ALT+E from ALT+E. Tool also has issues, as G, R, S are used to define the reset options - by Draise
kmi = km.keymap_items.new('pose.breakdown', 'E', 'PRESS', shift=True)
#kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS') ##- useless menu removed from BFA
#kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_specials')
kmi = km.keymap_items.new('wm.call_menu', 'P', 'PRESS', alt=True)
kmi_props_setattr(kmi.properties, 'name', 'VIEW3D_MT_pose_propagate')
kmi = km.keymap_items.new('transform.transform', 'W', 'PRESS') #Added back by Draise to make the transform work in BFA, issue due to Factory Reset and newer test builds of BFA
kmi_props_setattr(kmi.properties, 'mode', 'TRANSLATION')
kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS') #Added back by Draise to make the transform work in BFA, issue due to Factory Reset and newer test builds of BFA
kmi_props_setattr(kmi.properties, 'mode', 'ROTATION')
kmi = km.keymap_items.new('transform.transform', 'R', 'PRESS') #Added back by Draise to make the transform work in BFA, issue due to Factory Reset and newer test builds of BFA
kmi_props_setattr(kmi.properties, 'mode', 'RESIZE')

 

 

Draise's picture

Status: Active » Needs review
Reiner's picture

Is there something for the standard keymap to do?

Draise's picture

The only one affecting the standard map: "Added back old code WER controls to make former WER controls functional. This changed between versions."

Once the Full BFA Map is done, the conflicting changes to the BFA Standard is reflected (there are little changes, like the D, move W in map pose to CTRL+F, added WER transform.transform code change) - as the Full BFA Map is just appended code to the Standard, essentially. It's just deleting and resaving that document and uploading them both, you don't need to do anything to the standard just yet.

Draise's picture

I just needed you to review the changes to make sure it's all ok with you, and seems so, so now will close. When done the Standard and Full BFA would be uploaded with comments and there will be no future tasks to do once this is done.

Draise's picture

Status: Needs review » Closed (fixed)