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:
authorMartin Felke <martin.felke@googlemail.com>2018-12-03 00:16:16 +0300
committerMartin Felke <martin.felke@googlemail.com>2018-12-03 00:16:16 +0300
commitc8d6bba3cce77ff2005205ab2af0d1757ef29b4c (patch)
tree83bf23b9da11dc607cc0b56a2aebdcacdbcdca23
parent7a18c905bf104ab6eb5e7fd483cb305e25e00898 (diff)
backport of master fix for https://developer.blender.org/T56969
allows to let the branch run with python 3.7 too
-rw-r--r--source/blender/python/intern/bpy_rna.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 0d3781ca176..38d139188f9 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -7388,7 +7388,13 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
identifier = RNA_property_identifier(prop);
item = PyObject_GetAttrString(py_class, identifier);
+ /* TODO(campbell): Use Python3.7x _PyObject_LookupAttr(), also in the macro below. */
+ /* backported fix from 2.79 master to allow 2.79b based fracture_modifier branch
+ * running with Python 3.7x which would throw an error here,
+ * symptom was no rendered UI elements,
+ * https://developer.blender.org/T56969 - Martin Felke */
if (item == NULL) {
+ PyErr_Clear();
/* Sneaky workaround to use the class name as the bl_idname */
#define BPY_REPLACEMENT_STRING(rna_attr, py_attr) \
@@ -7404,6 +7410,9 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
} \
Py_DECREF(item); \
} \
+ else { \
+ PyErr_Clear(); \
+ } \
} /* intentionally allow else here */
if (false) {} /* needed for macro */