Partial revert of rev 23723
BRECHT, CHECK THIS The change made it return RNA python properties with null data pointer instead of None. That would make the particles and physics properties crash like this: 1. A valid property instead of None makes is seem like smoke (or other) modifier data is in context when it is Null. 2. UI code would try to access RNA properties of the (Null) modifier, which would crash
This commit is contained in:
@@ -433,7 +433,7 @@ PyObject * pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop)
|
||||
{
|
||||
PointerRNA newptr;
|
||||
newptr= RNA_property_pointer_get(ptr, prop);
|
||||
if (newptr.type) {
|
||||
if (newptr.data) {
|
||||
ret = pyrna_struct_CreatePyObject(&newptr);
|
||||
} else {
|
||||
ret = Py_None;
|
||||
@@ -1297,7 +1297,7 @@ static PyObject *pyrna_struct_getattro( BPy_StructRNA * self, PyObject *pyname )
|
||||
|
||||
CTX_data_get(self->ptr.data, name, &newptr, &newlb);
|
||||
|
||||
if (newptr.type) {
|
||||
if (newptr.data) {
|
||||
ret = pyrna_struct_CreatePyObject(&newptr);
|
||||
}
|
||||
else if (newlb.first) {
|
||||
|
||||
Reference in New Issue
Block a user