Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_collection.c
| Show All 24 Lines | |||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| const EnumPropertyItem rna_enum_collection_color_items[] = { | |||||
| {COLLECTION_COLOR_NONE, "NONE", ICON_X, "None", "Assign no color tag to the collection"}, | |||||
| {COLLECTION_COLOR_01, "COLOR_01", ICON_COLLECTION_COLOR_01, "Color 01", ""}, | |||||
| {COLLECTION_COLOR_02, "COLOR_02", ICON_COLLECTION_COLOR_02, "Color 02", ""}, | |||||
| {COLLECTION_COLOR_03, "COLOR_03", ICON_COLLECTION_COLOR_03, "Color 03", ""}, | |||||
| {COLLECTION_COLOR_04, "COLOR_04", ICON_COLLECTION_COLOR_04, "Color 04", ""}, | |||||
| {COLLECTION_COLOR_05, "COLOR_05", ICON_COLLECTION_COLOR_05, "Color 05", ""}, | |||||
| {COLLECTION_COLOR_06, "COLOR_06", ICON_COLLECTION_COLOR_06, "Color 06", ""}, | |||||
| {COLLECTION_COLOR_07, "COLOR_07", ICON_COLLECTION_COLOR_07, "Color 07", ""}, | |||||
| {COLLECTION_COLOR_08, "COLOR_08", ICON_COLLECTION_COLOR_08, "Color 08", ""}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| # include "DNA_object_types.h" | # include "DNA_object_types.h" | ||||
| # include "DNA_scene_types.h" | # include "DNA_scene_types.h" | ||||
| # include "DEG_depsgraph.h" | # include "DEG_depsgraph.h" | ||||
| # include "DEG_depsgraph_build.h" | # include "DEG_depsgraph_build.h" | ||||
| ▲ Show 20 Lines • Show All 428 Lines • ▼ Show 20 Lines | void RNA_def_collections(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", COLLECTION_RESTRICT_RENDER); | RNA_def_property_boolean_sdna(prop, NULL, "flag", COLLECTION_RESTRICT_RENDER); | ||||
| RNA_def_property_boolean_funcs(prop, NULL, "rna_Collection_hide_render_set"); | RNA_def_property_boolean_funcs(prop, NULL, "rna_Collection_hide_render_set"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1); | ||||
| RNA_def_property_ui_text(prop, "Disable in Renders", "Globally disable in renders"); | RNA_def_property_ui_text(prop, "Disable in Renders", "Globally disable in renders"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_Collection_flag_update"); | RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_Collection_flag_update"); | ||||
| prop = RNA_def_property(srna, "color", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "color"); | |||||
| RNA_def_property_enum_items(prop, rna_enum_collection_color_items); | |||||
| RNA_def_property_ui_text(prop, "Collection Color", "Color tag for a collection"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, NULL); | |||||
| RNA_define_lib_overridable(false); | RNA_define_lib_overridable(false); | ||||
| } | } | ||||
| #endif | #endif | ||||