Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_props.c
| Show First 20 Lines • Show All 709 Lines • ▼ Show 20 Lines | static void bpy_prop_boolean_array_get_fn(struct PointerRNA *ptr, | ||||
| } | } | ||||
| else { | else { | ||||
| if (PyC_AsArray(values, ret, len, &PyBool_Type, false, "BoolVectorProperty get") == -1) { | if (PyC_AsArray(values, ret, len, &PyBool_Type, false, "BoolVectorProperty get") == -1) { | ||||
| PyC_Err_PrintWithFunc(py_func); | PyC_Err_PrintWithFunc(py_func); | ||||
| for (i = 0; i < len; i++) { | for (i = 0; i < len; i++) { | ||||
| values[i] = false; | values[i] = false; | ||||
| } | } | ||||
| /* PyC_AsArray decrements refcount internally on error */ | |||||
| } | } | ||||
| else { | |||||
| Py_DECREF(ret); | Py_DECREF(ret); | ||||
| } | } | ||||
| } | |||||
| if (use_gil) { | if (use_gil) { | ||||
| PyGILState_Release(gilstate); | PyGILState_Release(gilstate); | ||||
| } | } | ||||
| if (!is_write_ok) { | if (!is_write_ok) { | ||||
| pyrna_write_set(false); | pyrna_write_set(false); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | static void bpy_prop_int_array_get_fn(struct PointerRNA *ptr, | ||||
| } | } | ||||
| else { | else { | ||||
| if (PyC_AsArray(values, ret, len, &PyLong_Type, false, "IntVectorProperty get") == -1) { | if (PyC_AsArray(values, ret, len, &PyLong_Type, false, "IntVectorProperty get") == -1) { | ||||
| PyC_Err_PrintWithFunc(py_func); | PyC_Err_PrintWithFunc(py_func); | ||||
| for (i = 0; i < len; i++) { | for (i = 0; i < len; i++) { | ||||
| values[i] = 0; | values[i] = 0; | ||||
| } | } | ||||
| /* PyC_AsArray decrements refcount internally on error */ | |||||
| } | } | ||||
| else { | |||||
| Py_DECREF(ret); | Py_DECREF(ret); | ||||
| } | } | ||||
| } | |||||
| if (use_gil) { | if (use_gil) { | ||||
| PyGILState_Release(gilstate); | PyGILState_Release(gilstate); | ||||
| } | } | ||||
| if (!is_write_ok) { | if (!is_write_ok) { | ||||
| pyrna_write_set(false); | pyrna_write_set(false); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | static void bpy_prop_float_array_get_fn(struct PointerRNA *ptr, | ||||
| } | } | ||||
| else { | else { | ||||
| if (PyC_AsArray(values, ret, len, &PyFloat_Type, false, "FloatVectorProperty get") == -1) { | if (PyC_AsArray(values, ret, len, &PyFloat_Type, false, "FloatVectorProperty get") == -1) { | ||||
| PyC_Err_PrintWithFunc(py_func); | PyC_Err_PrintWithFunc(py_func); | ||||
| for (i = 0; i < len; i++) { | for (i = 0; i < len; i++) { | ||||
| values[i] = 0.0f; | values[i] = 0.0f; | ||||
| } | } | ||||
| /* PyC_AsArray decrements refcount internally on error */ | |||||
| } | } | ||||
| else { | |||||
| Py_DECREF(ret); | Py_DECREF(ret); | ||||
| } | } | ||||
| } | |||||
| if (use_gil) { | if (use_gil) { | ||||
| PyGILState_Release(gilstate); | PyGILState_Release(gilstate); | ||||
| } | } | ||||
| if (!is_write_ok) { | if (!is_write_ok) { | ||||
| pyrna_write_set(false); | pyrna_write_set(false); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,759 Lines • Show Last 20 Lines | |||||