Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-08 02:51:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-08 02:51:57 +0400
commitcfb7aee017d95137e19b7b006d9393b5d6a935d4 (patch)
tree005a1981af6c5a0f36959d73479cc69137842eb4 /source/blender/blenkernel/intern
parentd58ce290e1e4dcb8d0b96259fdf29c854bfaef49 (diff)
style cleanup
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c4
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c16
-rw-r--r--source/blender/blenkernel/intern/bmfont.c6
-rw-r--r--source/blender/blenkernel/intern/booleanops_mesh.c28
-rw-r--r--source/blender/blenkernel/intern/brush.c2
-rw-r--r--source/blender/blenkernel/intern/constraint.c12
-rw-r--r--source/blender/blenkernel/intern/customdata.c4
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c14
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c4
-rw-r--r--source/blender/blenkernel/intern/effect.c16
-rw-r--r--source/blender/blenkernel/intern/fcurve.c8
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c8
-rw-r--r--source/blender/blenkernel/intern/font.c70
-rw-r--r--source/blender/blenkernel/intern/library.c4
-rw-r--r--source/blender/blenkernel/intern/nla.c18
-rw-r--r--source/blender/blenkernel/intern/object.c12
-rw-r--r--source/blender/blenkernel/intern/packedFile.c36
-rw-r--r--source/blender/blenkernel/intern/particle.c4
-rw-r--r--source/blender/blenkernel/intern/property.c4
-rw-r--r--source/blender/blenkernel/intern/scene.c10
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c8
-rw-r--r--source/blender/blenkernel/intern/sequencer.c2
-rw-r--r--source/blender/blenkernel/intern/texture.c4
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c12
24 files changed, 155 insertions, 151 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index 35bf4c0961f..c456840637a 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -2210,7 +2210,7 @@ static void ccgSubSurf__sync(CCGSubSurf *ss)
VertDataAdd(co, r, ss);
}
- // edge flags cleared later
+ /* edge flags cleared later */
}
for (ptrIdx = 0; ptrIdx < numEffectedV; ptrIdx++) {
CCGVert *v = effectedV[ptrIdx];
@@ -2337,7 +2337,7 @@ static void ccgSubSurf__sync(CCGSubSurf *ss)
VertDataAdd(nCo, r, ss);
}
- // vert flags cleared later
+ /* vert flags cleared later */
}
if (ss->useAgeCounts) {
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index f7b18ce557a..8e8c98a38e4 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -936,7 +936,7 @@ KS_Path *BKE_keyingset_find_path(KeyingSet *ks, ID *id, const char group_name[],
/* group */
if (group_name) {
- // FIXME: these checks need to be coded... for now, it's not too important though
+ /* FIXME: these checks need to be coded... for now, it's not too important though */
}
/* if all aspects are ok, return */
@@ -1116,11 +1116,13 @@ void BKE_keyingsets_free(ListBase *list)
static short animsys_remap_path(AnimMapper *UNUSED(remap), char *path, char **dst)
{
/* is there a valid remapping table to use? */
- //if (remap) {
- /* find a matching entry... to use to remap */
- // ...TODO...
- //}
-
+#if 0
+ if (remap) {
+ /* find a matching entry... to use to remap */
+ /* ...TODO... */
+ }
+#endif
+
/* nothing suitable found, so just set dst to look at path (i.e. no alloc/free needed) */
*dst = path;
return 0;
@@ -1997,7 +1999,7 @@ void nladata_flush_channels(ListBase *channels)
RNA_property_enum_set(ptr, prop, (int)value);
break;
default:
- // can't do anything with other types of property....
+ /* can't do anything with other types of property.... */
break;
}
}
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index e85fe83b752..722dc1834dd 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -107,7 +107,7 @@ void readBitmapFontVersion0(ImBuf * ibuf, unsigned char * rect, int step)
buffer[i] = rect[index];
index += step;
if (index >= linelength) {
- // we've read one line, no skip to the line *before* that
+ /* we've read one line, no skip to the line *before* that */
rect -= linelength;
index -= linelength;
}
@@ -118,7 +118,7 @@ void readBitmapFontVersion0(ImBuf * ibuf, unsigned char * rect, int step)
bmfont = MEM_mallocN(bytes, "readBitmapFontVersion0:bmfont");
index = 0;
- // first read the header
+ /* first read the header */
bmfont->magic[0] = buffer[index++];
bmfont->magic[1] = buffer[index++];
bmfont->magic[2] = buffer[index++];
@@ -278,7 +278,7 @@ void matrixGlyph(ImBuf * ibuf, unsigned short unicode,
*centerx = bmfont->glyphs[0].locx / (float) ibuf->x;
*centery = (ibuf->y - bmfont->glyphs[0].locy) / (float) ibuf->y;
- // 2.0 units is the default size of an object
+ /* 2.0 units is the default size of an object */
*movey = 1.0f - *sizey + 2.0f * (bmfont->glyphs[index].ofsy - bmfont->glyphs[0].ofsy) / (float) bmfont->glyphs[0].sizey;
*movex = *sizex - 1.0f + 2.0f * (bmfont->glyphs[index].ofsx - bmfont->glyphs[0].ofsx) / (float) bmfont->glyphs[0].sizex;
diff --git a/source/blender/blenkernel/intern/booleanops_mesh.c b/source/blender/blenkernel/intern/booleanops_mesh.c
index 972793227a8..be79077bb58 100644
--- a/source/blender/blenkernel/intern/booleanops_mesh.c
+++ b/source/blender/blenkernel/intern/booleanops_mesh.c
@@ -44,19 +44,19 @@
CSG_DestroyMeshDescriptor(
CSG_MeshDescriptor *mesh
) {
- // Call mesh descriptors destroy function....
+ /* Call mesh descriptors destroy function.... */
mesh->m_destroy_func(mesh);
}
-
-// Destroy function for blender mesh internals.
+
+/* Destroy function for blender mesh internals. */
static
void
CSG_DestroyBlenderMeshInternals(
CSG_MeshDescriptor *mesh
) {
- // Free face and vertex iterators.
- FreeMeshDescriptors(&(mesh->m_face_iterator),&(mesh->m_vertex_iterator));
+ /* Free face and vertex iterators. */
+ FreeMeshDescriptors(&(mesh->m_face_iterator),&(mesh->m_vertex_iterator));
}
@@ -140,18 +140,18 @@ CSG_AddMeshToBlender(
invert_m4_m4(inv_mat,mesh->base->object->obmat);
- // Create a new blender mesh object - using 'base' as
- // a template for the new object.
+ /* Create a new blender mesh object - using 'base' as
+ * a template for the new object. */
ob_new= AddNewBlenderMesh(mesh->base);
me_new = ob_new->data;
- // make sure the iterators are reset.
+ /* make sure the iterators are reset. */
mesh->m_face_iterator.Reset(mesh->m_face_iterator.it);
mesh->m_vertex_iterator.Reset(mesh->m_vertex_iterator.it);
- // iterate through results of operation and insert into new object
- // see subsurf.c
+ /* iterate through results of operation and insert into new object
+ * see subsurf.c */
ConvertCSGDescriptorsToMeshObject(
ob_new,
@@ -195,8 +195,8 @@ CSG_PerformOp(
output->base = mesh1->base;
if (output->m_descriptor.user_face_vertex_data_size) {
- // Then use the only interp function supported
- success =
+ /* Then use the only interp function supported */
+ success =
CSG_PerformBooleanOperation(
bool_op,
op_type,
@@ -225,8 +225,8 @@ CSG_PerformOp(
bool_op = NULL;
return 0;
}
-
- // get the ouput mesh descriptors.
+
+ /* get the ouput mesh descriptors. */
CSG_OutputFaceDescriptor(bool_op,&(output->m_face_iterator));
CSG_OutputVertexDescriptor(bool_op,&(output->m_vertex_iterator));
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 741d4b729ae..53a9057116c 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -1074,7 +1074,7 @@ void BKE_brush_jitter_pos(const Scene *scene, Brush *brush, const float pos[2],
const int radius = BKE_brush_size_get(scene, brush);
const int diameter = 2 * radius;
- // find random position within a circle of diameter 1
+ /* find random position within a circle of diameter 1 */
do {
rand_pos[0] = BLI_frand() - 0.5f;
rand_pos[1] = BLI_frand() - 0.5f;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 93c9ea06084..c2b38442a6b 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -2163,7 +2163,7 @@ static void actcon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintT
Object workob;
/* evaluate using workob */
- // FIXME: we don't have any consistent standards on limiting effects on object...
+ /* FIXME: we don't have any consistent standards on limiting effects on object... */
what_does_obaction(cob->ob, &workob, NULL, data->act, NULL, t);
BKE_object_to_mat4(&workob, ct->matrix);
}
@@ -2623,7 +2623,7 @@ static void distlimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
}
/* if soft-distance is enabled, start fading once owner is dist-soft from the target */
else if (data->flag & LIMITDIST_USESOFT) {
- // FIXME: there's a problem with "jumping" when this kicks in
+ /* FIXME: there's a problem with "jumping" when this kicks in */
if (dist >= (data->dist - data->soft)) {
sfac = (float)(data->soft * (1.0f - expf(-(dist - data->dist) / data->soft)) + data->dist);
if (dist != 0.0f) sfac /= dist;
@@ -2989,7 +2989,7 @@ static void rbj_new_data(void *cdata)
{
bRigidBodyJointConstraint *data = (bRigidBodyJointConstraint *)cdata;
- // removed code which set target of this constraint
+ /* removed code which set target of this constraint */
data->type = 1;
}
@@ -3608,7 +3608,7 @@ static void damptrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
if (normalize_v3(tarvec) == 0.0f) {
/* the target is sitting on the owner, so just make them use the same direction vectors */
- // FIXME: or would it be better to use the pure direction vector?
+ /* FIXME: or would it be better to use the pure direction vector? */
copy_v3_v3(tarvec, obvec);
//copy_v3_v3(tarvec, track_dir_vecs[data->trackflag]);
}
@@ -3839,7 +3839,7 @@ static void pivotcon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *ta
}
/* get rotation matrix representing the rotation of the owner */
- // TODO: perhaps we might want to include scaling based on the pivot too?
+ /* TODO: perhaps we might want to include scaling based on the pivot too? */
copy_m3_m4(rotMat, cob->matrix);
normalize_m3(rotMat);
@@ -4395,7 +4395,7 @@ static bConstraint *add_new_constraint_internal(const char *name, short type)
}
else {
/* if no name is provided, use the generic "Const" name */
- // NOTE: any constraint type that gets here really shouldn't get added...
+ /* NOTE: any constraint type that gets here really shouldn't get added... */
newName = (name && name[0]) ? name : "Const";
}
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index f551b2d18a4..8dd3b3da705 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -337,12 +337,12 @@ static void layerSwap_tface(void *data, const int *corner_indices)
copy_v2_v2(uv[j], tf->uv[source_index]);
- // swap pinning flags around
+ /* swap pinning flags around */
if (tf->unwrap & pin_flags[source_index]) {
unwrap |= pin_flags[j];
}
- // swap selection flags around
+ /* swap selection flags around */
if (tf->flag & sel_flags[source_index]) {
flag |= sel_flags[j];
}
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index a64cab5d2fc..1092f877283 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -320,7 +320,7 @@ static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node
DRIVER_TARGETS_USED_LOOPER(dvar)
{
if (dtar->id) {
- // FIXME: other data types need to be added here so that they can work!
+ /* FIXME: other data types need to be added here so that they can work! */
if (GS(dtar->id->name) == ID_OB) {
Object *ob = (Object *)dtar->id;
@@ -399,8 +399,8 @@ static void dag_add_collision_field_relation(DagForest *dag, Scene *scene, Objec
Base *base;
DagNode *node2;
- // would be nice to have a list of colliders here
- // so for now walk all objects in scene check 'same layer rule'
+ /* would be nice to have a list of colliders here
+ * so for now walk all objects in scene check 'same layer rule' */
for (base = scene->base.first; base; base = base->next) {
if ((base->lay & ob->lay) && base->object->pd) {
Object *ob1 = base->object;
@@ -858,7 +858,7 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask)
}
}
- // cycle detection and solving
+ /* cycle detection and solving */
// solve_cycles(dag);
return dag;
@@ -1567,7 +1567,7 @@ DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob)
node = dag_find_node(dag, ob);
- // need to go over the whole dag for adj list
+ /* need to go over the whole dag for adj list */
nqueue = queue_create(node->ancestor_count);
node1 = dag->DagNode.first;
@@ -2205,8 +2205,8 @@ static int object_modifiers_use_time(Object *ob)
return 1;
}
- // XXX: also, should check NLA strips, though for now assume that nobody uses
- // that and we can omit that for performance reasons...
+ /* XXX: also, should check NLA strips, though for now assume that nobody uses
+ * that and we can omit that for performance reasons... */
}
return 0;
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index dd5751c5d1f..8122f9bf617 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3417,7 +3417,9 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
sampleStrength *= sample_factor;
}
- else continue;
+ else {
+ continue;
+ }
/* velocity brush, only do on main sample */
if (brush->flags & MOD_DPAINT_USES_VELOCITY && ss == 0 && brushVelocity) {
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index b32ac24084f..a4e7676c602 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -393,7 +393,7 @@ void pd_point_from_soft(Scene *scene, float *loc, float *vel, int index, Effecte
// triangle - ray callback function
static void eff_tri_ray_hit(void *UNUSED(userData), int UNUSED(index), const BVHTreeRay *UNUSED(ray), BVHTreeRayHit *hit)
{
- // whenever we hit a bounding box, we don't check further
+ /* whenever we hit a bounding box, we don't check further */
hit->dist = -1;
hit->index = 1;
}
@@ -418,24 +418,24 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect
negate_v3_v3(norm, efd->vec_to_point);
len = normalize_v3(norm);
- // check all collision objects
+ /* check all collision objects */
for (col = colls->first; col; col = col->next) {
CollisionModifierData *collmd = col->collmd;
if (col->ob == eff->ob)
continue;
-
+
if (collmd->bvhtree) {
BVHTreeRayHit hit;
-
+
hit.index = -1;
hit.dist = len + FLT_EPSILON;
-
- // check if the way is blocked
+
+ /* check if the way is blocked */
if (BLI_bvhtree_ray_cast(collmd->bvhtree, point->loc, norm, 0.0f, &hit, eff_tri_ray_hit, NULL)>=0) {
absorption= col->ob->pd->absorption;
- // visibility is only between 0 and 1, calculated from 1-absorption
+ /* visibility is only between 0 and 1, calculated from 1-absorption */
visibility *= CLAMPIS(1.0f-absorption, 0.0f, 1.0f);
if (visibility <= 0.0f)
@@ -1006,7 +1006,7 @@ void pdDoEffectors(ListBase *effectors, ListBase *colliders, EffectorWeights *we
do_physical_effector(eff, &efd, point, force);
- // for softbody backward compatibility
+ /* for softbody backward compatibility */
if (point->flag & PE_WIND_AS_SPEED && impulse) {
sub_v3_v3v3(temp2, force, temp1);
sub_v3_v3v3(impulse, impulse, temp2);
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 2da8c22e28b..38c1709d79a 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -422,7 +422,7 @@ int binarysearch_bezt_index(BezTriple array[], float frame, int arraylen, short
if (loopbreaker == (maxloop - 1)) {
printf("Error: binarysearch_bezt_index() was taking too long\n");
- // include debug info
+ /* include debug info */
printf("\tround = %d: start = %d, end = %d, arraylen = %d\n", loopbreaker, start, end, arraylen);
}
@@ -1159,7 +1159,7 @@ static float dvar_eval_locDiff(ChannelDriver *driver, DriverVar *dvar)
float loc2[3] = {0.0f, 0.0f, 0.0f};
/* get two location values */
- // NOTE: for now, these are all just worldspace
+ /* NOTE: for now, these are all just worldspace */
DRIVER_TARGETS_USED_LOOPER(dvar)
{
/* get pointer to loc values to store in */
@@ -1206,7 +1206,7 @@ static float dvar_eval_locDiff(ChannelDriver *driver, DriverVar *dvar)
/* object */
if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
if (dtar->flag & DTAR_FLAG_LOCAL_CONSTS) {
- // XXX: this should practically be the same as transform space...
+ /* XXX: this should practically be the same as transform space... */
float mat[4][4];
/* extract transform just like how the constraints do it! */
@@ -1796,7 +1796,7 @@ static int findzero(float x, float q0, float q1, float q2, float q3, float *o)
c = c0;
if (a != 0.0) {
- // discriminant
+ /* discriminant */
p = b * b - 4 * a * c;
if (p > 0) {
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index d95bbf94b58..cefcbdd2762 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -433,7 +433,7 @@ static void fcm_envelope_verify(FModifier *fcm)
/* if the are points, perform bubble-sort on them, as user may have changed the order */
if (env->data) {
- // XXX todo...
+ /* XXX todo... */
}
}
@@ -539,7 +539,7 @@ static float fcm_cycles_time(FCurve *fcu, FModifier *fcm, float UNUSED(cvalue),
int cycles = 0, ofs = 0;
/* check if modifier is first in stack, otherwise disable ourself... */
- // FIXME...
+ /* FIXME... */
if (fcm->prev) {
fcm->flag |= FMODIFIER_FLAG_DISABLED;
return evaltime;
@@ -883,7 +883,7 @@ static void fcm_stepped_new_data(void *mdata)
FMod_Stepped *data = (FMod_Stepped *)mdata;
/* just need to set the step-size to 2-frames by default */
- // XXX: or would 5 be more normal?
+ /* XXX: or would 5 be more normal? */
data->step_size = 2.0f;
}
@@ -1104,7 +1104,7 @@ int remove_fmodifier(ListBase *modifiers, FModifier *fcm)
return 1;
}
else {
- // XXX this case can probably be removed some day, as it shouldn't happen...
+ /* XXX this case can probably be removed some day, as it shouldn't happen... */
printf("remove_fmodifier() - no modifier stack given\n");
MEM_freeN(fcm);
return 0;
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 5d33c8fbcbf..050f921998d 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -133,7 +133,7 @@ struct TmpFont *BKE_vfont_find_tmpfont(VFont *vfont)
if (vfont == NULL) return NULL;
- // Try finding the font from font list
+ /* Try finding the font from font list */
tmpfnt = ttfdata.first;
while (tmpfnt) {
if (tmpfnt->vfont == vfont)
@@ -150,28 +150,28 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
if (vfont == NULL) return NULL;
- // Try finding the font from font list
+ /* Try finding the font from font list */
tmpfnt = BKE_vfont_find_tmpfont(vfont);
-
- // And then set the data
+
+ /* And then set the data */
if (!vfont->data) {
PackedFile *pf;
-
+
if (strcmp(vfont->name, FO_BUILTIN_NAME) == 0) {
pf = get_builtin_packedfile();
}
else {
if (vfont->packedfile) {
pf = vfont->packedfile;
-
- // We need to copy a tmp font to memory unless it is already there
+
+ /* We need to copy a tmp font to memory unless it is already there */
if (!tmpfnt) {
tpf = MEM_callocN(sizeof(*tpf), "PackedFile");
tpf->data = MEM_mallocN(pf->size, "packFile");
tpf->size = pf->size;
memcpy(tpf->data, pf->data, pf->size);
-
- // Add temporary packed file to globals
+
+ /* Add temporary packed file to globals */
tmpfnt = (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
tmpfnt->pf = tpf;
tmpfnt->vfont = vfont;
@@ -183,8 +183,8 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
if (!tmpfnt) {
tpf = newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
-
- // Add temporary packed file to globals
+
+ /* Add temporary packed file to globals */
tmpfnt = (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
tmpfnt->pf = tpf;
tmpfnt->vfont = vfont;
@@ -251,21 +251,21 @@ VFont *BKE_vfont_load(Main *bmain, const char *name)
}
BLI_strncpy(vfont->name, name, sizeof(vfont->name));
- // if autopack is on store the packedfile in de font structure
+ /* if autopack is on store the packedfile in de font structure */
if (!is_builtin && (G.fileflags & G_AUTOPACK)) {
vfont->packedfile = pf;
}
-
- // Do not add FO_BUILTIN_NAME to temporary listbase
+
+ /* Do not add FO_BUILTIN_NAME to temporary listbase */
if (strcmp(filename, FO_BUILTIN_NAME)) {
tmpfnt = (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
tmpfnt->pf = tpf;
tmpfnt->vfont = vfont;
BLI_addtail(&ttfdata, tmpfnt);
- }
+ }
}
-
- // Free the packed file
+
+ /* Free the packed file */
if (!vfont || vfont->packedfile != pf) {
freePackedFile(pf);
}
@@ -390,11 +390,11 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo
che = find_vfont_char(vfd, character);
- // Select the glyph data
+ /* Select the glyph data */
if (che)
nu1 = che->nurbsbase.first;
- // Create the character
+ /* Create the character */
while (nu1) {
bezt1 = nu1->bezt;
if (bezt1) {
@@ -508,7 +508,7 @@ int BKE_vfont_select_get(Object *ob, int *start, int *end)
static float char_width(Curve *cu, VChar *che, CharInfo *info)
{
- // The character wasn't found, propably ascii = 0, then the width shall be 0 as well
+ /* The character wasn't found, propably ascii = 0, then the width shall be 0 as well */
if (che == NULL) {
return 0.0f;
}
@@ -543,20 +543,20 @@ struct chartrans *BKE_vfont_to_curve(Main *bmain, Scene *scene, Object *ob, int
if (ob->type != OB_FONT) return NULL;
- // Set font data
+ /* Set font data */
cu = (Curve *) ob->data;
vfont = cu->vfont;
-
+
if (cu->str == NULL) return NULL;
if (vfont == NULL) return NULL;
- // Create unicode string
+ /* Create unicode string */
utf8len = BLI_strlen_utf8(cu->str);
mem = MEM_callocN(((utf8len + 1) * sizeof(wchar_t)), "convertedmem");
-
+
BLI_strncpy_wchar_from_utf8(mem, cu->str, utf8len + 1);
- // Count the wchar_t string length
+ /* Count the wchar_t string length */
slen = wcslen(mem);
if (cu->ulheight == 0.0f)
@@ -612,7 +612,7 @@ struct chartrans *BKE_vfont_to_curve(Main *bmain, Scene *scene, Object *ob, int
curbox = 0;
for (i = 0; i <= slen; i++) {
makebreak:
- // Characters in the list
+ /* Characters in the list */
info = &(custrinfo[i]);
ascii = mem[i];
if (info->flag & CU_CHINFO_SMALLCAPS) {
@@ -664,7 +664,7 @@ makebreak:
twidth = char_width(cu, che, info);
- // Calculate positions
+ /* Calculate positions */
if ((tb->w != 0.0f) && (ct->dobreak == 0) && ((xof - (tb->x / cu->fsize) + twidth) * cu->fsize) > tb->w + cu->xof * cu->fsize) {
// fprintf(stderr, "linewidth exceeded: %c%c%c...\n", mem[i], mem[i+1], mem[i+2]);
for (j = i; j && (mem[j] != '\n') && (mem[j] != '\r') && (chartransdata[j].dobreak == 0); j--) {
@@ -762,7 +762,7 @@ makebreak:
}
else wsfac = 1.0f;
- // Set the width of the character
+ /* Set the width of the character */
twidth = char_width(cu, che, info);
xof += (twidth * wsfac * (1.0f + (info->kern / 40.0f)) ) + xtrax;
@@ -781,10 +781,10 @@ makebreak:
if (ascii == '\n' || ascii == '\r' || ct->dobreak) cu->lines++;
}
- // linedata is now: width of line
- // linedata2 is now: number of characters
- // linedata3 is now: maxlen of that line
- // linedata4 is now: number of whitespaces of line
+ /* linedata is now: width of line
+ * linedata2 is now: number of characters
+ * linedata3 is now: maxlen of that line
+ * linedata4 is now: number of whitespaces of line */
if (cu->spacemode != CU_LEFT) {
ct = chartransdata;
@@ -1023,7 +1023,7 @@ makebreak:
/* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */
info->mat_nr = 0;
}
- // We do not want to see any character for \n or \r
+ /* We do not want to see any character for \n or \r */
if (cha != '\n' && cha != '\r')
buildchar(bmain, cu, cha, info, ct->xof, ct->yof, ct->rot, i);
@@ -1035,8 +1035,8 @@ makebreak:
{
uloverlap = xtrax + 0.1f;
}
- // Find the character, the characters has to be in the memory already
- // since character checking has been done earlier already.
+ /* Find the character, the characters has to be in the memory already
+ * since character checking has been done earlier already. */
che = find_vfont_char(vfd, cha);
twidth = char_width(cu, che, info);
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 6e6891684c9..f3ef01425dd 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1342,7 +1342,7 @@ static void lib_indirect_test_id(ID *id, Library *lib)
int a;
#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
- // XXX old animation system! --------------------------------------
+ /* XXX old animation system! -------------------------------------- */
{
bActionStrip *strip;
for (strip = ob->nlastrips.first; strip; strip = strip->next) {
@@ -1351,7 +1351,7 @@ static void lib_indirect_test_id(ID *id, Library *lib)
LIBTAG(strip->ipo);
}
}
- // XXX: new animation system needs something like this?
+ /* XXX: new animation system needs something like this? */
#endif
for (a = 0; a < ob->totcol; a++) {
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 84943172cbc..d62b03b5060 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -407,7 +407,7 @@ static float nlastrip_get_frame_actionclip(NlaStrip *strip, float cframe, short
/* reversed = play strip backwards */
if (strip->flag & NLASTRIP_FLAG_REVERSE) {
- // FIXME: this won't work right with Graph Editor?
+ /* FIXME: this won't work right with Graph Editor? */
if (mode == NLATIME_CONVERT_MAP) {
return strip->end - scale * (cframe - strip->actstart);
}
@@ -1154,7 +1154,7 @@ static short nlastrip_is_first(AnimData *adt, NlaStrip *strip)
return 0;
/* check other tracks to see if they have a strip that's earlier */
- // TODO: or should we check that the strip's track is also the first?
+ /* TODO: or should we check that the strip's track is also the first? */
for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
/* only check the first strip, assuming that they're all in order */
ns = nlt->strips.first;
@@ -1234,7 +1234,7 @@ void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
/* store path - make copy, and store that */
fcu->rna_path = BLI_strdupn("influence", 9);
- // TODO: insert a few keyframes to ensure default behavior?
+ /* TODO: insert a few keyframes to ensure default behavior? */
}
}
@@ -1255,7 +1255,7 @@ void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
/* store path - make copy, and store that */
fcu->rna_path = BLI_strdupn("strip_time", 10);
- // TODO: insert a few keyframes to ensure default behavior?
+ /* TODO: insert a few keyframes to ensure default behavior? */
}
}
}
@@ -1340,7 +1340,7 @@ static void nlastrip_get_endpoint_overlaps(NlaStrip *strip, NlaTrack *track, flo
/* find strips that overlap over the start/end of the given strip,
* but which don't cover the entire length
*/
- // TODO: this scheme could get quite slow for doing this on many strips...
+ /* TODO: this scheme could get quite slow for doing this on many strips... */
for (nls = track->strips.first; nls; nls = nls->next) {
/* check if strip overlaps (extends over or exactly on) the entire range of the strip we're validating */
if ((nls->start <= strip->start) && (nls->end >= strip->end)) {
@@ -1443,7 +1443,7 @@ void BKE_nla_validate_state(AnimData *adt)
/* apart from 'nothing' option which user has to explicitly choose, we don't really know if
* we should be overwriting the extend setting (but assume that's what the user wanted)
*/
- // TODO: 1 solution is to tie this in with auto-blending...
+ /* TODO: 1 solution is to tie this in with auto-blending... */
if (strip->extendmode != NLASTRIP_EXTEND_NOTHING) {
/* 1) First strip must be set to extend hold, otherwise, stuff before acts dodgy
* 2) Only overwrite extend mode if *not* changing it will most probably result in
@@ -1505,7 +1505,7 @@ void BKE_nla_action_pushdown(AnimData *adt)
/* not first, so extend mode can only be NLASTRIP_EXTEND_HOLD_FORWARD not NLASTRIP_EXTEND_HOLD,
* so that it doesn't override strips in previous tracks
*/
- // FIXME: this needs to be more automated, since user can rearrange strips
+ /* FIXME: this needs to be more automated, since user can rearrange strips */
strip->extendmode = NLASTRIP_EXTEND_HOLD_FORWARD;
}
@@ -1632,8 +1632,8 @@ void BKE_nla_tweakmode_exit(AnimData *adt)
if ((adt->flag & ADT_NLA_EDIT_ON) == 0)
return;
- // TODO: need to sync the user-strip with the new state of the action!
-
+ /* TODO: need to sync the user-strip with the new state of the action! */
+
/* for all Tracks, clear the 'disabled' flag
* for all Strips, clear the 'tweak-user' flag
*/
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index a7a6dd1d5cd..2ba2ad7bd6e 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1958,8 +1958,8 @@ static void solve_parenting(Scene *scene, Object *ob, Object *par, float obmat[]
break;
}
- // total
- mul_serie_m4(tmat, totmat, ob->parentinv,
+ /* total */
+ mul_serie_m4(tmat, totmat, ob->parentinv,
NULL, NULL, NULL, NULL, NULL, NULL);
mul_serie_m4(obmat, tmat, locmat,
NULL, NULL, NULL, NULL, NULL, NULL);
@@ -1968,7 +1968,7 @@ static void solve_parenting(Scene *scene, Object *ob, Object *par, float obmat[]
}
else {
- // external usable originmat
+ /* external usable originmat */
copy_m3_m4(originmat, tmat);
/* origin, for help line */
@@ -2503,7 +2503,7 @@ void BKE_object_handle_update(Scene *scene, Object *ob)
/* XXX new animsys warning: depsgraph tag OB_RECALC_DATA should not skip drivers,
* which is only in BKE_object_where_is_calc now */
- // XXX: should this case be OB_RECALC_OB instead?
+ /* XXX: should this case be OB_RECALC_OB instead? */
if (ob->recalc & OB_RECALC_ALL) {
if (G.debug & G_DEBUG)
@@ -2539,7 +2539,7 @@ void BKE_object_handle_update(Scene *scene, Object *ob)
if (adt) {
/* evaluate drivers - datalevel */
- // XXX: for mesh types, should we push this to derivedmesh instead?
+ /* XXX: for mesh types, should we push this to derivedmesh instead? */
BKE_animsys_evaluate_animdata(scene, data_id, adt, ctime, ADT_RECALC_DRIVERS);
}
@@ -3163,7 +3163,7 @@ struct LinkNode *BKE_object_relational_superset(struct Scene *scene, eObjectSet
/* iterate over all selected and visible objects */
for (base = scene->base.first; base; base = base->next) {
if (objectSet == OB_SET_ALL) {
- // as we get all anyways just add it
+ /* as we get all anyways just add it */
Object *ob = base->object;
obrel_list_add(&links, ob);
}
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index a2c89967f44..52acbeb94e5 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -132,7 +132,7 @@ int countPackedFiles(Main *bmain)
bSound *sound;
int count = 0;
- // let's check if there are packed files...
+ /* let's check if there are packed files... */
for (ima = bmain->image.first; ima; ima = ima->id.next)
if (ima->packedfile)
count++;
@@ -181,13 +181,13 @@ PackedFile *newPackedFile(ReportList *reports, const char *filename, const char
//XXX waitcursor(1);
- // convert relative filenames to absolute filenames
-
+ /* convert relative filenames to absolute filenames */
+
BLI_strncpy(name, filename, sizeof(name));
BLI_path_abs(name, basepath);
-
- // open the file
- // and create a PackedFile structure
+
+ /* open the file
+ * and create a PackedFile structure */
file = BLI_open(name, O_BINARY | O_RDONLY, 0);
if (file <= 0) {
@@ -197,8 +197,8 @@ PackedFile *newPackedFile(ReportList *reports, const char *filename, const char
filelen = BLI_file_descriptor_size(file);
if (filelen == 0) {
- // MEM_mallocN complains about MEM_mallocN(0, "bla");
- // we don't care....
+ /* MEM_mallocN complains about MEM_mallocN(0, "bla");
+ * we don't care.... */
data = MEM_mallocN(1, "packFile");
}
else {
@@ -294,7 +294,7 @@ int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, i
}
}
- // make sure the path to the file exists...
+ /* make sure the path to the file exists... */
BLI_make_existing_file(name);
file = BLI_open(name, O_BINARY + O_WRONLY + O_CREAT + O_TRUNC, 0666);
@@ -354,23 +354,23 @@ int checkPackedFile(const char *filename, PackedFile *pf)
ret_val = PF_DIFFERS;
}
else {
- // we'll have to compare the two...
-
+ /* we'll have to compare the two... */
+
file = BLI_open(name, O_BINARY | O_RDONLY, 0);
if (file < 0) {
ret_val = PF_NOFILE;
}
else {
ret_val = PF_EQUAL;
-
+
for (i = 0; i < pf->size; i += sizeof(buf)) {
len = pf->size - i;
if (len > sizeof(buf)) {
len = sizeof(buf);
}
-
+
if (read(file, buf, len) != len) {
- // read error ...
+ /* read error ... */
ret_val = PF_DIFFERS;
break;
}
@@ -412,24 +412,24 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na
temp = abs_name;
break;
case PF_USE_LOCAL:
- // if file exists use it
+ /* if file exists use it */
if (BLI_exists(local_name)) {
temp = local_name;
break;
}
- // else fall through and create it
+ /* else fall through and create it */
case PF_WRITE_LOCAL:
if (writePackedFile(reports, local_name, pf, 1) == RET_OK) {
temp = local_name;
}
break;
case PF_USE_ORIGINAL:
- // if file exists use it
+ /* if file exists use it */
if (BLI_exists(abs_name)) {
temp = abs_name;
break;
}
- // else fall through and create it
+ /* else fall through and create it */
case PF_WRITE_ORIGINAL:
if (writePackedFile(reports, abs_name, pf, 1) == RET_OK) {
temp = abs_name;
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index a1fe1f7b8a9..dcd1a797a7a 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -546,7 +546,7 @@ void psys_free(Object *ob, ParticleSystem *psys)
psys->totchild = 0;
}
- // check if we are last non-visible particle system
+ /* check if we are last non-visible particle system */
for (tpsys = ob->particlesystem.first; tpsys; tpsys = tpsys->next) {
if (tpsys->part) {
if (ELEM(tpsys->part->ren_as, PART_DRAW_OB, PART_DRAW_GR)) {
@@ -555,7 +555,7 @@ void psys_free(Object *ob, ParticleSystem *psys)
}
}
}
- // clear do-not-draw-flag
+ /* clear do-not-draw-flag */
if (!nr)
ob->transflag &= ~OB_DUPLIPARTS;
diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c
index b82521504dd..46ddce4b51b 100644
--- a/source/blender/blenkernel/intern/property.c
+++ b/source/blender/blenkernel/intern/property.c
@@ -223,8 +223,8 @@ int compare_property(bProperty *prop, const char *str)
case GPROP_FLOAT:
case GPROP_TIME:
- // WARNING: untested for GPROP_TIME
- // function isn't used currently
+ /* WARNING: untested for GPROP_TIME
+ * function isn't used currently */
fvalue = *((float *)&prop->data);
ftest = (float)atof(str);
if (fvalue > ftest) return 1;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 3d81275bb06..6f24eadd1b6 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -257,10 +257,10 @@ void BKE_scene_free(Scene *sce)
/* do not free objects! */
if (sce->gpd) {
-#if 0 // removed since this can be invalid memory when freeing everything
- // since the grease pencil data is freed before the scene.
- // since grease pencil data is not (yet?), shared between objects
- // its probably safe not to do this, some save and reload will free this.
+#if 0 /* removed since this can be invalid memory when freeing everything */
+ /* since the grease pencil data is freed before the scene.
+ * since grease pencil data is not (yet?), shared between objects
+ * its probably safe not to do this, some save and reload will free this. */
sce->gpd->id.us--;
#endif
sce->gpd = NULL;
@@ -1060,7 +1060,7 @@ void BKE_scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
sound_set_cfra(sce->r.cfra);
/* clear animation overrides */
- // XXX TODO...
+ /* XXX TODO... */
for (sce_iter = sce; sce_iter; sce_iter = sce_iter->set) {
if (sce_iter->theDag == NULL)
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 6e5149d7924..2e2f0e54792 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -1848,7 +1848,7 @@ static void do_transform(Scene *scene, Sequence *seq, float UNUSED(facf0), int x
TransformVars *transform = (TransformVars *)seq->effectdata;
float scale_x, scale_y, translate_x, translate_y, rotate_radians;
- // Scale
+ /* Scale */
if (transform->uniform_scale) {
scale_x = scale_y = transform->ScalexIni;
}
@@ -1857,7 +1857,7 @@ static void do_transform(Scene *scene, Sequence *seq, float UNUSED(facf0), int x
scale_y = transform->ScaleyIni;
}
- // Translate
+ /* Translate */
if (!transform->percent) {
float rd_s = (scene->r.size / 100.0f);
@@ -1868,8 +1868,8 @@ static void do_transform(Scene *scene, Sequence *seq, float UNUSED(facf0), int x
translate_x = x * (transform->xIni / 100.0f) + (x / 2.0f);
translate_y = y * (transform->yIni / 100.0f) + (y / 2.0f);
}
-
- // Rotate
+
+ /* Rotate */
rotate_radians = DEG2RADF(transform->rotIni);
transform_image(x, y, ibuf1, out, scale_x, scale_y, translate_x, translate_y, rotate_radians, transform->interpolation);
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 78ccdc425e5..902eeefd934 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -2528,7 +2528,7 @@ static ImBuf *seq_render_strip_stack(
#if 0 /* commentind since this breaks keyframing, since it resets the value on draw */
if (scene->r.cfra != cfra) {
- // XXX for prefetch and overlay offset!..., very bad!!!
+ /* XXX for prefetch and overlay offset!..., very bad!!! */
AnimData *adt = BKE_animdata_from_id(&scene->id);
BKE_animsys_evaluate_animdata(scene, &scene->id, adt, cfra, ADT_RECALC_ANIM);
}
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 7081a642b8a..5bad69c2e8d 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -1413,11 +1413,11 @@ int BKE_texture_dependsOnTime(const struct Tex *texture)
return 1;
}
else if (texture->adt) {
- // assume anything in adt means the texture is animated
+ /* assume anything in adt means the texture is animated */
return 1;
}
else if (texture->type == TEX_NOISE) {
- // noise always varies with time
+ /* noise always varies with time */
return 1;
}
return 0;
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index f72942df8b3..f22fd74baf4 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -516,7 +516,7 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
c->qmax = 51;
}
- // Keep lossless encodes in the RGB domain.
+ /* Keep lossless encodes in the RGB domain. */
if (codec_id == CODEC_ID_HUFFYUV) {
/* HUFFYUV was PIX_FMT_YUV422P before */
c->pix_fmt = PIX_FMT_RGB32;
@@ -572,12 +572,12 @@ static AVStream *alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
}
if (codec_id == CODEC_ID_QTRLE) {
- // normally it should be enough to have buffer with actual image size,
- // but some codecs like QTRLE might store extra information in this buffer,
- // so it should be a way larger
+ /* normally it should be enough to have buffer with actual image size,
+ * but some codecs like QTRLE might store extra information in this buffer,
+ * so it should be a way larger */
- // maximum video buffer size is 6-bytes per pixel, plus DPX header size (1664)
- // (from FFmpeg sources)
+ /* maximum video buffer size is 6-bytes per pixel, plus DPX header size (1664)
+ * (from FFmpeg sources) */
int size = c->width * c->height;
video_buffersize = 7 * size + 10000;
}