- 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

@@ -273,7 +273,9 @@ class EXPORT_OT_ply(bpy.types.Operator):
bpy.ops.add(EXPORT_OT_ply)
import dynamic_menu
menu_func = lambda self, context: self.layout.itemO("export.ply", text="Stanford (.ply)...")
menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
if __name__ == "__main__":
bpy.ops.EXPORT_OT_ply(path="/tmp/test.ply")