Cleanup: use prefix for return args
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -301,7 +301,7 @@ void update_autoflags_fcurve(FCurve *fcu, bContext *C, ReportList *reports, Poin
|
||||
* NOTE: any recalculate of the F-Curve that needs to be done will need to
|
||||
* be done by the caller.
|
||||
*/
|
||||
int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag)
|
||||
int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, short flag)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@@ -383,7 +383,8 @@ int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag)
|
||||
return i;
|
||||
}
|
||||
|
||||
/* This function is a wrapper for insert_bezt_fcurve_internal(), and should be used when
|
||||
/**
|
||||
* This function is a wrapper for insert_bezt_fcurve_internal(), and should be used when
|
||||
* adding a new keyframe to a curve, when the keyframe doesn't exist anywhere else yet.
|
||||
* It returns the index at which the keyframe was added.
|
||||
*
|
||||
|
||||
@@ -91,7 +91,7 @@ void update_autoflags_fcurve(struct FCurve *fcu, struct bContext *C, struct Repo
|
||||
* Use this when validation of necessary animation data isn't necessary as it already
|
||||
* exists, and there is a beztriple that can be directly copied into the array.
|
||||
*/
|
||||
int insert_bezt_fcurve(struct FCurve *fcu, struct BezTriple *bezt, short flag);
|
||||
int insert_bezt_fcurve(struct FCurve *fcu, const struct BezTriple *bezt, short flag);
|
||||
|
||||
/* Main Keyframing API call:
|
||||
* Use this when validation of necessary animation data isn't necessary as it
|
||||
|
||||
Reference in New Issue
Block a user