- 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.
This commit is contained in:
2011-01-11 02:30:01 +00:00
parent d72639323b
commit 35e68e9785
7 changed files with 22 additions and 22 deletions

View File

@@ -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 );