2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * Contributor(s): Blender Foundation (2008).
20 * ***** END GPL LICENSE BLOCK *****
23 /** \file blender/makesrna/intern/rna_color.c
30 #include "DNA_color_types.h"
31 #include "DNA_texture_types.h"
33 #include "BLI_utildefines.h"
35 #include "RNA_define.h"
36 #include "rna_internal.h"
43 #include "RNA_access.h"
45 #include "DNA_image_types.h"
46 #include "DNA_material_types.h"
47 #include "DNA_movieclip_types.h"
48 #include "DNA_node_types.h"
49 #include "DNA_object_types.h"
50 #include "DNA_particle_types.h"
51 #include "DNA_sequence_types.h"
53 #include "MEM_guardedalloc.h"
55 #include "BKE_colortools.h"
56 #include "BKE_depsgraph.h"
57 #include "BKE_image.h"
58 #include "BKE_movieclip.h"
60 #include "BKE_sequencer.h"
61 #include "BKE_texture.h"
62 #include "BKE_linestyle.h"
66 #include "IMB_colormanagement.h"
67 #include "IMB_imbuf.h"
69 static int rna_CurveMapping_curves_length(PointerRNA *ptr)
71 CurveMapping *cumap = (CurveMapping *)ptr->data;
74 for (len = 0; len < CM_TOT; len++)
75 if (!cumap->cm[len].curve)
81 static void rna_CurveMapping_curves_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
83 CurveMapping *cumap = (CurveMapping *)ptr->data;
85 rna_iterator_array_begin(iter, cumap->cm, sizeof(CurveMap), rna_CurveMapping_curves_length(ptr), 0, NULL);
88 static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value)
90 CurveMapping *cumap = (CurveMapping *)ptr->data;
92 if (value) cumap->flag |= CUMA_DO_CLIP;
93 else cumap->flag &= ~CUMA_DO_CLIP;
95 curvemapping_changed(cumap, false);
98 static void rna_CurveMapping_black_level_set(PointerRNA *ptr, const float *values)
100 CurveMapping *cumap = (CurveMapping *)ptr->data;
101 cumap->black[0] = values[0];
102 cumap->black[1] = values[1];
103 cumap->black[2] = values[2];
104 curvemapping_set_black_white(cumap, NULL, NULL);
107 static void rna_CurveMapping_white_level_set(PointerRNA *ptr, const float *values)
109 CurveMapping *cumap = (CurveMapping *)ptr->data;
110 cumap->white[0] = values[0];
111 cumap->white[1] = values[1];
112 cumap->white[2] = values[2];
113 curvemapping_set_black_white(cumap, NULL, NULL);
116 static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *max,
117 float *UNUSED(softmin), float *UNUSED(softmax))
119 CurveMapping *cumap = (CurveMapping *)ptr->data;
122 *max = cumap->clipr.xmax;
125 static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *max,
126 float *UNUSED(softmin), float *UNUSED(softmax))
128 CurveMapping *cumap = (CurveMapping *)ptr->data;
131 *max = cumap->clipr.ymax;
134 static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *max,
135 float *UNUSED(softmin), float *UNUSED(softmax))
137 CurveMapping *cumap = (CurveMapping *)ptr->data;
139 *min = cumap->clipr.xmin;
143 static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float *max,
144 float *UNUSED(softmin), float *UNUSED(softmax))
146 CurveMapping *cumap = (CurveMapping *)ptr->data;
148 *min = cumap->clipr.ymin;
153 static char *rna_ColorRamp_path(PointerRNA *ptr)
157 /* handle the cases where a single datablock may have 2 ramp types */
159 ID *id = ptr->id.data;
161 switch (GS(id->name)) {
162 case ID_MA: /* material has 2 cases - diffuse and specular */
164 Material *ma = (Material *)id;
166 if (ptr->data == ma->ramp_col)
167 path = BLI_strdup("diffuse_ramp");
168 else if (ptr->data == ma->ramp_spec)
169 path = BLI_strdup("specular_ramp");
175 bNodeTree *ntree = (bNodeTree *)id;
180 for (node = ntree->nodes.first; node; node = node->next) {
181 if (ELEM(node->type, SH_NODE_VALTORGB, CMP_NODE_VALTORGB, TEX_NODE_VALTORGB)) {
182 if (node->storage == ptr->data) {
183 /* all node color ramp properties called 'color_ramp'
184 * prepend path from ID to the node
186 RNA_pointer_create(id, &RNA_Node, node, &node_ptr);
187 node_path = RNA_path_from_ID_to_struct(&node_ptr);
188 path = BLI_sprintfN("%s.color_ramp", node_path);
189 MEM_freeN(node_path);
198 char *path = BKE_linestyle_path_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data);
205 /* everything else just uses 'color_ramp' */
206 path = BLI_strdup("color_ramp");
211 /* everything else just uses 'color_ramp' */
212 path = BLI_strdup("color_ramp");
218 static char *rna_ColorRampElement_path(PointerRNA *ptr)
225 /* helper macro for use here to try and get the path
226 * - this calls the standard code for getting a path to a texture...
229 #define COLRAMP_GETPATH \
231 prop = RNA_struct_find_property(&ramp_ptr, "elements"); \
233 index = RNA_property_collection_lookup_index(&ramp_ptr, prop, ptr); \
235 char *texture_path = rna_ColorRamp_path(&ramp_ptr); \
236 path = BLI_sprintfN("%s.elements[%d]", texture_path, index); \
237 MEM_freeN(texture_path); \
242 /* determine the path from the ID-block to the ramp */
243 /* FIXME: this is a very slow way to do it, but it will have to suffice... */
245 ID *id = ptr->id.data;
247 switch (GS(id->name)) {
248 case ID_MA: /* 2 cases for material - diffuse and spec */
250 Material *ma = (Material *)id;
252 /* try diffuse first */
254 RNA_pointer_create(id, &RNA_ColorRamp, ma->ramp_col, &ramp_ptr);
257 /* try specular if not diffuse */
258 if (!path && ma->ramp_spec) {
259 RNA_pointer_create(id, &RNA_ColorRamp, ma->ramp_spec, &ramp_ptr);
266 bNodeTree *ntree = (bNodeTree *)id;
269 for (node = ntree->nodes.first; node; node = node->next) {
270 if (ELEM(node->type, SH_NODE_VALTORGB, CMP_NODE_VALTORGB, TEX_NODE_VALTORGB)) {
271 RNA_pointer_create(id, &RNA_ColorRamp, node->storage, &ramp_ptr);
282 BKE_linestyle_modifier_list_color_ramps((FreestyleLineStyle *)id, &listbase);
283 for (link = (LinkData *)listbase.first; link; link = link->next) {
284 RNA_pointer_create(id, &RNA_ColorRamp, link->data, &ramp_ptr);
287 BLI_freelistN(&listbase);
291 default: /* everything else should have a "color_ramp" property */
293 /* create pointer to the ID block, and try to resolve "color_ramp" pointer */
294 RNA_id_pointer_create(id, &ramp_ptr);
295 if (RNA_path_resolve(&ramp_ptr, "color_ramp", &ramp_ptr, &prop)) {
303 /* cleanup the macro we defined */
304 #undef COLRAMP_GETPATH
309 static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
312 ID *id = ptr->id.data;
314 switch (GS(id->name)) {
317 Material *ma = ptr->id.data;
319 DAG_id_tag_update(&ma->id, 0);
320 WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, ma);
325 bNodeTree *ntree = (bNodeTree *)id;
328 for (node = ntree->nodes.first; node; node = node->next) {
329 if (ELEM(node->type, SH_NODE_VALTORGB, CMP_NODE_VALTORGB, TEX_NODE_VALTORGB)) {
330 ED_node_tag_update_nodetree(bmain, ntree);
337 Tex *tex = ptr->id.data;
339 DAG_id_tag_update(&tex->id, 0);
340 WM_main_add_notifier(NC_TEXTURE, tex);
345 FreestyleLineStyle *linestyle = ptr->id.data;
347 WM_main_add_notifier(NC_LINESTYLE, linestyle);
352 ParticleSettings *part = ptr->id.data;
354 DAG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
355 WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, part);
363 static void rna_ColorRamp_eval(struct ColorBand *coba, float position, float color[4])
365 do_colorband(coba, position, color);
368 static CBData *rna_ColorRampElement_new(struct ColorBand *coba, ReportList *reports, float position)
370 CBData *element = colorband_element_add(coba, position);
373 BKE_reportf(reports, RPT_ERROR, "Unable to add element to colorband (limit %d)", MAXCOLORBAND);
378 static void rna_ColorRampElement_remove(struct ColorBand *coba, ReportList *reports, PointerRNA *element_ptr)
380 CBData *element = element_ptr->data;
381 int index = (int)(element - coba->data);
382 if (colorband_element_remove(coba, index) == false) {
383 BKE_report(reports, RPT_ERROR, "Element not found in element collection or last element");
387 RNA_POINTER_INVALIDATE(element_ptr);
390 static void rna_CurveMap_remove_point(CurveMap *cuma, ReportList *reports, PointerRNA *point_ptr)
392 CurveMapPoint *point = point_ptr->data;
393 if (curvemap_remove_point(cuma, point) == false) {
394 BKE_report(reports, RPT_ERROR, "Unable to remove curve point");
398 RNA_POINTER_INVALIDATE(point_ptr);
401 static void rna_Scopes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
403 Scopes *s = (Scopes *)ptr->data;
407 static int rna_ColorManagedDisplaySettings_display_device_get(struct PointerRNA *ptr)
409 ColorManagedDisplaySettings *display = (ColorManagedDisplaySettings *) ptr->data;
411 return IMB_colormanagement_display_get_named_index(display->display_device);
414 static void rna_ColorManagedDisplaySettings_display_device_set(struct PointerRNA *ptr, int value)
416 ColorManagedDisplaySettings *display = (ColorManagedDisplaySettings *) ptr->data;
417 const char *name = IMB_colormanagement_display_get_indexed_name(value);
420 BLI_strncpy(display->display_device, name, sizeof(display->display_device));
424 static EnumPropertyItem *rna_ColorManagedDisplaySettings_display_device_itemf(
425 bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
427 EnumPropertyItem *items = NULL;
430 IMB_colormanagement_display_items_add(&items, &totitem);
431 RNA_enum_item_end(&items, &totitem);
438 static void rna_ColorManagedDisplaySettings_display_device_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
440 ID *id = ptr->id.data;
445 if (GS(id->name) == ID_SCE) {
446 Scene *scene = (Scene *) id;
448 IMB_colormanagement_validate_settings(&scene->display_settings, &scene->view_settings);
450 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
454 static char *rna_ColorManagedDisplaySettings_path(PointerRNA *UNUSED(ptr))
456 return BLI_sprintfN("display_settings");
459 static int rna_ColorManagedViewSettings_view_transform_get(PointerRNA *ptr)
461 ColorManagedViewSettings *view = (ColorManagedViewSettings *) ptr->data;
463 return IMB_colormanagement_view_get_named_index(view->view_transform);
466 static void rna_ColorManagedViewSettings_view_transform_set(PointerRNA *ptr, int value)
468 ColorManagedViewSettings *view = (ColorManagedViewSettings *) ptr->data;
470 const char *name = IMB_colormanagement_view_get_indexed_name(value);
473 BLI_strncpy(view->view_transform, name, sizeof(view->view_transform));
477 static EnumPropertyItem *rna_ColorManagedViewSettings_view_transform_itemf(
478 bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
480 Scene *scene = CTX_data_scene(C);
481 EnumPropertyItem *items = NULL;
482 ColorManagedDisplaySettings *display_settings = &scene->display_settings;
485 IMB_colormanagement_view_items_add(&items, &totitem, display_settings->display_device);
486 RNA_enum_item_end(&items, &totitem);
492 static int rna_ColorManagedViewSettings_look_get(PointerRNA *ptr)
494 ColorManagedViewSettings *view = (ColorManagedViewSettings *) ptr->data;
496 return IMB_colormanagement_look_get_named_index(view->look);
499 static void rna_ColorManagedViewSettings_look_set(PointerRNA *ptr, int value)
501 ColorManagedViewSettings *view = (ColorManagedViewSettings *) ptr->data;
503 const char *name = IMB_colormanagement_look_get_indexed_name(value);
506 BLI_strncpy(view->look, name, sizeof(view->look));
510 static EnumPropertyItem *rna_ColorManagedViewSettings_look_itemf(
511 bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
513 EnumPropertyItem *items = NULL;
516 IMB_colormanagement_look_items_add(&items, &totitem);
517 RNA_enum_item_end(&items, &totitem);
523 static void rna_ColorManagedViewSettings_use_curves_set(PointerRNA *ptr, int value)
525 ColorManagedViewSettings *view_settings = (ColorManagedViewSettings *) ptr->data;
528 view_settings->flag |= COLORMANAGE_VIEW_USE_CURVES;
530 if (view_settings->curve_mapping == NULL) {
531 view_settings->curve_mapping = curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
535 view_settings->flag &= ~COLORMANAGE_VIEW_USE_CURVES;
539 static char *rna_ColorManagedViewSettings_path(PointerRNA *UNUSED(ptr))
541 return BLI_sprintfN("view_settings");
545 static int rna_ColorManagedColorspaceSettings_colorspace_get(struct PointerRNA *ptr)
547 ColorManagedColorspaceSettings *colorspace = (ColorManagedColorspaceSettings *) ptr->data;
549 return IMB_colormanagement_colorspace_get_named_index(colorspace->name);
552 static void rna_ColorManagedColorspaceSettings_colorspace_set(struct PointerRNA *ptr, int value)
554 ColorManagedColorspaceSettings *colorspace = (ColorManagedColorspaceSettings *) ptr->data;
555 const char *name = IMB_colormanagement_colorspace_get_indexed_name(value);
557 if (name && name[0]) {
558 BLI_strncpy(colorspace->name, name, sizeof(colorspace->name));
562 static EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_itemf(
563 bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
565 EnumPropertyItem *items = NULL;
568 IMB_colormanagement_colorspace_items_add(&items, &totitem);
569 RNA_enum_item_end(&items, &totitem);
576 static void rna_ColorManagedColorspaceSettings_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
578 ID *id = ptr->id.data;
580 if (GS(id->name) == ID_IM) {
581 Image *ima = (Image *) id;
583 DAG_id_tag_update(&ima->id, 0);
585 BKE_image_signal(ima, NULL, IMA_SIGNAL_COLORMANAGE);
587 WM_main_add_notifier(NC_IMAGE | ND_DISPLAY, &ima->id);
588 WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id);
590 else if (GS(id->name) == ID_MC) {
591 MovieClip *clip = (MovieClip *) id;
593 BKE_movieclip_reload(clip);
595 /* all sequencers for now, we don't know which scenes are using this clip as a strip */
596 BKE_sequencer_cache_cleanup();
597 BKE_sequencer_preprocessed_cache_cleanup();
599 WM_main_add_notifier(NC_MOVIECLIP | ND_DISPLAY, &clip->id);
600 WM_main_add_notifier(NC_MOVIECLIP | NA_EDITED, &clip->id);
602 else if (GS(id->name) == ID_SCE) {
603 Scene *scene = (Scene *) id;
606 ColorManagedColorspaceSettings *colorspace_settings = (ColorManagedColorspaceSettings *) ptr->data;
608 bool seq_found = false;
610 if (&scene->sequencer_colorspace_settings != colorspace_settings) {
611 SEQ_BEGIN(scene->ed, seq);
613 if (seq->strip && &seq->strip->colorspace_settings == colorspace_settings) {
623 IMB_free_anim(seq->anim);
626 if (seq->strip->proxy && seq->strip->proxy->anim) {
627 IMB_free_anim(seq->strip->proxy->anim);
628 seq->strip->proxy->anim = NULL;
631 BKE_sequence_invalidate_cache(scene, seq);
632 BKE_sequencer_preprocessed_cache_cleanup_sequence(seq);
635 SEQ_BEGIN(scene->ed, seq);
638 IMB_free_anim(seq->anim);
644 BKE_sequencer_cache_cleanup();
645 BKE_sequencer_preprocessed_cache_cleanup();
648 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
653 static char *rna_ColorManagedSequencerColorspaceSettings_path(PointerRNA *UNUSED(ptr))
655 return BLI_sprintfN("sequencer_colorspace_settings");
658 static char *rna_ColorManagedInputColorspaceSettings_path(PointerRNA *UNUSED(ptr))
660 return BLI_sprintfN("colorspace_settings");
663 static void rna_ColorManagement_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
665 ID *id = ptr->id.data;
670 if (GS(id->name) == ID_SCE) {
671 DAG_id_tag_update(id, 0);
672 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
676 /* this function only exists because #curvemap_evaluateF uses a 'const' qualifier */
677 static float rna_CurveMap_evaluateF(struct CurveMap *cuma, ReportList *reports, float value)
680 BKE_reportf(reports, RPT_ERROR, "CurveMap table not initialized, call initialize() on CurveMapping owner of the CurveMap");
683 return curvemap_evaluateF(cuma, value);
686 static void rna_CurveMap_initialize(struct CurveMapping *cumap)
688 curvemapping_initialize(cumap);
692 static void rna_def_curvemappoint(BlenderRNA *brna)
696 static EnumPropertyItem prop_handle_type_items[] = {
697 {0, "AUTO", 0, "Auto Handle", ""},
698 {CUMA_VECTOR, "VECTOR", 0, "Vector Handle", ""},
699 {0, NULL, 0, NULL, NULL}
702 srna = RNA_def_struct(brna, "CurveMapPoint", NULL);
703 RNA_def_struct_ui_text(srna, "CurveMapPoint", "Point of a curve used for a curve mapping");
705 prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
706 RNA_def_property_float_sdna(prop, NULL, "x");
707 RNA_def_property_array(prop, 2);
708 RNA_def_property_ui_text(prop, "Location", "X/Y coordinates of the curve point");
710 prop = RNA_def_property(srna, "handle_type", PROP_ENUM, PROP_NONE);
711 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
712 RNA_def_property_enum_items(prop, prop_handle_type_items);
713 RNA_def_property_ui_text(prop, "Handle Type", "Curve interpolation at this point: Bezier or vector");
715 prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
716 RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_SELECT);
717 RNA_def_property_ui_text(prop, "Select", "Selection state of the curve point");
720 static void rna_def_curvemap_points_api(BlenderRNA *brna, PropertyRNA *cprop)
726 RNA_def_property_srna(cprop, "CurveMapPoints");
727 srna = RNA_def_struct(brna, "CurveMapPoints", NULL);
728 RNA_def_struct_sdna(srna, "CurveMap");
729 RNA_def_struct_ui_text(srna, "Curve Map Point", "Collection of Curve Map Points");
731 func = RNA_def_function(srna, "new", "curvemap_insert");
732 RNA_def_function_ui_description(func, "Add point to CurveMap");
733 parm = RNA_def_float(func, "position", 0.0f, -FLT_MAX, FLT_MAX, "Position", "Position to add point", -FLT_MAX, FLT_MAX);
734 RNA_def_property_flag(parm, PROP_REQUIRED);
735 parm = RNA_def_float(func, "value", 0.0f, -FLT_MAX, FLT_MAX, "Value", "Value of point", -FLT_MAX, FLT_MAX);
736 RNA_def_property_flag(parm, PROP_REQUIRED);
737 parm = RNA_def_pointer(func, "point", "CurveMapPoint", "", "New point");
738 RNA_def_function_return(func, parm);
740 func = RNA_def_function(srna, "remove", "rna_CurveMap_remove_point");
741 RNA_def_function_flag(func, FUNC_USE_REPORTS);
742 RNA_def_function_ui_description(func, "Delete point from CurveMap");
743 parm = RNA_def_pointer(func, "point", "CurveMapPoint", "", "PointElement to remove");
744 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
745 RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
748 static void rna_def_curvemap(BlenderRNA *brna)
751 PropertyRNA *prop, *parm;
754 static EnumPropertyItem prop_extend_items[] = {
755 {0, "HORIZONTAL", 0, "Horizontal", ""},
756 {CUMA_EXTEND_EXTRAPOLATE, "EXTRAPOLATED", 0, "Extrapolated", ""},
757 {0, NULL, 0, NULL, NULL}
760 srna = RNA_def_struct(brna, "CurveMap", NULL);
761 RNA_def_struct_ui_text(srna, "CurveMap", "Curve in a curve mapping");
763 prop = RNA_def_property(srna, "extend", PROP_ENUM, PROP_NONE);
764 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
765 RNA_def_property_enum_items(prop, prop_extend_items);
766 RNA_def_property_ui_text(prop, "Extend", "Extrapolate the curve or extend it horizontally");
768 prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
769 RNA_def_property_collection_sdna(prop, NULL, "curve", "totpoint");
770 RNA_def_property_struct_type(prop, "CurveMapPoint");
771 RNA_def_property_ui_text(prop, "Points", "");
772 rna_def_curvemap_points_api(brna, prop);
774 func = RNA_def_function(srna, "evaluate", "rna_CurveMap_evaluateF");
775 RNA_def_function_flag(func, FUNC_USE_REPORTS);
776 RNA_def_function_ui_description(func, "Evaluate curve at given location");
777 parm = RNA_def_float(func, "position", 0.0f, -FLT_MAX, FLT_MAX, "Position", "Position to evaluate curve at", -FLT_MAX, FLT_MAX);
778 RNA_def_property_flag(parm, PROP_REQUIRED);
779 parm = RNA_def_float(func, "value", 0.0f, -FLT_MAX, FLT_MAX, "Value", "Value of curve at given location", -FLT_MAX, FLT_MAX);
780 RNA_def_function_return(func, parm);
783 static void rna_def_curvemapping(BlenderRNA *brna)
789 srna = RNA_def_struct(brna, "CurveMapping", NULL);
790 RNA_def_struct_ui_text(srna, "CurveMapping",
791 "Curve mapping to map color, vector and scalar values to other values using "
792 "a user defined curve");
794 prop = RNA_def_property(srna, "use_clip", PROP_BOOLEAN, PROP_NONE);
795 RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_DO_CLIP);
796 RNA_def_property_ui_text(prop, "Clip", "Force the curve view to fit a defined boundary");
797 RNA_def_property_boolean_funcs(prop, NULL, "rna_CurveMapping_clip_set");
799 prop = RNA_def_property(srna, "clip_min_x", PROP_FLOAT, PROP_NONE);
800 RNA_def_property_float_sdna(prop, NULL, "clipr.xmin");
801 RNA_def_property_range(prop, -100.0f, 100.0f);
802 RNA_def_property_ui_text(prop, "Clip Min X", "");
803 RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipminx_range");
805 prop = RNA_def_property(srna, "clip_min_y", PROP_FLOAT, PROP_NONE);
806 RNA_def_property_float_sdna(prop, NULL, "clipr.ymin");
807 RNA_def_property_range(prop, -100.0f, 100.0f);
808 RNA_def_property_ui_text(prop, "Clip Min Y", "");
809 RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipminy_range");
811 prop = RNA_def_property(srna, "clip_max_x", PROP_FLOAT, PROP_NONE);
812 RNA_def_property_float_sdna(prop, NULL, "clipr.xmax");
813 RNA_def_property_range(prop, -100.0f, 100.0f);
814 RNA_def_property_ui_text(prop, "Clip Max X", "");
815 RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipmaxx_range");
817 prop = RNA_def_property(srna, "clip_max_y", PROP_FLOAT, PROP_NONE);
818 RNA_def_property_float_sdna(prop, NULL, "clipr.ymax");
819 RNA_def_property_range(prop, -100.0f, 100.0f);
820 RNA_def_property_ui_text(prop, "Clip Max Y", "");
821 RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipmaxy_range");
823 prop = RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
824 RNA_def_property_collection_funcs(prop, "rna_CurveMapping_curves_begin", "rna_iterator_array_next",
825 "rna_iterator_array_end", "rna_iterator_array_get",
826 "rna_CurveMapping_curves_length", NULL, NULL, NULL);
827 RNA_def_property_struct_type(prop, "CurveMap");
828 RNA_def_property_ui_text(prop, "Curves", "");
830 prop = RNA_def_property(srna, "black_level", PROP_FLOAT, PROP_COLOR);
831 RNA_def_property_float_sdna(prop, NULL, "black");
832 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
833 RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 1, 3);
834 RNA_def_property_ui_text(prop, "Black Level", "For RGB curves, the color that black is mapped to");
835 RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_black_level_set", NULL);
837 prop = RNA_def_property(srna, "white_level", PROP_FLOAT, PROP_COLOR);
838 RNA_def_property_float_sdna(prop, NULL, "white");
839 RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
840 RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 1, 3);
841 RNA_def_property_ui_text(prop, "White Level", "For RGB curves, the color that white is mapped to");
842 RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_white_level_set", NULL);
844 func = RNA_def_function(srna, "update", "curvemapping_changed_all");
845 RNA_def_function_ui_description(func, "Update curve mapping after making changes");
847 func = RNA_def_function(srna, "initialize", "rna_CurveMap_initialize");
848 RNA_def_function_ui_description(func, "Initialize curve");
851 static void rna_def_color_ramp_element(BlenderRNA *brna)
856 srna = RNA_def_struct(brna, "ColorRampElement", NULL);
857 RNA_def_struct_sdna(srna, "CBData");
858 RNA_def_struct_path_func(srna, "rna_ColorRampElement_path");
859 RNA_def_struct_ui_text(srna, "Color Ramp Element", "Element defining a color at a position in the color ramp");
861 prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
862 RNA_def_property_float_sdna(prop, NULL, "r");
863 RNA_def_property_array(prop, 4);
864 RNA_def_property_ui_text(prop, "Color", "Set color of selected color stop");
865 RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
867 prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_COLOR);
868 RNA_def_property_float_sdna(prop, NULL, "a");
869 RNA_def_property_ui_text(prop, "Alpha", "Set alpha of selected color stop");
870 RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
872 prop = RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
873 RNA_def_property_float_sdna(prop, NULL, "pos");
874 RNA_def_property_range(prop, 0, 1);
875 RNA_def_property_ui_text(prop, "Position", "Set position of selected color stop");
876 RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
879 static void rna_def_color_ramp_element_api(BlenderRNA *brna, PropertyRNA *cprop)
885 RNA_def_property_srna(cprop, "ColorRampElements");
886 srna = RNA_def_struct(brna, "ColorRampElements", NULL);
887 RNA_def_struct_sdna(srna, "ColorBand");
888 RNA_def_struct_path_func(srna, "rna_ColorRampElement_path");
889 RNA_def_struct_ui_text(srna, "Color Ramp Elements", "Collection of Color Ramp Elements");
891 /* TODO, make these functions generic in texture.c */
892 func = RNA_def_function(srna, "new", "rna_ColorRampElement_new");
893 RNA_def_function_ui_description(func, "Add element to ColorRamp");
894 RNA_def_function_flag(func, FUNC_USE_REPORTS);
895 parm = RNA_def_float(func, "position", 0.0f, 0.0f, 1.0f, "Position", "Position to add element", 0.0f, 1.0f);
896 RNA_def_property_flag(parm, PROP_REQUIRED);
898 parm = RNA_def_pointer(func, "element", "ColorRampElement", "", "New element");
899 RNA_def_function_return(func, parm);
901 func = RNA_def_function(srna, "remove", "rna_ColorRampElement_remove");
902 RNA_def_function_ui_description(func, "Delete element from ColorRamp");
903 RNA_def_function_flag(func, FUNC_USE_REPORTS);
904 parm = RNA_def_pointer(func, "element", "ColorRampElement", "", "Element to remove");
905 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
906 RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
909 static void rna_def_color_ramp(BlenderRNA *brna)
915 static EnumPropertyItem prop_interpolation_items[] = {
916 {COLBAND_INTERP_EASE, "EASE", 0, "Ease", ""},
917 {COLBAND_INTERP_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
918 {COLBAND_INTERP_LINEAR, "LINEAR", 0, "Linear", ""},
919 {COLBAND_INTERP_B_SPLINE, "B_SPLINE", 0, "B-Spline", ""},
920 {COLBAND_INTERP_CONSTANT, "CONSTANT", 0, "Constant", ""},
921 {0, NULL, 0, NULL, NULL}
924 static EnumPropertyItem prop_mode_items[] = {
925 {COLBAND_BLEND_RGB, "RGB", 0, "RGB", ""},
926 {COLBAND_BLEND_HSV, "HSV", 0, "HSV", ""},
927 {COLBAND_BLEND_HSL, "HSL", 0, "HSL", ""},
928 {0, NULL, 0, NULL, NULL}
931 static EnumPropertyItem prop_hsv_items[] = {
932 {COLBAND_HUE_NEAR, "NEAR", 0, "Near", ""},
933 {COLBAND_HUE_FAR, "FAR", 0, "Far", ""},
934 {COLBAND_HUE_CW, "CW", 0, "Clockwise", ""},
935 {COLBAND_HUE_CCW, "CCW", 0, "Counter-Clockwise", ""},
936 {0, NULL, 0, NULL, NULL}
939 srna = RNA_def_struct(brna, "ColorRamp", NULL);
940 RNA_def_struct_sdna(srna, "ColorBand");
941 RNA_def_struct_path_func(srna, "rna_ColorRamp_path");
942 RNA_def_struct_ui_text(srna, "Color Ramp", "Color ramp mapping a scalar value to a color");
944 prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_COLOR);
945 RNA_def_property_collection_sdna(prop, NULL, "data", "tot");
946 RNA_def_property_struct_type(prop, "ColorRampElement");
947 RNA_def_property_ui_text(prop, "Elements", "");
948 RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
949 rna_def_color_ramp_element_api(brna, prop);
951 prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
952 RNA_def_property_enum_sdna(prop, NULL, "ipotype");
953 RNA_def_property_enum_items(prop, prop_interpolation_items);
954 RNA_def_property_ui_text(prop, "Interpolation", "Set interpolation between color stops");
955 RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
957 prop = RNA_def_property(srna, "hue_interpolation", PROP_ENUM, PROP_NONE);
958 RNA_def_property_enum_sdna(prop, NULL, "ipotype_hue");
959 RNA_def_property_enum_items(prop, prop_hsv_items);
960 RNA_def_property_ui_text(prop, "Color Interpolation", "Set color interpolation");
961 RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
963 prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
964 RNA_def_property_enum_sdna(prop, NULL, "color_mode");
965 RNA_def_property_enum_items(prop, prop_mode_items);
966 RNA_def_property_ui_text(prop, "Color Mode", "Set color mode to use for interpolation");
967 RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
969 #if 0 /* use len(elements) */
970 prop = RNA_def_property(srna, "total", PROP_INT, PROP_NONE);
971 RNA_def_property_int_sdna(prop, NULL, "tot");
972 /* needs a function to do the right thing when adding elements like colorband_add_cb() */
973 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
974 RNA_def_property_range(prop, 0, 31); /* MAXCOLORBAND = 32 */
975 RNA_def_property_ui_text(prop, "Total", "Total number of elements");
976 RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
979 func = RNA_def_function(srna, "evaluate", "rna_ColorRamp_eval");
980 RNA_def_function_ui_description(func, "Evaluate ColorRamp");
981 prop = RNA_def_float(func, "position", 1.0f, 0.0f, 1.0f, "Position", "Evaluate ColorRamp at position", 0.0f, 1.0f);
982 RNA_def_property_flag(prop, PROP_REQUIRED);
984 prop = RNA_def_float_color(func, "color", 4, NULL, -FLT_MAX, FLT_MAX, "Color", "Color at given position",
986 RNA_def_property_flag(prop, PROP_THICK_WRAP);
987 RNA_def_function_output(func, prop);
990 static void rna_def_histogram(BlenderRNA *brna)
995 static EnumPropertyItem prop_mode_items[] = {
996 {HISTO_MODE_LUMA, "LUMA", 0, "Luma", "Luma"},
997 {HISTO_MODE_RGB, "RGB", 0, "RGB", "Red Green Blue"},
998 {HISTO_MODE_R, "R", 0, "R", "Red"},
999 {HISTO_MODE_G, "G", 0, "G", "Green"},
1000 {HISTO_MODE_B, "B", 0, "B", "Blue"},
1001 {HISTO_MODE_ALPHA, "A", 0, "A", "Alpha"},
1002 {0, NULL, 0, NULL, NULL}
1005 srna = RNA_def_struct(brna, "Histogram", NULL);
1006 RNA_def_struct_ui_text(srna, "Histogram", "Statistical view of the levels of color in an image");
1008 prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
1009 RNA_def_property_enum_sdna(prop, NULL, "mode");
1010 RNA_def_property_enum_items(prop, prop_mode_items);
1011 RNA_def_property_ui_text(prop, "Mode", "Channels to display when drawing the histogram");
1013 prop = RNA_def_property(srna, "show_line", PROP_BOOLEAN, PROP_NONE);
1014 RNA_def_property_boolean_sdna(prop, NULL, "flag", HISTO_FLAG_LINE);
1015 RNA_def_property_ui_text(prop, "Show Line", "Display lines rather than filled shapes");
1016 RNA_def_property_ui_icon(prop, ICON_IPO, 0);
1019 static void rna_def_scopes(BlenderRNA *brna)
1024 static EnumPropertyItem prop_wavefrm_mode_items[] = {
1025 {SCOPES_WAVEFRM_LUMA, "LUMA", ICON_COLOR, "Luma", ""},
1026 {SCOPES_WAVEFRM_RGB, "RGB", ICON_COLOR, "Red Green Blue", ""},
1027 {SCOPES_WAVEFRM_YCC_601, "YCBCR601", ICON_COLOR, "YCbCr (ITU 601)", ""},
1028 {SCOPES_WAVEFRM_YCC_709, "YCBCR709", ICON_COLOR, "YCbCr (ITU 709)", ""},
1029 {SCOPES_WAVEFRM_YCC_JPEG, "YCBCRJPG", ICON_COLOR, "YCbCr (Jpeg)", ""},
1030 {0, NULL, 0, NULL, NULL}
1033 srna = RNA_def_struct(brna, "Scopes", NULL);
1034 RNA_def_struct_ui_text(srna, "Scopes", "Scopes for statistical view of an image");
1036 prop = RNA_def_property(srna, "use_full_resolution", PROP_BOOLEAN, PROP_NONE);
1037 RNA_def_property_boolean_sdna(prop, "Scopes", "sample_full", 1);
1038 RNA_def_property_ui_text(prop, "Full Sample", "Sample every pixel of the image");
1039 RNA_def_property_update(prop, 0, "rna_Scopes_update");
1041 prop = RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_PERCENTAGE);
1042 RNA_def_property_float_sdna(prop, "Scopes", "accuracy");
1043 RNA_def_property_range(prop, 0.0, 100.0);
1044 RNA_def_property_ui_range(prop, 0.0, 100.0, 10, 1);
1045 RNA_def_property_ui_text(prop, "Accuracy", "Proportion of original image source pixel lines to sample");
1046 RNA_def_property_update(prop, 0, "rna_Scopes_update");
1048 prop = RNA_def_property(srna, "histogram", PROP_POINTER, PROP_NONE);
1049 RNA_def_property_pointer_sdna(prop, "Scopes", "hist");
1050 RNA_def_property_struct_type(prop, "Histogram");
1051 RNA_def_property_ui_text(prop, "Histogram", "Histogram for viewing image statistics");
1053 prop = RNA_def_property(srna, "waveform_mode", PROP_ENUM, PROP_NONE);
1054 RNA_def_property_enum_sdna(prop, "Scopes", "wavefrm_mode");
1055 RNA_def_property_enum_items(prop, prop_wavefrm_mode_items);
1056 RNA_def_property_ui_text(prop, "Waveform Mode", "");
1057 RNA_def_property_update(prop, 0, "rna_Scopes_update");
1059 prop = RNA_def_property(srna, "waveform_alpha", PROP_FLOAT, PROP_FACTOR);
1060 RNA_def_property_float_sdna(prop, "Scopes", "wavefrm_alpha");
1061 RNA_def_property_range(prop, 0, 1);
1062 RNA_def_property_ui_text(prop, "Waveform Opacity", "Opacity of the points");
1064 prop = RNA_def_property(srna, "vectorscope_alpha", PROP_FLOAT, PROP_FACTOR);
1065 RNA_def_property_float_sdna(prop, "Scopes", "vecscope_alpha");
1066 RNA_def_property_range(prop, 0, 1);
1067 RNA_def_property_ui_text(prop, "Vectorscope Opacity", "Opacity of the points");
1070 static void rna_def_colormanage(BlenderRNA *brna)
1075 static EnumPropertyItem display_device_items[] = {
1076 {0, "DEFAULT", 0, "Default", ""},
1077 {0, NULL, 0, NULL, NULL}
1080 static EnumPropertyItem look_items[] = {
1081 {0, "NONE", 0, "None", "Do not modify image in an artistic manner"},
1082 {0, NULL, 0, NULL, NULL}
1085 static EnumPropertyItem view_transform_items[] = {
1086 {0, "NONE", 0, "None", "Do not perform any color transform on display, use old non-color managed technique for display"},
1087 {0, NULL, 0, NULL, NULL}
1090 static EnumPropertyItem color_space_items[] = {
1091 {0, "NONE", 0, "None", "Do not perform any color transform on load, treat colors as in scene linear space already"},
1092 {0, NULL, 0, NULL, NULL}
1095 /* ** Display Settings ** */
1096 srna = RNA_def_struct(brna, "ColorManagedDisplaySettings", NULL);
1097 RNA_def_struct_path_func(srna, "rna_ColorManagedDisplaySettings_path");
1098 RNA_def_struct_ui_text(srna, "ColorManagedDisplaySettings", "Color management specific to display device");
1100 prop = RNA_def_property(srna, "display_device", PROP_ENUM, PROP_NONE);
1101 RNA_def_property_enum_items(prop, display_device_items);
1102 RNA_def_property_enum_funcs(prop, "rna_ColorManagedDisplaySettings_display_device_get",
1103 "rna_ColorManagedDisplaySettings_display_device_set",
1104 "rna_ColorManagedDisplaySettings_display_device_itemf");
1105 RNA_def_property_ui_text(prop, "Display Device", "Display device name");
1106 RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagedDisplaySettings_display_device_update");
1108 /* ** View Settings ** */
1109 srna = RNA_def_struct(brna, "ColorManagedViewSettings", NULL);
1110 RNA_def_struct_path_func(srna, "rna_ColorManagedViewSettings_path");
1111 RNA_def_struct_ui_text(srna, "ColorManagedViewSettings", "Color management settings used for displaying images on the display");
1113 prop = RNA_def_property(srna, "look", PROP_ENUM, PROP_NONE);
1114 RNA_def_property_enum_items(prop, look_items);
1115 RNA_def_property_enum_funcs(prop, "rna_ColorManagedViewSettings_look_get",
1116 "rna_ColorManagedViewSettings_look_set",
1117 "rna_ColorManagedViewSettings_look_itemf");
1118 RNA_def_property_ui_text(prop, "Look", "Additional transform applied before view transform for an artistic needs");
1119 RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
1121 prop = RNA_def_property(srna, "view_transform", PROP_ENUM, PROP_NONE);
1122 RNA_def_property_enum_items(prop, view_transform_items);
1123 RNA_def_property_enum_funcs(prop, "rna_ColorManagedViewSettings_view_transform_get",
1124 "rna_ColorManagedViewSettings_view_transform_set",
1125 "rna_ColorManagedViewSettings_view_transform_itemf");
1126 RNA_def_property_ui_text(prop, "View Transform", "View used when converting image to a display space");
1127 RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
1129 prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_FACTOR);
1130 RNA_def_property_float_sdna(prop, NULL, "exposure");
1131 RNA_def_property_range(prop, -10.0f, 10.0f);
1132 RNA_def_property_float_default(prop, 0.0f);
1133 RNA_def_property_ui_text(prop, "Exposure", "Exposure (stops) applied before display transform");
1134 RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
1136 prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_FACTOR);
1137 RNA_def_property_float_sdna(prop, NULL, "gamma");
1138 RNA_def_property_float_default(prop, 1.0f);
1139 RNA_def_property_range(prop, 0.0f, 5.0f);
1140 RNA_def_property_ui_text(prop, "Gamma", "Amount of gamma modification applied after display transform");
1141 RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
1143 prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
1144 RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping");
1145 RNA_def_property_ui_text(prop, "Curve", "Color curve mapping applied before display transform");
1146 RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
1148 prop = RNA_def_property(srna, "use_curve_mapping", PROP_BOOLEAN, PROP_NONE);
1149 RNA_def_property_boolean_sdna(prop, NULL, "flag", COLORMANAGE_VIEW_USE_CURVES);
1150 RNA_def_property_boolean_funcs(prop, NULL, "rna_ColorManagedViewSettings_use_curves_set");
1151 RNA_def_property_ui_text(prop, "Use Curves", "Use RGB curved for pre-display transformation");
1152 RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
1154 /* ** Colorspace ** */
1155 srna = RNA_def_struct(brna, "ColorManagedInputColorspaceSettings", NULL);
1156 RNA_def_struct_path_func(srna, "rna_ColorManagedInputColorspaceSettings_path");
1157 RNA_def_struct_ui_text(srna, "ColorManagedInputColorspaceSettings", "Input color space settings");
1159 prop = RNA_def_property(srna, "name", PROP_ENUM, PROP_NONE);
1160 RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
1161 RNA_def_property_enum_items(prop, color_space_items);
1162 RNA_def_property_enum_funcs(prop, "rna_ColorManagedColorspaceSettings_colorspace_get",
1163 "rna_ColorManagedColorspaceSettings_colorspace_set",
1164 "rna_ColorManagedColorspaceSettings_colorspace_itemf");
1165 RNA_def_property_ui_text(prop, "Input Color Space", "Color space of the image or movie on disk");
1166 RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagedColorspaceSettings_reload_update");
1169 srna = RNA_def_struct(brna, "ColorManagedSequencerColorspaceSettings", NULL);
1170 RNA_def_struct_path_func(srna, "rna_ColorManagedSequencerColorspaceSettings_path");
1171 RNA_def_struct_ui_text(srna, "ColorManagedSequencerColorspaceSettings", "Input color space settings");
1173 prop = RNA_def_property(srna, "name", PROP_ENUM, PROP_NONE);
1174 RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
1175 RNA_def_property_enum_items(prop, color_space_items);
1176 RNA_def_property_enum_funcs(prop, "rna_ColorManagedColorspaceSettings_colorspace_get",
1177 "rna_ColorManagedColorspaceSettings_colorspace_set",
1178 "rna_ColorManagedColorspaceSettings_colorspace_itemf");
1179 RNA_def_property_ui_text(prop, "Color Space", "Color space that the sequencer operates in");
1180 RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagedColorspaceSettings_reload_update");
1183 void RNA_def_color(BlenderRNA *brna)
1185 rna_def_curvemappoint(brna);
1186 rna_def_curvemap(brna);
1187 rna_def_curvemapping(brna);
1188 rna_def_color_ramp_element(brna);
1189 rna_def_color_ramp(brna);
1190 rna_def_histogram(brna);
1191 rna_def_scopes(brna);
1192 rna_def_colormanage(brna);