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-20 07:19:55 +0300
committerMatt Ebb <matt@mke3.net>2010-01-20 07:19:55 +0300
commit1d3186cbcf9e3e463e4e6362ac76862b801cf7ba (patch)
tree450dc8b914efeb8829f815dbba1f9aabd7449a0f /source/blender/editors/interface/interface.c
parent8bcf66e1d16ece55f8736797f7d4180a456060ff (diff)
Durian request: Added 'Color Balance' node to compositor. uses Lift/Gamma/Gain
similar to sequence editor. --> http://mke3.net/blender/devel/2.5/color_balance_node.jpg Also added 0 key (zero key) shortcut when mouse is over a button, to reset it to its default value. Same as the RMB menu ->Reset to Default, except for color wheels, it only resets the hue/sat/value components that that widget affects. Peter/Xavier: The existing color balance code can generate NaNs (fractional power of a negative), which causes havoc along the image pipeline. I added a check in the node code to prevent this. Still plenty of potential for lots of better colour correction tools in the compositor, just needs time...
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 48fd23ad0e7..8b59ff604b9 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1626,6 +1626,17 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str)
return 0;
}
+void ui_set_but_default(bContext *C, uiBut *but)
+{
+ /* if there is a valid property that is editable... */
+ if (but->rnapoin.data && but->rnaprop && RNA_property_editable(&but->rnapoin, but->rnaprop)) {
+ if(RNA_property_reset(&but->rnapoin, but->rnaprop, -1)) {
+ /* perform updates required for this property */
+ RNA_property_update(C, &but->rnapoin, but->rnaprop);
+ }
+ }
+}
+
static double soft_range_round_up(double value, double max)
{
/* round up to .., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, .. */