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>2015-11-12 16:03:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-12 16:03:12 +0300
commit46f452e96baaf9424582003e87736840ccbbffca (patch)
tree473504617269380df580b584854b6ef8feaad570 /source/blender/editors/interface/resources.c
parent833ef0cfdd0ac9154f018c17a80ca8cdc7c15bc9 (diff)
Fix error cutting node links
Accessing theme from outside drawing code isn't reliable, pass space-type.
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r--source/blender/editors/interface/resources.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index f4051da10ca..92ef0d0ab37 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1382,6 +1382,23 @@ int UI_GetThemeValue(int colorid)
return ((int) cp[0]);
}
+/* versions of the function above, which take a space-type */
+float UI_GetThemeValueTypef(int colorid, int spacetype)
+{
+ const unsigned char *cp;
+
+ cp = UI_ThemeGetColorPtr(theme_active, spacetype, colorid);
+ return ((float)cp[0]);
+}
+
+int UI_GetThemeValueType(int colorid, int spacetype)
+{
+ const unsigned char *cp;
+
+ cp = UI_ThemeGetColorPtr(theme_active, spacetype, colorid);
+ return ((int)cp[0]);
+}
+
/* get the color, range 0.0-1.0 */
void UI_GetThemeColor3fv(int colorid, float col[3])