Cleanup: style, use braces for the Python API
This commit is contained in:
@@ -126,9 +126,15 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (absolute) flag |= BKE_BPATH_TRAVERSE_ABS;
|
||||
if (!packed) flag |= BKE_BPATH_TRAVERSE_SKIP_PACKED;
|
||||
if (local) flag |= BKE_BPATH_TRAVERSE_SKIP_LIBRARY;
|
||||
if (absolute) {
|
||||
flag |= BKE_BPATH_TRAVERSE_ABS;
|
||||
}
|
||||
if (!packed) {
|
||||
flag |= BKE_BPATH_TRAVERSE_SKIP_PACKED;
|
||||
}
|
||||
if (local) {
|
||||
flag |= BKE_BPATH_TRAVERSE_SKIP_LIBRARY;
|
||||
}
|
||||
|
||||
list = PyList_New(0);
|
||||
|
||||
@@ -157,10 +163,10 @@ static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObj
|
||||
}
|
||||
|
||||
/* stupid string compare */
|
||||
if (STREQ(type, "DATAFILES")) folder_id = BLENDER_USER_DATAFILES;
|
||||
else if (STREQ(type, "CONFIG")) folder_id = BLENDER_USER_CONFIG;
|
||||
else if (STREQ(type, "SCRIPTS")) folder_id = BLENDER_USER_SCRIPTS;
|
||||
else if (STREQ(type, "AUTOSAVE")) folder_id = BLENDER_USER_AUTOSAVE;
|
||||
if (STREQ(type, "DATAFILES")) { folder_id = BLENDER_USER_DATAFILES; }
|
||||
else if (STREQ(type, "CONFIG")) { folder_id = BLENDER_USER_CONFIG; }
|
||||
else if (STREQ(type, "SCRIPTS")) { folder_id = BLENDER_USER_SCRIPTS; }
|
||||
else if (STREQ(type, "AUTOSAVE")) { folder_id = BLENDER_USER_AUTOSAVE; }
|
||||
else {
|
||||
PyErr_SetString(PyExc_ValueError, "invalid resource argument");
|
||||
return NULL;
|
||||
@@ -203,9 +209,9 @@ static PyObject *bpy_resource_path(PyObject *UNUSED(self), PyObject *args, PyObj
|
||||
}
|
||||
|
||||
/* stupid string compare */
|
||||
if (STREQ(type, "USER")) folder_id = BLENDER_RESOURCE_PATH_USER;
|
||||
else if (STREQ(type, "LOCAL")) folder_id = BLENDER_RESOURCE_PATH_LOCAL;
|
||||
else if (STREQ(type, "SYSTEM")) folder_id = BLENDER_RESOURCE_PATH_SYSTEM;
|
||||
if (STREQ(type, "USER")) { folder_id = BLENDER_RESOURCE_PATH_USER; }
|
||||
else if (STREQ(type, "LOCAL")) { folder_id = BLENDER_RESOURCE_PATH_LOCAL; }
|
||||
else if (STREQ(type, "SYSTEM")) { folder_id = BLENDER_RESOURCE_PATH_SYSTEM; }
|
||||
else {
|
||||
PyErr_SetString(PyExc_ValueError, "invalid resource argument");
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user