From d7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 14 Nov 2018 12:53:15 +1100 Subject: Cleanup: comment block tabs --- source/blender/blenkernel/BKE_action.h | 8 +- source/blender/blenkernel/BKE_animsys.h | 2 +- source/blender/blenkernel/BKE_fcurve.h | 10 +- source/blender/blenkernel/BKE_shrinkwrap.h | 6 +- source/blender/blenkernel/intern/action.c | 30 +-- source/blender/blenkernel/intern/anim.c | 18 +- source/blender/blenkernel/intern/anim_sys.c | 146 ++++++------ source/blender/blenkernel/intern/armature.c | 20 +- source/blender/blenkernel/intern/armature_update.c | 12 +- source/blender/blenkernel/intern/boids.c | 4 +- source/blender/blenkernel/intern/cloth.c | 14 +- source/blender/blenkernel/intern/collision.c | 8 +- source/blender/blenkernel/intern/constraint.c | 94 ++++---- source/blender/blenkernel/intern/dynamicpaint.c | 252 ++++++++++----------- source/blender/blenkernel/intern/fcurve.c | 64 +++--- source/blender/blenkernel/intern/fmodifier.c | 58 ++--- source/blender/blenkernel/intern/gpencil.c | 4 +- source/blender/blenkernel/intern/ipo.c | 58 ++--- source/blender/blenkernel/intern/lamp.c | 6 +- source/blender/blenkernel/intern/material.c | 6 +- .../blender/blenkernel/intern/mball_tessellate.c | 22 +- source/blender/blenkernel/intern/nla.c | 108 ++++----- source/blender/blenkernel/intern/object_dupli.c | 4 +- source/blender/blenkernel/intern/particle_system.c | 4 +- source/blender/blenkernel/intern/rigidbody.c | 48 ++-- source/blender/blenkernel/intern/scene.c | 8 +- source/blender/blenkernel/intern/seqeffects.c | 4 +- source/blender/blenkernel/intern/shrinkwrap.c | 4 +- source/blender/blenkernel/intern/smoke.c | 14 +- source/blender/blenkernel/intern/softbody.c | 4 +- source/blender/blenkernel/intern/text.c | 6 +- source/blender/blenkernel/intern/texture.c | 6 +- source/blender/blenkernel/intern/world.c | 6 +- 33 files changed, 531 insertions(+), 527 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index b627e3f69e8..f1858fc18ed 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -19,7 +19,7 @@ * All rights reserved. * * Contributor(s): Full recode, Ton Roosendaal, Crete 2005 - * Full recode, Joshua Leung, 2009 + * Full recode, Joshua Leung, 2009 * * ***** END GPL LICENSE BLOCK ***** */ @@ -70,7 +70,7 @@ void BKE_action_make_local(struct Main *bmain, struct bAction *act, const bool l /* Action API ----------------- */ /* types of transforms applied to the given item - * - these are the return flags for action_get_item_transforms() + * - these are the return flags for action_get_item_transforms() */ typedef enum eAction_TransformFlags { /* location */ @@ -94,8 +94,8 @@ typedef enum eAction_TransformFlags { } eAction_TransformFlags; /* Return flags indicating which transforms the given object/posechannel has - * - if 'curves' is provided, a list of links to these curves are also returned - * whose nodes WILL NEED FREEING + * - if 'curves' is provided, a list of links to these curves are also returned + * whose nodes WILL NEED FREEING */ short action_get_item_transforms(struct bAction *act, struct Object *ob, struct bPoseChannel *pchan, ListBase *curves); diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 5cce1e090a9..40b4bf8e7f5 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -190,7 +190,7 @@ bool BKE_animsys_execute_fcurve(struct PointerRNA *ptr, struct AnimMapper *remap * for standard animation evaluation UNDER ANY CIRCUMSTANCES! * * i.e. Pose Library (PoseLib) uses some of these for selectively applying poses, but - * Particles/Sequencer performing funky time manipulation is not ok. + * Particles/Sequencer performing funky time manipulation is not ok. */ /* Evaluate Action (F-Curve Bag) */ diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 1dfcfd5e54f..055a3d40aba 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -122,8 +122,8 @@ typedef struct GHash FModifierStackStorage; * as some constraints don't define some of these. * * Warning: it is not too advisable to reorder order of members of this struct, - * as you'll have to edit quite a few ($FMODIFIER_NUM_TYPES) of these - * structs. + * as you'll have to edit quite a few ($FMODIFIER_NUM_TYPES) of these + * structs. */ typedef struct FModifierTypeInfo { /* admin/ident */ @@ -230,7 +230,7 @@ struct FCurve *iter_step_fcurve(struct FCurve *fcu_iter, const char rna_path[]); struct FCurve *id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, bool *r_driven); /* Get list of LinkData's containing pointers to the F-Curves which control the types of data indicated - * e.g. numMatches = list_find_data_fcurves(matches, &act->curves, "pose.bones[", "MyFancyBone"); + * e.g. numMatches = list_find_data_fcurves(matches, &act->curves, "pose.bones[", "MyFancyBone"); */ int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName); @@ -291,8 +291,8 @@ float calculate_fcurve(struct PathResolvedRNA *anim_rna, struct FCurve *fcu, flo /* -------- Defines -------- */ /* Basic signature for F-Curve sample-creation function - * - fcu: the F-Curve being operated on - * - data: pointer to some specific data that may be used by one of the callbacks + * - fcu: the F-Curve being operated on + * - data: pointer to some specific data that may be used by one of the callbacks */ typedef float (*FcuSampleFunc)(struct FCurve *fcu, void *data, float evaltime); diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h index 31b4b5cecc5..2dd42a9da1f 100644 --- a/source/blender/blenkernel/BKE_shrinkwrap.h +++ b/source/blender/blenkernel/BKE_shrinkwrap.h @@ -38,9 +38,9 @@ * Shrinkwrap is composed by a set of functions and options that define the type of shrink. * * 3 modes are available: - * - Nearest vertex - * - Nearest surface - * - Normal projection + * - Nearest vertex + * - Nearest surface + * - Normal projection * * ShrinkwrapCalcData encapsulates all needed data for shrinkwrap functions. * (So that you don't have to pass an enormous amount of arguments to functions) diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 00e5d17128b..7612e9a3fdb 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -19,7 +19,7 @@ * All rights reserved. * * Contributor(s): Full recode, Ton Roosendaal, Crete 2005 - * Full recode, Joshua Leung, 2009 + * Full recode, Joshua Leung, 2009 * * ***** END GPL LICENSE BLOCK ***** */ @@ -263,8 +263,8 @@ bActionGroup *action_groups_add_new(bAction *act, const char name[]) } /* Add given channel into (active) group - * - assumes that channel is not linked to anything anymore - * - always adds at the end of the group + * - assumes that channel is not linked to anything anymore + * - always adds at the end of the group */ void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve) { @@ -309,8 +309,8 @@ void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve) for (grp = agrp->prev; grp; grp = grp->prev) { /* if this group has F-Curves, we want weave the given one in right after the last channel there, * but via the Action's list not this group's list - * - this is so that the F-Curve is in the right place in the Action, - * but won't be included in the previous group + * - this is so that the F-Curve is in the right place in the Action, + * but won't be included in the previous group */ if (grp->channels.last) { /* once we've added, break here since we don't need to search any further... */ @@ -1063,8 +1063,8 @@ void BKE_pose_remove_group(bPose *pose, bActionGroup *grp, const int index) BLI_assert(idx > 0); /* adjust group references (the trouble of using indices!): - * - firstly, make sure nothing references it - * - also, make sure that those after this item get corrected + * - firstly, make sure nothing references it + * - also, make sure that those after this item get corrected */ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { if (pchan->agrp_index == idx) @@ -1147,7 +1147,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_ } /* if incl_modifiers is enabled, need to consider modifiers too - * - only really care about the last modifier + * - only really care about the last modifier */ if ((incl_modifiers) && (fcu->modifiers.last)) { FModifier *fcm = fcu->modifiers.last; @@ -1203,7 +1203,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_ } /* Return flags indicating which transforms the given object/posechannel has - * - if 'curves' is provided, a list of links to these curves are also returned + * - if 'curves' is provided, a list of links to these curves are also returned */ short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves) { @@ -1226,7 +1226,7 @@ short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan, return 0; /* search F-Curves for the given properties - * - we cannot use the groups, since they may not be grouped in that way... + * - we cannot use the groups, since they may not be grouped in that way... */ for (fcu = act->curves.first; fcu; fcu = fcu->next) { const char *bPtr = NULL, *pPtr = NULL; @@ -1249,11 +1249,11 @@ short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan, bPtr += strlen(basePath); /* step 2: check for some property with transforms - * - to speed things up, only check for the ones not yet found - * unless we're getting the curves too - * - if we're getting the curves, the BLI_genericNodeN() creates a LinkData - * node wrapping the F-Curve, which then gets added to the list - * - once a match has been found, the curve cannot possibly be any other one + * - to speed things up, only check for the ones not yet found + * unless we're getting the curves too + * - if we're getting the curves, the BLI_genericNodeN() creates a LinkData + * node wrapping the F-Curve, which then gets added to the list + * - once a match has been found, the curve cannot possibly be any other one */ if ((curves) || (flags & ACT_TRANS_LOC) == 0) { pPtr = strstr(bPtr, "location"); diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index e35af19facb..d5f269b82a8 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -235,7 +235,7 @@ typedef struct MPathTarget { /* ........ */ /* get list of motion paths to be baked for the given object - * - assumes the given list is ready to be used + * - assumes the given list is ready to be used */ /* TODO: it would be nice in future to be able to update objects dependent on these bones too? */ void animviz_get_object_motionpaths(Object *ob, ListBase *targets) @@ -349,9 +349,9 @@ static void motionpaths_calc_update_scene(Main *bmain, Scene *scene) } #else // original, 'always correct' version /* do all updates - * - if this is too slow, resort to using a more efficient way - * that doesn't force complete update, but for now, this is the - * most accurate way! + * - if this is too slow, resort to using a more efficient way + * that doesn't force complete update, but for now, this is the + * most accurate way! */ BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene, scene->lay); /* XXX this is the best way we can get anything moving */ #endif @@ -370,7 +370,7 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets) bMotionPathVert *mpv; /* current frame must be within the range the cache works for - * - is inclusive of the first frame, but not the last otherwise we get buffer overruns + * - is inclusive of the first frame, but not the last otherwise we get buffer overruns */ if ((CFRA < mpath->start_frame) || (CFRA >= mpath->end_frame)) continue; @@ -399,9 +399,9 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets) } /* Perform baking of the given object's and/or its bones' transforms to motion paths - * - scene: current scene - * - ob: object whose flagged motionpaths should get calculated - * - recalc: whether we need to + * - scene: current scene + * - ob: object whose flagged motionpaths should get calculated + * - recalc: whether we need to */ /* TODO: include reports pointer? */ void animviz_calc_motionpaths(Main *bmain, Scene *scene, ListBase *targets) @@ -474,7 +474,7 @@ void free_path(Path *path) } /* calculate a curve-deform path for a curve - * - only called from displist.c -> do_makeDispListCurveTypes + * - only called from displist.c -> do_makeDispListCurveTypes */ void calc_curvepath(Object *ob, ListBase *nurbs) { diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 05cb10ab7a4..b17bc70c51a 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -422,8 +422,8 @@ static bool animpath_matches_basepath(const char path[], const char basepath[]) /* Move F-Curves in src action to dst action, setting up all the necessary groups * for this to happen, but only if the F-Curves being moved have the appropriate * "base path". - * - This is used when data moves from one datablock to another, causing the - * F-Curves to need to be moved over too + * - This is used when data moves from one datablock to another, causing the + * F-Curves to need to be moved over too */ void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const char basepath[]) { @@ -449,7 +449,7 @@ void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const cha fcn = fcu->next; /* should F-Curve be moved over? - * - we only need the start of the path to match basepath + * - we only need the start of the path to match basepath */ if (animpath_matches_basepath(fcu->rna_path, basepath)) { bActionGroup *agrp = NULL; @@ -1188,8 +1188,8 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const cha ID *id; /* macro for less typing - * - whether animdata exists is checked for by the main renaming callback, though taking - * this outside of the function may make things slightly faster? + * - whether animdata exists is checked for by the main renaming callback, though taking + * this outside of the function may make things slightly faster? */ #define RENAMEFIX_ANIM_IDS(first) \ for (id = first; id; id = id->next) { \ @@ -1465,7 +1465,7 @@ void BKE_keyingsets_free(ListBase *list) return; /* loop over KeyingSets freeing them - * - BKE_keyingset_free() doesn't free the set itself, but it frees its sub-data + * - BKE_keyingset_free() doesn't free the set itself, but it frees its sub-data */ for (ks = list->first; ks; ks = ksn) { ksn = ks->next; @@ -1481,9 +1481,9 @@ void BKE_keyingsets_free(ListBase *list) * It returns whether the string needs to be freed (i.e. if it was a temp remapped one) * // FIXME: maybe it would be faster if we didn't have to alloc/free strings like this all the time, but for now it's safer * - * - remap: remapping table to use - * - path: original path string (as stored in F-Curve data) - * - dst: destination string to write data to + * - remap: remapping table to use + * - path: original path string (as stored in F-Curve data) + * - dst: destination string to write data to */ static bool animsys_remap_path(AnimMapper *UNUSED(remap), char *path, char **dst) { @@ -1781,8 +1781,8 @@ static void action_idcode_patch_check(ID *id, bAction *act) /* the actual checks... hopefully not too much of a performance hit in the long run... */ if (act->idroot == 0) { /* use the current root if not set already (i.e. newly created actions and actions from 2.50-2.57 builds) - * - this has problems if there are 2 users, and the first one encountered is the invalid one - * in which case, the user will need to manually fix this (?) + * - this has problems if there are 2 users, and the first one encountered is the invalid one + * in which case, the user will need to manually fix this (?) */ act->idroot = idcode; } @@ -1878,8 +1878,8 @@ static void nlastrip_evaluate_controls(NlaStrip *strip, float ctime) } /* analytically generate values for influence and time (if applicable) - * - we do this after the F-Curves have been evaluated to override the effects of those - * in case the override has been turned off. + * - we do this after the F-Curves have been evaluated to override the effects of those + * in case the override has been turned off. */ if ((strip->flag & NLASTRIP_FLAG_USR_TIME) == 0) strip->strip_time = nlastrip_get_frame(strip, ctime, NLATIME_CONVERT_EVAL); @@ -1925,8 +1925,8 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short else { /* before next strip - previous strip has ended, but next hasn't begun, * so blending mode depends on whether strip is being held or not... - * - only occurs when no transition strip added, otherwise the transition would have - * been picked up above... + * - only occurs when no transition strip added, otherwise the transition would have + * been picked up above... */ strip = strip->prev; @@ -1953,7 +1953,7 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short } /* check if a valid strip was found - * - must not be muted (i.e. will have contribution + * - must not be muted (i.e. will have contribution */ if ((estrip == NULL) || (estrip->flag & NLASTRIP_FLAG_MUTED)) return NULL; @@ -1969,8 +1969,8 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short } /* evaluate strip's evaluation controls - * - skip if no influence (i.e. same effect as muting the strip) - * - negative influence is not supported yet... how would that be defined? + * - skip if no influence (i.e. same effect as muting the strip) + * - negative influence is not supported yet... how would that be defined? */ /* TODO: this sounds a bit hacky having a few isolated F-Curves stuck on some data it operates on... */ nlastrip_evaluate_controls(estrip, ctime); @@ -2014,7 +2014,7 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short /* ---------------------- */ /* find an NlaEvalChannel that matches the given criteria - * - ptr and prop are the RNA data to find a match for + * - ptr and prop are the RNA data to find a match for */ static NlaEvalChannel *nlaevalchan_find_match(ListBase *channels, PointerRNA *ptr, PropertyRNA *prop, int array_index) { @@ -2029,7 +2029,7 @@ static NlaEvalChannel *nlaevalchan_find_match(ListBase *channels, PointerRNA *pt /* - comparing the PointerRNA's is done by comparing the pointers * to the actual struct the property resides in, since that all the * other data stored in PointerRNA cannot allow us to definitively - * identify the data + * identify the data */ if ((nec->ptr.data == ptr->data) && (nec->prop == prop) && (nec->index == array_index)) return nec; @@ -2176,8 +2176,8 @@ static void nlaevalchan_accumulate(NlaEvalChannel *nec, NlaEvalStrip *nes, float case NLASTRIP_MODE_REPLACE: default: /* TODO: do we really want to blend by default? it seems more uses might prefer add... */ /* do linear interpolation - * - the influence of the accumulated data (elsewhere, that is called dstweight) - * is 1 - influence, since the strip's influence is srcweight + * - the influence of the accumulated data (elsewhere, that is called dstweight) + * is 1 - influence, since the strip's influence is srcweight */ nec->value = nec->value * (1.0f - inf) + (value * inf); break; @@ -2238,7 +2238,7 @@ static void nlaeval_fmodifiers_join_stacks(ListBase *result, ListBase *list1, Li } else { /* list1 should be added first, and list2 second, with the endpoints of these being the endpoints for result - * - the original lists must be left unchanged though, as we need that fact for restoring + * - the original lists must be left unchanged though, as we need that fact for restoring */ result->first = list1->first; result->last = list2->last; @@ -2350,11 +2350,11 @@ static void nlastrip_evaluate_transition(PointerRNA *ptr, ListBase *channels, Li nlaeval_fmodifiers_join_stacks(&tmp_modifiers, &nes->strip->modifiers, modifiers); /* get the two strips to operate on - * - we use the endpoints of the strips directly flanking our strip - * using these as the endpoints of the transition (destination and source) - * - these should have already been determined to be valid... - * - if this strip is being played in reverse, we need to swap these endpoints - * otherwise they will be interpolated wrong + * - we use the endpoints of the strips directly flanking our strip + * using these as the endpoints of the transition (destination and source) + * - these should have already been determined to be valid... + * - if this strip is being played in reverse, we need to swap these endpoints + * otherwise they will be interpolated wrong */ if (nes->strip->flag & NLASTRIP_FLAG_REVERSE) { s1 = nes->strip->next; @@ -2366,11 +2366,11 @@ static void nlastrip_evaluate_transition(PointerRNA *ptr, ListBase *channels, Li } /* prepare template for 'evaluation strip' - * - based on the transition strip's evaluation strip data - * - strip_mode is NES_TIME_TRANSITION_* based on which endpoint - * - strip_time is the 'normalized' (i.e. in-strip) time for evaluation, - * which doubles up as an additional weighting factor for the strip influences - * which allows us to appear to be 'interpolating' between the two extremes + * - based on the transition strip's evaluation strip data + * - strip_mode is NES_TIME_TRANSITION_* based on which endpoint + * - strip_time is the 'normalized' (i.e. in-strip) time for evaluation, + * which doubles up as an additional weighting factor for the strip influences + * which allows us to appear to be 'interpolating' between the two extremes */ tmp_nes = *nes; @@ -2551,7 +2551,7 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData } /* if this track has strips (but maybe they won't be suitable), set has_strips - * - used for mainly for still allowing normal action evaluation... + * - used for mainly for still allowing normal action evaluation... */ if (nlt->strips.first) has_strips = true; @@ -2562,9 +2562,9 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData } /* add 'active' Action (may be tweaking track) as last strip to evaluate in NLA stack - * - only do this if we're not exclusively evaluating the 'solo' NLA-track - * - however, if the 'solo' track houses the current 'tweaking' strip, - * then we should allow this to play, otherwise nothing happens + * - only do this if we're not exclusively evaluating the 'solo' NLA-track + * - however, if the 'solo' track houses the current 'tweaking' strip, + * then we should allow this to play, otherwise nothing happens */ if ((adt->action) && ((adt->flag & ADT_NLA_SOLO_TRACK) == 0 || (adt->flag & ADT_NLA_EDIT_ON))) { /* if there are strips, evaluate action as per NLA rules */ @@ -2636,8 +2636,8 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData } /* NLA Evaluation function (mostly for use through do_animdata) - * - All channels that will be affected are not cleared anymore. Instead, we just evaluate into - * some temp channels, where values can be accumulated in one go. + * - All channels that will be affected are not cleared anymore. Instead, we just evaluate into + * some temp channels, where values can be accumulated in one go. */ static void animsys_calculate_nla(PointerRNA *ptr, AnimData *adt, float ctime) { @@ -2690,34 +2690,34 @@ static void animsys_evaluate_overrides(PointerRNA *ptr, AnimData *adt) /* Evaluation System - Public API */ /* Overview of how this system works: - * 1) Depsgraph sorts data as necessary, so that data is in an order that means - * that all dependencies are resolved before dependents. - * 2) All normal animation is evaluated, so that drivers have some basis values to - * work with - * a. NLA stacks are done first, as the Active Actions act as 'tweaking' tracks - * which modify the effects of the NLA-stacks - * b. Active Action is evaluated as per normal, on top of the results of the NLA tracks + * 1) Depsgraph sorts data as necessary, so that data is in an order that means + * that all dependencies are resolved before dependents. + * 2) All normal animation is evaluated, so that drivers have some basis values to + * work with + * a. NLA stacks are done first, as the Active Actions act as 'tweaking' tracks + * which modify the effects of the NLA-stacks + * b. Active Action is evaluated as per normal, on top of the results of the NLA tracks * * --------------< often in a separate phase... >------------------ * - * 3) Drivers/expressions are evaluated on top of this, in an order where dependencies are - * resolved nicely. - * Note: it may be necessary to have some tools to handle the cases where some higher-level - * drivers are added and cause some problematic dependencies that didn't exist in the local levels... + * 3) Drivers/expressions are evaluated on top of this, in an order where dependencies are + * resolved nicely. + * Note: it may be necessary to have some tools to handle the cases where some higher-level + * drivers are added and cause some problematic dependencies that didn't exist in the local levels... * * --------------< always executed >------------------ * * Maintenance of editability of settings (XXX): - * In order to ensure that settings that are animated can still be manipulated in the UI without requiring - * that keyframes are added to prevent these values from being overwritten, we use 'overrides'. + * In order to ensure that settings that are animated can still be manipulated in the UI without requiring + * that keyframes are added to prevent these values from being overwritten, we use 'overrides'. * * Unresolved things: - * - Handling of multi-user settings (i.e. time-offset, group-instancing) -> big cache grids or nodal system? but stored where? - * - Multiple-block dependencies (i.e. drivers for settings are in both local and higher levels) -> split into separate lists? + * - Handling of multi-user settings (i.e. time-offset, group-instancing) -> big cache grids or nodal system? but stored where? + * - Multiple-block dependencies (i.e. drivers for settings are in both local and higher levels) -> split into separate lists? * * Current Status: - * - Currently (as of September 2009), overrides we haven't needed to (fully) implement overrides. - * However, the code for this is relatively harmless, so is left in the code for now. + * - Currently (as of September 2009), overrides we haven't needed to (fully) implement overrides. + * However, the code for this is relatively harmless, so is left in the code for now. */ /* Evaluation loop for evaluation animation data @@ -2738,15 +2738,15 @@ void BKE_animsys_evaluate_animdata(Scene *scene, ID *id, AnimData *adt, float ct RNA_id_pointer_create(id, &id_ptr); /* recalculate keyframe data: - * - NLA before Active Action, as Active Action behaves as 'tweaking track' - * that overrides 'rough' work in NLA + * - NLA before Active Action, as Active Action behaves as 'tweaking track' + * that overrides 'rough' work in NLA */ /* TODO: need to double check that this all works correctly */ if ((recalc & ADT_RECALC_ANIM) || (adt->recalc & ADT_RECALC_ANIM)) { /* evaluate NLA data */ if ((adt->nla_tracks.first) && !(adt->flag & ADT_NLA_EVAL_OFF)) { /* evaluate NLA-stack - * - active action is evaluated as part of the NLA stack as the last item + * - active action is evaluated as part of the NLA stack as the last item */ animsys_calculate_nla(&id_ptr, adt, ctime); } @@ -2759,9 +2759,9 @@ void BKE_animsys_evaluate_animdata(Scene *scene, ID *id, AnimData *adt, float ct } /* recalculate drivers - * - Drivers need to be evaluated afterwards, as they can either override - * or be layered on top of existing animation data. - * - Drivers should be in the appropriate order to be evaluated without problems... + * - Drivers need to be evaluated afterwards, as they can either override + * or be layered on top of existing animation data. + * - Drivers should be in the appropriate order to be evaluated without problems... */ if ((recalc & ADT_RECALC_DRIVERS) /* XXX for now, don't check yet, as depsgraph hasn't been updated */ @@ -2771,10 +2771,10 @@ void BKE_animsys_evaluate_animdata(Scene *scene, ID *id, AnimData *adt, float ct } /* always execute 'overrides' - * - Overrides allow editing, by overwriting the value(s) set from animation-data, with the - * value last set by the user (and not keyframed yet). - * - Overrides are cleared upon frame change and/or keyframing - * - It is best that we execute this every time, so that no errors are likely to occur. + * - Overrides allow editing, by overwriting the value(s) set from animation-data, with the + * value last set by the user (and not keyframed yet). + * - Overrides are cleared upon frame change and/or keyframing + * - It is best that we execute this every time, so that no errors are likely to occur. */ animsys_evaluate_overrides(&id_ptr, adt); @@ -2804,9 +2804,9 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime) printf("Evaluate all animation - %f\n", ctime); /* macros for less typing - * - only evaluate animation data for id if it has users (and not just fake ones) - * - whether animdata exists is checked for by the evaluation function, though taking - * this outside of the function may make things slightly faster? + * - only evaluate animation data for id if it has users (and not just fake ones) + * - whether animdata exists is checked for by the evaluation function, though taking + * this outside of the function may make things slightly faster? */ #define EVAL_ANIM_IDS(first, aflag) \ for (id = first; id; id = id->next) { \ @@ -2817,10 +2817,10 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime) } (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 - * for, otherwise they'd get skipped - * - ntp = "node tree parent" = datablock where node tree stuff resides + * - 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 + * for, otherwise they'd get skipped + * - ntp = "node tree parent" = datablock where node tree stuff resides */ #define EVAL_ANIM_NODETREE_IDS(first, NtId_Type, aflag) \ for (id = first; id; id = id->next) { \ diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 2eded2ee8f1..4ad9e9c8205 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -295,12 +295,12 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a BLI_strncpy(basename, name, sizeof(basename)); /* Figure out extension to append: - * - The extension to append is based upon the axis that we are working on. - * - If head happens to be on 0, then we must consider the tail position as well to decide - * which side the bone is on - * -> If tail is 0, then it's bone is considered to be on axis, so no extension should be added - * -> Otherwise, extension is added from perspective of object based on which side tail goes to - * - If head is non-zero, extension is added from perspective of object based on side head is on + * - The extension to append is based upon the axis that we are working on. + * - If head happens to be on 0, then we must consider the tail position as well to decide + * which side the bone is on + * -> If tail is 0, then it's bone is considered to be on axis, so no extension should be added + * -> Otherwise, extension is added from perspective of object based on which side tail goes to + * - If head is non-zero, extension is added from perspective of object based on side head is on */ if (axis == 2) { /* z-axis - vertical (top/bottom) */ @@ -350,8 +350,8 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a } /* Simple name truncation - * - truncate if there is an extension and it wouldn't be able to fit - * - otherwise, just append to end + * - truncate if there is an extension and it wouldn't be able to fit + * - otherwise, just append to end */ if (extension[0]) { bool changed = true; @@ -2314,8 +2314,8 @@ void BKE_pose_where_is(Scene *scene, Object *ob) BIK_initialize_tree(scene, ob, ctime); /* 2b. construct the Spline IK trees - * - this is not integrated as an IK plugin, since it should be able - * to function in conjunction with standard IK + * - this is not integrated as an IK plugin, since it should be able + * to function in conjunction with standard IK */ BKE_pose_splineik_init_tree(scene, ob, ctime); diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index cb4237f51b4..241a842d73f 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -160,7 +160,7 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos */ for (i = 0; i < segcount; i++) { /* 'head' joints, traveling towards the root of the chain - * - 2 methods; the one chosen depends on whether we've got usable lengths + * - 2 methods; the one chosen depends on whether we've got usable lengths */ if ((ikData->flag & CONSTRAINT_SPLINEIK_EVENSPLITS) || (totLength == 0.0f)) { /* 1) equi-spaced joints */ @@ -363,7 +363,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o rangle *= tree->con->enforce; /* construct rotation matrix from the axis-angle rotation found above - * - this call takes care to make sure that the axis provided is a unit vector first + * - this call takes care to make sure that the axis provided is a unit vector first */ axis_angle_to_mat3(dmat, raxis, rangle); @@ -486,8 +486,8 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o } else if (tree->con->enforce < 1.0f) { /* when the influence is too low - * - blend the positions for the 'root' bone - * - stick to the parent for any other + * - blend the positions for the 'root' bone + * - stick to the parent for any other */ if (pchan->parent) { copy_v3_v3(poseHead, pchan->pose_head); @@ -604,8 +604,8 @@ void BKE_pose_eval_init_ik(EvaluationContext *UNUSED(eval_ctx), /* construct the IK tree (standard IK) */ BIK_initialize_tree(scene, ob, ctime); /* construct the Spline IK trees - * - this is not integrated as an IK plugin, since it should be able - * to function in conjunction with standard IK + * - this is not integrated as an IK plugin, since it should be able + * to function in conjunction with standard IK */ BKE_pose_splineik_init_tree(scene, ob, ctime); } diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index 10f7a3b9457..810056f8fc7 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -1282,8 +1282,8 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa) /* integrate new location & velocity */ - /* by regarding the acceleration as a force at this stage we*/ - /* can get better control although it's a bit unphysical */ + /* by regarding the acceleration as a force at this stage we + * can get better control although it's a bit unphysical */ mul_v3_fl(acc, 1.0f/pa_mass); copy_v3_v3(dvec, acc); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 22fdcb9ea1f..88d4766048f 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -1439,13 +1439,13 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) } } else { - /* bending springs for hair strands */ - /* The current algorithm only goes through the edges in order of the mesh edges list */ - /* and makes springs between the outer vert of edges sharing a vertice. This works just */ - /* fine for hair, but not for user generated string meshes. This could/should be later */ - /* extended to work with non-ordered edges so that it can be used for general "rope */ - /* dynamics" without the need for the vertices or edges to be ordered through the length*/ - /* of the strands. -jahka */ + /* bending springs for hair strands + * The current algorithm only goes through the edges in order of the mesh edges list + * and makes springs between the outer vert of edges sharing a vertice. This works just + * fine for hair, but not for user generated string meshes. This could/should be later + * extended to work with non-ordered edges so that it can be used for general "rope + * dynamics" without the need for the vertices or edges to be ordered through the length + * of the strands. -jahka */ search = cloth->springs; search2 = search->next; while (search && search2) { diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 1df749ee842..84490ba3ee2 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -1062,9 +1062,11 @@ BLI_INLINE bool cloth_point_face_collision_params(const float p1[3], const float *r_lambda = f * dot_v3v3(edge2, q); /* don't care about 0..1 lambda range here */ - /*if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f)) - * return 0; - */ +#if 0 + if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f)) { + return 0; + } +#endif r_w[0] = 1.0f - u - v; r_w[1] = u; diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 2f3a18cd163..66147c44352 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -452,10 +452,10 @@ static void contarget_get_mesh_mat(Object *ob, const char *substring, float mat[ /* derive the rotation from the average normal: - * - code taken from transform_manipulator.c, - * calc_manipulator_stats, V3D_MANIP_NORMAL case + * - code taken from transform_manipulator.c, + * calc_manipulator_stats, V3D_MANIP_NORMAL case */ - /* we need the transpose of the inverse for a normal... */ + /* we need the transpose of the inverse for a normal... */ copy_m3_m4(imat, ob->obmat); invert_m3_m3(tmat, imat); @@ -543,7 +543,7 @@ static void contarget_get_lattice_mat(Object *ob, const char *substring, float m /* The cases where the target can be object data have not been implemented */ static void constraint_target_to_mat4(Object *ob, const char *substring, float mat[4][4], short from, short to, short flag, float headtail) { - /* Case OBJECT */ + /* Case OBJECT */ if (substring[0] == '\0') { copy_m4_m4(mat, ob->obmat); BKE_constraint_mat_convertspace(ob, NULL, mat, from, to, false); @@ -555,7 +555,7 @@ static void constraint_target_to_mat4(Object *ob, const char *substring, float m * 'average' vertex normal, and deriving the rotation from that. * * NOTE: EditMode is not currently supported, and will most likely remain that - * way as constraints can only really affect things on object/bone level. + * way as constraints can only really affect things on object/bone level. */ else if (ob->type == OB_MESH) { contarget_get_mesh_mat(ob, substring, mat); @@ -565,7 +565,7 @@ static void constraint_target_to_mat4(Object *ob, const char *substring, float m contarget_get_lattice_mat(ob, substring, mat); BKE_constraint_mat_convertspace(ob, NULL, mat, from, to, false); } - /* Case BONE */ + /* Case BONE */ else { bPoseChannel *pchan; @@ -659,15 +659,15 @@ static void constraint_target_to_mat4(Object *ob, const char *substring, float m */ /* Template for type-info data: - * - make a copy of this when creating new constraints, and just change the functions - * pointed to as necessary - * - although the naming of functions doesn't matter, it would help for code - * readability, to follow the same naming convention as is presented here - * - any functions that a constraint doesn't need to define, don't define - * for such cases, just use NULL - * - these should be defined after all the functions have been defined, so that - * forward-definitions/prototypes don't need to be used! - * - keep this copy #if-def'd so that future constraints can get based off this + * - make a copy of this when creating new constraints, and just change the functions + * pointed to as necessary + * - although the naming of functions doesn't matter, it would help for code + * readability, to follow the same naming convention as is presented here + * - any functions that a constraint doesn't need to define, don't define + * for such cases, just use NULL + * - these should be defined after all the functions have been defined, so that + * forward-definitions/prototypes don't need to be used! + * - keep this copy #if-def'd so that future constraints can get based off this */ #if 0 static bConstraintTypeInfo CTI_CONSTRNAME = { @@ -1257,7 +1257,7 @@ static void followpath_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra unit_m4(ct->matrix); /* note: when creating constraints that follow path, the curve gets the CU_PATH set now, - * currently for paths to work it needs to go through the bevlist/displist system (ton) + * currently for paths to work it needs to go through the bevlist/displist system (ton) */ #ifdef CYCLIC_DEPENDENCY_WORKAROUND @@ -2163,9 +2163,9 @@ static void actcon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintT /* determine where in transform range target is */ /* data->type is mapped as follows for backwards compatibility: - * 00,01,02 - rotation (it used to be like this) - * 10,11,12 - scaling - * 20,21,22 - location + * 00,01,02 - rotation (it used to be like this) + * 10,11,12 - scaling + * 20,21,22 - location */ if (data->type < 10) { /* extract rotation (is in whatever space target should be in) */ @@ -2209,7 +2209,7 @@ static void actcon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintT bPoseChannel *pchan, *tchan; /* make a copy of the bone of interest in the temp pose before evaluating action, so that it can get set - * - we need to manually copy over a few settings, including rotation order, otherwise this fails + * - we need to manually copy over a few settings, including rotation order, otherwise this fails */ pchan = cob->pchan; @@ -2764,12 +2764,14 @@ static void stretchto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t normalize_v3_v3(zz, cob->matrix[2]); /* XXX That makes the constraint buggy with asymmetrically scaled objects, see #29940. */ -/* sub_v3_v3v3(vec, cob->matrix[3], ct->matrix[3]);*/ -/* vec[0] /= size[0];*/ -/* vec[1] /= size[1];*/ -/* vec[2] /= size[2];*/ +#if 0 + sub_v3_v3v3(vec, cob->matrix[3], ct->matrix[3]); + vec[0] /= size[0]; + vec[1] /= size[1]; + vec[2] /= size[2]; -/* dist = normalize_v3(vec);*/ + dist = normalize_v3(vec); +#endif dist = len_v3v3(cob->matrix[3], ct->matrix[3]); /* Only Y constrained object axis scale should be used, to keep same length when scaling it. */ @@ -3678,9 +3680,9 @@ static void damptrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t float rmat[3][3], tmat[4][4]; /* find the (unit) direction that the axis we're interested in currently points - * - mul_mat3_m4_v3() only takes the 3x3 (rotation+scaling) components of the 4x4 matrix - * - the normalization step at the end should take care of any unwanted scaling - * left over in the 3x3 matrix we used + * - mul_mat3_m4_v3() only takes the 3x3 (rotation+scaling) components of the 4x4 matrix + * - the normalization step at the end should take care of any unwanted scaling + * left over in the 3x3 matrix we used */ copy_v3_v3(obvec, track_dir_vecs[data->trackflag]); mul_mat3_m4_v3(cob->matrix, obvec); @@ -3703,11 +3705,11 @@ static void damptrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t /* determine the axis-angle rotation, which represents the smallest possible rotation * between the two rotation vectors (i.e. the 'damping' referred to in the name) - * - we take this to be the rotation around the normal axis/vector to the plane defined - * by the current and destination vectors, which will 'map' the current axis to the - * destination vector - * - the min/max wrappers around (obvec . tarvec) result (stored temporarily in rangle) - * are used to ensure that the smallest angle is chosen + * - we take this to be the rotation around the normal axis/vector to the plane defined + * by the current and destination vectors, which will 'map' the current axis to the + * destination vector + * - the min/max wrappers around (obvec . tarvec) result (stored temporarily in rangle) + * are used to ensure that the smallest angle is chosen */ cross_v3_v3v3_hi_prec(raxis, obvec, tarvec); @@ -3715,15 +3717,15 @@ static void damptrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t rangle = acosf(max_ff(-1.0f, min_ff(1.0f, rangle))); /* construct rotation matrix from the axis-angle rotation found above - * - this call takes care to make sure that the axis provided is a unit vector first + * - this call takes care to make sure that the axis provided is a unit vector first */ float norm = normalize_v3(raxis); if (norm < FLT_EPSILON) { /* if dot product is nonzero, while cross is zero, we have two opposite vectors! - * - this is an ambiguity in the math that needs to be resolved arbitrarily, - * or there will be a case where damped track strangely does nothing - * - to do that, rotate around a different local axis + * - this is an ambiguity in the math that needs to be resolved arbitrarily, + * or there will be a case where damped track strangely does nothing + * - to do that, rotate around a different local axis */ float tmpvec[3]; @@ -4970,13 +4972,13 @@ void BKE_constraint_targets_for_solving_get(bConstraint *con, bConstraintOb *cob bConstraintTarget *ct; /* get targets - * - constraints should use ct->matrix, not directly accessing values - * - ct->matrix members have not yet been calculated here! + * - constraints should use ct->matrix, not directly accessing values + * - ct->matrix members have not yet been calculated here! */ cti->get_constraint_targets(con, targets); /* set matrices - * - calculate if possible, otherwise just initialize as identity matrix + * - calculate if possible, otherwise just initialize as identity matrix */ if (cti->get_target_matrix) { for (ct = targets->first; ct; ct = ct->next) @@ -5021,7 +5023,7 @@ void BKE_constraints_solve(ListBase *conlist, bConstraintOb *cob, float ctime) if (con->enforce == 0.0f) continue; /* influence of constraint - * - value should have been set from animation data already + * - value should have been set from animation data already */ enf = con->enforce; @@ -5038,8 +5040,8 @@ void BKE_constraints_solve(ListBase *conlist, bConstraintOb *cob, float ctime) cti->evaluate_constraint(con, cob, &targets); /* clear targets after use - * - this should free temp targets but no data should be copied back - * as constraints may have done some nasty things to it... + * - this should free temp targets but no data should be copied back + * as constraints may have done some nasty things to it... */ if (cti->flush_constraint_targets) { cti->flush_constraint_targets(con, &targets, 1); @@ -5050,9 +5052,9 @@ void BKE_constraints_solve(ListBase *conlist, bConstraintOb *cob, float ctime) BKE_constraint_mat_convertspace(cob->ob, cob->pchan, cob->matrix, con->ownspace, CONSTRAINT_SPACE_WORLD, false); /* Interpolate the enforcement, to blend result of constraint into final owner transform - * - all this happens in worldspace to prevent any weirdness creeping in ([#26014] and [#25725]), - * since some constraints may not convert the solution back to the input space before blending - * but all are guaranteed to end up in good "worldspace" result + * - all this happens in worldspace to prevent any weirdness creeping in ([#26014] and [#25725]), + * since some constraints may not convert the solution back to the input space before blending + * but all are guaranteed to end up in good "worldspace" result */ /* Note: all kind of stuff here before (caused trouble), much easier to just interpolate, * or did I miss something? -jahka (r.32105) */ diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 661c802d64e..e129251157e 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -75,11 +75,11 @@ #include "BKE_pointcache.h" #include "BKE_scene.h" -/* for image output */ +/* for image output */ #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" -/* to read material/texture color */ +/* to read material/texture color */ #include "RE_render_ext.h" #include "RE_shader_ext.h" @@ -90,7 +90,7 @@ //# pragma GCC diagnostic ignored "-Wdouble-promotion" #endif -/* precalculated gaussian factors for 5x super sampling */ +/* precalculated gaussian factors for 5x super sampling */ static const float gaussianFactors[5] = { 0.996849f, 0.596145f, @@ -169,7 +169,7 @@ typedef struct BakeAdjPoint { float dist; /* distance to */ } BakeAdjPoint; -/* Surface data used while processing a frame */ +/* Surface data used while processing a frame */ typedef struct PaintBakeNormal { float invNorm[3]; /* current pixel world-space inverted normal */ float normal_scale; /* normal directional scale for displace mapping */ @@ -201,7 +201,7 @@ typedef struct PaintBakeData { int clear; /* flag to check if surface was cleared/reset -> have to redo velocity etc. */ } PaintBakeData; -/* UV Image sequence format point */ +/* UV Image sequence format point */ typedef struct PaintUVPoint { /* Pixel / mesh data */ unsigned int tri_index, pixel_index; /* tri index on domain derived mesh */ @@ -1132,7 +1132,7 @@ bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, str if (!brush->paint_ramp) return false; ramp = brush->paint_ramp->data; - /* Add default smooth-falloff ramp. */ + /* Add default smooth-falloff ramp. */ ramp[0].r = ramp[0].g = ramp[0].b = ramp[0].a = 1.0f; ramp[0].pos = 0.0f; ramp[1].r = ramp[1].g = ramp[1].b = ramp[1].pos = 1.0f; @@ -1163,14 +1163,14 @@ bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, str void dynamicPaint_Modifier_copy(const struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tpmd) { - /* Init modifier */ + /* Init modifier */ tpmd->type = pmd->type; if (pmd->canvas) dynamicPaint_createType(tpmd, MOD_DYNAMICPAINT_TYPE_CANVAS, NULL); if (pmd->brush) dynamicPaint_createType(tpmd, MOD_DYNAMICPAINT_TYPE_BRUSH, NULL); - /* Copy data */ + /* Copy data */ if (tpmd->canvas) { DynamicPaintSurface *surface; tpmd->canvas->pmd = tpmd; @@ -1880,7 +1880,7 @@ static void dynamic_paint_apply_surface_wave_cb( } /* - * Apply canvas data to the object derived mesh + * Apply canvas data to the object derived mesh */ static DerivedMesh *dynamicPaint_Modifier_apply( DynamicPaintModifierData *pmd, Object *ob, DerivedMesh *dm) @@ -2070,7 +2070,7 @@ static void canvas_copyDerivedMesh(DynamicPaintCanvasSettings *canvas, DerivedMe } /* - * Updates derived mesh copy and processes dynamic paint step / caches. + * Updates derived mesh copy and processes dynamic paint step / caches. */ static void dynamicPaint_frameUpdate( Main *bmain, EvaluationContext *eval_ctx, DynamicPaintModifierData *pmd, Scene *scene, Object *ob, DerivedMesh *dm) @@ -2182,7 +2182,7 @@ DerivedMesh *dynamicPaint_Modifier_do(Main *bmain, /***************************** Image Sequence / UV Image Surface Calls ******************************/ /* - * Create a surface for uv image sequence format + * Create a surface for uv image sequence format */ #define JITTER_SAMPLES { \ 0.0f, 0.0f, \ @@ -2240,7 +2240,7 @@ static void dynamic_paint_create_uv_surface_direct_cb( tPoint->neighbour_pixel = -1; tPoint->pixel_index = index; - /* Actual pixel center, used when collision is found */ + /* Actual pixel center, used when collision is found */ point[0][0] = ((float)tx + 0.5f) / w; point[0][1] = ((float)ty + 0.5f) / h; @@ -2261,12 +2261,12 @@ static void dynamic_paint_create_uv_surface_direct_cb( point[4][1] = ((float)ty + 1) / h; - /* Loop through samples, starting from middle point */ + /* Loop through samples, starting from middle point */ for (int sample = 0; sample < 5; sample++) { - /* Loop through every face in the mesh */ + /* Loop through every face in the mesh */ /* XXX TODO This is *horrible* with big meshes, should use a 2D BVHTree over UV tris here! */ for (int i = 0; i < tottri; i++) { - /* Check uv bb */ + /* Check uv bb */ if ((faceBB[i].min[0] > point[sample][0]) || (faceBB[i].min[1] > point[sample][1]) || (faceBB[i].max[0] < point[sample][0]) || @@ -2283,7 +2283,7 @@ static void dynamic_paint_create_uv_surface_direct_cb( if (isect_point_tri_v2(point[sample], uv1, uv2, uv3) != 0) { float uv[2]; - /* Add b-weights per anti-aliasing sample */ + /* Add b-weights per anti-aliasing sample */ for (int j = 0; j < aa_samples; j++) { uv[0] = point[0][0] + jitter5sample[j * 2] / w; uv[1] = point[0][1] + jitter5sample[j * 2 + 1] / h; @@ -2291,10 +2291,10 @@ static void dynamic_paint_create_uv_surface_direct_cb( barycentric_weights_v2(uv1, uv2, uv3, uv, tempWeights[index * aa_samples + j].v); } - /* Set surface point face values */ + /* Set surface point face values */ tPoint->tri_index = i; - /* save vertex indexes */ + /* save vertex indexes */ tPoint->v1 = mloop[mlooptri[i].tri[0]].v; tPoint->v2 = mloop[mlooptri[i].tri[1]].v; tPoint->v3 = mloop[mlooptri[i].tri[2]].v; @@ -2333,11 +2333,11 @@ static void dynamic_paint_create_uv_surface_neighbor_cb( const int index = tx + w * ty; PaintUVPoint *tPoint = &tempPoints[index]; - /* If point isn't on canvas mesh */ + /* If point isn't on canvas mesh */ if (tPoint->tri_index == -1) { float point[2]; - /* get loop area */ + /* get loop area */ const int u_min = (tx > 0) ? -1 : 0; const int u_max = (tx < (w - 1)) ? 1 : 0; const int v_min = (ty > 0) ? -1 : 0; @@ -2352,7 +2352,7 @@ static void dynamic_paint_create_uv_surface_neighbor_cb( int v = neighStraightY[ni]; if (u >= u_min && u <= u_max && v >= v_min && v <= v_max) { - /* if not this pixel itself */ + /* if not this pixel itself */ if (u != 0 || v != 0) { const int ind = (tx + u) + w * (ty + v); @@ -2377,14 +2377,14 @@ static void dynamic_paint_create_uv_surface_neighbor_cb( tPoint->tri_index = i; /* Now calculate pixel data for this pixel as it was on polygon surface */ - /* Add b-weights per anti-aliasing sample */ + /* Add b-weights per anti-aliasing sample */ for (int j = 0; j < aa_samples; j++) { uv[0] = point[0] + jitter5sample[j * 2] / w; uv[1] = point[1] + jitter5sample[j * 2 + 1] / h; barycentric_weights_v2(uv1, uv2, uv3, uv, tempWeights[index * aa_samples + j].v); } - /* save vertex indexes */ + /* save vertex indexes */ tPoint->v1 = mloop[mlooptri[i].tri[0]].v; tPoint->v2 = mloop[mlooptri[i].tri[1]].v; tPoint->v3 = mloop[mlooptri[i].tri[2]].v; @@ -2609,8 +2609,8 @@ static void dynamic_paint_find_island_border( continue; /* - * Find a point that is relatively at same edge position - * on this other face UV + * Find a point that is relatively at same edge position + * on this other face UV */ float closest_point[2], dir_vec[2], tgt_pixel[2]; @@ -2624,7 +2624,7 @@ static void dynamic_paint_find_island_border( int final_pixel[2] = { (int)floorf(tgt_pixel[0] * w), (int)floorf(tgt_pixel[1] * h) }; - /* If current pixel uv is outside of texture */ + /* If current pixel uv is outside of texture */ if (final_pixel[0] < 0 || final_pixel[0] >= w || final_pixel[1] < 0 || final_pixel[1] >= h) { if (bdata->best_index == NOT_FOUND) bdata->best_index = OUT_OF_TEXTURE; @@ -2635,7 +2635,7 @@ static void dynamic_paint_find_island_border( const PaintUVPoint *tempPoints = data->tempPoints; int final_index = final_pixel[0] + w * final_pixel[1]; - /* If we ended up to our origin point ( mesh has smaller than pixel sized faces) */ + /* If we ended up to our origin point ( mesh has smaller than pixel sized faces) */ if (final_index == (px + w * py)) continue; @@ -2648,7 +2648,7 @@ static void dynamic_paint_find_island_border( continue; } - /* If found pixel still lies on wrong face ( mesh has smaller than pixel sized faces) */ + /* If found pixel still lies on wrong face ( mesh has smaller than pixel sized faces) */ if (tempPoints[final_index].tri_index != target_tri) { /* Check if it's close enough to likely touch the intended triangle. Any triangle * becomes thinner than a pixel at its vertices, so robustness requires some margin. */ @@ -2768,7 +2768,7 @@ static bool dynamicPaint_symmetrizeAdjData(PaintAdjData *ed, int active_points) int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, float *progress, short *do_update) { - /* Antialias jitter point relative coords */ + /* Antialias jitter point relative coords */ const int aa_samples = (surface->flags & MOD_DPAINT_ANTIALIAS) ? 5 : 1; char uvname[MAX_CUSTOMDATA_LAYER_NAME]; uint32_t active_points = 0; @@ -2805,7 +2805,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo mloopuv = CustomData_get_layer_named(&dm->loopData, CD_MLOOPUV, uvname); } - /* Check for validity */ + /* Check for validity */ if (!mloopuv) return setError(canvas, N_("No UV data on canvas")); if (surface->image_resolution < 16 || surface->image_resolution > 8192) @@ -2815,7 +2815,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo const int h = w; /* - * Start generating the surface + * Start generating the surface */ printf("DynamicPaint: Preparing UV surface of %ix%i pixels and %i tris.\n", w, h, tottri); @@ -2839,8 +2839,8 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo error = true; /* - * Generate a temporary bounding box array for UV faces to optimize - * the pixel-inside-a-face search. + * Generate a temporary bounding box array for UV faces to optimize + * the pixel-inside-a-face search. */ if (!error) { faceBB = MEM_mallocN(tottri * sizeof(*faceBB), "MPCanvasFaceBB"); @@ -2884,10 +2884,10 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo *do_update = true; /* - * Now loop through every pixel that was left without index - * and find if they have neighboring pixels that have an index. - * If so use that polygon as pixel surface. - * (To avoid seams on uv island edges) + * Now loop through every pixel that was left without index + * and find if they have neighboring pixels that have an index. + * If so use that polygon as pixel surface. + * (To avoid seams on uv island edges) */ data.active_points = &active_points; { @@ -2903,7 +2903,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo *progress = 0.06f; *do_update = true; - /* Generate surface adjacency data. */ + /* Generate surface adjacency data. */ { int cursor = 0; @@ -2987,9 +2987,9 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo } #if 0 - /* ----------------------------------------------------------------- - * For debug, write a dump of adjacency data to a file. - * -----------------------------------------------------------------*/ + /* ----------------------------------------------------------------- + * For debug, write a dump of adjacency data to a file. + * -----------------------------------------------------------------*/ FILE *dump_file = fopen("dynpaint-adj-data.txt", "w"); int *tmp = MEM_callocN(sizeof(int) * active_points, "tmp"); for (int ty = 0; ty < h; ty++) { @@ -3080,20 +3080,20 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo dynamicPaint_allocateSurfaceType(surface); #if 0 - /* ----------------------------------------------------------------- - * For debug, output pixel statuses to the color map - * -----------------------------------------------------------------*/ + /* ----------------------------------------------------------------- + * For debug, output pixel statuses to the color map + * -----------------------------------------------------------------*/ for (index = 0; index < sData->total_points; index++) { ImgSeqFormatData *f_data = (ImgSeqFormatData *)sData->format_data; PaintUVPoint *uvPoint = &((PaintUVPoint *)f_data->uv_p)[index]; PaintPoint *pPoint = &((PaintPoint *)sData->type_data)[index]; pPoint->alpha = 1.0f; - /* Every pixel that is assigned as "edge pixel" gets blue color */ + /* Every pixel that is assigned as "edge pixel" gets blue color */ if (uvPoint->neighbour_pixel != -1) pPoint->color[2] = 1.0f; - /* and every pixel that finally got an polygon gets red color */ - /* green color shows pixel face index hash */ + /* and every pixel that finally got an polygon gets red color */ + /* green color shows pixel face index hash */ if (uvPoint->tri_index != -1) { pPoint->color[0] = 1.0f; pPoint->color[1] = (float)(uvPoint->tri_index % 255) / 256.0f; @@ -3111,7 +3111,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo } /* - * Outputs an image file from uv surface data. + * Outputs an image file from uv surface data. */ typedef struct DynamicPaintOutputSurfaceImageData { const DynamicPaintSurface *surface; @@ -3135,7 +3135,7 @@ static void dynamic_paint_output_surface_image_paint_cb( /* blend wet and dry layers */ blendColors(point->color, point->color[3], point->e_color, point->e_color[3], &ibuf->rect_float[pos]); - /* Multiply color by alpha if enabled */ + /* Multiply color by alpha if enabled */ if (surface->flags & MOD_DPAINT_MULALPHA) { mul_v3_fl(&ibuf->rect_float[pos], ibuf->rect_float[pos + 3]); } @@ -3215,7 +3215,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam { ImBuf *ibuf = NULL; PaintSurfaceData *sData = surface->data; - /* OpenEXR or PNG */ + /* OpenEXR or PNG */ int format = (surface->image_fileformat & MOD_DPAINT_IMGFORMAT_OPENEXR) ? R_IMF_IMTYPE_OPENEXR : R_IMF_IMTYPE_PNG; char output_file[FILE_MAX]; @@ -3231,11 +3231,11 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam BLI_strncpy(output_file, filename, sizeof(output_file)); BKE_image_path_ensure_ext_from_imtype(output_file, format); - /* Validate output file path */ + /* Validate output file path */ BLI_path_abs(output_file, BKE_main_blendfile_path_from_global()); BLI_make_existing_file(output_file); - /* Init image buffer */ + /* Init image buffer */ ibuf = IMB_allocImBuf(surface->image_resolution, surface->image_resolution, 32, IB_rectfloat); if (ibuf == NULL) { setError(surface->canvas, N_("Image save failed: not enough free memory")); @@ -3396,7 +3396,7 @@ static void dynamicPaint_freeBrushMaterials(BrushMaterials *bMats) } /* - * Get material diffuse color and alpha (including linked textures) in given coordinates + * Get material diffuse color and alpha (including linked textures) in given coordinates */ static void dynamicPaint_doMaterialTex( const BrushMaterials *bMats, float color[3], float *alpha, Object *brushOb, @@ -3432,7 +3432,7 @@ static void dynamicPaint_doMaterialTex( /* A modified callback to bvh tree raycast. The tree must have been built using bvhtree_from_mesh_looptri. * userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree. * - * To optimize brush detection speed this doesn't calculate hit coordinates or normal. + * To optimize brush detection speed this doesn't calculate hit coordinates or normal. */ static void mesh_tris_spherecast_dp(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) { @@ -3505,7 +3505,7 @@ static void dynamicPaint_mixPaintColors( { PaintPoint *pPoint = &((PaintPoint *)surface->data->type_data)[index]; - /* Add paint */ + /* Add paint */ if (!(paintFlags & MOD_DPAINT_ERASE)) { float mix[4]; float temp_alpha = paintAlpha * ((paintFlags & MOD_DPAINT_ABS_ALPHA) ? 1.0f : timescale); @@ -3531,15 +3531,15 @@ static void dynamicPaint_mixPaintColors( pPoint->state = DPAINT_PAINT_NEW; } - /* Erase paint */ + /* Erase paint */ else { float a_ratio, a_highest; float wetness; float invFact = 1.0f - paintAlpha; /* - * Make highest alpha to match erased value - * but maintain alpha ratio + * Make highest alpha to match erased value + * but maintain alpha ratio */ if (paintFlags & MOD_DPAINT_ABS_ALPHA) { a_highest = max_ff(pPoint->color[3], pPoint->e_color[3]); @@ -3607,7 +3607,7 @@ static void dynamicPaint_mixWaveHeight( } /* - * add brush results to the surface data depending on surface type + * add brush results to the surface data depending on surface type */ static void dynamicPaint_updatePointData( const DynamicPaintSurface *surface, const int index, const DynamicPaintBrushSettings *brush, @@ -3874,7 +3874,7 @@ typedef struct DynamicPaintPaintData { } DynamicPaintPaintData; /* - * Paint a brush object mesh to the surface + * Paint a brush object mesh to the surface */ static void dynamic_paint_paint_mesh_cell_point_cb_ex( void *__restrict userdata, @@ -3921,7 +3921,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( if (samples > 1 && surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) total_sample = gaussianTotal; - /* Supersampling */ + /* Supersampling */ for (ss = 0; ss < samples; ss++) { float ray_start[3], ray_dir[3]; float sample_factor = 0.0f; @@ -3938,17 +3938,17 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( const bool inner_proximity = (brush->flags & MOD_DPAINT_INVERSE_PROX && brush->collision == MOD_DPAINT_COL_VOLDIST); - /* hit data */ + /* hit data */ float hitCoord[3]; int hitTri = -1; - /* Supersampling factor */ + /* Supersampling factor */ if (samples > 1 && surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) sample_factor = gaussianFactors[ss]; else sample_factor = 1.0f; - /* Get current sample position in world coordinates */ + /* Get current sample position in world coordinates */ copy_v3_v3(ray_start, bData->realCoord[bData->s_pos[index] + ss].v); copy_v3_v3(ray_dir, bData->bNormal[index].invNorm); @@ -3960,13 +3960,13 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( nearest.index = -1; nearest.dist_sq = brush_radius * brush_radius; /* find_nearest uses squared distance */ - /* Check volume collision */ + /* Check volume collision */ if (ELEM(brush->collision, MOD_DPAINT_COL_VOLUME, MOD_DPAINT_COL_VOLDIST)) { BLI_bvhtree_ray_cast(treeData->tree, ray_start, ray_dir, 0.0f, &hit, mesh_tris_spherecast_dp, treeData); if (hit.index != -1) { - /* We hit a triangle, now check if collision point normal is facing the point */ + /* We hit a triangle, now check if collision point normal is facing the point */ - /* For optimization sake, hit point normal isn't calculated in ray cast loop */ + /* For optimization sake, hit point normal isn't calculated in ray cast loop */ const int vtri[3] = { mloop[mlooptri[hit.index].tri[0]].v, mloop[mlooptri[hit.index].tri[1]].v, @@ -3977,8 +3977,8 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( normal_tri_v3(hit.no, mvert[vtri[0]].co, mvert[vtri[1]].co, mvert[vtri[2]].co); dot = dot_v3v3(ray_dir, hit.no); - /* If ray and hit face normal are facing same direction - * hit point is inside a closed mesh. */ + /* If ray and hit face normal are facing same direction + * hit point is inside a closed mesh. */ if (dot >= 0.0f) { const float dist = hit.dist; const int f_index = hit.index; @@ -3993,7 +3993,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( treeData->tree, ray_start, ray_dir, 0.0f, &hit, mesh_tris_spherecast_dp, treeData); if (hit.index != -1) { - /* Add factor on supersample filter */ + /* Add factor on supersample filter */ volume_factor = 1.0f; hit_found = HIT_VOLUME; @@ -4006,7 +4006,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( } } - /* Check proximity collision */ + /* Check proximity collision */ if (ELEM(brush->collision, MOD_DPAINT_COL_DIST, MOD_DPAINT_COL_VOLDIST) && (!hit_found || (brush->flags & MOD_DPAINT_INVERSE_PROX))) { @@ -4043,7 +4043,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( hit.index = -1; hit.dist = brush_radius; - /* Do a face normal directional raycast, and use that distance */ + /* Do a face normal directional raycast, and use that distance */ BLI_bvhtree_ray_cast( treeData->tree, ray_start, proj_ray, 0.0f, &hit, mesh_tris_spherecast_dp, treeData); if (hit.index != -1) { @@ -4053,7 +4053,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( } } - /* If a hit was found, calculate required values */ + /* If a hit was found, calculate required values */ if (proxDist >= 0.0f && proxDist <= brush_radius) { proximity_factor = proxDist / brush_radius; CLAMP(proximity_factor, 0.0f, 1.0f); @@ -4146,7 +4146,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( } /* - * Process hit color and alpha + * Process hit color and alpha */ if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) { float sampleColor[3]; @@ -4156,14 +4156,14 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( sampleColor[1] = brush->g; sampleColor[2] = brush->b; - /* Get material+textures color on hit point if required */ + /* Get material+textures color on hit point if required */ if (brush_usesMaterial(brush, scene)) { dynamicPaint_doMaterialTex(bMats, sampleColor, &alpha_factor, brushOb, bData->realCoord[bData->s_pos[index] + ss].v, hitCoord, hitTri, dm); } - /* Sample proximity colorband if required */ + /* Sample proximity colorband if required */ if ((hit_found == HIT_PROXIMITY) && (brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP)) { @@ -4187,16 +4187,16 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( } // end supersampling - /* if any sample was inside paint range */ + /* if any sample was inside paint range */ if (brushStrength > 0.0f || depth > 0.0f) { - /* apply supersampling results */ + /* apply supersampling results */ if (samples > 1) { brushStrength /= total_sample; } CLAMP(brushStrength, 0.0f, 1.0f); if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) { - /* Get final pixel color and alpha */ + /* Get final pixel color and alpha */ paintColor[0] /= numOfHits; paintColor[1] /= numOfHits; paintColor[2] /= numOfHits; @@ -4248,9 +4248,9 @@ static int dynamicPaint_paintMesh(Main *bmain, mloop = dm->getLoopArray(dm); numOfVerts = dm->getNumVerts(dm); - /* Transform collider vertices to global space - * (Faster than transforming per surface point - * coordinates and normals to object space) */ + /* Transform collider vertices to global space + * (Faster than transforming per surface point + * coordinates and normals to object space) */ for (ii = 0; ii < numOfVerts; ii++) { mul_m4_v3(brushOb->obmat, mvert[ii].co); boundInsert(&mesh_bb, mvert[ii].co); @@ -4276,7 +4276,7 @@ static int dynamicPaint_paintMesh(Main *bmain, /* check bounding box collision */ if (grid && meshBrush_boundsIntersect(&grid->grid_bounds, &mesh_bb, brush, brush_radius)) { - /* Build a bvh tree from transformed vertices */ + /* Build a bvh tree from transformed vertices */ if (bvhtree_from_mesh_get(&treeData, dm, BVHTREE_FROM_LOOPTRI, 4)) { int c_index; int total_cells = grid->dim[0] * grid->dim[1] * grid->dim[2]; @@ -4323,7 +4323,7 @@ static int dynamicPaint_paintMesh(Main *bmain, } /* - * Paint a particle system to the surface + * Paint a particle system to the surface */ static void dynamic_paint_paint_particle_cell_point_cb_ex( void *__restrict userdata, @@ -4358,14 +4358,14 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex( int part_index = -1; /* - * With predefined radius, there is no variation between particles. - * It's enough to just find the nearest one. + * With predefined radius, there is no variation between particles. + * It's enough to just find the nearest one. */ { KDTreeNearest nearest; float smooth_range, part_solidradius; - /* Find nearest particle and get distance to it */ + /* Find nearest particle and get distance to it */ BLI_kdtree_find_nearest(tree, bData->realCoord[bData->s_pos[index]].v, &nearest); /* if outside maximum range, no other particle can influence either */ if (nearest.dist > range) @@ -4381,9 +4381,9 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex( } radius = part_solidradius + smooth; if (nearest.dist < radius) { - /* distances inside solid radius has maximum influence -> dist = 0 */ + /* distances inside solid radius has maximum influence -> dist = 0 */ smooth_range = max_ff(0.0f, (nearest.dist - part_solidradius)); - /* do smoothness if enabled */ + /* do smoothness if enabled */ if (smooth) smooth_range /= smooth; @@ -4392,11 +4392,11 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex( part_index = nearest.index; } } - /* If using random per particle radius and closest particle didn't give max influence */ + /* If using random per particle radius and closest particle didn't give max influence */ if (brush->flags & MOD_DPAINT_PART_RAD && strength < 1.0f && psys->part->randsize > 0.0f) { /* - * If we use per particle radius, we have to sample all particles - * within max radius range + * If we use per particle radius, we have to sample all particles + * within max radius range */ KDTreeNearest *nearest; @@ -4444,13 +4444,13 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex( radius = rad; } - /* do smoothness if enabled */ + /* do smoothness if enabled */ CLAMP_MIN(smooth_range, 0.0f); if (smooth) smooth_range /= smooth; const float str = 1.0f - smooth_range; - /* if influence is greater, use this one */ + /* if influence is greater, use this one */ if (str > strength) strength = str; } @@ -4485,7 +4485,7 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex( copy_v3_v3(paintColor, &brush->r); } else if (ELEM(surface->type, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_WAVE)) { - /* get displace depth */ + /* get displace depth */ disp_intersect = (1.0f - sqrtf(disp_intersect / radius)) * radius; depth = max_ff(0.0f, (radius - disp_intersect) / bData->bNormal[index].normal_scale); } @@ -4521,14 +4521,14 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, return 1; /* - * Build a kd-tree to optimize distance search + * Build a kd-tree to optimize distance search */ tree = BLI_kdtree_new(psys->totpart); /* loop through particles and insert valid ones to the tree */ p = 0; for (ParticleData *pa = psys->particles; p < psys->totpart; p++, pa++) { - /* Proceed only if particle is active */ + /* Proceed only if particle is active */ if ((pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN) == 0) || (pa->alive == PARS_DEAD && (part->flag & PART_DIED) == 0) || (pa->flag & PARS_UNEXIST)) @@ -4536,8 +4536,8 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, continue; } - /* for debug purposes check if any NAN particle proceeds - * For some reason they get past activity check, this should rule most of them out */ + /* for debug purposes check if any NAN particle proceeds + * For some reason they get past activity check, this should rule most of them out */ if (isnan(pa->state.co[0]) || isnan(pa->state.co[1]) || isnan(pa->state.co[2])) { invalidParticles++; continue; @@ -4557,7 +4557,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, if (invalidParticles) printf("Warning: Invalid particle(s) found!\n"); - /* If no suitable particles were found, exit */ + /* If no suitable particles were found, exit */ if (particlesAdded < 1) { BLI_kdtree_free(tree); return 1; @@ -4571,7 +4571,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, int c_index; int total_cells = grid->dim[0] * grid->dim[1] * grid->dim[2]; - /* balance tree */ + /* balance tree */ BLI_kdtree_balance(tree); /* loop through space partitioning grid */ @@ -4637,7 +4637,7 @@ static void dynamic_paint_paint_single_point_cb_ex( if (distance > brush_radius) return; - /* Smooth range or color ramp */ + /* Smooth range or color ramp */ if (brush->proximity_falloff == MOD_DPAINT_PRFALL_SMOOTH || brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP) { @@ -4709,7 +4709,7 @@ static void dynamic_paint_paint_single_point_cb_ex( } } else if (ELEM(surface->type, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_WAVE)) { - /* get displace depth */ + /* get displace depth */ const float disp_intersect = (1.0f - sqrtf((brush_radius - distance) / brush_radius)) * brush_radius; depth = max_ff(0.0f, (brush_radius - disp_intersect) / bData->bNormal[index].normal_scale); } @@ -4731,7 +4731,7 @@ static int dynamicPaint_paintSinglePoint( const MVert *mvert = brush->dm->getVertArray(brush->dm); /* - * Loop through every surface point + * Loop through every surface point */ DynamicPaintPaintData data = { .surface = surface, @@ -4756,7 +4756,7 @@ static int dynamicPaint_paintSinglePoint( /***************************** Dynamic Paint Step / Baking ******************************/ /* - * Calculate current frame distances and directions for adjacency data + * Calculate current frame distances and directions for adjacency data */ static void dynamic_paint_prepare_adjacency_cb( @@ -4991,8 +4991,8 @@ typedef struct DynamicPaintEffectData { } DynamicPaintEffectData; /* - * Prepare data required by effects for current frame. - * Returns number of steps required + * Prepare data required by effects for current frame. + * Returns number of steps required */ static void dynamic_paint_prepare_effect_cb( void *__restrict userdata, @@ -5105,7 +5105,7 @@ static int dynamicPaint_prepareEffectStep( } /** - * Processes active effect step. + * Processes active effect step. */ static void dynamic_paint_effect_spread_cb( void *__restrict userdata, @@ -5129,7 +5129,7 @@ static void dynamic_paint_effect_spread_cb( const int *n_index = sData->adj_data->n_index; const int *n_target = sData->adj_data->n_target; - /* Loop through neighboring points */ + /* Loop through neighboring points */ for (int i = 0; i < numOfNeighs; i++) { const int n_idx = n_index[index] + i; float w_factor; @@ -5178,7 +5178,7 @@ static void dynamic_paint_effect_shrink_cb( const int *n_index = sData->adj_data->n_index; const int *n_target = sData->adj_data->n_target; - /* Loop through neighboring points */ + /* Loop through neighboring points */ for (int i = 0; i < numOfNeighs; i++) { const int n_idx = n_index[index] + i; const float speed_scale = (bNeighs[n_idx].dist < eff_scale) ? 1.0f : eff_scale / bNeighs[n_idx].dist; @@ -5333,12 +5333,12 @@ static void dynamicPaint_doEffectStep( return; /* - * Spread Effect + * Spread Effect */ if (surface->effect & MOD_DPAINT_EFFECT_DO_SPREAD) { const float eff_scale = distance_scale * EFF_MOVEMENT_PER_FRAME * surface->spread_speed * timescale; - /* Copy current surface to the previous points array to read unmodified values */ + /* Copy current surface to the previous points array to read unmodified values */ memcpy(prevPoint, sData->type_data, sData->total_points * sizeof(struct PaintPoint)); DynamicPaintEffectData data = { @@ -5354,12 +5354,12 @@ static void dynamicPaint_doEffectStep( } /* - * Shrink Effect + * Shrink Effect */ if (surface->effect & MOD_DPAINT_EFFECT_DO_SHRINK) { const float eff_scale = distance_scale * EFF_MOVEMENT_PER_FRAME * surface->shrink_speed * timescale; - /* Copy current surface to the previous points array to read unmodified values */ + /* Copy current surface to the previous points array to read unmodified values */ memcpy(prevPoint, sData->type_data, sData->total_points * sizeof(struct PaintPoint)); DynamicPaintEffectData data = { @@ -5375,7 +5375,7 @@ static void dynamicPaint_doEffectStep( } /* - * Drip Effect + * Drip Effect */ if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP && force) { const float eff_scale = distance_scale * EFF_MOVEMENT_PER_FRAME * timescale / 2.0f; @@ -5384,7 +5384,7 @@ static void dynamicPaint_doEffectStep( const size_t point_locks_size = (sData->total_points / 8) + 1; uint8_t *point_locks = MEM_callocN(sizeof(*point_locks) * point_locks_size, __func__); - /* Copy current surface to the previous points array to read unmodified values */ + /* Copy current surface to the previous points array to read unmodified values */ memcpy(prevPoint, sData->type_data, sData->total_points * sizeof(struct PaintPoint)); DynamicPaintEffectData data = { @@ -5685,7 +5685,7 @@ static void dynamic_paint_surface_pre_step_cb( dry_ratio = pPoint->wetness / p_wetness; /* - * Slowly "shift" paint from wet layer to dry layer as it drys: + * Slowly "shift" paint from wet layer to dry layer as it drys: */ /* make sure alpha values are within proper range */ CLAMP(pPoint->color[3], 0.0f, 1.0f); @@ -5810,7 +5810,7 @@ static void dynamic_paint_generate_bake_data_cb( } /* - * Calculate current 3D-position and normal of each surface point + * Calculate current 3D-position and normal of each surface point */ if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) { float n1[3], n2[3], n3[3]; @@ -5829,7 +5829,7 @@ static void dynamic_paint_generate_bake_data_cb( f_data->barycentricWeights[index * bData->s_num[index] + ss].v); } - /* Calculate current pixel surface normal */ + /* Calculate current pixel surface normal */ normal_short_to_float_v3(n1, mvert[tPoint->v1].no); normal_short_to_float_v3(n2, mvert[tPoint->v2].no); normal_short_to_float_v3(n3, mvert[tPoint->v3].no); @@ -5972,7 +5972,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const Sce } /* - * Make a transformed copy of canvas derived mesh vertices to avoid recalculation. + * Make a transformed copy of canvas derived mesh vertices to avoid recalculation. */ bData->mesh_bounds.valid = false; for (index = 0; index < canvasNumOfVerts; index++) { @@ -5982,7 +5982,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const Sce } /* - * Prepare each surface point for a new step + * Prepare each surface point for a new step */ DynamicPaintGenerateBakeData data = { .surface = surface, .ob = ob, @@ -6079,11 +6079,11 @@ static int dynamicPaint_doStep( continue; } - /* check if target has an active dp modifier */ + /* check if target has an active dp modifier */ md = modifiers_findByType(brushObj, eModifierType_DynamicPaint); if (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)) { DynamicPaintModifierData *pmd2 = (DynamicPaintModifierData *)md; - /* make sure we're dealing with a brush */ + /* make sure we're dealing with a brush */ if (pmd2->brush) { DynamicPaintBrushSettings *brush = pmd2->brush; BrushMaterials bMats = {NULL}; @@ -6104,7 +6104,7 @@ static int dynamicPaint_doStep( BKE_object_modifier_update_subframe(bmain, eval_ctx, scene, brushObj, true, SUBFRAME_RECURSION, BKE_scene_frame_get(scene), eModifierType_DynamicPaint); } - /* Prepare materials if required */ + /* Prepare materials if required */ if (brush_usesMaterial(brush, scene)) dynamicPaint_updateBrushMaterials(brushObj, brush->mat, scene, &bMats); @@ -6167,7 +6167,7 @@ static int dynamicPaint_doStep( PaintPoint *prevPoint; float *force = NULL; - /* Allocate memory for surface previous points to read unchanged values from */ + /* Allocate memory for surface previous points to read unchanged values from */ prevPoint = MEM_mallocN(sData->total_points * sizeof(struct PaintPoint), "PaintSurfaceDataCopy"); if (!prevPoint) return setError(canvas, N_("Not enough free memory")); @@ -6178,7 +6178,7 @@ static int dynamicPaint_doStep( dynamicPaint_doEffectStep(surface, force, prevPoint, timescale, (float)steps); } - /* Free temporary effect data */ + /* Free temporary effect data */ if (prevPoint) MEM_freeN(prevPoint); if (force) diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 6ee6d877b9c..d4e69ad06ac 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -270,12 +270,12 @@ FCurve *iter_step_fcurve(FCurve *fcu_iter, const char rna_path[]) /* Get list of LinkData's containing pointers to the F-Curves which control the types of data indicated * Lists... - * - dst: list of LinkData's matching the criteria returned. - * List must be freed after use, and is assumed to be empty when passed. - * - src: list of F-Curves to search through + * - dst: list of LinkData's matching the criteria returned. + * List must be freed after use, and is assumed to be empty when passed. + * - src: list of F-Curves to search through * Filters... - * - dataPrefix: i.e. 'pose.bones[' or 'nodes[' - * - dataName: name of entity within "" immediately following the prefix + * - dataPrefix: i.e. 'pose.bones[' or 'nodes[' + * - dataName: name of entity within "" immediately following the prefix */ int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName) { @@ -428,8 +428,8 @@ static int binarysearch_bezt_index_ex(BezTriple array[], float frame, int arrayl *r_replace = false; /* sneaky optimizations (don't go through searching process if...): - * - keyframe to be added is to be added out of current bounds - * - keyframe to be added would replace one of the existing ones on bounds + * - keyframe to be added is to be added out of current bounds + * - keyframe to be added would replace one of the existing ones on bounds */ if ((arraylen <= 0) || (array == NULL)) { printf("Warning: binarysearch_bezt_index() encountered invalid array\n"); @@ -829,7 +829,7 @@ void bezt_add_to_cfra_elem(ListBase *lb, BezTriple *bezt) /* Basic sampling callback which acts as a wrapper for evaluate_fcurve() - * 'data' arg here is unneeded here... + * 'data' arg here is unneeded here... */ float fcurve_samplingcb_evalcurve(FCurve *fcu, void *UNUSED(data), float evaltime) { @@ -931,9 +931,9 @@ void calchandles_fcurve(FCurve *fcu) int a = fcu->totvert; /* Error checking: - * - need at least two points - * - need bezier keys - * - only bezier-interpolation has handles (for now) + * - need at least two points + * - need bezier keys + * - only bezier-interpolation has handles (for now) */ if (ELEM(NULL, fcu, fcu->bezt) || (a < 2) /*|| ELEM(fcu->ipo, BEZT_IPO_CONST, BEZT_IPO_LIN)*/) return; @@ -1527,10 +1527,10 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar) pchan = BKE_pose_channel_find_name(ob->pose, dtar->pchan_name); /* check if object or bone, and get transform matrix accordingly - * - "useEulers" code is used to prevent the problems associated with non-uniqueness - * of euler decomposition from matrices [#20870] - * - localspace is for [#21384], where parent results are not wanted - * but local-consts is for all the common "corrective-shapes-for-limbs" situations + * - "useEulers" code is used to prevent the problems associated with non-uniqueness + * of euler decomposition from matrices [#20870] + * - localspace is for [#21384], where parent results are not wanted + * but local-consts is for all the common "corrective-shapes-for-limbs" situations */ if (pchan) { /* bone */ @@ -1596,12 +1596,12 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar) } else if (dtar->transChan >= DTAR_TRANSCHAN_ROTX) { /* extract rotation as eulers (if needed) - * - definitely if rotation order isn't eulers already - * - if eulers, then we have 2 options: - * a) decompose transform matrix as required, then try to make eulers from - * there compatible with original values - * b) [NOT USED] directly use the original values (no decomposition) - * - only an option for "transform space", if quality is really bad with a) + * - definitely if rotation order isn't eulers already + * - if eulers, then we have 2 options: + * a) decompose transform matrix as required, then try to make eulers from + * there compatible with original values + * b) [NOT USED] directly use the original values (no decomposition) + * - only an option for "transform space", if quality is really bad with a) */ float eul[3]; @@ -1672,9 +1672,9 @@ void driver_free_variable(ListBase *variables, DriverVar *dvar) return; /* free target vars - * - need to go over all of them, not just up to the ones that are used - * currently, since there may be some lingering RNA paths from - * previous users needing freeing + * - need to go over all of them, not just up to the ones that are used + * currently, since there may be some lingering RNA paths from + * previous users needing freeing */ DRIVER_TARGETS_LOOPER(dvar) { @@ -1920,8 +1920,8 @@ float driver_get_variable_value(ChannelDriver *driver, DriverVar *dvar) } /* Evaluate an Channel-Driver to get a 'time' value to use instead of "evaltime" - * - "evaltime" is the frame at which F-Curve is being evaluated - * - has to return a float value + * - "evaltime" is the frame at which F-Curve is being evaluated + * - has to return a float value */ float evaluate_driver(PathResolvedRNA *anim_rna, ChannelDriver *driver, const float evaltime) { @@ -2005,7 +2005,7 @@ float evaluate_driver(PathResolvedRNA *anim_rna, ChannelDriver *driver, const fl } else { /* this evaluates the expression using Python, and returns its result: - * - on errors it reports, then returns 0.0f + * - on errors it reports, then returns 0.0f */ BLI_mutex_lock(&python_driver_lock); @@ -2050,9 +2050,9 @@ void correct_bezpart(float v1[2], float v2[2], float v3[2], float v4[2]) h2[1] = v4[1] - v3[1]; /* calculate distances: - * - len = span of time between keyframes - * - len1 = length of handle of start key - * - len2 = length of handle of end key + * - len = span of time between keyframes + * - len1 = length of handle of start key + * - len2 = length of handle of end key */ len = v4[0] - v1[0]; len1 = fabsf(h1[0]); @@ -2675,8 +2675,8 @@ static float evaluate_fcurve_ex(FCurve *fcu, float evaltime, float cvalue) devaltime = evaluate_time_fmodifiers(storage, &fcu->modifiers, fcu, cvalue, evaltime); /* evaluate curve-data - * - 'devaltime' instead of 'evaltime', as this is the time that the last time-modifying - * F-Curve modifier on the stack requested the curve to be evaluated at + * - 'devaltime' instead of 'evaltime', as this is the time that the last time-modifying + * F-Curve modifier on the stack requested the curve to be evaluated at */ if (fcu->bezt) cvalue = fcurve_eval_keyframes(fcu, fcu->bezt, devaltime); diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index e288242ce9c..f5915e1ddb9 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -69,15 +69,15 @@ void *fmodifiers_storage_get(FModifierStackStorage *storage, FModifier *fcm); */ /* Template for type-info data: - * - make a copy of this when creating new modifiers, and just change the functions - * pointed to as necessary - * - although the naming of functions doesn't matter, it would help for code - * readability, to follow the same naming convention as is presented here - * - any functions that a constraint doesn't need to define, don't define - * for such cases, just use NULL - * - these should be defined after all the functions have been defined, so that - * forward-definitions/prototypes don't need to be used! - * - keep this copy #if-def'd so that future constraints can get based off this + * - make a copy of this when creating new modifiers, and just change the functions + * pointed to as necessary + * - although the naming of functions doesn't matter, it would help for code + * readability, to follow the same naming convention as is presented here + * - any functions that a constraint doesn't need to define, don't define + * for such cases, just use NULL + * - these should be defined after all the functions have been defined, so that + * forward-definitions/prototypes don't need to be used! + * - keep this copy #if-def'd so that future constraints can get based off this */ #if 0 static FModifierTypeInfo FMI_MODNAME = { @@ -260,7 +260,7 @@ static FModifierTypeInfo FMI_GENERATOR = { * x is the evaluation 'time', and 'y' is the resultant value * * Functions available are - * sin, cos, tan, sinc (normalized sin), natural log, square root + * sin, cos, tan, sinc (normalized sin), natural log, square root */ static void fcm_fn_generator_new_data(void *mdata) @@ -460,8 +460,8 @@ static void fcm_envelope_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cv } /* adjust *cvalue - * - fac is the ratio of how the current y-value corresponds to the reference range - * - thus, the new value is found by mapping the old range to the new! + * - fac is the ratio of how the current y-value corresponds to the reference range + * - thus, the new value is found by mapping the old range to the new! */ fac = (*cvalue - (env->midval + env->min)) / (env->max - env->min); *cvalue = min + fac * (max - min); @@ -638,8 +638,8 @@ static float fcm_cycles_time(FModifierStackStorage *storage, FCurve *fcu, FModif return evaltime; /* check if modifier will do anything - * 1) if in data range, definitely don't do anything - * 2) if before first frame or after last frame, make sure some cycling is in use + * 1) if in data range, definitely don't do anything + * 2) if before first frame or after last frame, make sure some cycling is in use */ if (evaltime < prevkey[0]) { if (data->before_mode) { @@ -711,8 +711,8 @@ static float fcm_cycles_time(FModifierStackStorage *storage, FCurve *fcu, FModif /* calculate where in the cycle we are (overwrite evaltime to reflect this) */ else if ((mode == FCM_EXTRAPOLATE_MIRROR) && ((int)(cycle + 1) % 2)) { /* when 'mirror' option is used and cycle number is odd, this cycle is played in reverse - * - for 'before' extrapolation, we need to flip in a different way, otherwise values past - * then end of the curve get referenced (result of fmod will be negative, and with different phase) + * - for 'before' extrapolation, we need to flip in a different way, otherwise values past + * then end of the curve get referenced (result of fmod will be negative, and with different phase) */ if (side < 0) evaltime = prevkey[0] - cyct; @@ -795,8 +795,8 @@ static void fcm_noise_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cvalu float noise; /* generate noise using good ol' Blender Noise - * - 0.1 is passed as the 'z' value, otherwise evaluation fails for size = phase = 1 - * with evaltime being an integer (which happens when evaluating on frame by frame basis) + * - 0.1 is passed as the 'z' value, otherwise evaluation fails for size = phase = 1 + * with evaltime being an integer (which happens when evaluating on frame by frame basis) */ noise = BLI_turbulence(data->size, evaltime - data->offset, data->phase, 0.1f, data->depth); @@ -891,7 +891,7 @@ static void fcm_python_evaluate(FCurve *UNUSED(fcu), FModifier *UNUSED(fcm), flo //FMod_Python *data = (FMod_Python *)fcm->data; /* FIXME... need to implement this modifier... - * It will need it execute a script using the custom properties + * It will need it execute a script using the custom properties */ #endif /* WITH_PYTHON */ } @@ -986,7 +986,7 @@ static float fcm_stepped_time(FCurve *UNUSED(fcu), FModifier *fcm, float UNUSED( /* we snap to the start of the previous closest block of 'step_size' frames * after the start offset has been discarded - * - i.e. round down + * - i.e. round down */ snapblock = (int)((evaltime - data->offset) / data->step_size); @@ -1264,8 +1264,8 @@ void set_active_fmodifier(ListBase *modifiers, FModifier *fcm) } /* Do we have any modifiers which match certain criteria - * - mtype - type of modifier (if 0, doesn't matter) - * - acttype - type of action to perform (if -1, doesn't matter) + * - mtype - type of modifier (if 0, doesn't matter) + * - acttype - type of action to perform (if -1, doesn't matter) */ bool list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype) { @@ -1397,13 +1397,13 @@ static float eval_fmodifier_influence(FModifier *fcm, float evaltime) } /* evaluate time modifications imposed by some F-Curve Modifiers - * - this step acts as an optimization to prevent the F-Curve stack being evaluated - * several times by modifiers requesting the time be modified, as the final result - * would have required using the modified time - * - modifiers only ever receive the unmodified time, as subsequent modifiers should be - * working on the 'global' result of the modified curve, not some localised segment, - * so nevaltime gets set to whatever the last time-modifying modifier likes... - * - we start from the end of the stack, as only the last one matters for now + * - this step acts as an optimization to prevent the F-Curve stack being evaluated + * several times by modifiers requesting the time be modified, as the final result + * would have required using the modified time + * - modifiers only ever receive the unmodified time, as subsequent modifiers should be + * working on the 'global' result of the modified curve, not some localised segment, + * so nevaltime gets set to whatever the last time-modifying modifier likes... + * - we start from the end of the stack, as only the last one matters for now * * Note: *fcu might be NULL */ diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index e89508fd6c0..a0d759118ec 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -907,8 +907,8 @@ bGPDframe *BKE_gpencil_layer_find_frame(bGPDlayer *gpl, int cframe) } /* get the appropriate gp-frame from a given layer - * - this sets the layer's actframe var (if allowed to) - * - extension beyond range (if first gp-frame is after all frame in interest and cannot add) + * - this sets the layer's actframe var (if allowed to) + * - extension beyond range (if first gp-frame is after all frame in interest and cannot add) */ bGPDframe *BKE_gpencil_layer_getframe(bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew) { diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 7cb9ffc3611..c11f2368197 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -811,13 +811,13 @@ static const char *particle_adrcodes_to_paths(int adrcode, int *array_index) /* ------- */ /* Allocate memory for RNA-path for some property given a blocktype, adrcode, and 'root' parts of path - * Input: - * - id - the datablock that the curve's IPO block is attached to and/or which the new paths will start from - * - blocktype, adrcode - determines setting to get - * - actname, constname,seq - used to build path - * Output: - * - array_index - index in property's array (if applicable) to use - * - return - the allocated path... + * Input: + * - id - the datablock that the curve's IPO block is attached to and/or which the new paths will start from + * - blocktype, adrcode - determines setting to get + * - actname, constname,seq - used to build path + * Output: + * - array_index - index in property's array (if applicable) to use + * - return - the allocated path... */ static char *get_rna_access(ID *id, int blocktype, int adrcode, char actname[], char constname[], Sequence *seq, int *array_index) { @@ -913,7 +913,7 @@ static char *get_rna_access(ID *id, int blocktype, int adrcode, char actname[], } /* check if any property found - * - blocktype < 0 is special case for a specific type of driver, where we don't need a property name... + * - blocktype < 0 is special case for a specific type of driver, where we don't need a property name... */ if ((propname == NULL) && (blocktype > 0)) { /* nothing was found, so exit */ @@ -1095,7 +1095,7 @@ static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver) } /* Add F-Curve to the correct list - * - grpname is needed to be used as group name where relevant, and is usually derived from actname + * - grpname is needed to be used as group name where relevant, and is usually derived from actname */ static void fcurve_add_to_list(ListBase *groups, ListBase *list, FCurve *fcu, char *grpname, int muteipo) { @@ -1153,8 +1153,8 @@ static void fcurve_add_to_list(ListBase *groups, ListBase *list, FCurve *fcu, ch /* Convert IPO-Curve to F-Curve (including Driver data), and free any of the old data that * is not relevant, BUT do not free the IPO-Curve itself... - * actname: name of Action-Channel (if applicable) that IPO-Curve's IPO-block belonged to - * constname: name of Constraint-Channel (if applicable) that IPO-Curve's IPO-block belonged to + * actname: name of Action-Channel (if applicable) that IPO-Curve's IPO-block belonged to + * constname: name of Constraint-Channel (if applicable) that IPO-Curve's IPO-block belonged to * seq: sequencer-strip (if applicable) that IPO-Curve's IPO-block belonged to */ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *icu, char *actname, char *constname, Sequence *seq, int muteipo) @@ -1237,8 +1237,8 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i fcurve->array_index = abp->array_index; /* convert keyframes - * - beztriples and bpoints are mutually exclusive, so we won't have both at the same time - * - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet) + * - beztriples and bpoints are mutually exclusive, so we won't have both at the same time + * - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet) */ fcurve->totvert = icu->totvert; @@ -1286,15 +1286,15 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i unsigned int i = 0; /* get rna-path - * - we will need to set the 'disabled' flag if no path is able to be made (for now) + * - we will need to set the 'disabled' flag if no path is able to be made (for now) */ fcu->rna_path = get_rna_access(id, icu->blocktype, icu->adrcode, actname, constname, seq, &fcu->array_index); if (fcu->rna_path == NULL) fcu->flag |= FCURVE_DISABLED; /* convert keyframes - * - beztriples and bpoints are mutually exclusive, so we won't have both at the same time - * - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet) + * - beztriples and bpoints are mutually exclusive, so we won't have both at the same time + * - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet) */ fcu->totvert = icu->totvert; @@ -1323,8 +1323,8 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i } /* correct values for euler rotation curves - * - they were degrees/10 - * - we need radians for RNA to do the right thing + * - they were degrees/10 + * - we need radians for RNA to do the right thing */ if ( ((icu->blocktype == ID_OB) && ELEM(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) || ((icu->blocktype == ID_PO) && ELEM(icu->adrcode, AC_EUL_X, AC_EUL_Y, AC_EUL_Z)) ) @@ -1337,8 +1337,8 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i } /* correct values for path speed curves - * - their values were 0-1 - * - we now need as 'frames' + * - their values were 0-1 + * - we now need as 'frames' */ if ( (id) && (icu->blocktype == GS(id->name)) && (fcu->rna_path && STREQ(fcu->rna_path, "eval_time")) ) @@ -1351,9 +1351,9 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i } /* correct times for rotation drivers - * - need to go from degrees to radians... - * - there's only really 1 target to worry about - * - were also degrees/10 + * - need to go from degrees to radians... + * - there's only really 1 target to worry about + * - were also degrees/10 */ if (fcu->driver && fcu->driver->variables.first) { DriverVar *dvar = fcu->driver->variables.first; @@ -1412,10 +1412,10 @@ static void ipo_to_animato(ID *id, Ipo *ipo, char actname[], char constname[], S if (G.debug & G_DEBUG) printf("ipo_to_animato\n"); /* validate actname and constname - * - clear actname if it was one of the generic ones (i.e. 'Object', or 'Shapes') - * - actname can then be used to assign F-Curves in Action to Action Groups - * (i.e. thus keeping the benefits that used to be provided by Action Channels for grouping - * F-Curves for bones). This may be added later... for now let's just dump without them... + * - clear actname if it was one of the generic ones (i.e. 'Object', or 'Shapes') + * - actname can then be used to assign F-Curves in Action to Action Groups + * (i.e. thus keeping the benefits that used to be provided by Action Channels for grouping + * F-Curves for bones). This may be added later... for now let's just dump without them... */ if (actname) { if ((ipo->blocktype == ID_OB) && STREQ(actname, "Object")) @@ -1623,8 +1623,8 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips) /* create a new-style NLA-strip which references this Action, then copy over relevant settings */ { /* init a new strip, and assign the action to it - * - no need to muck around with the user-counts, since this is just - * passing over the ref to the new owner, not creating an additional ref + * - no need to muck around with the user-counts, since this is just + * passing over the ref to the new owner, not creating an additional ref */ strip = MEM_callocN(sizeof(NlaStrip), "NlaStrip"); strip->act = as->act; diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c index b8ebdd9cda5..23cd81b6da9 100644 --- a/source/blender/blenkernel/intern/lamp.c +++ b/source/blender/blenkernel/intern/lamp.c @@ -158,9 +158,9 @@ Lamp *BKE_lamp_copy(Main *bmain, const Lamp *la) Lamp *BKE_lamp_localize(Lamp *la) { /* TODO replace with something like - * Lamp *la_copy; - * BKE_id_copy_ex(bmain, &la->id, (ID **)&la_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false); - * return la_copy; + * Lamp *la_copy; + * BKE_id_copy_ex(bmain, &la->id, (ID **)&la_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false); + * return la_copy; * * ... Once f*** nodes are fully converted to that too :( */ diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 1caef98ea11..376e819268d 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -274,9 +274,9 @@ Material *BKE_material_copy(Main *bmain, const Material *ma) Material *BKE_material_localize(Material *ma) { /* TODO replace with something like - * Material *ma_copy; - * BKE_id_copy_ex(bmain, &ma->id, (ID **)&ma_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false); - * return ma_copy; + * Material *ma_copy; + * BKE_id_copy_ex(bmain, &ma->id, (ID **)&ma_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false); + * return ma_copy; * * ... Once f*** nodes are fully converted to that too :( */ diff --git a/source/blender/blenkernel/intern/mball_tessellate.c b/source/blender/blenkernel/intern/mball_tessellate.c index cc82d12a776..840062df3a3 100644 --- a/source/blender/blenkernel/intern/mball_tessellate.c +++ b/source/blender/blenkernel/intern/mball_tessellate.c @@ -447,18 +447,18 @@ static void freepolygonize(PROCESS *process) /**** Cubical Polygonization (optional) ****/ -#define LB 0 /* left bottom edge */ -#define LT 1 /* left top edge */ -#define LN 2 /* left near edge */ -#define LF 3 /* left far edge */ +#define LB 0 /* left bottom edge */ +#define LT 1 /* left top edge */ +#define LN 2 /* left near edge */ +#define LF 3 /* left far edge */ #define RB 4 /* right bottom edge */ -#define RT 5 /* right top edge */ -#define RN 6 /* right near edge */ -#define RF 7 /* right far edge */ -#define BN 8 /* bottom near edge */ -#define BF 9 /* bottom far edge */ -#define TN 10 /* top near edge */ -#define TF 11 /* top far edge */ +#define RT 5 /* right top edge */ +#define RN 6 /* right near edge */ +#define RF 7 /* right far edge */ +#define BN 8 /* bottom near edge */ +#define BF 9 /* bottom far edge */ +#define TN 10 /* top near edge */ +#define TF 11 /* top far edge */ static INTLISTS *cubetable[256]; static char faces[256]; diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 75dd0416e52..2f0af028abd 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -254,7 +254,7 @@ void BKE_nla_tracks_copy(Main *bmain, ListBase *dst, ListBase *src) /* Adding ------------------------------------------- */ /* Add a NLA Track to the given AnimData - * - prev: NLA-Track to add the new one after + * - prev: NLA-Track to add the new one after */ NlaTrack *BKE_nlatrack_add(AnimData *adt, NlaTrack *prev) { @@ -299,11 +299,11 @@ NlaStrip *BKE_nlastrip_new(bAction *act) strip = MEM_callocN(sizeof(NlaStrip), "NlaStrip"); /* generic settings - * - selected flag to highlight this to the user - * - (XXX) disabled Auto-Blends, as this was often causing some unwanted effects - * - (XXX) synchronization of strip-length in accordance with changes to action-length - * is not done though, since this should only really happens in editmode for strips now - * though this decision is still subject to further review... + * - selected flag to highlight this to the user + * - (XXX) disabled Auto-Blends, as this was often causing some unwanted effects + * - (XXX) synchronization of strip-length in accordance with changes to action-length + * is not done though, since this should only really happens in editmode for strips now + * though this decision is still subject to further review... */ strip->flag = NLASTRIP_FLAG_SELECT; @@ -312,7 +312,7 @@ NlaStrip *BKE_nlastrip_new(bAction *act) id_us_plus(&act->id); /* determine initial range - * - strip length cannot be 0... ever... + * - strip length cannot be 0... ever... */ calc_action_range(strip->act, &strip->actstart, &strip->actend, 0); @@ -401,7 +401,7 @@ NlaStrip *BKE_nla_add_soundstrip(Scene *scene, Speaker *speaker) /* Strip Mapping ------------------------------------- */ /* non clipped mapping for strip-time <-> global time (for Action-Clips) - * invert = convert action-strip time to global time + * invert = convert action-strip time to global time */ static float nlastrip_get_frame_actionclip(NlaStrip *strip, float cframe, short mode) { @@ -471,7 +471,7 @@ static float nlastrip_get_frame_actionclip(NlaStrip *strip, float cframe, short } /* non clipped mapping for strip-time <-> global time (for Transitions) - * invert = convert action-strip time to global time + * invert = convert action-strip time to global time */ static float nlastrip_get_frame_transition(NlaStrip *strip, float cframe, short mode) { @@ -516,7 +516,7 @@ float nlastrip_get_frame(NlaStrip *strip, float cframe, short mode) /* Non clipped mapping for strip-time <-> global time - * mode = eNlaTime_ConvertModes -> NLATIME_CONVERT_* + * mode = eNlaTime_ConvertModes -> NLATIME_CONVERT_* * * Public API method - perform this mapping using the given AnimData block * and perform any necessary sanity checks on the value @@ -526,9 +526,9 @@ float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode) NlaStrip *strip; /* sanity checks - * - obviously we've got to have some starting data - * - when not in tweakmode, the active Action does not have any scaling applied :) - * - when in tweakmode, if the no-mapping flag is set, do not map + * - obviously we've got to have some starting data + * - when not in tweakmode, the active Action does not have any scaling applied :) + * - when in tweakmode, if the no-mapping flag is set, do not map */ if ((adt == NULL) || (adt->flag & ADT_NLA_EDIT_ON) == 0 || (adt->flag & ADT_NLA_EDIT_NOMAP)) return cframe; @@ -548,9 +548,9 @@ float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode) strip = adt->actstrip; /* sanity checks - * - in rare cases, we may not be able to find this strip for some reason (internal error) - * - for now, if the user has defined a curve to control the time, this correction cannot be performed - * reliably... + * - in rare cases, we may not be able to find this strip for some reason (internal error) + * - for now, if the user has defined a curve to control the time, this correction cannot be performed + * reliably... */ if ((strip == NULL) || (strip->flag & NLASTRIP_FLAG_USR_TIME)) return cframe; @@ -680,7 +680,7 @@ bool BKE_nlastrips_add_strip(ListBase *strips, NlaStrip *strip) /* Convert 'islands' (i.e. continuous string of) selected strips to be * contained within 'Meta-Strips' which act as strips which contain strips. - * temp: are the meta-strips to be created 'temporary' ones used for transforms? + * temp: are the meta-strips to be created 'temporary' ones used for transforms? */ void BKE_nlastrips_make_metas(ListBase *strips, bool is_temp) { @@ -756,8 +756,8 @@ void BKE_nlastrips_clear_metastrip(ListBase *strips, NlaStrip *strip) } /* Remove meta-strips (i.e. flatten the list of strips) from the top-level of the list of strips - * sel: only consider selected meta-strips, otherwise all meta-strips are removed - * onlyTemp: only remove the 'temporary' meta-strips used for transforms + * sel: only consider selected meta-strips, otherwise all meta-strips are removed + * onlyTemp: only remove the 'temporary' meta-strips used for transforms */ void BKE_nlastrips_clear_metas(ListBase *strips, bool only_sel, bool only_temp) { @@ -844,8 +844,8 @@ void BKE_nlameta_flush_transforms(NlaStrip *mstrip) short scaleChanged = 0; /* sanity checks - * - strip must exist - * - strip must be a meta-strip with some contents + * - strip must exist + * - strip must be a meta-strip with some contents */ if (ELEM(NULL, mstrip, mstrip->strips.first)) return; @@ -853,8 +853,8 @@ void BKE_nlameta_flush_transforms(NlaStrip *mstrip) return; /* get the original start/end points, and calculate the start-frame offset - * - these are simply the start/end frames of the child strips, - * since we assume they weren't transformed yet + * - these are simply the start/end frames of the child strips, + * since we assume they weren't transformed yet */ oStart = ((NlaStrip *)mstrip->strips.first)->start; oEnd = ((NlaStrip *)mstrip->strips.last)->end; @@ -862,7 +862,7 @@ void BKE_nlameta_flush_transforms(NlaStrip *mstrip) /* optimization: * don't flush if nothing changed yet - * TODO: maybe we need a flag to say always flush? + * TODO: maybe we need a flag to say always flush? */ if (IS_EQF(oStart, mstrip->start) && IS_EQF(oEnd, mstrip->end)) return; @@ -1021,9 +1021,9 @@ void BKE_nlatrack_set_active(ListBase *tracks, NlaTrack *nlt_a) bool BKE_nlatrack_has_space(NlaTrack *nlt, float start, float end) { /* sanity checks - * - track must exist - * - track must be editable - * - bounds cannot be equal (0-length is nasty) + * - track must exist + * - track must be editable + * - bounds cannot be equal (0-length is nasty) */ if ((nlt == NULL) || (nlt->flag & NLATRACK_PROTECTED) || IS_EQF(start, end)) return false; @@ -1150,8 +1150,8 @@ bool BKE_nlastrip_within_bounds(NlaStrip *strip, float min, float max) return false; /* only ok if at least part of the strip is within the bounding window - * - first 2 cases cover when the strip length is less than the bounding area - * - second 2 cases cover when the strip length is greater than the bounding area + * - first 2 cases cover when the strip length is less than the bounding area + * - second 2 cases cover when the strip length is greater than the bounding area */ if ((stripLen < boundsLen) && !(IN_RANGE(strip->start, min, max) || @@ -1276,8 +1276,8 @@ void BKE_nlastrip_recalculate_bounds(NlaStrip *strip) float actlen, mapping; /* sanity checks - * - must have a strip - * - can only be done for action clips + * - must have a strip + * - can only be done for action clips */ if ((strip == NULL) || (strip->type != NLASTRIP_TYPE_CLIP)) return; @@ -1500,8 +1500,8 @@ void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip) } /* build a hash-table of all the strips in the tracks - * - this is easier than iterating over all the tracks+strips hierarchy every time - * (and probably faster) + * - this is easier than iterating over all the tracks+strips hierarchy every time + * (and probably faster) */ gh = BLI_ghash_str_new("nlastrip_validate_name gh"); @@ -1517,7 +1517,7 @@ void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip) } /* if the hash-table has a match for this name, try other names... - * - in an extreme case, it might not be able to find a name, but then everything else in Blender would fail too :) + * - in an extreme case, it might not be able to find a name, but then everything else in Blender would fail too :) */ BLI_uniquename_cb(nla_editbone_name_check, (void *)gh, DATA_("NlaStrip"), '.', strip->name, sizeof(strip->name)); @@ -1528,9 +1528,9 @@ void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip) /* ---- */ /* Get strips which overlap the given one at the start/end of its range - * - strip: strip that we're finding overlaps for - * - track: nla-track that the overlapping strips should be found from - * - start, end: frames for the offending endpoints + * - strip: strip that we're finding overlaps for + * - track: nla-track that the overlapping strips should be found from + * - start, end: frames for the offending endpoints */ static void nlastrip_get_endpoint_overlaps(NlaStrip *strip, NlaTrack *track, float **start, float **end) { @@ -1555,7 +1555,7 @@ static void nlastrip_get_endpoint_overlaps(NlaStrip *strip, NlaTrack *track, flo return; /* the range we're after has already passed */ /* if this strip is not part of an island of continuous strips, it can be used - * - this check needs to be done for each end of the strip we try and use... + * - this check needs to be done for each end of the strip we try and use... */ if ((nls->next == NULL) || IS_EQF(nls->next->start, nls->end) == 0) { if ((nls->end > strip->start) && (nls->end < strip->end)) @@ -1589,9 +1589,9 @@ static void BKE_nlastrip_validate_autoblends(NlaTrack *nlt, NlaStrip *nls) nlastrip_get_endpoint_overlaps(nls, nlt->next, &ns, &ne); /* set overlaps for this strip - * - don't use the values obtained though if the end in question - * is directly followed/preceded by another strip, forming an - * 'island' of continuous strips + * - don't use the values obtained though if the end in question + * is directly followed/preceded by another strip, forming an + * 'island' of continuous strips */ if ((ps || ns) && ((nls->prev == NULL) || IS_EQF(nls->prev->end, nls->start) == 0)) { /* start overlaps - pick the largest overlap */ @@ -1854,7 +1854,7 @@ bool BKE_nla_tweakmode_enter(AnimData *adt) return true; /* go over the tracks, finding the active one, and its active strip - * - if we cannot find both, then there's nothing to do + * - if we cannot find both, then there's nothing to do */ for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) { /* check if active */ @@ -1924,16 +1924,16 @@ bool BKE_nla_tweakmode_enter(AnimData *adt) } /* go over all the tracks after AND INCLUDING the active one, tagging them as being disabled - * - the active track needs to also be tagged, otherwise, it'll overlap with the tweaks going on + * - the active track needs to also be tagged, otherwise, it'll overlap with the tweaks going on */ for (nlt = activeTrack; nlt; nlt = nlt->next) nlt->flag |= NLATRACK_DISABLED; /* handle AnimData level changes: - * - 'real' active action to temp storage (no need to change user-counts) - * - action of active strip set to be the 'active action', and have its usercount incremented - * - editing-flag for this AnimData block should also get turned on (for more efficient restoring) - * - take note of the active strip for mapping-correction of keyframes in the action being edited + * - 'real' active action to temp storage (no need to change user-counts) + * - action of active strip set to be the 'active action', and have its usercount incremented + * - editing-flag for this AnimData block should also get turned on (for more efficient restoring) + * - take note of the active strip for mapping-correction of keyframes in the action being edited */ adt->tmpact = adt->action; adt->action = activeStrip->act; @@ -1999,11 +1999,11 @@ void BKE_nla_tweakmode_exit(AnimData *adt) } /* handle AnimData level changes: - * - 'temporary' active action needs its usercount decreased, since we're removing this reference - * - 'real' active action is restored from storage - * - storage pointer gets cleared (to avoid having bad notes hanging around) - * - editing-flag for this AnimData block should also get turned off - * - clear pointer to active strip + * - 'temporary' active action needs its usercount decreased, since we're removing this reference + * - 'real' active action is restored from storage + * - storage pointer gets cleared (to avoid having bad notes hanging around) + * - editing-flag for this AnimData block should also get turned off + * - clear pointer to active strip */ if (adt->action) id_us_min(&adt->action->id); @@ -2020,8 +2020,8 @@ static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimDat { /* verify that data is valid - * 1) Scene and AnimData must be provided - * 2) there must be tracks to merge... + * 1) Scene and AnimData must be provided + * 2) there must be tracks to merge... */ if (ELEM(NULL, scene, adt, adt->nla_tracks.first)) return; diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c index a3fb9981880..1406a7dd66b 100644 --- a/source/blender/blenkernel/intern/object_dupli.c +++ b/source/blender/blenkernel/intern/object_dupli.c @@ -373,8 +373,8 @@ static void make_duplis_frames(const DupliContext *ctx) /* make a copy of the object's original data (before any dupli-data overwrites it) * as we'll need this to keep track of unkeyed data - * - this doesn't take into account other data that can be reached from the object, - * for example it's shapekeys or bones, hence the need for an update flush at the end + * - this doesn't take into account other data that can be reached from the object, + * for example it's shapekeys or bones, hence the need for an update flush at the end */ copyob = *ob; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 8def945ca7c..cc6e28b2a82 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1612,7 +1612,7 @@ static void sph_density_accum_cb(void *userdata, int index, const float co[3], f * account, the forces will be biased by the tree search order. This * effectively adds energy to the system, and results in a churning motion. * But, we have to stop somewhere, and it's not the end of the world. - * - jahka and z0r + * - jahka and z0r */ if (pfr->tot_neighbors >= SPH_NEIGHBORS) return; @@ -2187,7 +2187,7 @@ static void basic_rotate(ParticleSettings *part, ParticleData *pa, float dfra, f } /************************************************ - * Collisions + * Collisions * * The algorithm is roughly: * 1. Use a BVH tree to search for faces that a particle may collide with. diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index bfc61794935..7fb313c838f 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -385,9 +385,9 @@ static void rigidbody_validate_sim_shape(Object *ob, bool rebuild) return; /* if automatically determining dimensions, use the Object's boundbox - * - assume that all quadrics are standing upright on local z-axis - * - assume even distribution of mass around the Object's pivot - * (i.e. Object pivot is centralized in boundbox) + * - assume that all quadrics are standing upright on local z-axis + * - assume even distribution of mass around the Object's pivot + * (i.e. Object pivot is centralized in boundbox) */ // XXX: all dimensions are auto-determined now... later can add stored settings for this /* get object dimensions without scaling */ @@ -472,10 +472,10 @@ void BKE_rigidbody_calc_volume(Object *ob, float *r_vol) float volume = 0.0f; /* if automatically determining dimensions, use the Object's boundbox - * - assume that all quadrics are standing upright on local z-axis - * - assume even distribution of mass around the Object's pivot - * (i.e. Object pivot is centralized in boundbox) - * - boundbox gives full width + * - assume that all quadrics are standing upright on local z-axis + * - assume even distribution of mass around the Object's pivot + * (i.e. Object pivot is centralized in boundbox) + * - boundbox gives full width */ // XXX: all dimensions are auto-determined now... later can add stored settings for this BKE_object_dimensions_get(ob, size); @@ -568,10 +568,10 @@ void BKE_rigidbody_calc_center_of_mass(Object *ob, float r_center[3]) zero_v3(r_center); /* if automatically determining dimensions, use the Object's boundbox - * - assume that all quadrics are standing upright on local z-axis - * - assume even distribution of mass around the Object's pivot - * (i.e. Object pivot is centralized in boundbox) - * - boundbox gives full width + * - assume that all quadrics are standing upright on local z-axis + * - assume even distribution of mass around the Object's pivot + * (i.e. Object pivot is centralized in boundbox) + * - boundbox gives full width */ // XXX: all dimensions are auto-determined now... later can add stored settings for this BKE_object_dimensions_get(ob, size); @@ -647,7 +647,7 @@ static void rigidbody_validate_sim_object(RigidBodyWorld *rbw, Object *ob, bool float rot[4]; /* sanity checks: - * - object doesn't have RigidBody info already: then why is it here? + * - object doesn't have RigidBody info already: then why is it here? */ if (rbo == NULL) return; @@ -778,8 +778,8 @@ static void rigidbody_validate_sim_constraint(RigidBodyWorld *rbw, Object *ob, b float ang_upper; /* sanity checks: - * - object should have a rigid body constraint - * - rigid body constraint should have at least one constrained object + * - object should have a rigid body constraint + * - rigid body constraint should have at least one constrained object */ if (rbc == NULL) { return; @@ -939,8 +939,8 @@ RigidBodyWorld *BKE_rigidbody_create_world(Scene *scene) RigidBodyWorld *rbw; /* sanity checks - * - there must be a valid scene to add world to - * - there mustn't be a sim world using this group already + * - there must be a valid scene to add world to + * - there mustn't be a sim world using this group already */ if (scene == NULL) return NULL; @@ -1015,9 +1015,9 @@ RigidBodyOb *BKE_rigidbody_create_object(Scene *scene, Object *ob, short type) RigidBodyWorld *rbw = scene->rigidbody_world; /* sanity checks - * - rigidbody world must exist - * - object must exist - * - cannot add rigid body if it already exists + * - rigidbody world must exist + * - object must exist + * - cannot add rigid body if it already exists */ if (ob == NULL || (ob->rigidbody_object != NULL)) return NULL; @@ -1070,9 +1070,9 @@ RigidBodyCon *BKE_rigidbody_create_constraint(Scene *scene, Object *ob, short ty RigidBodyWorld *rbw = scene->rigidbody_world; /* sanity checks - * - rigidbody world must exist - * - object must exist - * - cannot add constraint if it already exists + * - rigidbody world must exist + * - object must exist + * - cannot add constraint if it already exists */ if (ob == NULL || (ob->rigidbody_constraint != NULL)) return NULL; @@ -1312,7 +1312,7 @@ static void rigidbody_update_sim_ob(Scene *scene, RigidBodyWorld *rbw, Object *o pd_point_from_loc(scene, eff_loc, eff_vel, 0, &epoint); /* calculate net force of effectors, and apply to sim object - * - we use 'central force' since apply force requires a "relative position" which we don't have... + * - we use 'central force' since apply force requires a "relative position" which we don't have... */ pdDoEffectors(effectors, NULL, effector_weights, &epoint, eff_force, NULL); if (G.f & G_DEBUG) @@ -1382,7 +1382,7 @@ static void rigidbody_update_simulation(Scene *scene, RigidBodyWorld *rbw, bool if (rbo == NULL) { /* Since this object is included in the sim group but doesn't have * rigid body settings (perhaps it was added manually), add! - * - assume object to be active? That is the default for newly added settings... + * - assume object to be active? That is the default for newly added settings... */ ob->rigidbody_object = BKE_rigidbody_create_object(scene, ob, RBO_TYPE_ACTIVE); rigidbody_validate_sim_object(rbw, ob, true); diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 3a067221aad..9689ab173a8 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1314,10 +1314,10 @@ void BKE_scene_frame_set(struct Scene *scene, double cfra) #ifdef WITH_LEGACY_DEPSGRAPH /* drivers support/hacks - * - this method is called from scene_update_tagged_recursive(), so gets included in viewport + render - * - these are always run since the depsgraph can't handle non-object data - * - these happen after objects are all done so that we can read in their final transform values, - * though this means that objects can't refer to scene info for guidance... + * - this method is called from scene_update_tagged_recursive(), so gets included in viewport + render + * - these are always run since the depsgraph can't handle non-object data + * - these happen after objects are all done so that we can read in their final transform values, + * though this means that objects can't refer to scene info for guidance... */ static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene) { diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 08952113fce..c69f8ff074f 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -1202,8 +1202,8 @@ static void do_mul_effect_byte( fac3 = (int)(256.0f * facf1); /* formula: - * fac * (a * b) + (1 - fac) * a => fac * a * (b - 1) + axaux = c * px + py * s; //+centx - * yaux = -s * px + c * py; //+centy + * fac * (a * b) + (1 - fac) * a => fac * a * (b - 1) + axaux = c * px + py * s; //+centx + * yaux = -s * px + c * py; //+centy */ while (y--) { diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index 13a82490895..65d42467f67 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -187,8 +187,8 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc) * Returns true if "hit" was updated. * Opts control whether an hit is valid or not * Supported options are: - * MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (front faces hits are ignored) - * MOD_SHRINKWRAP_CULL_TARGET_BACKFACE (back faces hits are ignored) + * - MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (front faces hits are ignored) + * - MOD_SHRINKWRAP_CULL_TARGET_BACKFACE (back faces hits are ignored) */ bool BKE_shrinkwrap_project_normal( char options, const float vert[3], const float dir[3], diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 150e8a129fe..ccc991ed24a 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -724,7 +724,7 @@ static int get_lamp(Scene *scene, float *light) } /********************************************************** - * Obstacles + * Obstacles **********************************************************/ typedef struct ObstaclesFromDMData { @@ -982,7 +982,7 @@ static void update_obstacles(Scene *scene, Object *ob, SmokeDomainSettings *sds, } /********************************************************** - * Flow emission code + * Flow emission code **********************************************************/ typedef struct EmissionMap { @@ -1460,8 +1460,8 @@ static void sample_derivedmesh( if (sfs->volume_density) { if (BLI_bvhtree_ray_cast(treeData->tree, ray_start, ray_dir, 0.0f, &hit, treeData->raycast_callback, treeData) != -1) { float dot = ray_dir[0] * hit.no[0] + ray_dir[1] * hit.no[1] + ray_dir[2] * hit.no[2]; - /* If ray and hit face normal are facing same direction - * hit point is inside a closed mesh. */ + /* If ray and hit face normal are facing same direction + * hit point is inside a closed mesh. */ if (dot >= 0) { /* Also cast a ray in opposite direction to make sure * point is at least surrounded by two faces */ @@ -1691,8 +1691,8 @@ static void emit_from_derivedmesh(Object *flow_ob, SmokeDomainSettings *sds, Smo } } - /* Transform dm vertices to - * domain grid space for fast lookups */ + /* Transform dm vertices to + * domain grid space for fast lookups */ for (i = 0; i < numOfVerts; i++) { float n[3]; /* vert pos */ @@ -1775,7 +1775,7 @@ static void emit_from_derivedmesh(Object *flow_ob, SmokeDomainSettings *sds, Smo } /********************************************************** - * Smoke step + * Smoke step **********************************************************/ static void adjustDomainResolution(SmokeDomainSettings *sds, int new_shift[3], EmissionMap *emaps, unsigned int numflowobj, float dt) diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index a2f2819d132..940f7f72d62 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -2162,7 +2162,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo }/* existing spring list */ }/*any edges*/ /* ---springs */ - }/*omit on snap */ + }/*omit on snap */ }/*loop all bp's*/ return 0; /*done fine*/ } @@ -2514,7 +2514,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa }/* existing spring list */ }/*any edges*/ /* ---springs */ - }/*omit on snap */ + }/*omit on snap */ }/*loop all bp's*/ diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 345168e2000..63b9f838632 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2968,9 +2968,9 @@ int txt_setcurr_tab_spaces(Text *text, int space) } if (strstr(text->curl->line, word)) { /* if we find a ':' on this line, then add a tab but not if it is: - * 1) in a comment - * 2) within an identifier - * 3) after the cursor (text->curc), i.e. when creating space before a function def [#25414] + * 1) in a comment + * 2) within an identifier + * 3) after the cursor (text->curc), i.e. when creating space before a function def [#25414] */ int a; bool is_indent = false; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index a0399c74be1..1637c0c8054 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -549,9 +549,9 @@ Tex *BKE_texture_copy(Main *bmain, const Tex *tex) Tex *BKE_texture_localize(Tex *tex) { /* TODO replace with something like - * Tex *tex_copy; - * BKE_id_copy_ex(bmain, &tex->id, (ID **)&tex_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false); - * return tex_copy; + * Tex *tex_copy; + * BKE_id_copy_ex(bmain, &tex->id, (ID **)&tex_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false); + * return tex_copy; * * ... Once f*** nodes are fully converted to that too :( */ diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 545ca41c9c0..cb3ef82ed62 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -160,9 +160,9 @@ World *BKE_world_copy(Main *bmain, const World *wrld) World *BKE_world_localize(World *wrld) { /* TODO replace with something like - * World *wrld_copy; - * BKE_id_copy_ex(bmain, &wrld->id, (ID **)&wrld_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false); - * return wrld_copy; + * World *wrld_copy; + * BKE_id_copy_ex(bmain, &wrld->id, (ID **)&wrld_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false); + * return wrld_copy; * * ... Once f*** nodes are fully converted to that too :( */ -- cgit v1.2.3