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
path: root/source
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
parent7e0d34d5373367a612b22b160c883b17f35b14bd (diff)
EnV requests, copy and paste for colorbands, world ambient colorpicker
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/buttons_shading.c6
-rw-r--r--source/blender/src/interface.c21
2 files changed, 21 insertions, 6 deletions
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index f7c36b8caa5..41363f02c70 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -2233,20 +2233,20 @@ static void world_panel_world(World *wrld)
uiSetButLock(wrld->id.lib!=0, ERROR_LIBDATA_MESSAGE);
uiBlockSetCol(block, TH_AUTO);
- uiDefButF(block, COL, B_WORLDPRV, "", 10,150,145,19, &wrld->horr, 0, 0, 0, B_COLHOR, "");
- uiDefButF(block, COL, B_WORLDPRV, "", 160,150,145,19, &wrld->zenr, 0, 0, 0, B_COLZEN, "");
-
uiBlockBeginAlign(block);
+ uiDefButF(block, COL, B_WORLDPRV, "", 10,150,145,19, &wrld->horr, 0, 0, 0, B_COLHOR, "");
uiDefButF(block, NUMSLI,B_WORLDPRV,"HoR ", 10,130,145,19, &(wrld->horr), 0.0, 1.0, B_COLHOR,0, "Sets the amount of red color at the horizon");
uiDefButF(block, NUMSLI,B_WORLDPRV,"HoG ", 10,110,145,19, &(wrld->horg), 0.0, 1.0, B_COLHOR,0, "Sets the amount of green color at the horizon");
uiDefButF(block, NUMSLI,B_WORLDPRV,"HoB ", 10,90,145,19, &(wrld->horb), 0.0, 1.0, B_COLHOR,0, "Sets the amount of blue color at the horizon");
uiBlockBeginAlign(block);
+ uiDefButF(block, COL, B_WORLDPRV, "", 160,150,145,19, &wrld->zenr, 0, 0, 0, B_COLZEN, "");
uiDefButF(block, NUMSLI,B_WORLDPRV,"ZeR ", 160,130,145,19, &(wrld->zenr), 0.0, 1.0, B_COLZEN,0, "Sets the amount of red color at the zenith");
uiDefButF(block, NUMSLI,B_WORLDPRV,"ZeG ", 160,110,145,19, &(wrld->zeng), 0.0, 1.0, B_COLZEN,0, "Sets the amount of green color at the zenith");
uiDefButF(block, NUMSLI,B_WORLDPRV,"ZeB ", 160,90,145,19, &(wrld->zenb), 0.0, 1.0, B_COLZEN,0, "Sets the amount of blue color at the zenith");
uiBlockBeginAlign(block);
+ uiDefButF(block, COL, B_WORLDPRV, "", 10,70,145,19, &wrld->ambr, 0, 0, 0, 0, "");
uiDefButF(block, NUMSLI,B_WORLDPRV,"AmbR ", 10,50,145,19, &(wrld->ambr), 0.0, 1.0 ,0,0, "Sets the amount of red ambient color");
uiDefButF(block, NUMSLI,B_WORLDPRV,"AmbG ", 10,30,145,19, &(wrld->ambg), 0.0, 1.0 ,0,0, "Sets the amount of green ambient color");
uiDefButF(block, NUMSLI,B_WORLDPRV,"AmbB ", 10,10,145,19, &(wrld->ambb), 0.0, 1.0 ,0,0, "Sets the amount of blue ambient color");
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 ************************* */