Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_palette.c
| Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | static void rna_def_palettecolors(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_function_ui_description(func, "Add a new color to the palette"); | RNA_def_function_ui_description(func, "Add a new color to the palette"); | ||||
| parm = RNA_def_pointer(func, "color", "PaletteColor", "", "The newly created color"); | parm = RNA_def_pointer(func, "color", "PaletteColor", "", "The newly created color"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Palette_color_remove"); | func = RNA_def_function(srna, "remove", "rna_Palette_color_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a color from the palette"); | RNA_def_function_ui_description(func, "Remove a color from the palette"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "color", "PaletteColor", "", "The color to remove"); | parm = RNA_def_pointer(func, "color", "PaletteColor", "", "The color to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| func = RNA_def_function(srna, "clear", "rna_Palette_color_clear"); | func = RNA_def_function(srna, "clear", "rna_Palette_color_clear"); | ||||
| RNA_def_function_ui_description(func, "Remove all colors from the palette"); | RNA_def_function_ui_description(func, "Remove all colors from the palette"); | ||||
| prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "PaletteColor"); | RNA_def_property_struct_type(prop, "PaletteColor"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Palette_active_color_get", "rna_Palette_active_color_set", NULL, NULL); | RNA_def_property_pointer_funcs(prop, "rna_Palette_active_color_get", "rna_Palette_active_color_set", NULL, NULL); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||