- pyrna fix for reference counting when unable to register a property

- added modified 'Warp' enum to reserve this ID for durian files until the modifier is merged.
This commit is contained in:
Campbell Barton 2010-08-19 05:58:22 +00:00
parent 5e53012558
commit 98140e234e
2 changed files with 3 additions and 6 deletions

@ -66,6 +66,9 @@ typedef enum ModifierType {
eModifierType_ShapeKey, eModifierType_ShapeKey,
eModifierType_Solidify, eModifierType_Solidify,
eModifierType_Screw, eModifierType_Screw,
/* placeholder, keep this so durian files load in
* trunk with the correct modifier once its merged */
eModifierType_Warp,
NUM_MODIFIER_TYPES NUM_MODIFIER_TYPES
} ModifierType; } ModifierType;

@ -4372,7 +4372,6 @@ static int deferred_register_prop(StructRNA *srna, PyObject *item, PyObject *key
if(*_PyUnicode_AsString(key)=='_') { if(*_PyUnicode_AsString(key)=='_') {
PyErr_Format(PyExc_ValueError, "bpy_struct \"%.200s\" registration error: %.200s could not register because the property starts with an '_'\n", RNA_struct_identifier(srna), _PyUnicode_AsString(key)); PyErr_Format(PyExc_ValueError, "bpy_struct \"%.200s\" registration error: %.200s could not register because the property starts with an '_'\n", RNA_struct_identifier(srna), _PyUnicode_AsString(key));
Py_DECREF(dummy_args);
return -1; return -1;
} }
pyfunc = PyCapsule_GetPointer(py_func_ptr, NULL); pyfunc = PyCapsule_GetPointer(py_func_ptr, NULL);
@ -4393,8 +4392,6 @@ static int deferred_register_prop(StructRNA *srna, PyObject *item, PyObject *key
// PyLineSpit(); // PyLineSpit();
PyErr_Format(PyExc_ValueError, "bpy_struct \"%.200s\" registration error: %.200s could not register\n", RNA_struct_identifier(srna), _PyUnicode_AsString(key)); PyErr_Format(PyExc_ValueError, "bpy_struct \"%.200s\" registration error: %.200s could not register\n", RNA_struct_identifier(srna), _PyUnicode_AsString(key));
Py_DECREF(dummy_args);
return -1; return -1;
} }
} }
@ -4423,9 +4420,6 @@ int pyrna_deferred_register_props(StructRNA *srna, PyObject *class_dict)
order= PyDict_GetItemString(class_dict, "order"); order= PyDict_GetItemString(class_dict, "order");
if(order==NULL)
PyErr_Clear();
if(order && PyList_Check(order)) { if(order && PyList_Check(order)) {
for(pos= 0; pos<PyList_GET_SIZE(order); pos++) { for(pos= 0; pos<PyList_GET_SIZE(order); pos++) {
key= PyList_GET_ITEM(order, pos); key= PyList_GET_ITEM(order, pos);