Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
| Show First 20 Lines • Show All 2,115 Lines • ▼ Show 20 Lines | static const EnumPropertyItem display_mode_items[] = { | ||||
| {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_ACT_LAYER, "ACT_LAYER", 0, "Active View Layer", "Display the collections of the active view layer"}, | {SO_ACT_LAYER, "ACT_LAYER", 0, "Active View Layer", "Display the collections of the active view layer"}, | ||||
| {SO_COLLECTIONS, "COLLECTIONS", 0, "Collections", "Display all collections based on the " | {SO_COLLECTIONS, "COLLECTIONS", 0, "Collections", "Display all collections based on the " | ||||
| "master collection hierarchy"}, | "master collection hierarchy"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| 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} | |||||
| }; | |||||
| 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); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "outlinevis"); | RNA_def_property_enum_sdna(prop, NULL, "outlinevis"); | ||||
| RNA_def_property_enum_items(prop, display_mode_items); | RNA_def_property_enum_items(prop, display_mode_items); | ||||
| RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display"); | RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display"); | ||||
| Show All 19 Lines | static void rna_def_space_outliner(BlenderRNA *brna) | ||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_SKIP_SORT_ALPHA); | RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_SKIP_SORT_ALPHA); | ||||
| RNA_def_property_ui_text(prop, "Sort Alphabetically", ""); | RNA_def_property_ui_text(prop, "Sort Alphabetically", ""); | ||||
| 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, "show_filters", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "filter", SO_FILTER_SHOW); | |||||
| RNA_def_property_ui_text(prop, "Show Filters", "Show filters"); | |||||
| RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1); | |||||
| 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); | |||||
| /* 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_OUTLINER_OB_GROUP_INSTANCE, 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_DATA, 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_OBJECT_DATA, 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 | |||||