fix [#26227] "Sequence must have 2 items total, not -2"
authorCampbell Barton <ideasman42@gmail.com>
Sat, 26 Feb 2011 12:26:01 +0000 (12:26 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 26 Feb 2011 12:26:01 +0000 (12:26 +0000)
source/blender/python/intern/bpy_rna_array.c

index 74ce5f66cfd6a045ca21c5a8bc644f5bd989821a..4d7fe5906c92e34f3d7e75538cce9cf0499cf349 100644 (file)
@@ -137,7 +137,7 @@ static int validate_array_length(PyObject *rvalue, PointerRNA *ptr, PropertyRNA
        int tot, totdim, len;
 
        totdim= RNA_property_array_dimension(ptr, prop, dimsize);
-       tot= count_items(rvalue, totdim);
+       tot= count_items(rvalue, totdim - lvalue_dim);
 
        if ((RNA_property_flag(prop) & PROP_DYNAMIC) && lvalue_dim == 0) {
                if (RNA_property_array_length(ptr, prop) != tot) {