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>2019-01-10 08:51:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-10 10:28:53 +0300
commit5ce6b344d5463f5d0fd764970796ebf57b237e7c (patch)
tree438498acf9302e31a912d50baca1e20a6f999ff6 /source/blender/editors/interface/resources.c
parentca8f5219718e7d13185d68f3e69ceb4d057c76e7 (diff)
3D View: use faded color for dupli instance wire & points
Similar to 2.7x, so instanced geometry can be differentiated.
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r--source/blender/editors/interface/resources.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index d7451b0d0e4..5f132295c04 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -864,6 +864,20 @@ void UI_GetThemeColorBlend3f(int colorid1, int colorid2, float fac, float r_col[
r_col[2] = ((1.0f - fac) * cp1[2] + fac * cp2[2]) / 255.0f;
}
+void UI_GetThemeColorBlend4f(int colorid1, int colorid2, float fac, float r_col[4])
+{
+ const uchar *cp1, *cp2;
+
+ cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1);
+ cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2);
+
+ CLAMP(fac, 0.0f, 1.0f);
+ r_col[0] = ((1.0f - fac) * cp1[0] + fac * cp2[0]) / 255.0f;
+ r_col[1] = ((1.0f - fac) * cp1[1] + fac * cp2[1]) / 255.0f;
+ r_col[2] = ((1.0f - fac) * cp1[2] + fac * cp2[2]) / 255.0f;
+ r_col[3] = ((1.0f - fac) * cp1[3] + fac * cp2[3]) / 255.0f;
+}
+
void UI_FontThemeColor(int fontid, int colorid)
{
uchar color[4];