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:
authorCampbell Barton <ideasman42@gmail.com>2007-12-07 22:48:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-12-07 22:48:53 +0300
commitdc9909a33e39ec0fc367ec4b1c32880e93d42693 (patch)
treed31d667f8b23ff6e0502ee98d3f3e467950bb6f0 /source/blender/src/interface.c
parent7e0d34d5373367a612b22b160c883b17f35b14bd (diff)
EnV requests, copy and paste for colorbands, world ambient colorpicker
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r--source/blender/src/interface.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index 07debe8f864..46e27c59465 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -135,6 +135,7 @@ uiBut *UIbuttip;
static char but_copypaste_str[256]="";
static double but_copypaste_val=0.0;
static float but_copypaste_rgb[3];
+static ColorBand but_copypaste_coba = { NULL };
/* ************* PROTOTYPES ***************** */
@@ -556,9 +557,23 @@ static int ui_but_copy_paste(uiBut *but, char mode)
return 1;
}
}
-
-
- return 0;
+ else if(but->type==BUT_COLORBAND) {
+ if(mode=='c') {
+ if (!but->poin) {
+ return 0;
+ }
+ memcpy( &but_copypaste_coba, but->poin, sizeof(ColorBand) );
+ } else {
+ if (but_copypaste_coba.tot==0) {
+ return 0;
+ }
+ if (!but->poin) {
+ but->poin= MEM_callocN( sizeof(ColorBand), "colorband");
+ }
+ memcpy( but->poin, &but_copypaste_coba, sizeof(ColorBand) );
+ return 1;
+ }
+ }
}
/* ******************* block calc ************************* */