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:
authorAntony Riakiotakis <kalast@gmail.com>2015-01-28 15:03:42 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-01-28 15:03:42 +0300
commit7a6d757a3b802f91cbfb834abe7756a31af39e9a (patch)
tree185e397cbed0199a0a22e1c590995f8d00382c59 /source/blender/editors/interface/resources.c
parent1678cb9af291c86fda2c5d1b65e6dca7554e3886 (diff)
Add theme option for cliping border
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r--source/blender/editors/interface/resources.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index fb174e113b1..dab4b6a941c 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -682,6 +682,9 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
case TH_INFO_DEBUG_TEXT:
cp = ts->info_debug_text;
break;
+ case TH_V3D_CLIPPING_BORDER:
+ cp = ts->clipping_border_3d;
+ break;
}
}
}
@@ -951,6 +954,7 @@ void ui_theme_init_default(void)
rgba_char_args_set(btheme->tv3d.gradients.high_gradient, 58, 58, 58, 255);
btheme->tv3d.gradients.show_grad = false;
+ rgba_char_args_set(btheme->tv3d.clipping_border_3d, 50, 50, 50, 255);
/* space buttons */
/* to have something initialized */
btheme->tbuts = btheme->tv3d;
@@ -2572,6 +2576,25 @@ void init_userdef_do_versions(void)
}
}
+ if (U.versionfile < 273 || (U.versionfile == 273 && U.subversionfile < 5)) {
+ bTheme *btheme;
+ for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+ unsigned char *cp = (unsigned char *)btheme->tv3d.clipping_border_3d;
+ int c;
+ copy_v4_v4_char((char *)cp, btheme->tv3d.back);
+ c = cp[0] - 8;
+ CLAMP(c, 0, 255);
+ cp[0] = c;
+ c = cp[1] - 8;
+ CLAMP(c, 0, 255);
+ cp[1] = c;
+ c = cp[2] - 8;
+ CLAMP(c, 0, 255);
+ cp[2] = c;
+ cp[3] = 255;
+ }
+ }
+
if (U.pixelsize == 0.0f)
U.pixelsize = 1.0f;