Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-01-07 12:55:11 +0300
committerMatt Ebb <matt@mke3.net>2010-01-07 12:55:11 +0300
commitcf9b728c6a1cb600c721bea1823206047ab1c5c7 (patch)
tree981352c911d626f84da09010b00a50d0201524fe /source/blender/makesrna/intern/rna_ui_api.c
parent4463597dcd382a84be8a2a59e03adcfe149c23b2 (diff)
Color Picker work:
Restored the old Eyedropper tool from the 2.4 colour picker. Now it's an operator, working nicely using rna properties (fixes #19475 and some todo items) This ended up being a bit more work than expected, it involved converting the colour picker to use RNA properties directly, rather than temporary values. This has several advantages, including being able to type in RGB values greater than 1, however there are still some redraw issues with sliders. Also removed the alternate color pickers after this time spent testing, the current one should be sufficient, or alternatives to the wheel can possibly become preferences in the current design. Converting the picker to RNA also made it very trivial to make a cool new ColorWheel template, which can be embedded in UI layouts. I've enabled it already in texture/vertex paint brush properties and the sequence editor color correction: http://mke3.net/blender/devel/2.5/colorwheels.jpg
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index de20da0c0ca..011235c862f 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -335,6 +335,10 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
+ func= RNA_def_function(srna, "template_color_wheel", "uiTemplateColorWheel");
+ api_ui_item_rna_common(func);
+ RNA_def_boolean(func, "value_slider", 0, "", "Display the value slider to the right of the color wheel");
+
func= RNA_def_function(srna, "template_triColorSet", "uiTemplateTriColorSet");
api_ui_item_rna_common(func);