diff options
author | Arystanbek Dyussenov <arystan.d@gmail.com> | 2009-09-14 18:55:49 +0400 |
---|---|---|
committer | Arystanbek Dyussenov <arystan.d@gmail.com> | 2009-09-14 18:55:49 +0400 |
commit | c8af263e5d8d9d41a757e8438cdcf3b64d57e0c0 (patch) | |
tree | df6806c1d0efda9441c17720e16e16be09575518 /source/blender | |
parent | 3b2ad838e8c628a468ee19ac77fb1336dd6072cf (diff) |
Reverted Mesh.verts from dynamic array since it breaks foreach_set used by import scripts.
Did a few fixes in scripts to reflect recent RNA changes.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 3 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_array.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 8 |
3 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index e1744bb3d23..f1a46b199b4 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -981,10 +981,13 @@ static void rna_def_mface(BlenderRNA *brna) // XXX allows creating invalid meshes prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "v1"); RNA_def_property_array(prop, 4); + /* RNA_def_property_flag(prop, PROP_DYNAMIC); RNA_def_property_dynamic_array_funcs(prop, "rna_MeshFace_verts_get_length"); RNA_def_property_int_funcs(prop, "rna_MeshFace_verts_get", "rna_MeshFace_verts_set", NULL); + */ RNA_def_property_ui_text(prop, "Vertices", "Vertex indices"); prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED); diff --git a/source/blender/python/intern/bpy_array.c b/source/blender/python/intern/bpy_array.c index f11c95e7ed5..4459c7c313f 100644 --- a/source/blender/python/intern/bpy_array.c +++ b/source/blender/python/intern/bpy_array.c @@ -1,5 +1,5 @@ /** - * + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 8395e5c82e4..49105422325 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -545,9 +545,6 @@ int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *v int len = RNA_property_array_length(ptr, prop); if (len > 0) { - /* char error_str[512]; */ - int ok= 1; - #ifdef USE_MATHUTILS if(MatrixObject_Check(value)) { MatrixObject *mat = (MatrixObject*)value; @@ -559,10 +556,7 @@ int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *v PyErr_Format(PyExc_TypeError, "%.200s RNA array assignment expected a sequence instead of %.200s instance.", error_prefix, Py_TYPE(value)->tp_name); return -1; } - /* done getting the length */ - ok= pyrna_py_to_array(ptr, prop, data, value, error_prefix); - - if (!ok) { + else if (!pyrna_py_to_array(ptr, prop, data, value, error_prefix)) { /* PyErr_Format(PyExc_AttributeError, "%.200s %s", error_prefix, error_str); */ return -1; } |