Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-01-11 05:30:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-11 05:30:01 +0300
commit35e68e97850b00e75a1488a59e7e9b85d240c37f (patch)
treee59a6637d6e5729dfd6f570a73c3aaa918901f9a /source/blender/python
parentd72639323b5a2ab5dfc26e864c43d512ffb3cd58 (diff)
- bpy.data.lamps.new() now takes a type argument since lamp type also sets class type this avoids needing to use ugly lamp.type_recast() after changing type.
- default vertex color layer name was UTTex when added from python.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_rna.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 10b029084c8..d248499656a 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1312,12 +1312,10 @@ static PyObject * pyrna_prop_array_to_py_index(BPy_PropertyArrayRNA *self, int i
static int pyrna_py_to_prop_array_index(BPy_PropertyArrayRNA *self, int index, PyObject *value)
{
int ret = 0;
- int totdim;
PointerRNA *ptr= &self->ptr;
PropertyRNA *prop= self->prop;
- int type = RNA_property_type(prop);
- totdim= RNA_property_array_dimension(ptr, prop, NULL);
+ const int totdim= RNA_property_array_dimension(ptr, prop, NULL);
if (totdim > 1) {
/* char error_str[512]; */
@@ -1328,7 +1326,7 @@ static int pyrna_py_to_prop_array_index(BPy_PropertyArrayRNA *self, int index, P
}
else {
/* see if we can coorce into a python type - PropertyType */
- switch (type) {
+ switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
{
int param = PyLong_AsLong( value );