- add torus back from 2.4x as an operator

bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)

- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.

- removed OBJECT_OT_mesh_add, use the python add menu instead.

- made mesh primitive ops -  MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.

- RNA scene.active_object wrapped

- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
  ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
This commit is contained in:
2009-10-10 21:23:20 +00:00
parent deb30e8f9e
commit a3f6b0ed00
26 changed files with 450 additions and 362 deletions

View File

@@ -1,11 +1,3 @@
#!BPY
"""
Name: 'Vertex Keyframe Animation (.mdd)...'
Blender: 242
Group: 'Export'
Tooltip: 'Animated mesh to MDD vertex keyframe file.'
"""
__author__ = "Bill L.Nieuwendorp"
__bpydoc__ = """\
@@ -180,9 +172,13 @@ class EXPORT_OT_mdd(bpy.types.Operator):
bpy.ops.add(EXPORT_OT_mdd)
# Add to a menu
import dynamic_menu
menu_func = lambda self, context: self.layout.itemO("export.mdd", text="Vertex Keyframe Animation (.mdd)...")
menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
if __name__=='__main__':
#if not pack:
# Draw.PupMenu('Error%t|This script requires a full python install')
#Blender.Window.FileSelector(mdd_export_ui, 'EXPORT MDD', sys.makename(ext='.mdd'))
bpy.ops.EXPORT_OT_mdd(path="/tmp/test.mdd")