diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-28 00:13:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-28 00:13:59 +0400 |
commit | 032d83ecc411428a768e0b405fe73066dc6640ea (patch) | |
tree | f04c110b845544ca2ffab7a66c584423d769519b /source/blender/blenkernel/intern | |
parent | b65c9711fef4efbb868156a490a295457a0ad69e (diff) |
style cleanup: defines with braces
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 13 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 92 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 12 |
3 files changed, 59 insertions, 58 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 805db8f5171..1358c2e34a8 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -744,7 +744,7 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u for (id = first; id; id = id->next) { \ AnimData *adt = BKE_animdata_from_id(id); \ if (adt) func(id, adt, user_data); \ - } + } (void)0 /* "embedded" nodetree cases (i.e. scene/material/texture->nodetree) */ #define ANIMDATA_NODETREE_IDS_CB(first, NtId_Type) \ @@ -756,7 +756,7 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u if (adt2) func(id, adt2, user_data); \ } \ if (adt) func(id, adt, user_data); \ - } + } (void)0 /* nodes */ ANIMDATA_IDS_CB(mainptr->nodetree.first); @@ -828,7 +828,7 @@ void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const cha for (id = first; id; id = id->next) { \ AnimData *adt = BKE_animdata_from_id(id); \ BKE_animdata_fix_paths_rename(id, adt, ref_id, prefix, oldName, newName, 0, 0, 1); \ - } + } (void)0 /* another version of this macro for nodetrees */ #define RENAMEFIX_ANIM_NODETREE_IDS(first, NtId_Type) \ @@ -840,7 +840,7 @@ void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const cha BKE_animdata_fix_paths_rename((ID *)ntp, adt2, ref_id, prefix, oldName, newName, 0, 0, 1); \ } \ BKE_animdata_fix_paths_rename(id, adt, ref_id, prefix, oldName, newName, 0, 0, 1); \ - } + } (void)0 /* nodes */ RENAMEFIX_ANIM_IDS(mainptr->nodetree.first); @@ -2266,7 +2266,8 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime) AnimData *adt = BKE_animdata_from_id(id); \ BKE_animsys_evaluate_animdata(scene, id, adt, ctime, aflag); \ } \ - } + } (void)0 + /* another macro for the "embedded" nodetree cases * - this is like EVAL_ANIM_IDS, but this handles the case "embedded nodetrees" * (i.e. scene/material/texture->nodetree) which we need a special exception @@ -2284,7 +2285,7 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime) } \ BKE_animsys_evaluate_animdata(scene, id, adt, ctime, aflag); \ } \ - } + } (void)0 /* optimization: * when there are no actions, don't go over database and loop over heaps of datablocks, diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index da9350cc7b9..c6a0ecc057a 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -701,7 +701,7 @@ static void default_get_tarmat(bConstraint *con, bConstraintOb *UNUSED(cob), bCo } \ \ BLI_addtail(list, ct); \ - } + } (void)0 /* This following macro should be used for all standard single-target *_get_tars functions * to save typing and reduce maintenance woes. It does not do the subtarget related operations @@ -720,7 +720,7 @@ static void default_get_tarmat(bConstraint *con, bConstraintOb *UNUSED(cob), bCo if (ct->tar) ct->type = CONSTRAINT_OBTYPE_OBJECT; \ \ BLI_addtail(list, ct); \ - } + } (void)0 /* This following macro should be used for all standard single-target *_flush_tars functions * to save typing and reduce maintenance woes. @@ -741,7 +741,7 @@ static void default_get_tarmat(bConstraint *con, bConstraintOb *UNUSED(cob), bCo BLI_freelinkN(list, ct); \ ct = ctn; \ } \ - } + } (void)0 /* This following macro should be used for all standard single-target *_flush_tars functions * to save typing and reduce maintenance woes. It does not do the subtarget related operations. @@ -761,7 +761,7 @@ static void default_get_tarmat(bConstraint *con, bConstraintOb *UNUSED(cob), bCo BLI_freelinkN(list, ct); \ ct = ctn; \ } \ - } + } (void)0 /* --------- ChildOf Constraint ------------ */ @@ -790,7 +790,7 @@ static int childof_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -805,7 +805,7 @@ static void childof_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -925,7 +925,7 @@ static int trackto_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -940,7 +940,7 @@ static void trackto_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -1108,8 +1108,8 @@ static int kinematic_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints is used twice here */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) - SINGLETARGET_GET_TARS(con, data->poletar, data->polesubtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); + SINGLETARGET_GET_TARS(con, data->poletar, data->polesubtarget, ct, list); return 2; } @@ -1124,8 +1124,8 @@ static void kinematic_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) - SINGLETARGET_FLUSH_TARS(con, data->poletar, data->polesubtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); + SINGLETARGET_FLUSH_TARS(con, data->poletar, data->polesubtarget, ct, list, nocopy); } } @@ -1197,7 +1197,7 @@ static int followpath_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints without subtargets */ - SINGLETARGETNS_GET_TARS(con, data->tar, ct, list) + SINGLETARGETNS_GET_TARS(con, data->tar, ct, list); return 1; } @@ -1212,7 +1212,7 @@ static void followpath_flush_tars(bConstraint *con, ListBase *list, short nocopy bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy); } } @@ -1543,7 +1543,7 @@ static int loclike_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -1558,7 +1558,7 @@ static void loclike_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -1633,7 +1633,7 @@ static int rotlike_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -1648,7 +1648,7 @@ static void rotlike_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -1745,7 +1745,7 @@ static int sizelike_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -1760,7 +1760,7 @@ static void sizelike_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -1834,7 +1834,7 @@ static int translike_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -1849,7 +1849,7 @@ static void translike_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2093,7 +2093,7 @@ static int actcon_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2108,7 +2108,7 @@ static void actcon_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2255,7 +2255,7 @@ static int locktrack_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2270,7 +2270,7 @@ static void locktrack_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2565,7 +2565,7 @@ static int distlimit_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2580,7 +2580,7 @@ static void distlimit_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2692,7 +2692,7 @@ static int stretchto_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2707,7 +2707,7 @@ static void stretchto_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -2866,7 +2866,7 @@ static int minmax_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -2881,7 +2881,7 @@ static void minmax_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -3009,7 +3009,7 @@ static int rbj_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints without subtargets */ - SINGLETARGETNS_GET_TARS(con, data->tar, ct, list) + SINGLETARGETNS_GET_TARS(con, data->tar, ct, list); return 1; } @@ -3024,7 +3024,7 @@ static void rbj_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy); } } @@ -3060,7 +3060,7 @@ static int clampto_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints without subtargets */ - SINGLETARGETNS_GET_TARS(con, data->tar, ct, list) + SINGLETARGETNS_GET_TARS(con, data->tar, ct, list); return 1; } @@ -3075,7 +3075,7 @@ static void clampto_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy); } } @@ -3244,7 +3244,7 @@ static int transform_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -3259,7 +3259,7 @@ static void transform_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -3380,7 +3380,7 @@ static int shrinkwrap_get_tars(bConstraint *con, ListBase *list) bShrinkwrapConstraint *data = con->data; bConstraintTarget *ct; - SINGLETARGETNS_GET_TARS(con, data->target, ct, list) + SINGLETARGETNS_GET_TARS(con, data->target, ct, list); return 1; } @@ -3395,7 +3395,7 @@ static void shrinkwrap_flush_tars(bConstraint *con, ListBase *list, short nocopy bShrinkwrapConstraint *data = con->data; bConstraintTarget *ct = list->first; - SINGLETARGETNS_FLUSH_TARS(con, data->target, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->target, ct, list, nocopy); } } @@ -3545,7 +3545,7 @@ static int damptrack_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -3560,7 +3560,7 @@ static void damptrack_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } @@ -3690,7 +3690,7 @@ static int splineik_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints without subtargets */ - SINGLETARGETNS_GET_TARS(con, data->tar, ct, list) + SINGLETARGETNS_GET_TARS(con, data->tar, ct, list); return 1; } @@ -3705,7 +3705,7 @@ static void splineik_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy) + SINGLETARGETNS_FLUSH_TARS(con, data->tar, ct, list, nocopy); } } @@ -3762,7 +3762,7 @@ static int pivotcon_get_tars(bConstraint *con, ListBase *list) bConstraintTarget *ct; /* standard target-getting macro for single-target constraints */ - SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list) + SINGLETARGET_GET_TARS(con, data->tar, data->subtarget, ct, list); return 1; } @@ -3777,7 +3777,7 @@ static void pivotcon_flush_tars(bConstraint *con, ListBase *list, short nocopy) bConstraintTarget *ct = list->first; /* the following macro is used for all standard single-target constraints */ - SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy) + SINGLETARGET_FLUSH_TARS(con, data->tar, data->subtarget, ct, list, nocopy); } } diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 1077b5ad7c3..9737888e0b2 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -162,14 +162,14 @@ static AdrBit2Path ma_mode_bits[] = { static AdrBit2Path *adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *tot) { /* Object layers */ - if ((blocktype == ID_OB) && (adrcode == OB_LAY)) + if ((blocktype == ID_OB) && (adrcode == OB_LAY)) RET_ABP(ob_layer_bits) - else if ((blocktype == ID_MA) && (adrcode == MA_MODE)) - RET_ABP(ma_mode_bits) - // XXX TODO: add other types... + else if ((blocktype == ID_MA) && (adrcode == MA_MODE)) + RET_ABP(ma_mode_bits) + // XXX TODO: add other types... - /* Normal curve */ - return NULL; + /* Normal curve */ + return NULL; } /* *************************************************** */ |