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:
authorCampbell Barton <ideasman42@gmail.com>2019-05-31 15:51:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-31 15:55:15 +0300
commitd8dbd49a2f23b7637f05fc058f39bdf6ab706624 (patch)
tree0805b9372c82ae6505d87e879824efe1d3e32f8e /source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
parent8987f7987d8160e1f6e79e8c85d6ce65b885ab25 (diff)
Cleanup: style, use braces in source/
Automated using clang-tidy.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
index a2e483dec7e..e838bade64a 100644
--- a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
@@ -116,8 +116,9 @@ static PyObject *ContextFunctions_load_map(PyObject * /*self*/, PyObject *args,
float sigma = 1.0;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "ss|If", (char **)kwlist, &fileName, &mapName, &nbLevels, &sigma))
+ args, kwds, "ss|If", (char **)kwlist, &fileName, &mapName, &nbLevels, &sigma)) {
return NULL;
+ }
ContextFunctions::LoadMapCF(fileName, mapName, nbLevels, sigma);
Py_RETURN_NONE;
}
@@ -150,8 +151,10 @@ static PyObject *ContextFunctions_read_map_pixel(PyObject * /*self*/,
int level;
unsigned x, y;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "siII", (char **)kwlist, &mapName, &level, &x, &y))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kwds, "siII", (char **)kwlist, &mapName, &level, &x, &y)) {
return NULL;
+ }
return PyFloat_FromDouble(ContextFunctions::ReadMapPixelCF(mapName, level, x, y));
}
@@ -180,8 +183,9 @@ static PyObject *ContextFunctions_read_complete_view_map_pixel(PyObject * /*self
int level;
unsigned x, y;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "iII", (char **)kwlist, &level, &x, &y))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "iII", (char **)kwlist, &level, &x, &y)) {
return NULL;
+ }
return PyFloat_FromDouble(ContextFunctions::ReadCompleteViewMapPixelCF(level, x, y));
}
@@ -214,8 +218,9 @@ static PyObject *ContextFunctions_read_directional_view_map_pixel(PyObject * /*s
unsigned x, y;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "iiII", (char **)kwlist, &orientation, &level, &x, &y))
+ args, kwds, "iiII", (char **)kwlist, &orientation, &level, &x, &y)) {
return NULL;
+ }
return PyFloat_FromDouble(
ContextFunctions::ReadDirectionalViewMapPixelCF(orientation, level, x, y));
}
@@ -231,8 +236,9 @@ static char ContextFunctions_get_selected_fedge___doc__[] =
static PyObject *ContextFunctions_get_selected_fedge(PyObject * /*self*/)
{
FEdge *fe = ContextFunctions::GetSelectedFEdgeCF();
- if (fe)
+ if (fe) {
return Any_BPy_FEdge_from_FEdge(*fe);
+ }
Py_RETURN_NONE;
}
@@ -298,12 +304,14 @@ int ContextFunctions_Init(PyObject *module)
{
PyObject *m;
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
m = PyModule_Create(&module_definition);
- if (m == NULL)
+ if (m == NULL) {
return -1;
+ }
Py_INCREF(m);
PyModule_AddObject(module, "ContextFunctions", m);