diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface.c | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index a62658349c1..299bec0db8a 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1259,7 +1259,6 @@ void ui_get_but_vectorf(uiBut *but, float vec[3]) void ui_set_but_vectorf(uiBut *but, const float vec[3]) { PropertyRNA *prop; - int a, tot; if(but->editvec) { copy_v3_v3(but->editvec, vec); @@ -1269,11 +1268,15 @@ void ui_set_but_vectorf(uiBut *but, const float vec[3]) prop= but->rnaprop; if(RNA_property_type(prop) == PROP_FLOAT) { + int tot; + int a; + tot= RNA_property_array_length(&but->rnapoin, prop); tot= MIN2(tot, 3); - for(a=0; a<tot; a++) + for (a=0; a<tot; a++) { RNA_property_float_set_index(&but->rnapoin, prop, a, vec[a]); + } } } else if(but->pointype == CHA) { diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 0eaacc62f33..ccc8151ac7f 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -812,8 +812,8 @@ static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value) { Scene *scene= (Scene*)ptr->id.data; SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data; - BLI_strncpy_utf8(rl->name, value, sizeof(rl->name)); + BLI_uniquename(&scene->r.layers, rl, "RenderLayer", '.', offsetof(SceneRenderLayer, name), sizeof(rl->name)); if(scene->nodetree) { bNode *node; |