[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35427] trunk/blender/release/scripts/op: make python UV functions use a popup UI rather then redo UI, they are not fast enough.
Campbell Barton
ideasman42 at gmail.com
Wed Mar 9 12:01:45 CET 2011
Revision: 35427
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35427
Author: campbellbarton
Date: 2011-03-09 11:01:44 +0000 (Wed, 09 Mar 2011)
Log Message:
-----------
make python UV functions use a popup UI rather then redo UI, they are not fast enough.
Modified Paths:
--------------
trunk/blender/release/scripts/op/uvcalc_follow_active.py
trunk/blender/release/scripts/op/uvcalc_lightmap.py
trunk/blender/release/scripts/op/uvcalc_smart_project.py
Modified: trunk/blender/release/scripts/op/uvcalc_follow_active.py
===================================================================
--- trunk/blender/release/scripts/op/uvcalc_follow_active.py 2011-03-09 10:57:56 UTC (rev 35426)
+++ trunk/blender/release/scripts/op/uvcalc_follow_active.py 2011-03-09 11:01:44 UTC (rev 35427)
@@ -245,11 +245,16 @@
main(context, self)
return {'FINISHED'}
+ def invoke(self, context, event):
+ wm = context.window_manager
+ return wm.invoke_props_dialog(self)
-# Add to a menu
-menu_func = (lambda self, context: self.layout.operator(FollowActiveQuads.bl_idname))
+def menu_func(self, context):
+ self.layout.operator_context = 'INVOKE_REGION_WIN'
+ self.layout.operator(FollowActiveQuads.bl_idname)
+
def register():
bpy.utils.register_module(__name__)
bpy.types.VIEW3D_MT_uv_map.append(menu_func)
Modified: trunk/blender/release/scripts/op/uvcalc_lightmap.py
===================================================================
--- trunk/blender/release/scripts/op/uvcalc_lightmap.py 2011-03-09 10:57:56 UTC (rev 35426)
+++ trunk/blender/release/scripts/op/uvcalc_lightmap.py 2011-03-09 11:01:44 UTC (rev 35427)
@@ -592,9 +592,13 @@
return unwrap(self, context, **kwargs)
+ def invoke(self, context, event):
+ wm = context.window_manager
+ return wm.invoke_props_dialog(self)
-# Add to a menu
+
def menu_func(self, context):
+ self.layout.operator_context = 'INVOKE_REGION_WIN'
self.layout.operator(LightMapPack.bl_idname)
Modified: trunk/blender/release/scripts/op/uvcalc_smart_project.py
===================================================================
--- trunk/blender/release/scripts/op/uvcalc_smart_project.py 2011-03-09 10:57:56 UTC (rev 35426)
+++ trunk/blender/release/scripts/op/uvcalc_smart_project.py 2011-03-09 11:01:44 UTC (rev 35427)
@@ -1140,12 +1140,16 @@
main(context, self.island_margin, self.angle_limit)
return {'FINISHED'}
+ def invoke(self, context, event):
+ wm = context.window_manager
+ return wm.invoke_props_dialog(self)
-# Add to a menu
-menu_func = (lambda self, context: self.layout.operator(SmartProject.bl_idname,
- text="Smart Project"))
+def menu_func(self, context):
+ self.layout.operator_context = 'INVOKE_REGION_WIN'
+ self.layout.operator(SmartProject.bl_idname, text="Smart Project")
+
def register():
bpy.utils.register_module(__name__)
bpy.types.VIEW3D_MT_uv_map.append(menu_func)
More information about the Bf-blender-cvs
mailing list