[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1803] contrib/py/scripts/addons/ space_view3d_manipulator_Menu.py: updated for api changes
michael williamson
michaelw at cowtoolsmedia.co.uk
Sat Apr 9 18:36:27 CEST 2011
Revision: 1803
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1803
Author: michaelw
Date: 2011-04-09 16:36:26 +0000 (Sat, 09 Apr 2011)
Log Message:
-----------
updated for api changes
Modified Paths:
--------------
contrib/py/scripts/addons/space_view3d_manipulator_Menu.py
Modified: contrib/py/scripts/addons/space_view3d_manipulator_Menu.py
===================================================================
--- contrib/py/scripts/addons/space_view3d_manipulator_Menu.py 2011-04-09 12:02:45 UTC (rev 1802)
+++ contrib/py/scripts/addons/space_view3d_manipulator_Menu.py 2011-04-09 16:36:26 UTC (rev 1803)
@@ -1,31 +1,12 @@
#re creating the functionality of the manipulator menu from 2.49
-#
-#ported by Michael Williamson
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
+
bl_info = {
- 'name': 'Manipulator Menu',
+ 'name': '3d View: Manipulator Menu',
'author': 'MichaelW',
- 'version': (1,),
+ 'version': '1',
'blender': (2, 5, 3),
- 'api': 33907,
+ "api": 35324,
'location': 'View3D > Ctrl Space ',
'description': 'Menu to change the manipulator type and/or disable it',
'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.5/Py/'\
@@ -34,20 +15,10 @@
'func=detail&aid=22092',
'category': '3D View'}
-"Add manipulator menu (Ctrl-space in 3d view)"
-"""
-This adds a popup menu to change the manipulator mode.
-to move, rotate, scale or combo like in 2.49
-Usage:
-* Ctrl Space in the 3d view
-* Choose your function from the menu.
-Version history:
-V1(MichaelW) initial port form 2.49
-"""
import bpy
@@ -101,12 +72,21 @@
def register():
- km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View Generic']
+ bpy.utils.register_module(__name__)
+ kc = bpy.data.window_managers[0].keyconfigs.default
+ km = kc.keymaps.get('3D View Generic')
+ if km is None:
+ km = kc.keymaps.new(name="3D View Generic")
+
kmi = km.keymap_items.new('wm.call_menu', 'SPACE', 'PRESS' , ctrl=True)
kmi.properties.name = "VIEW3D_MT_ManipulatorMenu"
def unregister():
+ bpy.utils.unregister_module(__name__)
+ kc = bpy.data.window_managers[0].keyconfigs.default
+ km = kc.keymaps["3D View Generic"]
+
for kmi in km.items:
if kmi.idname == 'wm.call_menu':
if kmi.properties.name == "VIEW3D_MT_ManipulatorMenu":
More information about the Bf-extensions-cvs
mailing list