Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
| Show First 20 Lines • Show All 2,095 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void rna_def_space_outliner(BlenderRNA *brna) | static void rna_def_space_outliner(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem display_mode_items[] = { | static const EnumPropertyItem display_mode_items[] = { | ||||
| {SO_ALL_SCENES, "ALL_SCENES", 0, "All Scenes", "Display data-blocks in all scenes"}, | {SO_VIEW_LAYER, "VIEW_LAYER", 0, "View Layer", "Display the collections of the active view layer"}, | ||||
| {SO_CUR_SCENE, "CURRENT_SCENE", 0, "Current Scene", "Display data-blocks in current scene"}, | {SO_COLLECTIONS, "COLLECTIONS", 0, "Collections", "Display all collections based on the " | ||||
| {SO_VISIBLE, "VISIBLE_LAYERS", 0, "Visible Layers", "Display data-blocks in visible layers"}, | "master collection hierarchy"}, | ||||
| {SO_SELECTED, "SELECTED", 0, "Selected", "Display data-blocks of selected, visible objects"}, | {SO_ALL_SCENES, "ALL_SCENES", 0, "All Scenes", "Display composition related data in all scenes"}, | ||||
| {SO_ACTIVE, "ACTIVE", 0, "Active", "Display data-blocks of active object"}, | |||||
| {SO_SAME_TYPE, "SAME_TYPES", 0, "Same Types", | |||||
| "Display data-blocks of all objects of same type as selected object"}, | |||||
| {SO_GROUPS, "GROUPS", 0, "Groups", "Display groups and their data-blocks"}, | {SO_GROUPS, "GROUPS", 0, "Groups", "Display groups and their data-blocks"}, | ||||
| {SO_SEQUENCE, "SEQUENCE", 0, "Sequence", "Display sequence data-blocks"}, | {SO_SEQUENCE, "SEQUENCE", 0, "Sequence", "Display sequence data-blocks"}, | ||||
| {SO_LIBRARIES, "LIBRARIES", 0, "Blender File", "Display data of current file and linked libraries"}, | {SO_LIBRARIES, "LIBRARIES", 0, "Blender File", "Display data of current file and linked libraries"}, | ||||
| {SO_DATABLOCKS, "DATABLOCKS", 0, "Data-Blocks", "Display all raw data-blocks"}, | {SO_DATABLOCKS, "DATABLOCKS", 0, "Data-Blocks", "Display all raw data-blocks"}, | ||||
| {SO_USERDEF, "USER_PREFERENCES", 0, "User Preferences", "Display user preference data"}, | {SO_USERDEF, "USER_PREFERENCES", 0, "User Preferences", "Display user preference data"}, | ||||
| {SO_ID_ORPHANS, "ORPHAN_DATA", 0, "Orphan Data", | {SO_ID_ORPHANS, "ORPHAN_DATA", 0, "Orphan Data", | ||||
| "Display data-blocks which are unused and/or will be lost when the file is reloaded"}, | "Display data-blocks which are unused and/or will be lost when the file is reloaded"}, | ||||
| {SO_VIEW_LAYER, "VIEW_LAYER", 0, "View Layer", "Display the collections of the active view layer"}, | {0, NULL, 0, NULL, NULL} | ||||
| {SO_COLLECTIONS, "COLLECTIONS", 0, "Collections", "Display all collections based on the " | }; | ||||
| "master collection hierarchy"}, | |||||
| static const EnumPropertyItem filter_state_items[] = { | |||||
| {SO_FILTER_OB_VISIBLE, "VISIBLE", ICON_RESTRICT_VIEW_OFF, "Visible", "Show visible objects"}, | |||||
| {SO_FILTER_OB_SELECTED, "SELECTED", ICON_RESTRICT_SELECT_OFF, "Selected", "Show selected objects"}, | |||||
| {SO_FILTER_OB_ACTIVE, "ACTIVE", ICON_LAYER_ACTIVE, "Active", "Show only the active object"}, | |||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| srna = RNA_def_struct(brna, "SpaceOutliner", "Space"); | srna = RNA_def_struct(brna, "SpaceOutliner", "Space"); | ||||
| RNA_def_struct_sdna(srna, "SpaceOops"); | RNA_def_struct_sdna(srna, "SpaceOops"); | ||||
| RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data"); | RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data"); | ||||
| prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); | ||||
| Show All 25 Lines | static void rna_def_space_outliner(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Sort Alphabetically", ""); | RNA_def_property_ui_text(prop, "Sort Alphabetically", ""); | ||||
| RNA_def_property_ui_icon(prop, ICON_SORTALPHA, 0); | RNA_def_property_ui_icon(prop, ICON_SORTALPHA, 0); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | ||||
| prop = RNA_def_property(srna, "show_restrict_columns", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_restrict_columns", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS); | RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS); | ||||
| RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show column"); | RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show column"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | ||||
| /* Filters. */ | |||||
| prop = RNA_def_property(srna, "use_filter_search", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "filter", SO_FILTER_SEARCH); | |||||
| RNA_def_property_ui_text(prop, "Search Name", "Filter searched elements"); | |||||
| RNA_def_property_ui_icon(prop, ICON_VIEWZOOM, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filters", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "filter", SO_FILTER_ENABLE); | |||||
| RNA_def_property_ui_text(prop, "Use Filters", "Use filters"); | |||||
| RNA_def_property_ui_icon(prop, ICON_FILTER, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_object", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_OBJECT); | |||||
| RNA_def_property_ui_text(prop, "Filter Objects", "Show objects"); | |||||
| RNA_def_property_ui_icon(prop, ICON_OBJECT_DATA, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_object_content", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_OB_CONTENT); | |||||
| RNA_def_property_ui_text(prop, "Filter Objects Contents", "Show what is inside the objects elements"); | |||||
| RNA_def_property_ui_icon(prop, ICON_MODIFIER, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_children", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_CHILDREN); | |||||
| RNA_def_property_ui_text(prop, "Filter Objects Children", "Show children"); | |||||
| RNA_def_property_ui_icon(prop, ICON_PLUS, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_collection", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_COLLECTION); | |||||
| RNA_def_property_ui_text(prop, "Filter Collections", "Show collections"); | |||||
| RNA_def_property_ui_icon(prop, ICON_COLLAPSEMENU, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| /* Filters object state. */ | |||||
| prop = RNA_def_property(srna, "use_filter_object_state", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "filter", SO_FILTER_OB_STATE); | |||||
| RNA_def_property_ui_text(prop, "Filter Object State", "Filter objects based on their state (visible, ...)." | |||||
| "This can be slow"); | |||||
| RNA_def_property_ui_icon(prop, ICON_LAYER_USED, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "filter_state", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "filter_state"); | |||||
| RNA_def_property_enum_items(prop, filter_state_items); | |||||
| RNA_def_property_ui_text(prop, "State Filter", ""); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| /* Filters object type. */ | |||||
| prop = RNA_def_property(srna, "use_filter_object_type", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "filter", SO_FILTER_OB_TYPE); | |||||
| RNA_def_property_ui_text(prop, "Filter Object Type", "Show specific objects types"); | |||||
| RNA_def_property_ui_icon(prop, ICON_MESH_CUBE, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_object_mesh", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_OB_MESH); | |||||
| RNA_def_property_ui_text(prop, "Show Meshes", "Show mesh objects"); | |||||
| RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_MESH, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_object_armature", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_OB_ARMATURE); | |||||
| RNA_def_property_ui_text(prop, "Show Armatures", "Show armature objects"); | |||||
| RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_ARMATURE, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_object_empty", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_OB_EMPTY); | |||||
| RNA_def_property_ui_text(prop, "Show Empties", "Show empty objects"); | |||||
| RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_EMPTY, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_object_lamp", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_OB_LAMP); | |||||
| RNA_def_property_ui_text(prop, "Show Lamps", "Show lamps objects"); | |||||
| RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_LAMP, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_object_camera", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_OB_CAMERA); | |||||
| RNA_def_property_ui_text(prop, "Show Cameras", "Show camera objects"); | |||||
| RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_CAMERA, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| prop = RNA_def_property(srna, "use_filter_object_others", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "filter", SO_FILTER_NO_OB_OTHERS); | |||||
| RNA_def_property_ui_text(prop, "Show Other Objects", "Show curves, lattices, light probes, fonts, ..."); | |||||
| RNA_def_property_ui_icon(prop, ICON_ZOOMIN, 0); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); | |||||
| } | } | ||||
| static void rna_def_space_view3d(BlenderRNA *brna) | static void rna_def_space_view3d(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem manipulators_items[] = { | static const EnumPropertyItem manipulators_items[] = { | ||||
| ▲ Show 20 Lines • Show All 2,461 Lines • Show Last 20 Lines | |||||