diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-04 09:54:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-04 09:54:40 +0300 |
commit | 7719c110064fc6f90c93c5339681b7dd9f5cbd63 (patch) | |
tree | 6939cd7d5eeeb083d9846ea1945a74dd4a4dc3cb /source/blender/python/intern/bpy_rna_anim.c | |
parent | 854db8951bc15a7545eea3ff2219a28897698ead (diff) |
Cleanup: strip trailing space in Python module
Diffstat (limited to 'source/blender/python/intern/bpy_rna_anim.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_anim.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c index 9f9bb46c8bb..693ff954993 100644 --- a/source/blender/python/intern/bpy_rna_anim.c +++ b/source/blender/python/intern/bpy_rna_anim.c @@ -233,13 +233,13 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb */ ReportList reports; short result = 0; - + PointerRNA ptr = self->ptr; PropertyRNA *prop = NULL; const char *prop_name; - + BKE_reports_init(&reports, RPT_STORE); - + /* Retrieve the property identifier from the full path, since we can't get it any other way */ prop_name = strrchr(path_full, '.'); if ((prop_name >= path_full) && @@ -247,21 +247,21 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb { prop = RNA_struct_find_property(&ptr, prop_name + 1); } - + if (prop) { NlaStrip *strip = (NlaStrip *)ptr.data; FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index); - + result = insert_keyframe_direct(&reports, ptr, prop, fcu, cfra, keytype, options); } else { BKE_reportf(&reports, RPT_ERROR, "Could not resolve path (%s)", path_full); } MEM_freeN((void *)path_full); - + if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) return NULL; - + return PyBool_FromLong(result); } else { @@ -320,13 +320,13 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb */ ReportList reports; short result = 0; - + PointerRNA ptr = self->ptr; PropertyRNA *prop = NULL; const char *prop_name; - + BKE_reports_init(&reports, RPT_STORE); - + /* Retrieve the property identifier from the full path, since we can't get it any other way */ prop_name = strrchr(path_full, '.'); if ((prop_name >= path_full) && @@ -334,14 +334,14 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb { prop = RNA_struct_find_property(&ptr, prop_name + 1); } - + if (prop) { ID *id = ptr.id.data; NlaStrip *strip = (NlaStrip *)ptr.data; FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index); - + BLI_assert(fcu != NULL); /* NOTE: This should be true, or else we wouldn't be able to get here */ - + if (BKE_fcurve_is_protected(fcu)) { BKE_reportf(&reports, RPT_WARNING, "Not deleting keyframe for locked F-Curve for NLA Strip influence on %s - %s '%s'", @@ -354,7 +354,7 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb */ bool found = false; int i; - + /* try to find index of beztriple to get rid of */ i = binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &found); if (found) { @@ -368,10 +368,10 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb BKE_reportf(&reports, RPT_ERROR, "Could not resolve path (%s)", path_full); } MEM_freeN((void *)path_full); - + if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) return NULL; - + return PyBool_FromLong(result); } else { @@ -423,7 +423,7 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args) BKE_reports_init(&reports, RPT_STORE); - result = ANIM_add_driver(&reports, (ID *)self->ptr.id.data, path_full, index, + 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) @@ -449,7 +449,7 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args) RNA_pointer_create(id, &RNA_FCurve, fcu, &tptr); ret = pyrna_struct_CreatePyObject(&tptr); } - + WM_event_add_notifier(BPy_GetContext(), NC_ANIMATION | ND_FCURVES_ORDER, NULL); } else { @@ -502,7 +502,7 @@ PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args) if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) return NULL; - + WM_event_add_notifier(BPy_GetContext(), NC_ANIMATION | ND_FCURVES_ORDER, NULL); return PyBool_FromLong(result); |