spacebar_menu: view, animation, main menu changes: T68591
This commit is contained in:
parent
54e504f32b
commit
fb55d80bfb
|
@ -41,6 +41,7 @@ if "bpy" in locals():
|
|||
importlib.reload(curve_menus)
|
||||
importlib.reload(snap_origin_cursor)
|
||||
importlib.reload(sculpt_brush_paint)
|
||||
importlib.reload(animation_menus)
|
||||
|
||||
else:
|
||||
from . import object_menus
|
||||
|
@ -52,6 +53,7 @@ else:
|
|||
from . import curve_menus
|
||||
from . import snap_origin_cursor
|
||||
from . import sculpt_brush_paint
|
||||
from . import animation_menus
|
||||
|
||||
import bpy
|
||||
from bpy.types import (
|
||||
|
@ -91,8 +93,8 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("INFO_MT_area", icon='WORKSPACE')
|
||||
layout.menu("VIEW3D_MT_View_Directions", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_View_Navigation", icon='PIVOT_BOUNDBOX')
|
||||
layout.menu("VIEW3D_MT_view_viewpoint", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view_navigation", icon='PIVOT_BOUNDBOX')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
UseSeparator(self, context)
|
||||
|
@ -118,7 +120,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -142,9 +144,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Mesh Edit Mode #
|
||||
if obj and obj.type == 'MESH' and obj.mode in {'EDIT'}:
|
||||
|
@ -156,7 +155,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Edit_Mesh", icon='RESTRICT_SELECT_OFF')
|
||||
layout.menu("VIEW3D_MT_Edit_Multi", icon='VERTEXSEL')
|
||||
UseSeparator(self, context)
|
||||
|
@ -178,9 +177,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("VIEW3D_MT_edit_mesh_delete", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Sculpt Mode #
|
||||
if obj and obj.type == 'MESH' and obj.mode in {'SCULPT'}:
|
||||
|
@ -192,7 +188,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Sculpts", icon='SCULPTMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_Angle_Control", text="Angle Control", icon='BRUSH_SCULPT_DRAW')
|
||||
|
@ -202,9 +198,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("VIEW3D_MT_Sculpt_Specials", icon='SOLO_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Vertex Paint #
|
||||
if obj and obj.type == 'MESH' and obj.mode in {'VERTEX_PAINT'}:
|
||||
|
@ -216,7 +209,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
UseSeparator(self, context)
|
||||
# layout.menu("VIEW3D_MT_Brush_Settings", icon='BRUSH_DATA')
|
||||
layout.menu("VIEW3D_MT_Brush_Selection",
|
||||
|
@ -224,9 +217,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("VIEW3D_MT_Vertex_Colors", icon='GROUP_VCOL')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Weight Paint Menu #
|
||||
if obj and obj.type == 'MESH' and obj.mode in {'WEIGHT_PAINT'}:
|
||||
|
@ -238,7 +228,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Paint_Weights", icon='WPAINT_HLT')
|
||||
# layout.menu("VIEW3D_MT_Brush_Settings", icon='BRUSH_DATA')
|
||||
|
@ -246,9 +236,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
text="Weight Paint Tool", icon='BRUSH_TEXMASK')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Texture Paint #
|
||||
if obj and obj.type == 'MESH' and obj.mode in {'TEXTURE_PAINT'}:
|
||||
|
@ -260,15 +247,12 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
# layout.menu("VIEW3D_MT_Brush_Settings", icon='BRUSH_DATA')
|
||||
layout.menu("VIEW3D_MT_Brush_Selection",
|
||||
text="Texture Paint Tool", icon='SCULPTMODE_HLT')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Curve Object Mode #
|
||||
if obj and obj.type == 'CURVE' and obj.mode in {'OBJECT'}:
|
||||
|
@ -281,7 +265,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -304,9 +288,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Edit Curve #
|
||||
if obj and obj.type == 'CURVE' and obj.mode in {'EDIT'}:
|
||||
|
@ -318,7 +299,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Edit_Curve",
|
||||
icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
|
@ -338,9 +319,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Surface Object Mode #
|
||||
if obj and obj.type == 'SURFACE' and obj.mode in {'OBJECT'}:
|
||||
|
@ -353,7 +331,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -375,9 +353,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Edit Surface #
|
||||
if obj and obj.type == 'SURFACE' and obj.mode in {'EDIT'}:
|
||||
|
@ -389,7 +364,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Edit_Surface", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_surface_add", text="Add Surface",
|
||||
|
@ -409,9 +384,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
icon='CANCEL')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Metaball Object Mode #
|
||||
if obj and obj.type == 'META' and obj.mode in {'OBJECT'}:
|
||||
|
@ -424,7 +396,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -445,9 +417,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Edit Metaball #
|
||||
if obj and obj.type == 'META' and obj.mode in {'EDIT'}:
|
||||
|
@ -459,7 +428,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_SelectMetaball", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.operator_menu_enum("object.metaball_add", "type",
|
||||
|
@ -478,9 +447,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
icon='CANCEL')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Text Object Mode #
|
||||
if obj and obj.type == 'FONT' and obj.mode in {'OBJECT'}:
|
||||
|
@ -493,7 +459,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.operator("view3d.interactive_mode_text", icon='VIEW3D')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -516,9 +482,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Text Edit Mode #
|
||||
# To Do: Space is already reserved for the typing tool
|
||||
|
@ -533,14 +496,11 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
UseSeparator(self, context)
|
||||
layout.operator("object.editmode_toggle", text="Enter Object Mode",
|
||||
icon='OBJECT_DATA')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_select_edit_text", icon='VIEW3D')
|
||||
layout.menu("VIEW3D_MT_edit_font", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Camera Object Mode #
|
||||
if obj and obj.type == 'CAMERA' and obj.mode in {'OBJECT'}:
|
||||
|
@ -552,7 +512,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("wm.toolbar", text="Tools", icon='TOOL_SETTINGS')
|
||||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -573,9 +533,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Lamp Object Mode #
|
||||
if obj and obj.type == 'LIGHT' and obj.mode in {'OBJECT'}:
|
||||
|
@ -587,7 +544,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("wm.toolbar", text="Tools", icon='TOOL_SETTINGS')
|
||||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -608,9 +565,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Armature Object Mode #
|
||||
if obj and obj.type == 'ARMATURE' and obj.mode in {'OBJECT'}:
|
||||
|
@ -623,7 +577,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Armature", icon='VIEW3D')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -645,9 +599,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Armature Edit #
|
||||
if obj and obj.type == 'ARMATURE' and obj.mode in {'EDIT'}:
|
||||
|
@ -659,7 +610,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Armature", icon='VIEW3D')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Edit_Armature",
|
||||
icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
|
@ -682,9 +633,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Armature Pose #
|
||||
if obj and obj.type == 'ARMATURE' and obj.mode in {'POSE'}:
|
||||
|
@ -698,7 +646,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Armature", icon='VIEW3D')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Pose", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Pose", icon='ARMATURE_DATA')
|
||||
|
@ -723,10 +671,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Lattice Object Mode #
|
||||
if obj and obj.type == 'LATTICE' and obj.mode in {'OBJECT'}:
|
||||
|
||||
|
@ -738,7 +682,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -761,9 +705,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Edit Lattice #
|
||||
if obj and obj.type == 'LATTICE' and obj.mode in {'EDIT'}:
|
||||
|
@ -775,7 +716,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Edit_Lattice",
|
||||
icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
|
@ -791,9 +732,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("lattice.make_regular")
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Empty Object Mode #
|
||||
if obj and obj.type == 'EMPTY' and obj.mode in {'OBJECT'}:
|
||||
|
@ -805,7 +743,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("wm.toolbar", text="Tools", icon='TOOL_SETTINGS')
|
||||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -827,9 +765,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Speaker Object Mode #
|
||||
if obj and obj.type == 'SPEAKER' and obj.mode in {'OBJECT'}:
|
||||
|
@ -841,7 +776,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("wm.toolbar", text="Tools", icon='TOOL_SETTINGS')
|
||||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -859,9 +794,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Particle Menu #
|
||||
if obj and context.mode == 'PARTICLE':
|
||||
|
@ -873,7 +805,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_InteractiveMode", icon='VIEW3D')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Particle",
|
||||
icon='RESTRICT_SELECT_OFF')
|
||||
layout.menu("VIEW3D_MT_Selection_Mode_Particle",
|
||||
|
@ -894,9 +826,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Grease Pencil Object Mode #
|
||||
if obj and obj.type == 'GPENCIL' and obj.mode in {'OBJECT'}:
|
||||
|
@ -908,7 +837,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -932,9 +861,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.operator("object.delete", text="Delete Object", icon='X')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Grease Pencil Edit Mode #
|
||||
if obj and obj.type == 'GPENCIL' and obj.mode in {'EDIT_GPENCIL'}:
|
||||
|
@ -947,7 +873,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_select_gpencil", icon='RESTRICT_SELECT_OFF')
|
||||
layout.menu("VIEW3D_MT_edit_gpencil", icon='GREASEPENCIL')
|
||||
UseSeparator(self, context)
|
||||
|
@ -959,9 +885,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
text="Cursor to Grid", icon='SNAP_GRID')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Grease Pencil Sculpt Mode #
|
||||
if obj and obj.type == 'GPENCIL' and obj.mode in {'SCULPT_GPENCIL'}:
|
||||
|
@ -974,7 +897,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_select_gpencil", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -985,9 +908,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
text="Cursor to Grid", icon='SNAP_GRID')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Grease Pencil Paint Mode #
|
||||
if obj and obj.type == 'GPENCIL' and obj.mode in {'PAINT_GPENCIL'}:
|
||||
|
@ -1000,7 +920,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_paint_gpencil", icon='RESTRICT_SELECT_OFF')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
|
@ -1011,9 +931,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
text="Cursor to Grid", icon='SNAP_GRID')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Grease Pencil Weight Mode #
|
||||
if obj and obj.type == 'GPENCIL' and obj.mode in {'WEIGHT_GPENCIL'}:
|
||||
|
@ -1026,15 +943,12 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
|
||||
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_weight_gpencil", icon="GPBRUSH_WEIGHT")
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
|
||||
UseSeparator(self, context)
|
||||
layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
|
||||
layout.prop(view, "show_region_ui", icon='MENU_PANEL')
|
||||
|
||||
# Light Probe Menu #
|
||||
if obj and obj.type == 'LIGHT_PROBE':
|
||||
|
@ -1047,8 +961,8 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
|
|||
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("INFO_MT_area", icon='WORKSPACE')
|
||||
layout.menu("VIEW3D_MT_View_Directions", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_View_Navigation", icon='PIVOT_BOUNDBOX')
|
||||
layout.menu("VIEW3D_MT_view_viewpoint", icon='ZOOM_ALL')
|
||||
layout.menu("VIEW3D_MT_view_navigation", icon='PIVOT_BOUNDBOX')
|
||||
UseSeparator(self, context)
|
||||
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
|
||||
UseSeparator(self, context)
|
||||
|
@ -1126,6 +1040,7 @@ def register():
|
|||
curve_menus.register()
|
||||
snap_origin_cursor.register()
|
||||
sculpt_brush_paint.register()
|
||||
animation_menus.register()
|
||||
|
||||
wm = bpy.context.window_manager
|
||||
kc = wm.keyconfigs.addon
|
||||
|
@ -1156,6 +1071,7 @@ def unregister():
|
|||
curve_menus.unregister()
|
||||
snap_origin_cursor.unregister()
|
||||
sculpt_brush_paint.unregister()
|
||||
animation_menus.unregister()
|
||||
|
||||
for cls in reversed(classes):
|
||||
bpy.utils.unregister_class(cls)
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
# Contributed to by: meta-androcto, JayDez, sim88, sam, lijenstina, mkb, wisaac, CoDEmanX #
|
||||
|
||||
|
||||
import bpy
|
||||
from bpy.types import (
|
||||
Operator,
|
||||
Menu,
|
||||
)
|
||||
from bpy.props import (
|
||||
BoolProperty,
|
||||
StringProperty,
|
||||
)
|
||||
|
||||
from bl_ui.properties_paint_common import UnifiedPaintPanel
|
||||
|
||||
|
||||
# Animation Menus
|
||||
class VIEW3D_MT_KeyframeMenu(Menu):
|
||||
bl_label = "Keyframe"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.operator("anim.keyframe_insert_menu",
|
||||
text="Insert Keyframe...")
|
||||
layout.operator("anim.keyframe_delete_v3d",
|
||||
text="Delete Keyframe...")
|
||||
layout.operator("anim.keying_set_active_set",
|
||||
text="Change Keying Set...")
|
||||
|
||||
|
||||
|
||||
# Animation Player (Thanks to marvin.k.breuer) #
|
||||
class VIEW3D_MT_Animation_Player(Menu):
|
||||
bl_label = "Animation"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("screen.animation_play", text="PLAY", icon='PLAY')
|
||||
layout.operator("screen.animation_play", text="Stop", icon='PAUSE')
|
||||
layout.operator("screen.animation_play", text="Reverse", icon='PLAY_REVERSE').reverse = True
|
||||
layout.separator()
|
||||
|
||||
|
||||
layout.operator("screen.keyframe_jump", text="Next FR", icon='NEXT_KEYFRAME').next = True
|
||||
layout.operator("screen.keyframe_jump", text="Previous FR", icon='PREV_KEYFRAME').next = False
|
||||
layout.separator()
|
||||
|
||||
layout.operator("screen.frame_jump", text="Jump FF", icon='FF').end = True
|
||||
layout.operator("screen.frame_jump", text="Jump REW", icon='REW').end = False
|
||||
layout.separator()
|
||||
|
||||
layout.menu("VIEW3D_MT_KeyframeMenu", text="Keyframes", icon='DECORATE_ANIMATE')
|
||||
|
||||
|
||||
|
||||
# List The Classes #
|
||||
|
||||
classes = (
|
||||
VIEW3D_MT_KeyframeMenu,
|
||||
VIEW3D_MT_Animation_Player,
|
||||
)
|
||||
|
||||
|
||||
# Register Classes & Hotkeys #
|
||||
def register():
|
||||
for cls in classes:
|
||||
bpy.utils.register_class(cls)
|
||||
|
||||
|
||||
# Unregister Classes & Hotkeys #
|
||||
def unregister():
|
||||
|
||||
for cls in reversed(classes):
|
||||
bpy.utils.unregister_class(cls)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
|
@ -335,19 +335,6 @@ class VIEW3D_MT_Duplicate(Menu):
|
|||
layout.operator("object.duplicate_move_linked")
|
||||
|
||||
|
||||
class VIEW3D_MT_KeyframeMenu(Menu):
|
||||
bl_label = "Keyframe"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.operator("anim.keyframe_insert_menu",
|
||||
text="Insert Keyframe...")
|
||||
layout.operator("anim.keyframe_delete_v3d",
|
||||
text="Delete Keyframe...")
|
||||
layout.operator("anim.keying_set_active_set",
|
||||
text="Change Keying Set...")
|
||||
|
||||
|
||||
class VIEW3D_MT_UndoS(Menu):
|
||||
bl_label = "Undo/Redo"
|
||||
|
||||
|
@ -360,91 +347,6 @@ class VIEW3D_MT_UndoS(Menu):
|
|||
layout.operator("ed.undo_history")
|
||||
|
||||
|
||||
# Display Wire (Thanks to marvin.k.breuer) #
|
||||
class VIEW3D_OT_Display_Wire_All(Operator):
|
||||
bl_label = "Wire on All Objects"
|
||||
bl_idname = "view3d.display_wire_all"
|
||||
bl_description = "Enable/Disable Display Wire on All Objects"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.active_object is not None
|
||||
|
||||
def execute(self, context):
|
||||
is_error = False
|
||||
for obj in bpy.data.objects:
|
||||
try:
|
||||
if obj.show_wire:
|
||||
obj.show_all_edges = False
|
||||
obj.show_wire = False
|
||||
else:
|
||||
obj.show_all_edges = True
|
||||
obj.show_wire = True
|
||||
except:
|
||||
is_error = True
|
||||
pass
|
||||
|
||||
if is_error:
|
||||
self.report({'WARNING'},
|
||||
"Wire on All Objects could not be completed for some objects")
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
# Matcap and AO, Wire all and X-Ray entries thanks to marvin.k.breuer
|
||||
class VIEW3D_MT_Shade(Menu):
|
||||
bl_label = "Shade"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
# layout.prop(context.space_data, "viewport_shade", expand=True)
|
||||
|
||||
if context.active_object:
|
||||
if(context.mode == 'EDIT_MESH'):
|
||||
layout.operator("MESH_OT_faces_shade_smooth", icon='SHADING_RENDERED')
|
||||
layout.operator("MESH_OT_faces_shade_flat", icon='SHADING_SOLID')
|
||||
else:
|
||||
layout.operator("OBJECT_OT_shade_smooth", icon='SHADING_RENDERED')
|
||||
layout.operator("OBJECT_OT_shade_flat", icon='SHADING_SOLID')
|
||||
|
||||
layout.separator()
|
||||
layout.operator("view3d.display_wire_all", text="Wire all", icon='SHADING_WIRE')
|
||||
layout.prop(context.object, "show_in_front", text="X-Ray", icon="META_CUBE")
|
||||
|
||||
layout.separator()
|
||||
layout.prop(context.space_data.fx_settings, "use_ssao",
|
||||
text="Ambient Occlusion", icon="GROUP")
|
||||
# layout.prop(context.space_data, "use_matcap", icon="MATCAP_01")
|
||||
|
||||
# if context.space_data.use_matcap:
|
||||
# row = layout.column(1)
|
||||
# row.scale_y = 0.3
|
||||
# row.scale_x = 0.5
|
||||
# row.template_icon_view(context.space_data, "matcap_icon")
|
||||
|
||||
|
||||
# Animation Player (Thanks to marvin.k.breuer) #
|
||||
class VIEW3D_MT_Animation_Player(Menu):
|
||||
bl_label = "Animation"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("screen.frame_jump", text="Jump REW", icon='REW').end = False
|
||||
layout.operator("screen.keyframe_jump", text="Previous FR", icon='PREV_KEYFRAME').next = False
|
||||
|
||||
layout.separator()
|
||||
layout.operator("screen.animation_play", text="Reverse", icon='PLAY_REVERSE').reverse = True
|
||||
layout.operator("screen.animation_play", text="PLAY", icon='PLAY')
|
||||
layout.operator("screen.animation_play", text="Stop", icon='PAUSE')
|
||||
layout.separator()
|
||||
|
||||
layout.operator("screen.keyframe_jump", text="Next FR", icon='NEXT_KEYFRAME').next = True
|
||||
layout.operator("screen.frame_jump", text="Jump FF", icon='FF').end = True
|
||||
layout.menu("VIEW3D_MT_KeyframeMenu", text="Keyframes", icon='DECORATE_ANIMATE')
|
||||
|
||||
|
||||
# Set Mode Operator #
|
||||
class VIEW3D_OT_SetObjectMode(Operator):
|
||||
bl_idname = "object.set_object_mode"
|
||||
|
@ -478,18 +380,14 @@ classes = (
|
|||
VIEW3D_MT_MirrorMenu,
|
||||
VIEW3D_MT_ParentMenu,
|
||||
VIEW3D_MT_GroupMenu,
|
||||
VIEW3D_MT_KeyframeMenu,
|
||||
VIEW3D_MT_UndoS,
|
||||
VIEW3D_MT_Camera_Options,
|
||||
VIEW3D_MT_InteractiveMode,
|
||||
VIEW3D_MT_InteractiveModeOther,
|
||||
VIEW3D_OT_SetObjectMode,
|
||||
VIEW3D_MT_Shade,
|
||||
VIEW3D_MT_Object_Data_Link,
|
||||
VIEW3D_MT_Duplicate,
|
||||
VIEW3D_MT_Animation_Player,
|
||||
VIEW3D_OT_Interactive_Mode_Text,
|
||||
VIEW3D_OT_Display_Wire_All,
|
||||
VIEW3D_OT_Interactive_Mode_Grease_Pencil,
|
||||
VIEW3D_MT_Interactive_Mode_GPencil,
|
||||
VIEW3D_MT_Edit_Gpencil,
|
||||
|
|
|
@ -28,176 +28,78 @@ from bpy.props import (
|
|||
StringProperty,
|
||||
)
|
||||
|
||||
from .object_menus import *
|
||||
|
||||
|
||||
# View Menu's #
|
||||
# Display Wire (Thanks to marvin.k.breuer) #
|
||||
class VIEW3D_OT_Display_Wire_All(Operator):
|
||||
bl_label = "Wire on All Objects"
|
||||
bl_idname = "view3d.display_wire_all"
|
||||
bl_description = "Enable/Disable Display Wire on All Objects"
|
||||
|
||||
class VIEW3D_MT_View_Directions(Menu):
|
||||
bl_label = "Viewpoint"
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.active_object is not None
|
||||
|
||||
def execute(self, context):
|
||||
is_error = False
|
||||
for obj in bpy.data.objects:
|
||||
try:
|
||||
if obj.show_wire:
|
||||
obj.show_all_edges = False
|
||||
obj.show_wire = False
|
||||
else:
|
||||
obj.show_all_edges = True
|
||||
obj.show_wire = True
|
||||
except:
|
||||
is_error = True
|
||||
pass
|
||||
|
||||
if is_error:
|
||||
self.report({'WARNING'},
|
||||
"Wire on All Objects could not be completed for some objects")
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
# Matcap and AO, Wire all and X-Ray entries thanks to marvin.k.breuer
|
||||
class VIEW3D_MT_Shade(Menu):
|
||||
bl_label = "Shade"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("view3d.view_camera", text="Camera")
|
||||
# layout.prop(context.space_data, "viewport_shade", expand=True)
|
||||
|
||||
if context.active_object:
|
||||
if(context.mode == 'EDIT_MESH'):
|
||||
layout.operator("MESH_OT_faces_shade_smooth", icon='SHADING_RENDERED')
|
||||
layout.operator("MESH_OT_faces_shade_flat", icon='SHADING_SOLID')
|
||||
else:
|
||||
layout.operator("OBJECT_OT_shade_smooth", icon='SHADING_RENDERED')
|
||||
layout.operator("OBJECT_OT_shade_flat", icon='SHADING_SOLID')
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("view3d.view_axis", text="Top").type = 'TOP'
|
||||
layout.operator("view3d.view_axis", text="Bottom").type = 'BOTTOM'
|
||||
layout.operator("view3d.display_wire_all", text="Wire all", icon='SHADING_WIRE')
|
||||
|
||||
layout.separator()
|
||||
layout.prop(context.space_data.fx_settings, "use_ssao",
|
||||
text="Ambient Occlusion", icon="GROUP")
|
||||
# layout.prop(context.space_data, "use_matcap", icon="MATCAP_01")
|
||||
|
||||
layout.operator("view3d.view_axis", text="Front").type = 'FRONT'
|
||||
layout.operator("view3d.view_axis", text="Back").type = 'BACK'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("view3d.view_axis", text="Right").type = 'RIGHT'
|
||||
layout.operator("view3d.view_axis", text="Left").type = 'LEFT'
|
||||
|
||||
|
||||
class VIEW3D_MT_View_Border(Menu):
|
||||
bl_label = "View Border"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
# layout.operator("view3d.clip_border", text="Clipping Border...")
|
||||
layout.operator("view3d.zoom_border", text="Zoom Border...")
|
||||
layout.operator("view3d.render_border", text="Render Border...")
|
||||
layout.operator("view3d.clear_render_border")
|
||||
|
||||
|
||||
class VIEW3D_MT_View_Menu(Menu):
|
||||
bl_label = "View"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
view = context.space_data
|
||||
|
||||
layout.menu("INFO_MT_area")
|
||||
layout.separator()
|
||||
layout.operator("view3d.view_selected", text="Frame Selected").use_all_regions = False
|
||||
if view.region_quadviews:
|
||||
layout.operator("view3d.view_selected", text="Frame Selected (Quad View)").use_all_regions = True
|
||||
layout.operator("view3d.view_all", text="Frame All").center = False
|
||||
layout.operator("view3d.view_persportho", text="Perspective/Orthographic")
|
||||
layout.menu("VIEW3D_MT_View_Local")
|
||||
layout.separator()
|
||||
layout.menu("VIEW3D_MT_view_cameras", text="Cameras")
|
||||
layout.separator()
|
||||
layout.menu("VIEW3D_MT_View_Directions")
|
||||
layout.menu("VIEW3D_MT_View_Navigation")
|
||||
layout.separator()
|
||||
layout.menu("VIEW3D_MT_View_Align")
|
||||
layout.menu("VIEW3D_MT_view_align_selected")
|
||||
layout.separator()
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
layout.menu("VIEW3D_MT_view_regions", text="View Regions")
|
||||
layout.menu("VIEW3D_MT_Shade")
|
||||
layout.separator()
|
||||
layout.operator("render.opengl", icon='RENDER_STILL')
|
||||
layout.operator("render.opengl", text="Viewport Render Animation", icon='RENDER_ANIMATION').animation = True
|
||||
|
||||
|
||||
class VIEW3D_MT_View_Navigation(Menu):
|
||||
bl_label = "Navigation"
|
||||
|
||||
def draw(self, context):
|
||||
from math import pi
|
||||
layout = self.layout
|
||||
layout.operator_enum("view3d.view_orbit", "type")
|
||||
props = layout.operator("view3d.view_orbit", text ="Orbit Opposite")
|
||||
props.type = 'ORBITRIGHT'
|
||||
props.angle = pi
|
||||
|
||||
layout.separator()
|
||||
layout.operator("view3d.view_roll", text="Roll Left").type = 'LEFT'
|
||||
layout.operator("view3d.view_roll", text="Roll Right").type = 'RIGHT'
|
||||
layout.separator()
|
||||
layout.operator_enum("view3d.view_pan", "type")
|
||||
layout.separator()
|
||||
layout.operator("view3d.zoom", text="Zoom In").delta = 1
|
||||
layout.operator("view3d.zoom", text="Zoom Out").delta = -1
|
||||
layout.separator()
|
||||
layout.operator("view3d.zoom_camera_1_to_1", text="Zoom Camera 1:1")
|
||||
layout.separator()
|
||||
layout.operator("view3d.fly")
|
||||
layout.operator("view3d.walk")
|
||||
|
||||
|
||||
class VIEW3D_MT_View_Align(Menu):
|
||||
bl_label = "Align View"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.operator("view3d.camera_to_view", text="Align Active Camera to View")
|
||||
layout.operator("view3d.camera_to_view_selected", text="Align Active Camera to Selected")
|
||||
layout.separator()
|
||||
layout.operator("view3d.view_all", text="Center Cursor and View All").center = True
|
||||
layout.operator("view3d.view_center_cursor")
|
||||
layout.separator()
|
||||
layout.operator("view3d.view_lock_to_active")
|
||||
layout.operator("view3d.view_lock_clear")
|
||||
|
||||
|
||||
class VIEW3D_MT_View_Align_Selected(Menu):
|
||||
bl_label = "Align View to Active"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
props = layout.operator("view3d.viewnumpad", text="Top")
|
||||
props.align_active = True
|
||||
props.type = 'TOP'
|
||||
props = layout.operator("view3d.viewnumpad", text="Bottom")
|
||||
props.align_active = True
|
||||
props.type = 'BOTTOM'
|
||||
props = layout.operator("view3d.viewnumpad", text="Front")
|
||||
props.align_active = True
|
||||
props.type = 'FRONT'
|
||||
props = layout.operator("view3d.viewnumpad", text="Back")
|
||||
props.align_active = True
|
||||
props.type = 'BACK'
|
||||
props = layout.operator("view3d.viewnumpad", text="Right")
|
||||
props.align_active = True
|
||||
props.type = 'RIGHT'
|
||||
props = layout.operator("view3d.viewnumpad", text="Left")
|
||||
props.align_active = True
|
||||
props.type = 'LEFT'
|
||||
|
||||
|
||||
class VIEW3D_MT_View_Cameras(Menu):
|
||||
bl_label = "Cameras"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.operator("view3d.object_as_camera")
|
||||
layout.operator("view3d.viewnumpad", text="Active Camera").type = 'CAMERA'
|
||||
|
||||
class VIEW3D_MT_View_Local(Menu):
|
||||
bl_label = "Local View"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
view = context.space_data
|
||||
|
||||
layout.operator("view3d.localview", text="Toggle Local View")
|
||||
layout.operator("view3d.localview_remove_from")
|
||||
layout.operator("view3d.view_persportho")
|
||||
# if context.space_data.use_matcap:
|
||||
# row = layout.column(1)
|
||||
# row.scale_y = 0.3
|
||||
# row.scale_x = 0.5
|
||||
# row.template_icon_view(context.space_data, "matcap_icon")
|
||||
|
||||
def menu_func(self, context):
|
||||
self.layout.menu("VIEW3D_MT_Shade")
|
||||
|
||||
# List The Classes #
|
||||
|
||||
classes = (
|
||||
VIEW3D_MT_View_Directions,
|
||||
VIEW3D_MT_View_Border,
|
||||
VIEW3D_MT_View_Menu,
|
||||
VIEW3D_MT_View_Navigation,
|
||||
VIEW3D_MT_View_Align,
|
||||
VIEW3D_MT_View_Align_Selected,
|
||||
VIEW3D_MT_View_Cameras,
|
||||
VIEW3D_MT_View_Local,
|
||||
VIEW3D_MT_Shade,
|
||||
VIEW3D_OT_Display_Wire_All,
|
||||
)
|
||||
|
||||
|
||||
|
@ -206,13 +108,14 @@ def register():
|
|||
for cls in classes:
|
||||
bpy.utils.register_class(cls)
|
||||
|
||||
bpy.types.VIEW3D_MT_view.append(menu_func)
|
||||
|
||||
# Unregister Classes & Hotkeys #
|
||||
def unregister():
|
||||
|
||||
for cls in reversed(classes):
|
||||
bpy.utils.unregister_class(cls)
|
||||
|
||||
bpy.types.VIEW3D_MT_view.remove(menu_func)
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
|
|
Loading…
Reference in New Issue