diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 10:19:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 14:04:51 +0300 |
commit | 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch) | |
tree | e7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/blenkernel | |
parent | c735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff) |
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/blenkernel')
43 files changed, 225 insertions, 223 deletions
diff --git a/source/blender/blenkernel/BKE_addon.h b/source/blender/blenkernel/BKE_addon.h index 73e3f6e41dc..03d29d47a83 100644 --- a/source/blender/blenkernel/BKE_addon.h +++ b/source/blender/blenkernel/BKE_addon.h @@ -29,7 +29,7 @@ struct bAddon; #ifdef __RNA_TYPES_H__ typedef struct bAddonPrefType { /* type info */ - char idname[64]; // best keep the same size as BKE_ST_MAXNAME + char idname[64]; /* best keep the same size as #BKE_ST_MAXNAME */ /* RNA integration */ ExtensionRNA rna_ext; diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index 965bb7b737e..3a5328a33e2 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -63,14 +63,14 @@ typedef enum { //////////////////////////////////////// /* used for collisions in collision.c */ typedef struct CollPair { - unsigned int face1; // cloth face - unsigned int face2; // object face + unsigned int face1; /* cloth face */ + unsigned int face2; /* object face */ float distance; float normal[3]; - float vector[3]; // unnormalized collision vector: p2-p1 - float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 + float vector[3]; /* unnormalized collision vector: p2-p1 */ + float pa[3], pb[3]; /* collision point p1 on face1, p2 on face2 */ int flag; - float time; // collision time, from 0 up to 1 + float time; /* collision time, from 0 up to 1 */ /* mesh-mesh collision */ #ifdef WITH_ELTOPO /*either ap* or bp* can be set, but not both*/ @@ -90,7 +90,7 @@ typedef struct EdgeCollPair { float vector[3]; float time; int lastsign; - float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 + float pa[3], pb[3]; /* collision point p1 on face1, p2 on face2 */ } EdgeCollPair; /* used for collisions in collision.c */ @@ -100,7 +100,7 @@ typedef struct FaceCollPair { float vector[3]; float time; int lastsign; - float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 + float pa[3], pb[3]; /* collision point p1 on face1, p2 on face2 */ } FaceCollPair; //////////////////////////////////////// @@ -126,8 +126,8 @@ void bvhtree_update_from_mvert(BVHTree *bvhtree, ///////////////////////////////////////////////// -// move Collision modifier object inter-frame with step = [0,1] -// defined in collisions.c +/* move Collision modifier object inter-frame with step = [0,1] + * defined in collisions.c */ void collision_move_object(struct CollisionModifierData *collmd, const float step, const float prevstep, diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index 20190817a8e..7ac980e9d94 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -115,7 +115,7 @@ struct Scene *BKE_scene_find_from_collection(const struct Main *bmain, const struct Collection *collection); #ifdef DURIAN_CAMERA_SWITCH -struct Object *BKE_scene_camera_switch_find(struct Scene *scene); // DURIAN_CAMERA_SWITCH +struct Object *BKE_scene_camera_switch_find(struct Scene *scene); /* DURIAN_CAMERA_SWITCH */ #endif bool BKE_scene_camera_switch_update(struct Scene *scene); diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h index b0923be8434..d1cffd26432 100644 --- a/source/blender/blenkernel/BKE_softbody.h +++ b/source/blender/blenkernel/BKE_softbody.h @@ -40,7 +40,7 @@ typedef struct BodyPoint { int *springs; float choke, choke2, frozen; float colball; - short loc_flag; // reserved by locale module specific states + short loc_flag; /* reserved by locale module specific states */ // char octantflag; float mass; float springweight; diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index ec2fb5f5bdb..d63c5fe12ab 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -22,7 +22,7 @@ #include <stdlib.h> #include <string.h> -#include "BLI_sys_types.h" // for intptr_t support +#include "BLI_sys_types.h" /* for intptr_t support */ #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" /* for BLI_assert */ diff --git a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c index 22a4bf18f7f..99ea1fb9607 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c +++ b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c @@ -18,7 +18,7 @@ * \ingroup bke */ -#include "BLI_sys_types.h" // for intptr_t support +#include "BLI_sys_types.h" /* for intptr_t support */ #include "MEM_guardedalloc.h" #include "BLI_math.h" diff --git a/source/blender/blenkernel/intern/CCGSubSurf_util.c b/source/blender/blenkernel/intern/CCGSubSurf_util.c index bc63d8b97f7..3941b42d4b3 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_util.c +++ b/source/blender/blenkernel/intern/CCGSubSurf_util.c @@ -22,7 +22,7 @@ #include <stdlib.h> #include <string.h> -#include "BLI_sys_types.h" // for intptr_t support +#include "BLI_sys_types.h" /* for intptr_t support */ #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" /* for BLI_assert */ diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 9cb03a137a7..8f47739151e 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -199,17 +199,17 @@ static void action_blend_read_data(BlendDataReader *reader, ID *id) bAction *act = (bAction *)id; BLO_read_list(reader, &act->curves); - BLO_read_list(reader, &act->chanbase); // XXX deprecated - old animation system + BLO_read_list(reader, &act->chanbase); /* XXX deprecated - old animation system */ BLO_read_list(reader, &act->groups); BLO_read_list(reader, &act->markers); - // XXX deprecated - old animation system <<< + /* XXX deprecated - old animation system <<< */ LISTBASE_FOREACH (bActionChannel *, achan, &act->chanbase) { BLO_read_data_address(reader, &achan->grp); BLO_read_list(reader, &achan->constraintChannels); } - // >>> XXX deprecated - old animation system + /* >>> XXX deprecated - old animation system */ BKE_fcurve_blend_read_data(reader, &act->curves); @@ -230,12 +230,12 @@ static void action_blend_read_lib(BlendLibReader *reader, ID *id) { bAction *act = (bAction *)id; - // XXX deprecated - old animation system <<< + /* XXX deprecated - old animation system <<< */ LISTBASE_FOREACH (bActionChannel *, chan, &act->chanbase) { BLO_read_id_address(reader, act->id.lib, &chan->ipo); blend_read_lib_constraint_channels(reader, &act->id, &chan->constraintChannels); } - // >>> XXX deprecated - old animation system + /* >>> XXX deprecated - old animation system */ BKE_fcurve_blend_read_lib(reader, &act->id, &act->curves); @@ -257,12 +257,12 @@ static void action_blend_read_expand(BlendExpander *expander, ID *id) { bAction *act = (bAction *)id; - // XXX deprecated - old animation system -------------- + /* XXX deprecated - old animation system -------------- */ LISTBASE_FOREACH (bActionChannel *, chan, &act->chanbase) { BLO_expand(expander, chan->ipo); blend_read_expand_constraint_channels(expander, &chan->constraintChannels); } - // --------------------------------------------------- + /* --------------------------------------------------- */ /* F-Curves in Action */ BKE_fcurve_blend_read_expand(expander, &act->curves); @@ -827,7 +827,7 @@ void BKE_pose_copy_data_ex(bPose **dst, if (copy_constraints) { BKE_constraints_copy_ex( - &listb, &pchan->constraints, flag, true); // BKE_constraints_copy NULLs listb + &listb, &pchan->constraints, flag, true); /* BKE_constraints_copy NULLs listb */ pchan->constraints = listb; /* XXX: This is needed for motionpath drawing to work. diff --git a/source/blender/blenkernel/intern/anim_data.c b/source/blender/blenkernel/intern/anim_data.c index 6ff705a0379..4e24fc27be7 100644 --- a/source/blender/blenkernel/intern/anim_data.c +++ b/source/blender/blenkernel/intern/anim_data.c @@ -1527,14 +1527,14 @@ void BKE_animdata_blend_write(BlendWriter *writer, struct AnimData *adt) BKE_fcurve_blend_write(writer, &adt->drivers); /* write overrides */ - // FIXME: are these needed? + /* FIXME: are these needed? */ LISTBASE_FOREACH (AnimOverride *, aor, &adt->overrides) { /* overrides consist of base data + rna_path */ BLO_write_struct(writer, AnimOverride, aor); BLO_write_string(writer, aor->rna_path); } - // TODO write the remaps (if they are needed) + /* TODO write the remaps (if they are needed) */ /* write NLA data */ BKE_nla_blend_write(writer, &adt->nla_tracks); @@ -1553,7 +1553,7 @@ void BKE_animdata_blend_read_data(BlendDataReader *reader, AnimData *adt) adt->driver_array = NULL; /* link overrides */ - // TODO... + /* TODO... */ /* link NLA-data */ BLO_read_list(reader, &adt->nla_tracks); @@ -1563,8 +1563,8 @@ void BKE_animdata_blend_read_data(BlendDataReader *reader, AnimData *adt) * if we're in 'tweaking mode', we need to be able to have this loaded back for * undo, but also since users may not exit tweakmode before saving (T24535) */ - // TODO: it's not really nice that anyone should be able to save the file in this - // state, but it's going to be too hard to enforce this single case... + /* TODO: it's not really nice that anyone should be able to save the file in this + * state, but it's going to be too hard to enforce this single case... */ BLO_read_data_address(reader, &adt->act_track); BLO_read_data_address(reader, &adt->actstrip); } diff --git a/source/blender/blenkernel/intern/armature_test.cc b/source/blender/blenkernel/intern/armature_test.cc index cf17c37bc69..f3c0d2f407a 100644 --- a/source/blender/blenkernel/intern/armature_test.cc +++ b/source/blender/blenkernel/intern/armature_test.cc @@ -34,7 +34,7 @@ TEST(mat3_vec_to_roll, UnitMatrix) unit_m3(unit_matrix); - // Any vector with a unit matrix should return zero roll. + /* Any vector with a unit matrix should return zero roll. */ mat3_vec_to_roll(unit_matrix, unit_matrix[0], &roll); EXPECT_FLOAT_EQ(0.0f, roll); @@ -45,12 +45,12 @@ TEST(mat3_vec_to_roll, UnitMatrix) EXPECT_FLOAT_EQ(0.0f, roll); { - // Non-unit vector. + /* Non-unit vector. */ float vector[3] = {1.0f, 1.0f, 1.0f}; mat3_vec_to_roll(unit_matrix, vector, &roll); EXPECT_NEAR(0.0f, roll, FLOAT_EPSILON); - // Normalized version of the above vector. + /* Normalized version of the above vector. */ normalize_v3(vector); mat3_vec_to_roll(unit_matrix, vector, &roll); EXPECT_NEAR(0.0f, roll, FLOAT_EPSILON); diff --git a/source/blender/blenkernel/intern/blender_undo.c b/source/blender/blenkernel/intern/blender_undo.c index a6f84f3c3a4..9e061b1ac69 100644 --- a/source/blender/blenkernel/intern/blender_undo.c +++ b/source/blender/blenkernel/intern/blender_undo.c @@ -22,9 +22,9 @@ */ #ifndef _WIN32 -# include <unistd.h> // for read close +# include <unistd.h> /* for read close */ #else -# include <io.h> // for open close read +# include <io.h> /* for open close read */ #endif #include <errno.h> diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 3d5451125d9..403722b80cf 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -216,7 +216,7 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) BKE_ptcache_id_from_cloth(&pid, ob, clmd); - // don't do anything as long as we're in editmode! + /* don't do anything as long as we're in editmode! */ if (pid.cache->edit && ob->mode & OB_MODE_PARTICLE_EDIT) { return; } @@ -439,7 +439,7 @@ void cloth_free_modifier(ClothModifierData *clmd) if (cloth) { SIM_cloth_solver_free(clmd); - // Free the verts. + /* Free the verts. */ if (cloth->verts != NULL) { MEM_freeN(cloth->verts); } @@ -447,7 +447,7 @@ void cloth_free_modifier(ClothModifierData *clmd) cloth->verts = NULL; cloth->mvert_num = 0; - // Free the springs. + /* Free the springs. */ if (cloth->springs != NULL) { LinkNode *search = cloth->springs; while (search) { @@ -467,7 +467,7 @@ void cloth_free_modifier(ClothModifierData *clmd) cloth->springs = NULL; cloth->numsprings = 0; - // free BVH collision tree + /* free BVH collision tree */ if (cloth->bvhtree) { BLI_bvhtree_free(cloth->bvhtree); } @@ -476,7 +476,7 @@ void cloth_free_modifier(ClothModifierData *clmd) BLI_bvhtree_free(cloth->bvhselftree); } - // we save our faces for collision objects + /* we save our faces for collision objects */ if (cloth->tri) { MEM_freeN(cloth->tri); } @@ -521,7 +521,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd) SIM_cloth_solver_free(clmd); - // Free the verts. + /* Free the verts. */ if (cloth->verts != NULL) { MEM_freeN(cloth->verts); } @@ -529,7 +529,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd) cloth->verts = NULL; cloth->mvert_num = 0; - // Free the springs. + /* Free the springs. */ if (cloth->springs != NULL) { LinkNode *search = cloth->springs; while (search) { @@ -549,7 +549,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd) cloth->springs = NULL; cloth->numsprings = 0; - // free BVH collision tree + /* free BVH collision tree */ if (cloth->bvhtree) { BLI_bvhtree_free(cloth->bvhtree); } @@ -558,7 +558,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd) BLI_bvhtree_free(cloth->bvhselftree); } - // we save our faces for collision objects + /* we save our faces for collision objects */ if (cloth->tri) { MEM_freeN(cloth->tri); } @@ -655,8 +655,8 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, Mesh *mesh) /* goalfac= 1.0f; */ /* UNUSED */ - // Kicking goal factor to simplify things...who uses that anyway? - // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); + /* Kicking goal factor to simplify things...who uses that anyway? */ + // ABS (clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal); verts->goal = pow4f(verts->goal); if (verts->goal >= SOFTGOALSNAP) { @@ -727,7 +727,7 @@ static bool cloth_from_object( float(*shapekey_rest)[3] = NULL; const float tnull[3] = {0, 0, 0}; - // If we have a clothObject, free it. + /* If we have a clothObject, free it. */ if (clmd->clothObject != NULL) { cloth_free_modifier(clmd); if (G.debug & G_DEBUG_SIMDATA) { @@ -735,7 +735,7 @@ static bool cloth_from_object( } } - // Allocate a new cloth object. + /* Allocate a new cloth object. */ clmd->clothObject = MEM_callocN(sizeof(Cloth), "cloth"); if (clmd->clothObject) { clmd->clothObject->old_solver_type = 255; @@ -746,14 +746,14 @@ static bool cloth_from_object( return false; } - // mesh input objects need Mesh + /* mesh input objects need Mesh */ if (!mesh) { return false; } cloth_from_mesh(clmd, mesh); - // create springs + /* create springs */ clmd->clothObject->springs = NULL; clmd->clothObject->numsprings = -1; @@ -768,7 +768,7 @@ static bool cloth_from_object( verts = clmd->clothObject->verts; - // set initial values + /* set initial values */ for (i = 0; i < mesh->totvert; i++, verts++) { if (first) { copy_v3_v3(verts->x, mvert[i].co); @@ -808,8 +808,8 @@ static bool cloth_from_object( copy_v3_v3(verts->impulse, tnull); } - // apply / set vertex groups - // has to be happen before springs are build! + /* apply / set vertex groups */ + /* has to be happen before springs are build! */ cloth_apply_vgroup(clmd, mesh); if (!cloth_build_springs(clmd, mesh)) { @@ -818,7 +818,7 @@ static bool cloth_from_object( return false; } - // init our solver + /* init our solver */ SIM_cloth_solver_init(ob, clmd); if (!first) { @@ -1471,13 +1471,13 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh) const MEdge *medge = mesh->medge; const MPoly *mpoly = mesh->mpoly; const MLoop *mloop = mesh->mloop; - int index2 = 0; // our second vertex index + int index2 = 0; /* our second vertex index */ LinkNodePair *edgelist = NULL; EdgeSet *edgeset = NULL; LinkNode *search = NULL, *search2 = NULL; BendSpringRef *spring_ref = NULL; - // error handling + /* error handling */ if (numedges == 0) { return false; } @@ -1599,7 +1599,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh) if (spring) { spring_verts_ordered_set(spring, medge[i].v1, medge[i].v2); if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SEW && medge[i].flag & ME_LOOSEEDGE) { - // handle sewing (loose edges will be pulled together) + /* handle sewing (loose edges will be pulled together) */ spring->restlen = 0.0f; spring->lin_stiffness = 1.0f; spring->type = CLOTH_SPRING_TYPE_SEWING; diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 30e8a7948ba..274546132fb 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -744,7 +744,7 @@ static void default_get_tarmat_full_bbone(struct Depsgraph *UNUSED(depsgraph), * (Hopefully all compilers will be happy with the lines with just a space on them. * Those are really just to help this code easier to read). */ -// TODO: cope with getting rotation order... +/* TODO: cope with getting rotation order... */ #define SINGLETARGET_GET_TARS(con, datatar, datasubtarget, ct, list) \ { \ ct = MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \ @@ -779,7 +779,7 @@ static void default_get_tarmat_full_bbone(struct Depsgraph *UNUSED(depsgraph), * (Hopefully all compilers will be happy with the lines with just a space on them. Those are * really just to help this code easier to read) */ -// TODO: cope with getting rotation order... +/* TODO: cope with getting rotation order... */ #define SINGLETARGETNS_GET_TARS(con, datatar, ct, list) \ { \ ct = MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \ @@ -4340,7 +4340,7 @@ static void damptrack_do_transform(float matrix[4][4], const float tarvec_in[3], * we may have destroyed that in the process of multiplying the matrix */ unit_m4(tmat); - mul_m4_m3m4(tmat, rmat, matrix); // m1, m3, m2 + mul_m4_m3m4(tmat, rmat, matrix); /* m1, m3, m2 */ copy_m4_m4(matrix, tmat); copy_v3_v3(matrix[3], obloc); @@ -4577,7 +4577,7 @@ static bConstraintTypeInfo CTI_PIVOT = { pivotcon_id_looper, /* id looper */ NULL, /* copy data */ NULL, - /* new data */ // XXX: might be needed to get 'normal' pivot behavior... + /* new data */ /* XXX: might be needed to get 'normal' pivot behavior... */ pivotcon_get_tars, /* get constraint targets */ pivotcon_flush_tars, /* flush constraint targets */ default_get_tarmat, /* get target matrix */ diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 8a5b60fb0e8..c0da1f41c88 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -21,7 +21,7 @@ * \ingroup bke */ -#include <math.h> // floor +#include <math.h> /* floor */ #include <stdlib.h> #include <string.h> @@ -282,7 +282,7 @@ static void curve_blend_read_lib(BlendLibReader *reader, ID *id) BLO_read_id_address(reader, cu->id.lib, &cu->vfonti); BLO_read_id_address(reader, cu->id.lib, &cu->vfontbi); - BLO_read_id_address(reader, cu->id.lib, &cu->ipo); // XXX deprecated - old animation system + BLO_read_id_address(reader, cu->id.lib, &cu->ipo); /* XXX deprecated - old animation system */ BLO_read_id_address(reader, cu->id.lib, &cu->key); } @@ -298,7 +298,7 @@ static void curve_blend_read_expand(BlendExpander *expander, ID *id) BLO_expand(expander, cu->vfonti); BLO_expand(expander, cu->vfontbi); BLO_expand(expander, cu->key); - BLO_expand(expander, cu->ipo); // XXX deprecated - old animation system + BLO_expand(expander, cu->ipo); /* XXX deprecated - old animation system */ BLO_expand(expander, cu->bevobj); BLO_expand(expander, cu->taperobj); BLO_expand(expander, cu->textoncurve); @@ -3639,7 +3639,7 @@ static bool tridiagonal_solve_with_limits(float *a, * see if it may be a good idea to unlock some handles. */ if (!locked) { for (int i = 0; i < solve_count; i++) { - // to definitely avoid infinite loops limit this to 2 times + /* to definitely avoid infinite loops limit this to 2 times */ if (!is_locked[i] || num_unlocks[i] >= 2) { continue; } diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 856e0e872b3..d2a9064a373 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -444,8 +444,8 @@ FCurve *BKE_fcurve_find_by_rna_context_ui(bContext *C, continue; } - // XXX: the logic here is duplicated with a function up above - /* animation takes priority over drivers */ + /* XXX: the logic here is duplicated with a function up above + * animation takes priority over drivers. */ if (adt->action && adt->action->curves.first) { fcu = BKE_fcurve_find(&adt->action->curves, path, rnaindex); diff --git a/source/blender/blenkernel/intern/fcurve_test.cc b/source/blender/blenkernel/intern/fcurve_test.cc index a58f519adfb..f258e2ff28d 100644 --- a/source/blender/blenkernel/intern/fcurve_test.cc +++ b/source/blender/blenkernel/intern/fcurve_test.cc @@ -27,7 +27,7 @@ namespace blender::bke::tests { -// Epsilon for floating point comparisons. +/* Epsilon for floating point comparisons. */ static const float EPSILON = 1e-7f; TEST(evaluate_fcurve, EmptyFCurve) @@ -45,9 +45,9 @@ TEST(evaluate_fcurve, OnKeys) insert_vert_fcurve(fcu, 2.0f, 13.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF); insert_vert_fcurve(fcu, 3.0f, 19.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF); - EXPECT_NEAR(evaluate_fcurve(fcu, 1.0f), 7.0f, EPSILON); // hits 'on or before first' function - EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f), 13.0f, EPSILON); // hits 'between' function - EXPECT_NEAR(evaluate_fcurve(fcu, 3.0f), 19.0f, EPSILON); // hits 'on or after last' function + EXPECT_NEAR(evaluate_fcurve(fcu, 1.0f), 7.0f, EPSILON); /* hits 'on or before first' function */ + EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f), 13.0f, EPSILON); /* hits 'between' function */ + EXPECT_NEAR(evaluate_fcurve(fcu, 3.0f), 19.0f, EPSILON); /* hits 'on or after last' function */ /* Also test within a specific time epsilon of the keys, as this was an issue in T39207. * This epsilon is just slightly smaller than the epsilon given to binarysearch_bezt_index_ex() @@ -102,21 +102,21 @@ TEST(evaluate_fcurve, InterpolationBezier) EXPECT_EQ(fcu->bezt[0].ipo, BEZT_IPO_BEZ); EXPECT_EQ(fcu->bezt[1].ipo, BEZT_IPO_BEZ); - // Test with default handles. + /* Test with default handles. */ EXPECT_NEAR(evaluate_fcurve(fcu, 1.25f), 7.8297067f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, 1.50f), 10.0f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, 1.75f), 12.170294f, EPSILON); - // Test with modified handles. - fcu->bezt[0].vec[0][0] = 0.71855f; // left handle X - fcu->bezt[0].vec[0][1] = 6.22482f; // left handle Y - fcu->bezt[0].vec[2][0] = 1.35148f; // right handle X - fcu->bezt[0].vec[2][1] = 7.96806f; // right handle Y + /* Test with modified handles. */ + fcu->bezt[0].vec[0][0] = 0.71855f; /* left handle X */ + fcu->bezt[0].vec[0][1] = 6.22482f; /* left handle Y */ + fcu->bezt[0].vec[2][0] = 1.35148f; /* right handle X */ + fcu->bezt[0].vec[2][1] = 7.96806f; /* right handle Y */ - fcu->bezt[1].vec[0][0] = 1.66667f; // left handle X - fcu->bezt[1].vec[0][1] = 10.4136f; // left handle Y - fcu->bezt[1].vec[2][0] = 2.33333f; // right handle X - fcu->bezt[1].vec[2][1] = 15.5864f; // right handle Y + fcu->bezt[1].vec[0][0] = 1.66667f; /* left handle X */ + fcu->bezt[1].vec[0][1] = 10.4136f; /* left handle Y */ + fcu->bezt[1].vec[2][0] = 2.33333f; /* right handle X */ + fcu->bezt[1].vec[2][1] = 15.5864f; /* right handle Y */ EXPECT_NEAR(evaluate_fcurve(fcu, 1.25f), 7.945497f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, 1.50f), 9.3495407f, EPSILON); @@ -155,19 +155,19 @@ TEST(evaluate_fcurve, ExtrapolationLinearKeys) fcu->bezt[1].ipo = BEZT_IPO_LIN; fcu->extend = FCURVE_EXTRAPOLATE_LINEAR; - // Before first keyframe. + /* Before first keyframe. */ EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 5.5f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, 0.50f), 4.0f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, -1.50f), -8.0f, EPSILON); - // After last keyframe. + /* After last keyframe. */ EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 17.5f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 22.0f, EPSILON); fcu->extend = FCURVE_EXTRAPOLATE_CONSTANT; - // Before first keyframe. + /* Before first keyframe. */ EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 7.0f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, -1.50f), 7.0f, EPSILON); - // After last keyframe. + /* After last keyframe. */ EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 13.0f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 13.0f, EPSILON); @@ -181,29 +181,29 @@ TEST(evaluate_fcurve, ExtrapolationBezierKeys) EXPECT_EQ(insert_vert_fcurve(fcu, 1.0f, 7.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF), 0); EXPECT_EQ(insert_vert_fcurve(fcu, 2.0f, 13.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF), 1); - fcu->bezt[0].vec[0][0] = 0.71855f; // left handle X - fcu->bezt[0].vec[0][1] = 6.22482f; // left handle Y - fcu->bezt[0].vec[2][0] = 1.35148f; // right handle X - fcu->bezt[0].vec[2][1] = 7.96806f; // right handle Y + fcu->bezt[0].vec[0][0] = 0.71855f; /* left handle X */ + fcu->bezt[0].vec[0][1] = 6.22482f; /* left handle Y */ + fcu->bezt[0].vec[2][0] = 1.35148f; /* right handle X */ + fcu->bezt[0].vec[2][1] = 7.96806f; /* right handle Y */ - fcu->bezt[1].vec[0][0] = 1.66667f; // left handle X - fcu->bezt[1].vec[0][1] = 10.4136f; // left handle Y - fcu->bezt[1].vec[2][0] = 2.33333f; // right handle X - fcu->bezt[1].vec[2][1] = 15.5864f; // right handle Y + fcu->bezt[1].vec[0][0] = 1.66667f; /* left handle X */ + fcu->bezt[1].vec[0][1] = 10.4136f; /* left handle Y */ + fcu->bezt[1].vec[2][0] = 2.33333f; /* right handle X */ + fcu->bezt[1].vec[2][1] = 15.5864f; /* right handle Y */ fcu->extend = FCURVE_EXTRAPOLATE_LINEAR; - // Before first keyframe. + /* Before first keyframe. */ EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 6.3114409f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, -0.50f), 2.8686447f, EPSILON); - // After last keyframe. + /* After last keyframe. */ EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 18.81946f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 24.63892f, EPSILON); fcu->extend = FCURVE_EXTRAPOLATE_CONSTANT; - // Before first keyframe. + /* Before first keyframe. */ EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 7.0f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, -1.50f), 7.0f, EPSILON); - // After last keyframe. + /* After last keyframe. */ EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 13.0f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 13.0f, EPSILON); @@ -232,7 +232,7 @@ TEST(fcurve_subdivide, BKE_bezt_subdivide_handles) /* Create new keyframe point with defaults from insert_vert_fcurve(). */ BezTriple beztr; - const float x = 7.375f; // at this X-coord, the FCurve should evaluate to 1.000f. + const float x = 7.375f; /* at this X-coord, the FCurve should evaluate to 1.000f. */ const float y = 1.000f; beztr.vec[0][0] = x - 1.0f; beztr.vec[0][1] = y; @@ -249,25 +249,25 @@ TEST(fcurve_subdivide, BKE_bezt_subdivide_handles) EXPECT_FLOAT_EQ(y_delta, 0.0f); - EXPECT_FLOAT_EQ(fcu->bezt[0].vec[0][0], -5.0f); // Left handle should not be touched. + EXPECT_FLOAT_EQ(fcu->bezt[0].vec[0][0], -5.0f); /* Left handle should not be touched. */ EXPECT_FLOAT_EQ(fcu->bezt[0].vec[0][1], 0.0f); - EXPECT_FLOAT_EQ(fcu->bezt[0].vec[1][0], 1.0f); // Coordinates should not be touched. + EXPECT_FLOAT_EQ(fcu->bezt[0].vec[1][0], 1.0f); /* Coordinates should not be touched. */ EXPECT_FLOAT_EQ(fcu->bezt[0].vec[1][1], 0.0f); - EXPECT_FLOAT_EQ(fcu->bezt[0].vec[2][0], 1.5f); // Right handle should be updated. + EXPECT_FLOAT_EQ(fcu->bezt[0].vec[2][0], 1.5f); /* Right handle should be updated. */ EXPECT_FLOAT_EQ(fcu->bezt[0].vec[2][1], 2.0f); - EXPECT_FLOAT_EQ(fcu->bezt[1].vec[0][0], 13.0f); // Left handle should be updated. + EXPECT_FLOAT_EQ(fcu->bezt[1].vec[0][0], 13.0f); /* Left handle should be updated. */ EXPECT_FLOAT_EQ(fcu->bezt[1].vec[0][1], 0.0f); - EXPECT_FLOAT_EQ(fcu->bezt[1].vec[1][0], 13.0f); // Coordinates should not be touched. + EXPECT_FLOAT_EQ(fcu->bezt[1].vec[1][0], 13.0f); /* Coordinates should not be touched. */ EXPECT_FLOAT_EQ(fcu->bezt[1].vec[1][1], 2.0f); - EXPECT_FLOAT_EQ(fcu->bezt[1].vec[2][0], 16.0f); // Right handle should not be touched + EXPECT_FLOAT_EQ(fcu->bezt[1].vec[2][0], 16.0f); /* Right handle should not be touched */ EXPECT_FLOAT_EQ(fcu->bezt[1].vec[2][1], -3.0f); - EXPECT_FLOAT_EQ(beztr.vec[0][0], 4.5f); // Left handle should be updated. + EXPECT_FLOAT_EQ(beztr.vec[0][0], 4.5f); /* Left handle should be updated. */ EXPECT_FLOAT_EQ(beztr.vec[0][1], 1.5f); - EXPECT_FLOAT_EQ(beztr.vec[1][0], 7.375f); // Coordinates should not be touched. + EXPECT_FLOAT_EQ(beztr.vec[1][0], 7.375f); /* Coordinates should not be touched. */ EXPECT_FLOAT_EQ(beztr.vec[1][1], 1.0f); - EXPECT_FLOAT_EQ(beztr.vec[2][0], 10.250); // Right handle should be updated. + EXPECT_FLOAT_EQ(beztr.vec[2][0], 10.250); /* Right handle should be updated. */ EXPECT_FLOAT_EQ(beztr.vec[2][1], 0.5); BKE_fcurve_free(fcu); diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 92decf000ca..a63e3fda5a3 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -3208,7 +3208,7 @@ static void update_effectors( effectors = BKE_effectors_create(depsgraph, ob, NULL, fds->effector_weights); if (effectors) { - // precalculate wind forces + /* Precalculate wind forces. */ UpdateEffectorsData data; data.scene = scene; data.fds = fds; diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 970b5a906e3..d13425f5ec9 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -133,8 +133,8 @@ static void fcm_generator_new_data(void *mdata) data->poly_order = 1; data->arraysize = 2; cp = data->coefficients = MEM_callocN(sizeof(float) * 2, "FMod_Generator_Coefs"); - cp[0] = 0; // y-offset - cp[1] = 1; // gradient + cp[0] = 0; /* y-offset */ + cp[1] = 1; /* gradient */ } static void fcm_generator_verify(FModifier *fcm) @@ -1057,7 +1057,8 @@ static void fmods_init_typeinfo(void) fmodifiersTypeInfo[3] = &FMI_ENVELOPE; /* Envelope F-Curve Modifier */ fmodifiersTypeInfo[4] = &FMI_CYCLES; /* Cycles F-Curve Modifier */ fmodifiersTypeInfo[5] = &FMI_NOISE; /* Apply-Noise F-Curve Modifier */ - fmodifiersTypeInfo[6] = NULL /*&FMI_FILTER*/; /* Filter F-Curve Modifier */ // XXX unimplemented + fmodifiersTypeInfo[6] = NULL /*&FMI_FILTER*/; + /* Filter F-Curve Modifier */ /* XXX unimplemented. */ fmodifiersTypeInfo[7] = &FMI_PYTHON; /* Custom Python F-Curve Modifier */ fmodifiersTypeInfo[8] = &FMI_LIMITS; /* Limits F-Curve Modifier */ fmodifiersTypeInfo[9] = &FMI_STEPPED; /* Stepped F-Curve Modifier */ diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c index 01e3eef4e19..bcec90cf0cf 100644 --- a/source/blender/blenkernel/intern/icons.c +++ b/source/blender/blenkernel/intern/icons.c @@ -51,7 +51,7 @@ #include "BKE_icons.h" #include "BKE_studiolight.h" -#include "BLI_sys_types.h" // for intptr_t support +#include "BLI_sys_types.h" /* for intptr_t support */ #include "GPU_texture.h" diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index af15b9143e7..9ad71918242 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -967,7 +967,7 @@ bool IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2) * \code{.c} * IDPropertyTemplate val; * IDProperty *group, *idgroup, *color; - * group = IDP_New(IDP_GROUP, val, "group1"); //groups don't need a template. + * group = IDP_New(IDP_GROUP, val, "group1"); // groups don't need a template. * * val.array.len = 4 * val.array.type = IDP_FLOAT; diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 29cf3cc0a8d..07e31abab48 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -95,7 +95,7 @@ #include "GPU_texture.h" -#include "BLI_sys_types.h" // for intptr_t support +#include "BLI_sys_types.h" /* for intptr_t support */ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" @@ -1812,7 +1812,7 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i im_format->depth = R_IMF_CHAN_DEPTH_16; } if (custom_flags & OPENEXR_COMPRESS) { - im_format->exr_codec = R_IMF_EXR_CODEC_ZIP; // Can't determine compression + im_format->exr_codec = R_IMF_EXR_CODEC_ZIP; /* Can't determine compression */ } if (imbuf->zbuf_float) { im_format->flag |= R_IMF_FLAG_ZBUF; @@ -2200,7 +2200,7 @@ void BKE_image_stamp_buf(Scene *scene, float w, h, pad; int x, y, y_ofs; float h_fixed; - const int mono = blf_mono_font_render; // XXX + const int mono = blf_mono_font_render; /* XXX */ struct ColorManagedDisplay *display; const char *display_device; diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 17060750ed9..1a87b931689 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -177,7 +177,7 @@ static AdrBit2Path *adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *to if ((blocktype == ID_OB) && (adrcode == OB_LAY)) { RET_ABP(ob_layer_bits); } - // XXX TODO: add other types... + /* XXX TODO: add other types... */ /* Normal curve */ return NULL; @@ -473,7 +473,7 @@ static const char *mtex_adrcodes_to_paths(int adrcode, int *UNUSED(array_index)) /* property identifier for path */ adrcode = (adrcode & (MA_MAP1 - 1)); switch (adrcode) { -#if 0 // XXX these are not wrapped in RNA yet! +#if 0 /* XXX these are not wrapped in RNA yet! */ case MAP_OFS_X: poin = &(mtex->ofs[0]); break; @@ -541,17 +541,17 @@ static const char *texture_adrcodes_to_paths(int adrcode, int *array_index) case TE_TURB: return "turbulence"; - case TE_NDEPTH: // XXX texture RNA undefined + case TE_NDEPTH: /* XXX texture RNA undefined */ // poin= &(tex->noisedepth); *type= IPO_SHORT; break; break; - case TE_NTYPE: // XXX texture RNA undefined + case TE_NTYPE: /* XXX texture RNA undefined */ // poin= &(tex->noisetype); *type= IPO_SHORT; break; break; case TE_N_BAS1: return "noise_basis"; case TE_N_BAS2: - return "noise_basis"; // XXX this is not yet defined in RNA... + return "noise_basis"; /* XXX this is not yet defined in RNA... */ /* voronoi */ case TE_VNW1: @@ -582,7 +582,7 @@ static const char *texture_adrcodes_to_paths(int adrcode, int *array_index) return "distortion_amount"; /* musgrave */ - case TE_MG_TYP: // XXX texture RNA undefined + case TE_MG_TYP: /* XXX texture RNA undefined */ // poin= &(tex->stype); *type= IPO_SHORT; break; break; case TE_MGH: @@ -717,31 +717,31 @@ static const char *camera_adrcodes_to_paths(int adrcode, int *array_index) /* result depends on adrcode */ switch (adrcode) { case CAM_LENS: -#if 0 /* XXX this cannot be resolved easily... \ - * perhaps we assume camera is perspective (works for most cases... */ +#if 0 /* XXX this cannot be resolved easily... \ + * perhaps we assume camera is perspective (works for most cases... */ if (ca->type == CAM_ORTHO) { return "ortho_scale"; } else { return "lens"; } -#else // XXX lazy hack for now... +#else /* XXX lazy hack for now... */ return "lens"; -#endif // XXX this cannot be resolved easily +#endif /* XXX this cannot be resolved easily */ case CAM_STA: return "clip_start"; case CAM_END: return "clip_end"; -#if 0 // XXX these are not defined in RNA +#if 0 /* XXX these are not defined in RNA */ case CAM_YF_APERT: poin = &(ca->YF_aperture); break; case CAM_YF_FDIST: poin = &(ca->dof_distance); break; -#endif // XXX these are not defined in RNA +#endif /* XXX these are not defined in RNA */ case CAM_SHIFT_X: return "shift_x"; @@ -1040,7 +1040,7 @@ static char *get_rna_access(ID *id, /* XXX problematic blocktypes */ case ID_SEQ: /* sequencer strip */ - // SEQ_FAC1: + /* SEQ_FAC1: */ switch (adrcode) { case SEQ_FAC1: propname = "effect_fader"; @@ -1052,7 +1052,8 @@ static char *get_rna_access(ID *id, propname = "blend_opacity"; break; } - // poin= &(seq->facf0); // XXX this doesn't seem to be included anywhere in sequencer RNA... + /* XXX this doesn't seem to be included anywhere in sequencer RNA... */ + // poin= &(seq->facf0); break; /* special hacks */ @@ -1187,7 +1188,7 @@ static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver) /* if 'pydriver', just copy data across */ if (idriver->type == IPO_DRIVER_TYPE_PYTHON) { /* PyDriver only requires the expression to be copied */ - // FIXME: expression will be useless due to API changes, but at least not totally lost + /* FIXME: expression will be useless due to API changes, but at least not totally lost */ cdriver->type = DRIVER_TYPE_PYTHON; if (idriver->name[0]) { BLI_strncpy(cdriver->expression, idriver->name, sizeof(cdriver->expression)); @@ -1219,7 +1220,7 @@ static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver) dtar = &dvar->targets[1]; dtar->id = (ID *)idriver->ob; dtar->idtype = ID_OB; - if (idriver->name[0]) { // xxx... for safety + if (idriver->name[0]) { /* xxx... for safety */ BLI_strncpy( dtar->pchan_name, idriver->name + DRIVER_NAME_OFFS, sizeof(dtar->pchan_name)); } @@ -1272,7 +1273,7 @@ static void fcurve_add_to_list( bActionGroup *agrp = NULL; /* init the temp action */ - memset(&tmp_act, 0, sizeof(bAction)); // XXX only enable this line if we get errors + memset(&tmp_act, 0, sizeof(bAction)); /* XXX only enable this line if we get errors */ tmp_act.groups.first = groups->first; tmp_act.groups.last = groups->last; tmp_act.curves.first = list->first; @@ -1544,7 +1545,7 @@ static void icu_to_fcurves(ID *id, */ 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))) { - const float fac = (float)M_PI / 18.0f; // 10.0f * M_PI/180.0f; + const float fac = (float)M_PI / 18.0f; /* 10.0f * M_PI/180.0f; */ dst->vec[0][1] *= fac; dst->vec[1][1] *= fac; @@ -1719,7 +1720,7 @@ static void action_to_animato( } /* get rid of all Action Groups */ - // XXX this is risky if there's some old + some new data in the Action... + /* XXX this is risky if there's some old + some new data in the Action... */ if (act->groups.first) { BLI_freelistN(&act->groups); } @@ -1793,7 +1794,7 @@ static void ipo_to_animdata( /* Convert curves to animato system * (separated into separate lists of F-Curves for animation and drivers), * and the try to put these lists in the right places, but do not free the lists here. */ - // XXX there shouldn't be any need for the groups, so don't supply pointer for that now... + /* XXX there shouldn't be any need for the groups, so don't supply pointer for that now... */ ipo_to_animato(id, ipo, actname, constname, seq, NULL, &anim, &drivers); /* deal with animation first */ @@ -1942,7 +1943,7 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips) } /* modifiers */ - // FIXME: for now, we just free them... + /* FIXME: for now, we just free them... */ if (as->modifiers.first) { BLI_freelistN(&as->modifiers); } @@ -1965,7 +1966,7 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips) * Data that has been converted should be freed immediately, which means that it is immediately * clear which data-blocks have yet to be converted, and also prevent freeing errors when we exit. */ -// XXX currently done after all file reading... +/* XXX currently done after all file reading... */ void do_versions_ipos_to_animato(Main *bmain) { ListBase drivers = {NULL, NULL}; @@ -2084,7 +2085,7 @@ void do_versions_ipos_to_animato(Main *bmain) } /* check for Action Constraint */ - // XXX do we really want to do this here? + /* XXX do we really want to do this here? */ } /* check constraint channels - we need to remove them anyway... */ diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 8d0413f64c5..95a8419b95d 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -183,14 +183,14 @@ static void shapekey_blend_read_lib(BlendLibReader *reader, ID *id) Key *key = (Key *)id; BLI_assert((key->id.tag & LIB_TAG_EXTERN) == 0); - BLO_read_id_address(reader, key->id.lib, &key->ipo); // XXX deprecated - old animation system + BLO_read_id_address(reader, key->id.lib, &key->ipo); /* XXX deprecated - old animation system */ BLO_read_id_address(reader, key->id.lib, &key->from); } static void shapekey_blend_read_expand(BlendExpander *expander, ID *id) { Key *key = (Key *)id; - BLO_expand(expander, key->ipo); // XXX deprecated - old animation system + BLO_expand(expander, key->ipo); /* XXX deprecated - old animation system */ } IDTypeInfo IDType_ID_KE = { @@ -922,7 +922,7 @@ static void key_evaluate_relative(const int start, reffrom = refb->data; poin += start * poinsize; - reffrom += key->elemsize * start; // key elemsize yes! + reffrom += key->elemsize * start; /* key elemsize yes! */ from += key->elemsize * start; for (b = start; b < end; b += step) { diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 4ed8a796d5d..6efc9d0753e 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -1631,18 +1631,19 @@ void BKE_view_layer_selected_editable_objects_iterator_begin(BLI_Iterator *iter, objects_iterator_begin(iter, data_in, BASE_VISIBLE_DEPSGRAPH | BASE_SELECTED); if (iter->valid) { if (BKE_object_is_libdata((Object *)iter->current) == false) { - // First object is valid (selectable and not libdata) -> all good. + /* First object is valid (selectable and not libdata) -> all good. */ return; } - // Object is selectable but not editable -> search for another one. + /* Object is selectable but not editable -> search for another one. */ BKE_view_layer_selected_editable_objects_iterator_next(iter); } } void BKE_view_layer_selected_editable_objects_iterator_next(BLI_Iterator *iter) { - // Search while there are objects and the one we have is not editable (editable = not libdata). + /* Search while there are objects and the one we have is not editable (editable = not libdata). + */ do { objects_iterator_next(iter, BASE_VISIBLE_DEPSGRAPH | BASE_SELECTED); } while (iter->valid && BKE_object_is_libdata((Object *)iter->current) != false); diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c index f32a62376ac..733a2bcd1e1 100644 --- a/source/blender/blenkernel/intern/linestyle.c +++ b/source/blender/blenkernel/intern/linestyle.c @@ -2059,7 +2059,7 @@ void BKE_linestyle_default_shader(const bContext *C, FreestyleLineStyle *linesty uv_along_stroke = nodeAddStaticNode(C, ntree, SH_NODE_UVALONGSTROKE); uv_along_stroke->locx = 0.0f; uv_along_stroke->locy = 300.0f; - uv_along_stroke->custom1 = 0; // use_tips + uv_along_stroke->custom1 = 0; /* use_tips */ input_texure = nodeAddStaticNode(C, ntree, SH_NODE_TEX_IMAGE); input_texure->locx = 200.0f; @@ -2069,16 +2069,16 @@ void BKE_linestyle_default_shader(const bContext *C, FreestyleLineStyle *linesty output_linestyle->locx = 400.0f; output_linestyle->locy = 300.0f; output_linestyle->custom1 = MA_RAMP_BLEND; - output_linestyle->custom2 = 0; // use_clamp + output_linestyle->custom2 = 0; /* use_clamp */ nodeSetActive(ntree, input_texure); - fromsock = BLI_findlink(&uv_along_stroke->outputs, 0); // UV - tosock = BLI_findlink(&input_texure->inputs, 0); // UV + fromsock = BLI_findlink(&uv_along_stroke->outputs, 0); /* UV */ + tosock = BLI_findlink(&input_texure->inputs, 0); /* UV */ nodeAddLink(ntree, uv_along_stroke, fromsock, input_texure, tosock); - fromsock = BLI_findlink(&input_texure->outputs, 0); // Color - tosock = BLI_findlink(&output_linestyle->inputs, 0); // Color + fromsock = BLI_findlink(&input_texure->outputs, 0); /* Color */ + tosock = BLI_findlink(&output_linestyle->inputs, 0); /* Color */ nodeAddLink(ntree, input_texure, fromsock, output_linestyle, tosock); ntreeUpdateTree(CTX_data_main(C), ntree); diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 965fdb53c09..4a85fab4e18 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -225,7 +225,7 @@ static void material_blend_read_data(BlendDataReader *reader, ID *id) static void material_blend_read_lib(BlendLibReader *reader, ID *id) { Material *ma = (Material *)id; - BLO_read_id_address(reader, ma->id.lib, &ma->ipo); // XXX deprecated - old animation system + BLO_read_id_address(reader, ma->id.lib, &ma->ipo); /* XXX deprecated - old animation system */ /* relink grease pencil settings */ if (ma->gp_style != NULL) { @@ -242,7 +242,7 @@ static void material_blend_read_lib(BlendLibReader *reader, ID *id) static void material_blend_read_expand(BlendExpander *expander, ID *id) { Material *ma = (Material *)id; - BLO_expand(expander, ma->ipo); // XXX deprecated - old animation system + BLO_expand(expander, ma->ipo); /* XXX deprecated - old animation system */ if (ma->gp_style) { MaterialGPencilStyle *gp_style = ma->gp_style; diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c index c11f9961f67..247ea2975fd 100644 --- a/source/blender/blenkernel/intern/mesh_convert.c +++ b/source/blender/blenkernel/intern/mesh_convert.c @@ -317,7 +317,7 @@ int BKE_mesh_nurbs_displist_to_mdata(Object *ob, *r_allvert = mvert = MEM_calloc_arrayN(totvert, sizeof(MVert), "nurbs_init mvert"); *r_alledge = medge = MEM_calloc_arrayN(totedge, sizeof(MEdge), "nurbs_init medge"); *r_allloop = mloop = MEM_calloc_arrayN( - totpoly, sizeof(MLoop[4]), "nurbs_init mloop"); // totloop + totpoly, sizeof(MLoop[4]), "nurbs_init mloop"); /* totloop */ *r_allpoly = mpoly = MEM_calloc_arrayN(totpoly, sizeof(MPoly), "nurbs_init mloop"); if (r_alluv) { diff --git a/source/blender/blenkernel/intern/mesh_merge.c b/source/blender/blenkernel/intern/mesh_merge.c index ef28e9958fc..868694931cb 100644 --- a/source/blender/blenkernel/intern/mesh_merge.c +++ b/source/blender/blenkernel/intern/mesh_merge.c @@ -20,7 +20,7 @@ /** \file * \ingroup bke */ -#include <string.h> // for memcpy +#include <string.h> /* for memcpy */ #include "MEM_guardedalloc.h" diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 5f11476574e..6fea2cc8bf5 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -701,7 +701,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, /* Test same polys. */ if ((p1_nv == p2_nv) && (memcmp(p1_v, p2_v, p1_nv * sizeof(*p1_v)) == 0)) { if (do_verbose) { - // TODO: convert list to string + /* TODO: convert list to string */ PRINT_ERR("\tPolys %u and %u use same vertices (%d", prev_sp->index, sp->index, *p1_v); for (j = 1; j < p1_nv; j++) { PRINT_ERR(", %d", p1_v[j]); diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c index 7f378e6e80b..915ee56e2f7 100644 --- a/source/blender/blenkernel/intern/object_update.c +++ b/source/blender/blenkernel/intern/object_update.c @@ -100,7 +100,7 @@ void BKE_object_eval_parent(Depsgraph *depsgraph, Object *ob) DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob); /* get local matrix (but don't calculate it, as that was done already!) */ - // XXX: redundant? + /* XXX: redundant? */ copy_m4_m4(locmat, ob->obmat); /* get parent effect matrix */ diff --git a/source/blender/blenkernel/intern/outliner_treehash.c b/source/blender/blenkernel/intern/outliner_treehash.c index 39618c95a68..05873d20f7f 100644 --- a/source/blender/blenkernel/intern/outliner_treehash.c +++ b/source/blender/blenkernel/intern/outliner_treehash.c @@ -193,7 +193,7 @@ static TseGroup *BKE_outliner_treehash_lookup_group(GHash *th, short type, short { TreeStoreElem tse_template; tse_template.type = type; - tse_template.nr = type ? nr : 0; // we're picky! :) + tse_template.nr = type ? nr : 0; /* we're picky! :) */ tse_template.id = id; BLI_assert(th); diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index a4b9508320c..b978236da06 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -4195,7 +4195,7 @@ float psys_get_child_size(ParticleSystem *psys, float *UNUSED(pa_time)) { ParticleSettings *part = psys->part; - float size; // time XXX + float size; /* time XXX */ if (part->childtype == PART_CHILD_FACES) { int w = 0; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 862ebf43913..060a9b4d794 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2001,7 +2001,7 @@ static void sphclassical_force_cb(void *sphdata_v, /* 4.77 is an experimentally determined density factor */ float rest_density = fluid->rest_density * (fluid->flag & SPH_FAC_DENSITY ? 4.77f : 1.0f); - // Use speed of sound squared + /* Use speed of sound squared */ float stiffness = pow2f(fluid->stiffness_k); ParticleData *npa; @@ -2118,7 +2118,7 @@ void psys_sph_init(ParticleSimulationData *sim, SPHData *sphdata) BLI_buffer_field_init(&sphdata->new_springs, ParticleSpring); - // Add other coupled particle systems. + /* Add other coupled particle systems. */ sphdata->psys[0] = sim->psys; for (i = 1, pt = sim->psys->targets.first; i < 10; i++, pt = (pt ? pt->next : NULL)) { sphdata->psys[i] = pt ? psys_get_target_system(sim->ob, pt) : NULL; @@ -2132,8 +2132,8 @@ void psys_sph_init(ParticleSimulationData *sim, SPHData *sphdata) } sphdata->eh = sph_springhash_build(sim->psys); - // These per-particle values should be overridden later, but just for - // completeness we give them default values now. + /* These per-particle values should be overridden later, but just for + * completeness we give them default values now. */ sphdata->pa = NULL; sphdata->mass = 1.0f; diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 9018131af86..9d9e0a9c9cb 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -116,14 +116,14 @@ static CLG_LogRef LOG = {"bke.pointcache"}; static int ptcache_data_size[] = { - sizeof(unsigned int), // BPHYS_DATA_INDEX - sizeof(float[3]), // BPHYS_DATA_LOCATION - sizeof(float[3]), // BPHYS_DATA_VELOCITY - sizeof(float[4]), // BPHYS_DATA_ROTATION - sizeof(float[3]), // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST - sizeof(float), // BPHYS_DATA_SIZE - sizeof(float[3]), // BPHYS_DATA_TIMES - sizeof(BoidData), // case BPHYS_DATA_BOIDS + sizeof(unsigned int), /* BPHYS_DATA_INDEX */ + sizeof(float[3]), /* BPHYS_DATA_LOCATION */ + sizeof(float[3]), /* BPHYS_DATA_VELOCITY */ + sizeof(float[4]), /* BPHYS_DATA_ROTATION */ + sizeof(float[3]), /* BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */ + sizeof(float), /* BPHYS_DATA_SIZE */ + sizeof(float[3]), /* BPHYS_DATA_TIMES */ + sizeof(BoidData), /* case BPHYS_DATA_BOIDS */ }; static int ptcache_extra_datasize[] = { @@ -1550,7 +1550,7 @@ static int ptcache_file_compressed_write( r = LzmaCompress(out, &out_len, in, - in_len, // assume sizeof(char)==1.... + in_len, /* assume sizeof(char)==1.... */ props, &sizeOfIt, 5, @@ -2117,7 +2117,7 @@ static int ptcache_read_stream(PTCacheID *pid, int cfra) if (!error) { ptcache_file_pointers_init(pf); - // we have stream reading here + /* We have stream reading here. */ if (!pid->read_stream(pf, pid->calldata)) { pid->error(pid->calldata, "Failed to read point cache file data"); error = 1; @@ -3245,7 +3245,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker) scene, pid->calldata, &cache->startframe, &cache->endframe); } - // XXX workaround for regression inroduced in ee3fadd, needs looking into + /* XXX workaround for regression inroduced in ee3fadd, needs looking into */ if (pid->type == PTCACHE_TYPE_RIGIDBODY) { if ((cache->flag & PTCACHE_REDO_NEEDED || (cache->flag & PTCACHE_SIMULATION_VALID) == 0) && diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 6b2b7271c76..586aeb274a5 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -509,7 +509,7 @@ static rbCollisionShape *rigidbody_validate_sim_shape_helper(RigidBodyWorld *rbw * - 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 + /* XXX: all dimensions are auto-determined now... later can add stored settings for this */ /* get object dimensions without scaling */ bb = BKE_object_boundbox_get(ob); if (bb) { @@ -636,7 +636,7 @@ static void rigidbody_validate_sim_shape(RigidBodyWorld *rbw, Object *ob, bool r /* --------------------- */ /* helper function to calculate volume of rigidbody object */ -// TODO: allow a parameter to specify method used to calculate this? +/* TODO: allow a parameter to specify method used to calculate this? */ void BKE_rigidbody_calc_volume(Object *ob, float *r_vol) { RigidBodyOb *rbo = ob->rigidbody_object; @@ -653,7 +653,7 @@ void BKE_rigidbody_calc_volume(Object *ob, float *r_vol) * (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 + /* XXX: all dimensions are auto-determined now... later can add stored settings for this */ BKE_object_dimensions_get(ob, size); if (ELEM(rbo->shape, RB_SHAPE_CAPSULE, RB_SHAPE_CYLINDER, RB_SHAPE_CONE)) { @@ -742,7 +742,7 @@ void BKE_rigidbody_calc_center_of_mass(Object *ob, float r_center[3]) * (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 + /* XXX: all dimensions are auto-determined now... later can add stored settings for this */ BKE_object_dimensions_get(ob, size); /* calculate volume as appropriate */ @@ -2034,7 +2034,7 @@ void BKE_rigidbody_sync_transforms(RigidBodyWorld *rbw, Object *ob, float ctime) !(ob->base_flag & BASE_SELECTED && G.moving & G_TRANSFORM_OBJ)) { float mat[4][4], size_mat[4][4], size[3]; - normalize_qt(rbo->orn); // RB_TODO investigate why quaternion isn't normalized at this point + normalize_qt(rbo->orn); /* RB_TODO investigate why quaternion isn't normalized at this point */ quat_to_mat4(mat, rbo->orn); copy_v3_v3(mat[3], rbo->pos); @@ -2200,7 +2200,7 @@ void BKE_rigidbody_do_simulation(Depsgraph *depsgraph, Scene *scene, float ctime } /* try to read from cache */ - // RB_TODO deal with interpolated, old and baked results + /* RB_TODO deal with interpolated, old and baked results */ bool can_simulate = (ctime == rbw->ltime + 1) && !(cache->flag & PTCACHE_BAKED); if (BKE_ptcache_read(&pid, ctime, can_simulate) == PTCACHE_READ_EXACT) { diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 3ceac437274..5e5f325d7d8 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -421,10 +421,10 @@ static void scene_free_data(ID *id) } /* Master Collection */ - // TODO: what to do with do_id_user? it's also true when just - // closing the file which seems wrong? should decrement users - // for objects directly in the master collection? then other - // collections in the scene need to do it too? + /* TODO: what to do with do_id_user? it's also true when just + * closing the file which seems wrong? should decrement users + * for objects directly in the master collection? then other + * collections in the scene need to do it too? */ if (scene->master_collection) { BKE_collection_free(scene->master_collection); MEM_freeN(scene->master_collection); diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index 9240851c07a..e9cf6421a02 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -70,25 +70,25 @@ #define OUT_OF_MEMORY() ((void)printf("Shrinkwrap: Out of memory\n")) typedef struct ShrinkwrapCalcData { - ShrinkwrapModifierData *smd; // shrinkwrap modifier data + ShrinkwrapModifierData *smd; /* shrinkwrap modifier data */ - struct Object *ob; // object we are applying shrinkwrap to + struct Object *ob; /* object we are applying shrinkwrap to */ - struct MVert *vert; // Array of verts being projected (to fetch normals or other data) - float (*vertexCos)[3]; // vertexs being shrinkwraped + struct MVert *vert; /* Array of verts being projected (to fetch normals or other data) */ + float (*vertexCos)[3]; /* vertexs being shrinkwraped */ int numVerts; - struct MDeformVert *dvert; // Pointer to mdeform array - int vgroup; // Vertex group num - bool invert_vgroup; /* invert vertex group influence */ + struct MDeformVert *dvert; /* Pointer to mdeform array */ + int vgroup; /* Vertex group num */ + bool invert_vgroup; /* invert vertex group influence */ - struct Mesh *target; // mesh we are shrinking to - struct SpaceTransform local2target; // transform to move between local and target space - struct ShrinkwrapTreeData *tree; // mesh BVH tree data + struct Mesh *target; /* mesh we are shrinking to */ + struct SpaceTransform local2target; /* transform to move between local and target space */ + struct ShrinkwrapTreeData *tree; /* mesh BVH tree data */ struct Object *aux_target; - float keepDist; // Distance to keep above target surface (units are in local space) + float keepDist; /* Distance to keep above target surface (units are in local space) */ } ShrinkwrapCalcData; typedef struct ShrinkwrapCalcCBData { diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 9cf5ef85850..bf61c27ee2f 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -1506,7 +1506,7 @@ static void _scan_for_ext_spring_forces( madd_v3_v3fl(bs->ext_force, vel, f * (1.0f - fabsf(dot_v3v3(vel, sp)))); } else { - madd_v3_v3fl(bs->ext_force, vel, f); // to keep compatible with 2.45 release files + madd_v3_v3fl(bs->ext_force, vel, f); /* to keep compatible with 2.45 release files */ } } /* --- springs seeing wind */ @@ -1554,7 +1554,7 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph, for (i = 0; i < totthread; i++) { sb_threads[i].scene = scene; sb_threads[i].ob = ob; - sb_threads[i].forcetime = 0.0; // not used here + sb_threads[i].forcetime = 0.0; /* not used here */ sb_threads[i].timenow = timenow; sb_threads[i].ilast = left; left = left - dec; @@ -1565,9 +1565,9 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph, sb_threads[i].ifirst = 0; } sb_threads[i].effectors = effectors; - sb_threads[i].do_deflector = false; // not used here - sb_threads[i].fieldfactor = 0.0f; // not used here - sb_threads[i].windfactor = 0.0f; // not used here + sb_threads[i].do_deflector = false; /* not used here */ + sb_threads[i].fieldfactor = 0.0f; /* not used here */ + sb_threads[i].windfactor = 0.0f; /* not used here */ sb_threads[i].nr = i; sb_threads[i].tot = totthread; } @@ -1741,8 +1741,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], cross_v3_v3v3(d_nvect, edge2, edge1); /* n_mag = */ /* UNUSED */ normalize_v3(d_nvect); facedist = dot_v3v3(dv1, d_nvect); - // so rules are - // + /* so rules are */ if ((facedist > innerfacethickness) && (facedist < outerfacethickness)) { if (isect_point_tri_prism_v3(opco, nv1, nv2, nv3)) { @@ -1781,7 +1780,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], } } /* while () */ - if (deflected == 1) { // no face but 'outer' edge cylinder sees vert + if (deflected == 1) { /* no face but 'outer' edge cylinder sees vert */ force_mag_norm = (float)exp(-ee * mindistedge); if (mindistedge > outerfacethickness * ff) { force_mag_norm = (float)force_mag_norm * fa * (mindistedge - outerfacethickness) * @@ -1793,10 +1792,10 @@ static int sb_detect_vertex_collisionCached(float opco[3], *damp *= (1.0f - mindistedge / outerfacethickness); } } - if (deflected == 2) { // face inner detected + if (deflected == 2) { /* face inner detected */ add_v3_v3(force, innerforceaccu); } - if (deflected == 3) { // face outer detected + if (deflected == 3) { /* face outer detected */ add_v3_v3(force, outerforceaccu); } @@ -3496,14 +3495,14 @@ static void softbody_step( } else if (sb->solver_ID == 2) { /* do semi "fake" implicit euler */ - // removed + /* removed */ } /*SOLVER SELECT*/ else if (sb->solver_ID == 4) { /* do semi "fake" implicit euler */ } /*SOLVER SELECT*/ else if (sb->solver_ID == 3) { /* do "stupid" semi "fake" implicit euler */ - // removed + /* removed */ } /*SOLVER SELECT*/ else { diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index dbcc2482f5a..0f1b341a606 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -180,13 +180,13 @@ static void sound_blend_read_lib(BlendLibReader *reader, ID *id) { bSound *sound = (bSound *)id; BLO_read_id_address( - reader, sound->id.lib, &sound->ipo); // XXX deprecated - old animation system + reader, sound->id.lib, &sound->ipo); /* XXX deprecated - old animation system */ } static void sound_blend_read_expand(BlendExpander *expander, ID *id) { bSound *snd = (bSound *)id; - BLO_expand(expander, snd->ipo); // XXX deprecated - old animation system + BLO_expand(expander, snd->ipo); /* XXX deprecated - old animation system */ } IDTypeInfo IDType_ID_SO = { @@ -957,7 +957,7 @@ double BKE_sound_sync_scene(Scene *scene) { sound_verify_evaluated_id(&scene->id); - // Ugly: Blender doesn't like it when the animation is played back during rendering + /* Ugly: Blender doesn't like it when the animation is played back during rendering */ if (G.is_rendering) { return NAN_FLT; } @@ -976,12 +976,12 @@ int BKE_sound_scene_playing(Scene *scene) { sound_verify_evaluated_id(&scene->id); - // Ugly: Blender doesn't like it when the animation is played back during rendering + /* Ugly: Blender doesn't like it when the animation is played back during rendering */ if (G.is_rendering) { return -1; } - // in case of a "Null" audio device, we have no playback information + /* In case of a "Null" audio device, we have no playback information. */ if (AUD_Device_getRate(sound_device) == AUD_RATE_INVALID) { return -1; } diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index abc5c78d1d3..93306703686 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -906,7 +906,7 @@ void txt_move_left(Text *text, const bool sel) } else { /* do nice left only if there are only spaces */ - // TXT_TABSIZE hardcoded in DNA_text_types.h + /* #TXT_TABSIZE hard-coded in DNA_text_types.h */ if (text->flags & TXT_TABSTOSPACES) { tabsize = txt_calc_tab_left(*linep, *charp); } diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 077fab60546..90c4f71ce7a 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -193,14 +193,14 @@ static void texture_blend_read_lib(BlendLibReader *reader, ID *id) { Tex *tex = (Tex *)id; BLO_read_id_address(reader, tex->id.lib, &tex->ima); - BLO_read_id_address(reader, tex->id.lib, &tex->ipo); // XXX deprecated - old animation system + BLO_read_id_address(reader, tex->id.lib, &tex->ipo); /* XXX deprecated - old animation system */ } static void texture_blend_read_expand(BlendExpander *expander, ID *id) { Tex *tex = (Tex *)id; BLO_expand(expander, tex->ima); - BLO_expand(expander, tex->ipo); // XXX deprecated - old animation system + BLO_expand(expander, tex->ipo); /* XXX deprecated - old animation system */ } IDTypeInfo IDType_ID_TE = { diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 019cb9e2cf5..094557502a3 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -174,13 +174,13 @@ static void world_blend_read_data(BlendDataReader *reader, ID *id) static void world_blend_read_lib(BlendLibReader *reader, ID *id) { World *wrld = (World *)id; - BLO_read_id_address(reader, wrld->id.lib, &wrld->ipo); // XXX deprecated - old animation system + BLO_read_id_address(reader, wrld->id.lib, &wrld->ipo); /* XXX deprecated, old animation system */ } static void world_blend_read_expand(BlendExpander *expander, ID *id) { World *wrld = (World *)id; - BLO_expand(expander, wrld->ipo); // XXX deprecated - old animation system + BLO_expand(expander, wrld->ipo); /* XXX deprecated, old animation system */ } IDTypeInfo IDType_ID_WO = { diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 0073a3692ee..7a8fd2dc43b 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -249,7 +249,7 @@ static int write_audio_frame(FFMpegContext *context) return 0; } -# endif // #ifdef WITH_AUDASPACE +# endif /* #ifdef WITH_AUDASPACE */ /* Allocate a temporary frame */ static AVFrame *alloc_picture(int pix_fmt, int width, int height) @@ -878,9 +878,9 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, # endif if (c->frame_size == 0) { - // used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD)) - // not sure if that is needed anymore, so let's try out if there are any - // complaints regarding some ffmpeg versions users might have + /* Used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD)) + * not sure if that is needed anymore, so let's try out if there are any + * complaints regarding some FFmpeg versions users might have. */ context->audio_input_samples = FF_MIN_BUFFER_SIZE * 8 / c->bits_per_coded_sample / c->channels; } else { @@ -1675,9 +1675,9 @@ static void ffmpeg_set_expert_options(RenderData *rd) /* This breaks compatibility for QT. */ // BKE_ffmpeg_property_add_string(rd, "video", "flags:loop"); BKE_ffmpeg_property_add_string(rd, "video", "cmp:chroma"); - BKE_ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); // Deprecated. - BKE_ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); // Deprecated. - BKE_ffmpeg_property_add_string(rd, "video", "partitions:partb8x8"); // Deprecated. + BKE_ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); /* Deprecated. */ + BKE_ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); /* Deprecated. */ + BKE_ffmpeg_property_add_string(rd, "video", "partitions:partb8x8"); /* Deprecated. */ BKE_ffmpeg_property_add_string(rd, "video", "me:hex"); BKE_ffmpeg_property_add_string(rd, "video", "subq:6"); BKE_ffmpeg_property_add_string(rd, "video", "me_range:16"); @@ -1787,7 +1787,7 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset) rd->ffcodecdata.codec = AV_CODEC_ID_MPEG4; } else if (preset == FFMPEG_PRESET_THEORA) { - rd->ffcodecdata.type = FFMPEG_OGG; // XXX broken + rd->ffcodecdata.type = FFMPEG_OGG; /* XXX broken */ rd->ffcodecdata.codec = AV_CODEC_ID_THEORA; } |