Merged changes in the trunk up to revision 49797.

This commit is contained in:
2012-08-12 00:09:57 +00:00
649 changed files with 8918 additions and 20075 deletions

View File

@@ -195,7 +195,7 @@ PyDoc_STRVAR(bpy_app_debug_value_doc,
);
static PyObject *bpy_app_debug_value_get(PyObject *UNUSED(self), void *UNUSED(closure))
{
return PyLong_FromSsize_t(G.rt);
return PyLong_FromSsize_t(G.debug_value);
}
static int bpy_app_debug_value_set(PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure))
@@ -207,7 +207,7 @@ static int bpy_app_debug_value_set(PyObject *UNUSED(self), PyObject *value, void
return -1;
}
G.rt = param;
G.debug_value = param;
return 0;
}

View File

@@ -639,7 +639,7 @@ void BPY_modules_load_user(bContext *C)
bpy_context_set(C, &gilstate);
for (text = CTX_data_main(C)->text.first; text; text = text->id.next) {
for (text = bmain->text.first; text; text = text->id.next) {
if (text->flags & TXT_ISSCRIPT && BLI_testextensie(text->id.name + 2, ".py")) {
if (!(G.f & G_SCRIPT_AUTOEXEC)) {
printf("scripts disabled for \"%s\", skipping '%s'\n", bmain->name, text->id.name + 2);

View File

@@ -1298,9 +1298,8 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
eitems = enum_items_from_py(items_fast, def, &defvalue,
(opts & PROP_ENUM_FLAG) != 0);
Py_DECREF(items_fast);
if (!eitems) {
Py_DECREF(items_fast);
return NULL;
}
}
@@ -1327,6 +1326,10 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
RNA_def_property_duplicate_pointers(srna, prop);
if (is_itemf == FALSE) {
/* note: this must be postponed until after #RNA_def_property_duplicate_pointers
* otherwise if this is a generator it may free the strings before we copy them */
Py_DECREF(items_fast);
MEM_freeN(eitems);
}
}

View File

@@ -435,7 +435,7 @@ static int mathutils_rna_vector_set(BaseMathObject *bmo, int subtype)
RNA_property_float_range(&self->ptr, self->prop, &min, &max);
if (min != FLT_MIN || max != FLT_MAX) {
if (min != -FLT_MAX || max != FLT_MAX) {
int i, len = RNA_property_array_length(&self->ptr, self->prop);
for (i = 0; i < len; i++) {
CLAMP(bmo->data[i], min, max);