Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
| Show First 20 Lines • Show All 1,288 Lines • ▼ Show 20 Lines | |||||
| class INFO_MT_add(Menu): | class INFO_MT_add(Menu): | ||||
| bl_label = "Add" | bl_label = "Add" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| # note, don't use 'EXEC_SCREEN' or operators wont get the 'v3d' context. | # note, don't use 'EXEC_SCREEN' or operators won't get the 'v3d' context. | ||||
| # Note: was EXEC_AREA, but this context does not have the 'rv3d', which prevents | # Note: was EXEC_AREA, but this context does not have the 'rv3d', which prevents | ||||
| # "align_view" to work on first call (see [#32719]). | # "align_view" to work on first call (see [#32719]). | ||||
| layout.operator_context = 'EXEC_REGION_WIN' | layout.operator_context = 'EXEC_REGION_WIN' | ||||
| # layout.operator_menu_enum("object.mesh_add", "type", text="Mesh", icon='OUTLINER_OB_MESH') | # layout.operator_menu_enum("object.mesh_add", "type", text="Mesh", icon='OUTLINER_OB_MESH') | ||||
| layout.menu("INFO_MT_mesh_add", icon='OUTLINER_OB_MESH') | layout.menu("INFO_MT_mesh_add", icon='OUTLINER_OB_MESH') | ||||
| ▲ Show 20 Lines • Show All 2,847 Lines • Show Last 20 Lines | |||||