diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 8ee8652e2e5..6b925b42e06 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1024,8 +1024,13 @@ static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, i Key *key= ob_get_key(ob); *min= 0; - *max= (key)? BLI_countlist(&key->block)-1: 0; - *max= MAX2(0, *max); + if(key) { + *max= BLI_countlist(&key->block)-1; + if(*max < 0) *max= 0; + } + else { + *max= 0; + } } static int rna_Object_active_shape_key_index_get(PointerRNA *ptr) @@ -1826,7 +1831,6 @@ static void rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "parent_vertices", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "par1"); RNA_def_property_array(prop, 3); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Parent Vertices", "Indices of vertices in cases of a vertex parenting relation"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); |