- 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:
@@ -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")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user