diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-29 22:12:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-29 23:14:28 +0300 |
commit | 25ec4b437fe927205a810470cdc23efd7282c85b (patch) | |
tree | 6d7ba2fe73703915b4b94d3f2dab03fb731e9544 /source/blender/python/intern/bpy_rna_anim.c | |
parent | 18d06e8d21ed8c9a19df4205abcd7ed17eb9af00 (diff) |
Cleanup: style, use braces for the Python API
Diffstat (limited to 'source/blender/python/intern/bpy_rna_anim.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_anim.c | 21 |
1 files changed, 14 insertions, 7 deletions
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); |