Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
| Show First 20 Lines • Show All 1,528 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| layout.menu("VIEW3D_MT_metaball_add", text="Metaball", icon='OUTLINER_OB_META') | layout.menu("VIEW3D_MT_metaball_add", text="Metaball", icon='OUTLINER_OB_META') | ||||
| layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT') | layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT') | ||||
| layout.operator_menu_enum("object.gpencil_add", "type", text="Grease Pencil", icon='OUTLINER_OB_GREASEPENCIL') | layout.operator_menu_enum("object.gpencil_add", "type", text="Grease Pencil", icon='OUTLINER_OB_GREASEPENCIL') | ||||
| layout.separator() | layout.separator() | ||||
| layout.menu("VIEW3D_MT_armature_add", icon='OUTLINER_OB_ARMATURE') | layout.menu("VIEW3D_MT_armature_add", icon='OUTLINER_OB_ARMATURE') | ||||
| layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE' | layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE' | ||||
| layout.operator_menu_enum("object.empty_add", "type", text="Empty", icon='OUTLINER_OB_EMPTY') | layout.operator_menu_enum("object.empty_add", "type", text="Empty", icon='OUTLINER_OB_EMPTY') | ||||
| layout.menu("VIEW3D_MT_image_add", text="Image", icon='OUTLINER_OB_IMAGE') | |||||
| sublayout = layout.column() | |||||
| sublayout.operator_context = 'INVOKE_DEFAULT' | |||||
| sublayout.operator("object.load_image_as_empty", text="Image", icon="OUTLINER_OB_IMAGE") | |||||
| layout.separator() | layout.separator() | ||||
| layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER') | layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER') | ||||
| layout.separator() | layout.separator() | ||||
| if VIEW3D_MT_camera_add.is_extended(): | if VIEW3D_MT_camera_add.is_extended(): | ||||
| layout.menu("VIEW3D_MT_camera_add", icon='OUTLINER_OB_CAMERA') | layout.menu("VIEW3D_MT_camera_add", icon='OUTLINER_OB_CAMERA') | ||||
| else: | else: | ||||
| Show All 22 Lines | def draw(self, context): | ||||
| col.operator_menu_enum( | col.operator_menu_enum( | ||||
| "object.collection_instance_add", | "object.collection_instance_add", | ||||
| "collection", | "collection", | ||||
| text="Collection Instance", | text="Collection Instance", | ||||
| icon='OUTLINER_OB_GROUP_INSTANCE', | icon='OUTLINER_OB_GROUP_INSTANCE', | ||||
| ) | ) | ||||
| class VIEW3D_MT_image_add(Menu): | |||||
| bl_label = "Add Image" | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.operator("object.load_reference_image", text="Reference") | |||||
| layout.operator("object.load_background_image", text="Background") | |||||
| class VIEW3D_MT_object_relations(Menu): | class VIEW3D_MT_object_relations(Menu): | ||||
| bl_label = "Relations" | bl_label = "Relations" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.operator("object.proxy_make", text="Make Proxy...") | layout.operator("object.proxy_make", text="Make Proxy...") | ||||
| ▲ Show 20 Lines • Show All 3,883 Lines • ▼ Show 20 Lines | classes = ( | ||||
| VIEW3D_PT_overlay_sculpt, | VIEW3D_PT_overlay_sculpt, | ||||
| VIEW3D_PT_pivot_point, | VIEW3D_PT_pivot_point, | ||||
| VIEW3D_PT_snapping, | VIEW3D_PT_snapping, | ||||
| VIEW3D_PT_gpencil_origin, | VIEW3D_PT_gpencil_origin, | ||||
| VIEW3D_PT_gpencil_lock, | VIEW3D_PT_gpencil_lock, | ||||
| VIEW3D_PT_transform_orientations, | VIEW3D_PT_transform_orientations, | ||||
| VIEW3D_PT_overlay_gpencil_options, | VIEW3D_PT_overlay_gpencil_options, | ||||
| VIEW3D_PT_context_properties, | VIEW3D_PT_context_properties, | ||||
| VIEW3D_MT_image_add, | |||||
| ) | ) | ||||
| if __name__ == "__main__": # only for live edit. | if __name__ == "__main__": # only for live edit. | ||||
| from bpy.utils import register_class | from bpy.utils import register_class | ||||
| for cls in classes: | for cls in classes: | ||||
| register_class(cls) | register_class(cls) | ||||