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-07-19 19:35:09 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-19 19:35:09 +0300
commita597a380bbf513edf59b183cea3fb0545e859cca (patch)
tree217561c8956d7075db336907c227aae2fea529aa /source/blender/windowmanager/intern/wm_subwindow.c
parent8f1c1ef3a9f310db7f28806a2a441e32f5b56f97 (diff)
Properly fix T45477
Code was actually skipping setting color selection indices and previous commit actually broke mask selection in texture painting. All should work now.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_subwindow.c')
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index 94fe2a662b1..7dade62347c 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -462,10 +462,11 @@ void WM_framebuffer_index_set(int index)
void WM_framebuffer_index_get(int index, int *r_col)
{
const int col = index_to_framebuffer(index);
- *r_col = ((col & 0xFF) << 24) | /* red */
- (((col >> 8) & 0xFF) << 16) | /* green */
- (((col >> 16) & 0xFF) << 8) | /* blue */
- 0xFF; /* alpha */
+ char *c_col = (char *)r_col;
+ c_col[0] = (col & 0xFF); /* red */
+ c_col[1] = ((col >> 8) & 0xFF); /* green */
+ c_col[2] = ((col >> 16) & 0xFF); /* blue */
+ c_col[3] = 0xFF; /* alpha */
}