Page Menu
Home
Search
Configure Global Search
Log In
Files
F118183
AllMenuE.py
Varel (irvan4varel)
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Varel (irvan4varel)
Oct 18 2014, 9:42 AM
Size
4 KB
Subscribers
None
AllMenuE.py
View Options
bl_info
=
{
"name"
:
"All Menu"
,
"author"
:
"Varel"
,
"category"
:
"3D View"
,
}
import
bpy
class
AllMenu
(
bpy
.
types
.
Menu
):
"""All menus"""
bl_label
=
"All Menu"
bl_idname
=
"view3D.all_menu"
def
draw
(
self
,
context
):
layout
=
self
.
layout
layout
.
operator
(
"render.opengl"
,
text
=
""
,
icon
=
'RENDER_STILL'
)
layout
.
operator
(
"render.opengl"
,
text
=
""
,
icon
=
'RENDER_ANIMATION'
)
.
animation
=
True
layout
.
operator
(
"group.create"
,
text
=
"New Group"
)
layout
.
operator
(
"group.objects_add_active"
,
text
=
"Add to Active"
)
layout
.
operator
(
"group.objects_remove"
,
text
=
"Remove from Group"
)
layout
.
operator
(
"ed.undo"
)
layout
.
operator
(
"ed.redo"
)
layout
.
operator
(
"object.delete"
)
layout
.
operator
(
"wm.call_menu"
,
text
=
"Unwrap"
)
.
name
=
"VIEW3D_MT_uv_map"
layout
.
operator
(
"wm.save_as_mainfile"
,
text
=
"Save As"
,
icon
=
"SAVE_AS"
)
.
copy
=
True
layout
.
operator
(
"object.shade_smooth"
)
layout
.
operator
(
"object.shade_flat"
,
text
=
"Flat"
)
layout
.
operator
(
"mesh.primitive_cube_add"
,
text
=
"Cube"
,
icon
=
'MESH_CUBE'
)
layout
.
operator
(
"mesh.primitive_uv_sphere_add"
,
text
=
"UV Sphere"
,
icon
=
'MESH_UVSPHERE'
)
layout
.
operator
(
"mesh.primitive_cylinder_add"
,
text
=
"Cylinder"
,
icon
=
'MESH_CYLINDER'
)
layout
.
operator
(
"mesh.primitive_torus_add"
,
text
=
"Torus"
,
icon
=
'MESH_TORUS'
)
layout
.
operator
(
"mesh.primitive_plane_add"
,
text
=
"Plane"
,
icon
=
'MESH_PLANE'
)
layout
.
operator
(
"mesh.primitive_circle_add"
,
text
=
"Circle"
,
icon
=
'MESH_CIRCLE'
)
layout
.
operator
(
"mesh.primitive_ico_sphere_add"
,
text
=
"Ico Sphere"
,
icon
=
'MESH_ICOSPHERE'
)
layout
.
operator
(
"mesh.primitive_cone_add"
,
text
=
"Cone"
,
icon
=
'MESH_CONE'
)
layout
.
operator
(
"mesh.primitive_grid_add"
,
text
=
"Grid"
,
icon
=
'MESH_GRID'
)
layout
.
operator
(
"mesh.primitive_monkey_add"
,
text
=
"Monkey"
,
icon
=
'MESH_MONKEY'
)
layout
.
operator
(
"curve.primitive_bezier_curve_add"
,
text
=
"Bezier"
,
icon
=
'CURVE_BEZCURVE'
)
layout
.
operator
(
"curve.primitive_bezier_circle_add"
,
text
=
"Circle"
,
icon
=
'CURVE_BEZCIRCLE'
)
layout
.
operator
(
"curve.primitive_nurbs_curve_add"
,
text
=
"Nurbs Curve"
,
icon
=
'CURVE_NCURVE'
)
layout
.
operator
(
"curve.primitive_nurbs_circle_add"
,
text
=
"Nurbs Circle"
,
icon
=
'CURVE_NCIRCLE'
)
layout
.
operator
(
"curve.primitive_nurbs_path_add"
,
text
=
"Path"
,
icon
=
'CURVE_PATH'
)
layout
.
operator
(
"surface.primitive_nurbs_surface_curve_add"
,
text
=
"Nurbs Curve"
,
icon
=
'SURFACE_NCURVE'
)
layout
.
operator
(
"surface.primitive_nurbs_surface_circle_add"
,
text
=
"Nurbs Circle"
,
icon
=
'SURFACE_NCIRCLE'
)
layout
.
operator
(
"surface.primitive_nurbs_surface_surface_add"
,
text
=
"Nurbs Surface"
,
icon
=
'SURFACE_NSURFACE'
)
layout
.
operator
(
"surface.primitive_nurbs_surface_cylinder_add"
,
text
=
"Nurbs Cylinder"
,
icon
=
'SURFACE_NCYLINDER'
)
layout
.
operator
(
"surface.primitive_nurbs_surface_sphere_add"
,
text
=
"Nurbs Sphere"
,
icon
=
'SURFACE_NSPHERE'
)
layout
.
operator
(
"surface.primitive_nurbs_surface_torus_add"
,
text
=
"Nurbs Torus"
,
icon
=
'SURFACE_NTORUS'
)
layout
.
operator_enum
(
"object.metaball_add"
,
"type"
)
layout
.
operator_enum
(
"object.lamp_add"
,
"type"
)
layout
.
operator
(
"object.text_add"
,
text
=
"Text"
,
icon
=
'OUTLINER_OB_FONT'
)
layout
.
operator
(
"object.armature_add"
,
text
=
"Armature"
,
icon
=
'OUTLINER_OB_ARMATURE'
)
layout
.
operator
(
"object.add"
,
text
=
"Lattice"
,
icon
=
'OUTLINER_OB_LATTICE'
)
.
type
=
'LATTICE'
layout
.
operator
(
"object.empty_add"
,
text
=
"Empty"
,
icon
=
'OUTLINER_OB_EMPTY'
)
.
type
=
'PLAIN_AXES'
layout
.
operator
(
"object.speaker_add"
,
text
=
"Speaker"
,
icon
=
'OUTLINER_OB_SPEAKER'
)
layout
.
operator
(
"object.camera_add"
,
text
=
"Camera"
,
icon
=
'OUTLINER_OB_CAMERA'
)
layout
.
operator
(
"object.duplicate_move"
)
layout
.
operator_menu_enum
(
"object.modifier_add"
,
"type"
,
text
=
"Add Modifier"
,
icon
=
"MODIFIER"
)
layout
.
operator_menu_enum
(
"object.constraint_add"
,
"type"
,
text
=
"Add Object Constraint"
,
icon
=
"CONSTRAINT"
)
def
draw_item
(
self
,
context
):
layout
=
self
.
layout
layout
.
menu
(
AllMenu
.
bl_idname
)
def
register
():
bpy
.
utils
.
register_class
(
AllMenu
)
# lets add ourselves to the main header
bpy
.
types
.
INFO_HT_header
.
append
(
draw_item
)
def
unregister
():
bpy
.
utils
.
unregister_class
(
AllMenu
)
if
__name__
==
"__main__"
:
register
()
# The menu can also be called from scripts
bpy
.
ops
.
wm
.
call_menu
(
name
=
AllMenu
.
bl_idname
)
File Metadata
Details
Attached
Mime Type
text/x-python
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
be/54/96334d1cb860cdf06292a1c56b6f
Attached To
T42268: All Menu E
Event Timeline
Log In to Comment