From e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Apr 2019 06:17:24 +0200 Subject: ClangFormat: apply to source, most of intern Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat --- source/blender/blenkernel/BKE_animsys.h | 140 ++++++++++++++++++++++++-------- 1 file changed, 105 insertions(+), 35 deletions(-) (limited to 'source/blender/blenkernel/BKE_animsys.h') diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index e9eea162ceb..0503efb1661 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -66,38 +66,55 @@ void BKE_animdata_free(struct ID *id, const bool do_id_user); struct AnimData *BKE_animdata_copy(struct Main *bmain, struct AnimData *adt, const int flag); /* Copy AnimData */ -bool BKE_animdata_copy_id(struct Main *bmain, struct ID *id_to, struct ID *id_from, const int flag); +bool BKE_animdata_copy_id(struct Main *bmain, + struct ID *id_to, + struct ID *id_from, + const int flag); /* Copy AnimData Actions */ void BKE_animdata_copy_id_action(struct Main *bmain, struct ID *id, const bool set_newid); /* Merge copies of data from source AnimData block */ typedef enum eAnimData_MergeCopy_Modes { - /* Keep destination action */ - ADT_MERGECOPY_KEEP_DST = 0, + /* Keep destination action */ + ADT_MERGECOPY_KEEP_DST = 0, - /* Use src action (make a new copy) */ - ADT_MERGECOPY_SRC_COPY = 1, + /* Use src action (make a new copy) */ + ADT_MERGECOPY_SRC_COPY = 1, - /* Use src action (but just reference the existing version) */ - ADT_MERGECOPY_SRC_REF = 2, + /* Use src action (but just reference the existing version) */ + ADT_MERGECOPY_SRC_REF = 2, } eAnimData_MergeCopy_Modes; -void BKE_animdata_merge_copy( - struct Main *bmain, struct ID *dst_id, struct ID *src_id, - eAnimData_MergeCopy_Modes action_mode, bool fix_drivers); +void BKE_animdata_merge_copy(struct Main *bmain, + struct ID *dst_id, + struct ID *src_id, + eAnimData_MergeCopy_Modes action_mode, + bool fix_drivers); /* ************************************* */ /* KeyingSets API */ /* Used to create a new 'custom' KeyingSet for the user, that will be automatically added to the stack */ -struct KeyingSet *BKE_keyingset_add(struct ListBase *list, const char idname[], const char name[], short flag, short keyingflag); +struct KeyingSet *BKE_keyingset_add( + struct ListBase *list, const char idname[], const char name[], short flag, short keyingflag); /* Add a path to a KeyingSet */ -struct KS_Path *BKE_keyingset_add_path(struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, short flag, short groupmode); +struct KS_Path *BKE_keyingset_add_path(struct KeyingSet *ks, + struct ID *id, + const char group_name[], + const char rna_path[], + int array_index, + short flag, + short groupmode); /* Find the destination matching the criteria given */ -struct KS_Path *BKE_keyingset_find_path(struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, int group_mode); +struct KS_Path *BKE_keyingset_find_path(struct KeyingSet *ks, + struct ID *id, + const char group_name[], + const char rna_path[], + int array_index, + int group_mode); /* Copy all KeyingSets in the given list */ void BKE_keyingsets_copy(struct ListBase *newlist, const struct ListBase *list); @@ -115,20 +132,41 @@ void BKE_keyingsets_free(struct ListBase *list); /* Path Fixing API */ /* Get a "fixed" version of the given path (oldPath) */ -char *BKE_animsys_fix_rna_path_rename(struct ID *owner_id, char *old_path, const char *prefix, const char *oldName, - const char *newName, int oldSubscript, int newSubscript, bool verify_paths); +char *BKE_animsys_fix_rna_path_rename(struct ID *owner_id, + char *old_path, + const char *prefix, + const char *oldName, + const char *newName, + int oldSubscript, + int newSubscript, + bool verify_paths); /* Fix all the paths for the given ID + Action */ -void BKE_action_fix_paths_rename(struct ID *owner_id, struct bAction *act, const char *prefix, const char *oldName, - const char *newName, int oldSubscript, int newSubscript, bool verify_paths); +void BKE_action_fix_paths_rename(struct ID *owner_id, + struct bAction *act, + const char *prefix, + const char *oldName, + const char *newName, + int oldSubscript, + int newSubscript, + bool verify_paths); /* Fix all the paths for the given ID+AnimData */ -void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, struct ID *ref_id, const char *prefix, - const char *oldName, const char *newName, int oldSubscript, int newSubscript, +void BKE_animdata_fix_paths_rename(struct ID *owner_id, + struct AnimData *adt, + struct ID *ref_id, + const char *prefix, + const char *oldName, + const char *newName, + int oldSubscript, + int newSubscript, bool verify_paths); /* Fix all the paths for the entire database... */ -void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName); +void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, + const char *prefix, + const char *oldName, + const char *newName); /* Fix the path after removing elements that are not ID (e.g., node). * Returen truth if any animation data was affected. */ @@ -137,13 +175,19 @@ bool BKE_animdata_fix_paths_remove(struct ID *id, const char *path); /* -------------------------------------- */ /* Move animation data from src to destination if it's paths are based on basepaths */ -void BKE_animdata_separate_by_basepath( - struct Main *bmain, struct ID *srcID, struct ID *dstID, struct ListBase *basepaths); +void BKE_animdata_separate_by_basepath(struct Main *bmain, + struct ID *srcID, + struct ID *dstID, + struct ListBase *basepaths); /* Move F-Curves from src to destination if it's path is based on basepath */ -void action_move_fcurves_by_basepath(struct bAction *srcAct, struct bAction *dstAct, const char basepath[]); +void action_move_fcurves_by_basepath(struct bAction *srcAct, + struct bAction *dstAct, + const char basepath[]); -char *BKE_animdata_driver_path_hack(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, +char *BKE_animdata_driver_path_hack(struct bContext *C, + struct PointerRNA *ptr, + struct PropertyRNA *prop, char *base_path); /* ************************************* */ @@ -155,7 +199,6 @@ typedef void (*ID_AnimData_Edit_Callback)(struct ID *id, struct AnimData *adt, v /* Define for callback looper used in BKE_fcurves_main_cb */ typedef void (*ID_FCurve_Edit_Callback)(struct ID *id, struct FCurve *fcu, void *user_data); - /* Loop over all datablocks applying callback */ void BKE_animdata_main_cb(struct Main *bmain, ID_AnimData_Edit_Callback func, void *user_data); @@ -172,8 +215,18 @@ void BKE_fcurves_id_cb(struct ID *id, ID_FCurve_Edit_Callback func, void *user_d typedef struct NlaKeyframingContext NlaKeyframingContext; -struct NlaKeyframingContext *BKE_animsys_get_nla_keyframing_context(struct ListBase *cache, struct Depsgraph *depsgraph, struct PointerRNA *ptr, struct AnimData *adt, float ctime); -bool BKE_animsys_nla_remap_keyframe_values(struct NlaKeyframingContext *context, struct PointerRNA *prop_ptr, struct PropertyRNA *prop, float *values, int count, int index, bool *r_force_all); +struct NlaKeyframingContext *BKE_animsys_get_nla_keyframing_context(struct ListBase *cache, + struct Depsgraph *depsgraph, + struct PointerRNA *ptr, + struct AnimData *adt, + float ctime); +bool BKE_animsys_nla_remap_keyframe_values(struct NlaKeyframingContext *context, + struct PointerRNA *prop_ptr, + struct PropertyRNA *prop, + float *values, + int count, + int index, + bool *r_force_all); void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache); /* ************************************* */ @@ -184,16 +237,24 @@ void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache); /* Flags for recalc parameter, indicating which part to recalculate. */ typedef enum eAnimData_Recalc { - ADT_RECALC_DRIVERS = (1 << 0), - ADT_RECALC_ANIM = (1 << 1), - ADT_RECALC_ALL = (ADT_RECALC_DRIVERS | ADT_RECALC_ANIM), + ADT_RECALC_DRIVERS = (1 << 0), + ADT_RECALC_ANIM = (1 << 1), + ADT_RECALC_ALL = (ADT_RECALC_DRIVERS | ADT_RECALC_ANIM), } eAnimData_Recalc; /* Evaluation loop for evaluating animation data */ -void BKE_animsys_evaluate_animdata(struct Depsgraph *depsgraph, struct Scene *scene, struct ID *id, struct AnimData *adt, float ctime, short recalc); +void BKE_animsys_evaluate_animdata(struct Depsgraph *depsgraph, + struct Scene *scene, + struct ID *id, + struct AnimData *adt, + float ctime, + short recalc); /* Evaluation of all ID-blocks with Animation Data blocks - Animation Data Only */ -void BKE_animsys_evaluate_all_animation(struct Main *main, struct Depsgraph *depsgraph, struct Scene *scene, float ctime); +void BKE_animsys_evaluate_all_animation(struct Main *main, + struct Depsgraph *depsgraph, + struct Scene *scene, + float ctime); /* TODO(sergey): This is mainly a temp public function. */ bool BKE_animsys_execute_fcurve(struct PointerRNA *ptr, struct FCurve *fcu, float curval); @@ -207,10 +268,16 @@ bool BKE_animsys_execute_fcurve(struct PointerRNA *ptr, struct FCurve *fcu, floa */ /* Evaluate Action (F-Curve Bag) */ -void animsys_evaluate_action(struct Depsgraph *depsgraph, struct PointerRNA *ptr, struct bAction *act, float ctime); +void animsys_evaluate_action(struct Depsgraph *depsgraph, + struct PointerRNA *ptr, + struct bAction *act, + float ctime); /* Evaluate Action Group */ -void animsys_evaluate_action_group(struct PointerRNA *ptr, struct bAction *act, struct bActionGroup *agrp, float ctime); +void animsys_evaluate_action_group(struct PointerRNA *ptr, + struct bAction *act, + struct bActionGroup *agrp, + float ctime); /* ************************************* */ @@ -219,7 +286,10 @@ void animsys_evaluate_action_group(struct PointerRNA *ptr, struct bAction *act, struct Depsgraph; void BKE_animsys_eval_animdata(struct Depsgraph *depsgraph, struct ID *id); -void BKE_animsys_eval_driver(struct Depsgraph *depsgraph, struct ID *id, int driver_index, struct ChannelDriver *driver_orig); +void BKE_animsys_eval_driver(struct Depsgraph *depsgraph, + struct ID *id, + int driver_index, + struct ChannelDriver *driver_orig); void BKE_animsys_update_driver_array(struct ID *id); -- cgit v1.2.3