diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-03-24 10:05:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-03-24 10:05:10 +0300 |
commit | 7e65b02fb616a4b71a2ec58a4e544a3ce5c0c94c (patch) | |
tree | 394b98345cf807e922ab01ecc524302a45ec289b /source/blender/blenkernel | |
parent | 2a9e3c2bdb705d1ef834403d91d33045aa364785 (diff) |
Cleanup: use prefix for return args
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_fcurve.h | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 28 |
2 files changed, 22 insertions, 17 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index ff2880ab311..3db104aea73 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -226,11 +226,14 @@ struct FCurve *id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, c int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName); /* Find an f-curve based on an rna property. */ -struct FCurve *rna_get_fcurve(struct PointerRNA *ptr, struct PropertyRNA *prop, int rnaindex, - struct AnimData **adt, struct bAction **action, bool *r_driven, bool *r_special); +struct FCurve *rna_get_fcurve( + struct PointerRNA *ptr, struct PropertyRNA *prop, int rnaindex, + struct AnimData **r_adt, struct bAction **r_action, + bool *r_driven, bool *r_special); /* Same as above, but takes a context data, temp hack needed for complex paths like texture ones. */ -struct FCurve *rna_get_fcurve_context_ui(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, - int rnaindex, struct AnimData **adt, struct bAction **action, bool *r_driven, bool *r_special); +struct FCurve *rna_get_fcurve_context_ui( + struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int rnaindex, + struct AnimData **r_adt, struct bAction **r_action, bool *r_driven, bool *r_special); /* Binary search algorithm for finding where to 'insert' BezTriple with given frame number. * Returns the index to insert at (data already at that index will be offset if replace is 0) diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 891ab7999fe..52bece60361 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -314,23 +314,25 @@ int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, return matches; } -FCurve *rna_get_fcurve(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **adt, - bAction **action, bool *r_driven, bool *r_special) +FCurve *rna_get_fcurve( + PointerRNA *ptr, PropertyRNA *prop, int rnaindex, + AnimData **r_adt, bAction **r_action, bool *r_driven, bool *r_special) { - return rna_get_fcurve_context_ui(NULL, ptr, prop, rnaindex, adt, action, r_driven, r_special); + return rna_get_fcurve_context_ui(NULL, ptr, prop, rnaindex, r_adt, r_action, r_driven, r_special); } -FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **animdata, - bAction **action, bool *r_driven, bool *r_special) +FCurve *rna_get_fcurve_context_ui( + bContext *C, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, + AnimData **r_animdata, bAction **r_action, bool *r_driven, bool *r_special) { FCurve *fcu = NULL; PointerRNA tptr = *ptr; - if (animdata) *animdata = NULL; *r_driven = false; *r_special = false; - if (action) *action = NULL; + if (r_animdata) *r_animdata = NULL; + if (r_action) *r_action = NULL; /* Special case for NLA Control Curves... */ if (ptr->type == &RNA_NlaStrip) { @@ -372,8 +374,8 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro if (adt->action && adt->action->curves.first) { fcu = list_find_fcurve(&adt->action->curves, path, rnaindex); - if (fcu && action) - *action = adt->action; + if (fcu && r_action) + *r_action = adt->action; } /* if not animated, check if driven */ @@ -381,14 +383,14 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro fcu = list_find_fcurve(&adt->drivers, path, rnaindex); if (fcu) { - if (animdata) *animdata = adt; + if (r_animdata) *r_animdata = adt; *r_driven = true; } } - if (fcu && action) { - if (animdata) *animdata = adt; - *action = adt->action; + if (fcu && r_action) { + if (r_animdata) *r_animdata = adt; + *r_action = adt->action; break; } else if (step) { |