[Bf-funboard] New Keymap
proxe
proxe.err0r at gmail.com
Thu Nov 22 17:10:57 CET 2012
had an idea about the 3D manipulator, S D and F could be used for the 3D
manipulator while its active, otherwise they are used for your standard
transforms, maybe its worth a try.
def FindKeyMapItems(km, idname):
items = []
for kmi in km.keymap_items:
if kmi.idname == idname:
items.append(kmi)
return items
#Switch translate controls over to Manipulator.
if context.space_data.show_manipulator:
km = wm.keyconfigs.user.keymaps['3D View']
for kmi in FindKeyMapItems(km, 'view3d.set_manipulator'):
kmi.active = 1
kmi = km.keymap_items['transform.translate'] # Make sure Tweak
Move is not First!
kmi.active = 0
kmi = km.keymap_items['transform.rotate']
kmi.active = 0
kmi = km.keymap_items['transform.scale']
kmi.active = 0
#Switch it back.
else:
for kmi in FindKeyMapItems(km, 'view3d.set_manipulator'):
kmi.active = 0
km = wm.keyconfigs.user.keymaps['3D View']
kmi = km.keymap_items['transform.translate']
kmi.active = 1
kmi = km.keymap_items['transform.rotate']
kmi.active = 1
kmi = km.keymap_items['transform.scale']
kmi.active = 1
return {'FINISHED'}
bpy.utils.register_class(SetManipulator)
theres some code for ya if you wanna try it real fast, i can see how it
could be an issue though, expecially when animating, i like to use both the
keys and widget.
More information about the Bf-funboard
mailing list