From 25ec4b437fe927205a810470cdc23efd7282c85b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 30 Mar 2019 06:12:48 +1100 Subject: Cleanup: style, use braces for the Python API --- source/blender/python/intern/bpy_rna_anim.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'source/blender/python/intern/bpy_rna_anim.c') diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c index faead661f1f..a25906ac9a1 100644 --- a/source/blender/python/intern/bpy_rna_anim.c +++ b/source/blender/python/intern/bpy_rna_anim.c @@ -339,8 +339,9 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb } MEM_freeN((void *)path_full); - if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) + if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { return NULL; + } return PyBool_FromLong(result); } @@ -356,8 +357,9 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb result = insert_keyframe(G_MAIN, depsgraph, &reports, id, NULL, group_name, path_full, index, cfra, keytype, NULL, options); MEM_freeN((void *)path_full); - if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) + if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { return NULL; + } return PyBool_FromLong(result); } @@ -452,8 +454,9 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb } MEM_freeN((void *)path_full); - if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) + if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { return NULL; + } return PyBool_FromLong(result); } @@ -466,8 +469,9 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb result = delete_keyframe(G.main, &reports, (ID *)self->ptr.id.data, NULL, group_name, path_full, index, cfra, 0); MEM_freeN((void *)path_full); - if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) + if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { return NULL; + } return PyBool_FromLong(result); } @@ -493,8 +497,9 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args) PYRNA_STRUCT_CHECK_OBJ(self); - if (!PyArg_ParseTuple(args, "s|i:driver_add", &path, &index)) + if (!PyArg_ParseTuple(args, "s|i:driver_add", &path, &index)) { return NULL; + } if (pyrna_struct_anim_args_parse( &self->ptr, "bpy_struct.driver_add():", path, @@ -512,8 +517,9 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args) result = ANIM_add_driver(&reports, (ID *)self->ptr.id.data, path_full, index, CREATEDRIVER_WITH_FMODIFIER, DRIVER_TYPE_PYTHON); - if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) + if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { return NULL; + } if (result) { ID *id = self->ptr.id.data; @@ -592,8 +598,9 @@ PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args) MEM_freeN((void *)path_full); } - if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) + if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { return NULL; + } WM_event_add_notifier(BPy_GetContext(), NC_ANIMATION | ND_FCURVES_ORDER, NULL); -- cgit v1.2.3