Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 2,690 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| layout.operator("object.shade_flat", text="Shade Flat") | layout.operator("object.shade_flat", text="Shade Flat") | ||||
| layout.separator() | layout.separator() | ||||
| if obj.type in {'MESH', 'CURVE', 'SURFACE', 'ARMATURE', 'GPENCIL'}: | if obj.type in {'MESH', 'CURVE', 'SURFACE', 'ARMATURE', 'GPENCIL'}: | ||||
| if selected_objects_len > 1: | if selected_objects_len > 1: | ||||
| layout.operator("object.join") | layout.operator("object.join") | ||||
| if obj.type in {'MESH', 'CURVE', 'SURFACE', 'POINTCLOUD', 'META', 'FONT'}: | if obj.type in {'MESH', 'CURVE', 'CURVES', 'SURFACE', 'POINTCLOUD', 'META', 'FONT'}: | ||||
| layout.operator_menu_enum("object.convert", "target") | layout.operator_menu_enum("object.convert", "target") | ||||
| if obj.type == 'GPENCIL': | if obj.type == 'GPENCIL': | ||||
| layout.operator_menu_enum("gpencil.convert", "type", text="Convert To") | layout.operator_menu_enum("gpencil.convert", "type", text="Convert To") | ||||
| if ( | if ( | ||||
| obj.type in {'MESH', 'CURVE', 'SURFACE', 'GPENCIL', 'LATTICE', 'ARMATURE', 'META', 'FONT'} or | obj.type in {'MESH', 'CURVE', 'CURVES', 'SURFACE', 'GPENCIL', 'LATTICE', 'ARMATURE', 'META', 'FONT', 'POINTCLOUD'} or | ||||
| (obj.type == 'EMPTY' and obj.instance_collection is not None) | (obj.type == 'EMPTY' and obj.instance_collection is not None) | ||||
| ): | ): | ||||
| layout.operator_context = 'INVOKE_REGION_WIN' | layout.operator_context = 'INVOKE_REGION_WIN' | ||||
| layout.operator_menu_enum("object.origin_set", text="Set Origin", property="type") | layout.operator_menu_enum("object.origin_set", text="Set Origin", property="type") | ||||
| layout.operator_context = 'INVOKE_DEFAULT' | layout.operator_context = 'INVOKE_DEFAULT' | ||||
| layout.separator() | layout.separator() | ||||
| ▲ Show 20 Lines • Show All 5,529 Lines • Show Last 20 Lines | |||||