make python UV functions use a popup UI rather then redo UI, they are not fast enough.

This commit is contained in:
Campbell Barton 2011-03-09 11:01:44 +00:00
parent 897c2ede13
commit 94a8435124
3 changed files with 19 additions and 6 deletions

View File

@ -245,9 +245,14 @@ class FollowActiveQuads(bpy.types.Operator):
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():

View File

@ -592,9 +592,13 @@ class LightMapPack(bpy.types.Operator):
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)

View File

@ -1140,10 +1140,14 @@ class SmartProject(bpy.types.Operator):
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():