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>2018-01-10 12:50:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-10 12:50:14 +0300
commitf59303bead2ae4a25132edadf217a64cdd581dc5 (patch)
tree1d64b157ee7c0ddac1f5c91c239d12a104e3c87e /source/blender/python
parent2b56faebe5f2a8e2b37004485206007d22cdac1d (diff)
Fix color for manipulator drawing
Was drawing black after the first draw call. For now set the shader before each draw call, noted as TODO to investigate a nicer way to handle.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/gawain/gwn_py_types.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/python/gawain/gwn_py_types.c b/source/blender/python/gawain/gwn_py_types.c
index 5b602e85a12..4f6b354b7be 100644
--- a/source/blender/python/gawain/gwn_py_types.c
+++ b/source/blender/python/gawain/gwn_py_types.c
@@ -634,7 +634,7 @@ static PyObject *bpygwn_VertBatch_uniform_i32(BPyGwn_Batch *self, PyObject *args
static PyObject *bpygwn_VertBatch_uniform_f32(BPyGwn_Batch *self, PyObject *args)
{
- static struct {
+ struct {
const char *id;
float values[4];
} params;
@@ -648,10 +648,10 @@ static PyObject *bpygwn_VertBatch_uniform_f32(BPyGwn_Batch *self, PyObject *args
}
switch (PyTuple_GET_SIZE(args)) {
- case 2: GWN_batch_uniform_1f(self->batch, params.id, params.values[0]); break;
- case 3: GWN_batch_uniform_2fv(self->batch, params.id, params.values); break;
- case 4: GWN_batch_uniform_3fv(self->batch, params.id, params.values); break;
- case 5: GWN_batch_uniform_4fv(self->batch, params.id, params.values); break;
+ case 2: GWN_batch_uniform_1f(self->batch, params.id, params.values[0]); break;
+ case 3: GWN_batch_uniform_2f(self->batch, params.id, UNPACK2(params.values)); break;
+ case 4: GWN_batch_uniform_3f(self->batch, params.id, UNPACK3(params.values)); break;
+ case 5: GWN_batch_uniform_4f(self->batch, params.id, UNPACK4(params.values)); break;
default:
BLI_assert(0);
}