Cleanup: reduce indentation level in bpy_class_validate_recursive
This commit is contained in:
@@ -8103,18 +8103,11 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr,
|
||||
for (link = lb->first; link; link = link->next) {
|
||||
FunctionRNA *func = (FunctionRNA *)link;
|
||||
const int flag = RNA_function_flag(func);
|
||||
/* TODO(campbell): this is used for classmethod's too,
|
||||
* even though class methods should have 'FUNC_USE_SELF_TYPE' set, see Operator.poll for eg.
|
||||
* Keep this as-is since it's working, but we should be using
|
||||
* 'FUNC_USE_SELF_TYPE' for many functions. */
|
||||
const bool is_staticmethod = (flag & FUNC_NO_SELF) && !(flag & FUNC_USE_SELF_TYPE);
|
||||
|
||||
if (!(flag & FUNC_REGISTER)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
item = PyObject_GetAttrString(py_class, RNA_function_identifier(func));
|
||||
|
||||
have_function[i] = (item != NULL);
|
||||
i++;
|
||||
|
||||
@@ -8127,10 +8120,17 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr,
|
||||
RNA_function_identifier(func));
|
||||
return -1;
|
||||
}
|
||||
|
||||
PyErr_Clear();
|
||||
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
|
||||
/* TODO(campbell): this is used for classmethod's too,
|
||||
* even though class methods should have 'FUNC_USE_SELF_TYPE' set, see Operator.poll for eg.
|
||||
* Keep this as-is since it's working, but we should be using
|
||||
* 'FUNC_USE_SELF_TYPE' for many functions. */
|
||||
const bool is_staticmethod = (flag & FUNC_NO_SELF) && !(flag & FUNC_USE_SELF_TYPE);
|
||||
|
||||
/* Store original so we can decrement it's reference before returning. */
|
||||
PyObject *item_orig = item;
|
||||
|
||||
@@ -8204,7 +8204,6 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr,
|
||||
}
|
||||
Py_DECREF(item_orig);
|
||||
}
|
||||
}
|
||||
|
||||
/* Verify properties. */
|
||||
lb = RNA_struct_type_properties(srna);
|
||||
|
||||
Reference in New Issue
Block a user