diff options
Diffstat (limited to 'source/blender/draw/intern/draw_instance_data.c')
-rw-r--r-- | source/blender/draw/intern/draw_instance_data.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/draw/intern/draw_instance_data.c b/source/blender/draw/intern/draw_instance_data.c index 47710c32916..fd0a0b61503 100644 --- a/source/blender/draw/intern/draw_instance_data.c +++ b/source/blender/draw/intern/draw_instance_data.c @@ -533,9 +533,7 @@ static GPUUniformBuf *drw_sparse_uniform_buffer_get_ubo(DRWSparseUniformBuf *buf if (buffer && chunk < buffer->num_chunks && BLI_BITMAP_TEST(buffer->chunk_used, chunk)) { return buffer->chunk_ubos[chunk]; } - else { - return NULL; - } + return NULL; } /** Bind the UBO for the given chunk, if present. A NULL buffer pointer is handled as empty. */ @@ -640,21 +638,23 @@ static bool drw_uniform_property_lookup(ID *id, const char *name, float r_data[4 if (arraylen == 0) { float value; - if (type == PROP_FLOAT) + if (type == PROP_FLOAT) { value = RNA_property_float_get(&ptr, prop); - else if (type == PROP_INT) + } + else if (type == PROP_INT) { value = RNA_property_int_get(&ptr, prop); - else + } + else { return false; + } copy_v4_fl4(r_data, value, value, value, 1); return true; } - else if (type == PROP_FLOAT && arraylen <= 4) { - copy_v4_fl4(r_data, 0, 0, 0, 1); - RNA_property_float_get_array(&ptr, prop, r_data); - return true; - } + + copy_v4_fl4(r_data, 0, 0, 0, 1); + RNA_property_float_get_array(&ptr, prop, r_data); + return true; return false; } |