diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-18 08:21:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-18 08:59:28 +0300 |
commit | 333cdbb41025db012239e0549a439515880aad9b (patch) | |
tree | 7f34b68d8d412bd69073eabee1ed01e2ded0437f /source/blender/blenkernel | |
parent | 93e876c4f89909ff1e399d7f038aac134367b120 (diff) |
Cleanup: comment blocks
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_customdata.h | 18 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_modifier.h | 17 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 24 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/collision.c | 10 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/deform.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/tracking_auto.c | 3 |
11 files changed, 59 insertions, 51 deletions
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 88035e2b3d9..e4dc8ffae02 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -61,14 +61,18 @@ extern const CustomData_MeshMasks CD_MASK_EVERYTHING; * memory space for totelem elements. mask must be an array of length * CD_NUMTYPES elements, that indicate if a layer can be copied. */ -/* add/copy/merge allocation types */ +/** Add/copy/merge allocation types. */ typedef enum eCDAllocType { - CD_ASSIGN = 0, /* use the data pointer */ - CD_CALLOC = 1, /* allocate blank memory */ - CD_DEFAULT = 2, /* allocate and set to default */ - CD_REFERENCE = 3, /* use data pointers, set layer flag NOFREE */ - CD_DUPLICATE = 4, /* do a full copy of all layers, only allowed if source - * has same number of elements */ + /** Use the data pointer. */ + CD_ASSIGN = 0, + /** Allocate blank memory. */ + CD_CALLOC = 1, + /** Allocate and set to default. */ + CD_DEFAULT = 2, + /** Use data pointers, set layer flag NOFREE. */ + CD_REFERENCE = 3, + /** Do a full copy of all layers, only allowed if source has same number of elements. */ + CD_DUPLICATE = 4, } eCDAllocType; #define CD_TYPE_AS_MASK(_type) (CustomDataMask)((CustomDataMask)1 << (CustomDataMask)(_type)) diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 68ef413b198..5b6f3cf17c4 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -110,13 +110,16 @@ typedef void (*TexWalkFunc)(void *userData, const char *propname); typedef enum ModifierApplyFlag { - MOD_APPLY_RENDER = 1 << 0, /* Render time. */ - MOD_APPLY_USECACHE = 1 << 1, /* Result of evaluation will be cached, so modifier might - * want to cache data for quick updates (used by subsurf) */ - MOD_APPLY_ORCO = 1 << 2, /* Modifier evaluated for undeformed texture coordinates */ - MOD_APPLY_IGNORE_SIMPLIFY = 1 << 3, /* Ignore scene simplification flag and use subdivisions - * level set in multires modifier. - */ + /** Render time. */ + MOD_APPLY_RENDER = 1 << 0, + /** Result of evaluation will be cached, so modifier might + * want to cache data for quick updates (used by subsurf) */ + MOD_APPLY_USECACHE = 1 << 1, + /** Modifier evaluated for undeformed texture coordinates */ + MOD_APPLY_ORCO = 1 << 2, + /** Ignore scene simplification flag and use subdivisions + * level set in multires modifier. */ + MOD_APPLY_IGNORE_SIMPLIFY = 1 << 3, } ModifierApplyFlag; typedef struct ModifierUpdateDepsgraphContext { diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index de92077b052..785c3eedcfc 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -3777,10 +3777,10 @@ void BKE_animsys_evaluate_all_animation(Main *main, 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) { \ if (ID_REAL_USERS(id) > 0) { \ @@ -3791,11 +3791,11 @@ void BKE_animsys_evaluate_all_animation(Main *main, (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) { \ if (ID_REAL_USERS(id) > 0) { \ @@ -3906,9 +3906,9 @@ void BKE_animsys_eval_animdata(Depsgraph *depsgraph, ID *id) { float ctime = DEG_get_ctime(depsgraph); AnimData *adt = BKE_animdata_from_id(id); - Scene *scene = NULL; /* XXX: this is only needed for flushing RNA updates, - * which should get handled as part of the dependency graph instead... - */ + /* XXX: this is only needed for flushing RNA updates, + * which should get handled as part of the dependency graph instead. */ + Scene *scene = NULL; DEG_debug_print_eval_time(depsgraph, __func__, id->name, id, ctime); BKE_animsys_evaluate_animdata(depsgraph, scene, id, adt, ctime, ADT_RECALC_ANIM); } diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 9f25cd14499..3062c4d52fa 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -713,7 +713,7 @@ static float cloth_shrink_factor(ClothModifierData *clmd, ClothVertex *verts, in float k2 = base + delta * verts[i2].shrink_factor; /* Use geometrical mean to average two factors since it behaves better - for diagonals when a rectangle transforms into a trapezoid. */ + * for diagonals when a rectangle transforms into a trapezoid. */ return sqrtf(k1 * k2); } diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 67e1f36b222..41dc82cf05f 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -73,8 +73,8 @@ typedef struct SelfColDetectData { } SelfColDetectData; /*********************************** -Collision modifier code start -***********************************/ + * Collision modifier code start + ***********************************/ /* step is limited from 0 (frame start position) to 1 (frame end position) */ void collision_move_object(CollisionModifierData *collmd, float step, float prevstep) @@ -178,9 +178,9 @@ void bvhtree_update_from_mvert(BVHTree *bvhtree, BLI_bvhtree_update_tree(bvhtree); } -/*********************************** -Collision modifier code end -***********************************/ +/* *************************** + * Collision modifier code end + * *************************** */ BLI_INLINE int next_ind(int i) { diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index 7769f3aff86..c0effb1cb32 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -1192,7 +1192,7 @@ static bool data_transfer_layersmapping_vgroups_multisrc_to_dst(ListBase *r_map, } if (r_map) { /* At this stage, we **need** a valid CD_MDEFORMVERT layer on dest! - * use_create is not relevant in this case */ + * use_create is not relevant in this case */ if (!data_dst) { data_dst = CustomData_add_layer(cd_dst, CD_MDEFORMVERT, CD_CALLOC, NULL, num_elem_dst); } diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 4311402ef42..ffb3bad12e6 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -669,7 +669,7 @@ enum { * And in some cases it is even the same value as FT_Face->bbox.yMax/yMin (font top and bottom respectively). * * The em_height here is relative to FT_Face->bbox. -*/ + */ #define ASCENT(vfd) ((vfd)->ascender * (vfd)->em_height) #define DESCENT(vfd) ((vfd)->em_height - ASCENT(vfd)) diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index c2c8fb78a32..46315e1bc9a 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -852,10 +852,10 @@ static const char *particle_adrcodes_to_paths(int adrcode, int *array_index) return "settings.billboard_tilt"; /* PartDeflect needs to be sorted out properly in rna_object_force; - * If anyone else works on this, but is unfamiliar, these particular - * settings reference the particles of the system themselves - * being used as forces -- it will use the same rna structure - * as the similar object forces */ + * If anyone else works on this, but is unfamiliar, these particular + * settings reference the particles of the system themselves + * being used as forces -- it will use the same rna structure + * as the similar object forces */ #if 0 case PART_PD_FSTR: if (part->pd) diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index ee6faeaee3d..45bade78207 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -2188,10 +2188,10 @@ static bNodeSocket *make_socket_interface(bNodeTree *ntree, BLI_snprintf(sock->identifier, MAX_NAME, "Output_%d", own_index); #ifdef USE_NODE_COMPAT_CUSTOMNODES /* XXX forward compatibility: - * own_index is deprecated, but needs to be set here. - * Node sockets generally use the identifier string instead now, - * but reconstructing own_index in writefile.c would require parsing the identifier string. - */ + * own_index is deprecated, but needs to be set here. + * Node sockets generally use the identifier string instead now, + * but reconstructing own_index in writefile.c would require parsing the identifier string. + */ # if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406)) || defined(__clang__) # pragma GCC diagnostic push diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 65ad1c483c3..37b6211916c 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -644,8 +644,8 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count v0 = (sb->totpoint - a); for (b = bp->nofsprings; b > 0; b--) { bs = sb->bspring + bp->springs[b - 1]; - /*nasty thing here that springs have two ends - so here we have to make sure we examine the other */ + /* Nasty thing here that springs have two ends + * so here we have to make sure we examine the other */ if (v0 == bs->v1) { bpo = sb->bpoint + bs->v2; notthis = bs->v2; @@ -3289,11 +3289,13 @@ static void softbody_step( /* special case of 2nd order Runge-Kutta type AKA Heun */ int mid_flags = 0; float err = 0; - float forcetimemax = 1.0f; /* set defaults guess we shall do one frame */ - float forcetimemin = 0.01f; /* set defaults guess 1/100 is tight enough */ - float timedone = 0.0; /* how far did we get without violating error condition */ - /* loops = counter for emergency brake - * we don't want to lock up the system if physics fail */ + /* Set defaults guess we shall do one frame */ + float forcetimemax = 1.0f; + /* Set defaults guess 1/100 is tight enough */ + float forcetimemin = 0.01f; + /* How far did we get without violating error condition. */ + float timedone = 0.0; + /* Loops = counter for emergency brake we don't want to lock up the system if physics fail. */ int loops = 0; SoftHeunTol = sb->rklimit; /* humm .. this should be calculated from sb parameters and sizes */ diff --git a/source/blender/blenkernel/intern/tracking_auto.c b/source/blender/blenkernel/intern/tracking_auto.c index e93a5780b81..8a474725b0c 100644 --- a/source/blender/blenkernel/intern/tracking_auto.c +++ b/source/blender/blenkernel/intern/tracking_auto.c @@ -45,8 +45,7 @@ typedef struct AutoTrackOptions { int clip_index; /** Index of the clip this track belogs to. */ int track_index; /* Index of the track in AutoTrack tracks structure. */ MovieTrackingTrack *track; /* Pointer to an original track/ */ - libmv_TrackRegionOptions track_region_options; /* Options for the region - tracker. */ + libmv_TrackRegionOptions track_region_options; /* Options for the region tracker. */ bool use_keyframe_match; /* Keyframe pattern matching. */ /* TODO(sergey): A bit awkward to keep it in here, only used to |