Commit: 01b0d4bf3158fe3d7db5d2988630a772a14584d5
Author: Pablo Dobarro
Date: Tue May 14 00:38:51 2019 +0200
Branches: sculpt-mode-features
https://developer.blender.org/rB01b0d4bf3158fe3d7db5d2988630a772a14584d5
Cleanup: comments formatting
===================================================================
M intern/openvdb/openvdb_capi.cc
M source/blender/blenkernel/intern/remesh_quad.c
M source/blender/blenkernel/intern/remesh_voxel.c
M source/blender/editors/mesh/editmesh_add.c
M source/blender/editors/transform/transform_conversions.c
M source/blender/makesdna/DNA_modifier_types.h
M source/blender/modifiers/intern/MOD_remesh.c
===================================================================
diff --git a/intern/openvdb/openvdb_capi.cc b/intern/openvdb/openvdb_capi.cc
index fea1f6034f0..0bee45934d1 100644
--- a/intern/openvdb/openvdb_capi.cc
+++ b/intern/openvdb/openvdb_capi.cc
@@ -368,7 +368,7 @@ OpenVDBLevelSet
*OpenVDBLevelSet_transform_and_resample(struct OpenVDBLevelSet *
break;
case OPENVDB_LEVELSET_GRIDSAMPLER_NONE:
- //targetGrid = sourceGrid->deepCopy();
+ // targetGrid = sourceGrid->deepCopy();
break;
}
diff --git a/source/blender/blenkernel/intern/remesh_quad.c
b/source/blender/blenkernel/intern/remesh_quad.c
index bd5863b34bc..606023840bf 100644
--- a/source/blender/blenkernel/intern/remesh_quad.c
+++ b/source/blender/blenkernel/intern/remesh_quad.c
@@ -63,7 +63,7 @@ Mesh *BKE_remesh_quad(
int num_verts = mesh->totvert;
qex_TriMesh *trimesh = MEM_callocN(sizeof(qex_TriMesh), "trimesh");
qex_QuadMesh quadmesh; //= MEM_callocN(sizeof(qex_QuadMesh), "quadmesh");
- //qex_Valence *valence;
+ // qex_Valence *valence;
MVertTri *verttri = MEM_callocN(sizeof(*verttri) * (size_t)num_tris,
"remesh_looptri");
BKE_mesh_runtime_verttri_from_looptri(
@@ -73,7 +73,7 @@ Mesh *BKE_remesh_quad(
int(*tris)[3] = MEM_calloc_arrayN((size_t)num_tris, sizeof(int) * 3, "tris");
float(*uv_tris)[3][2] = MEM_calloc_arrayN((size_t)num_tris, sizeof(float) *
3 * 2, "uv_tris");
- //fill data
+ // fill data
for (int i = 0; i < num_verts; i++) {
copy_v3_v3(verts[i], mesh->mvert[i].co);
}
@@ -84,13 +84,13 @@ Mesh *BKE_remesh_quad(
tris[i][2] = verttri[i].tri[2];
}
- //mixed integer quadrangulation
- //double stiffness = 5.0;
- //double gradient_size = 50.0;
- //double iter = 0;
- //bool direct_round = false;
+ // mixed integer quadrangulation
+ // double stiffness = 5.0;
+ // double gradient_size = 50.0;
+ // double iter = 0;
+ // bool direct_round = false;
- //find pairs of verts of original edges (= marked with seam)
+ // find pairs of verts of original edges (= marked with seam)
bool *hard_edges = MEM_callocN(sizeof(bool) * 3 * num_tris, "hard edges");
// int *hard_verts = MEM_mallocN(sizeof(int) * mesh->totvert, "hard_verts");
@@ -121,7 +121,7 @@ Mesh *BKE_remesh_quad(
direct_round,
hard_edges);
- //build trimesh
+ // build trimesh
trimesh->tri_count = (unsigned int)num_tris;
trimesh->vertex_count = (unsigned int)num_verts;
trimesh->vertices = MEM_calloc_arrayN(sizeof(qex_Point3), (size_t)num_verts,
"trimesh vertices");
@@ -152,10 +152,10 @@ Mesh *BKE_remesh_quad(
trimesh->uvTris[i].uvs[2].x[1] = uv_tris[i][2][1];
}
- //quad extraction
+ // quad extraction
extractQuadMesh(trimesh, NULL, &quadmesh);
- //rebuild mesh
+ // rebuild mesh
if (quadmesh.quad_count > 0) {
result = BKE_mesh_new_nomain(quadmesh.vertex_count, 0,
quadmesh.quad_count, 0, 0);
for (int i = 0; i < quadmesh.vertex_count; i++) {
@@ -172,14 +172,14 @@ Mesh *BKE_remesh_quad(
result->mface->mat_nr = 0;
}
- //build edges, tessfaces, normals
+ // build edges, tessfaces, normals
BKE_mesh_calc_edges_tessface(result);
BKE_mesh_convert_mfaces_to_mpolys(result);
BKE_mesh_calc_normals(result);
BKE_mesh_update_customdata_pointers(result, true);
}
- //free stuff
+ // free stuff
MEM_freeN(verts);
MEM_freeN(tris);
MEM_freeN(uv_tris);
@@ -190,14 +190,14 @@ Mesh *BKE_remesh_quad(
MEM_freeN(trimesh);
MEM_freeN(verttri);
- //if (quadmesh->vertices)
+ // if (quadmesh->vertices)
// free(quadmesh->vertices);
- //if (quadmesh->quads)
+ // if (quadmesh->quads)
// free(quadmesh->quads);
- //MEM_freeN(quadmesh);
+ // MEM_freeN(quadmesh);
return result;
- //remap customdata (reproject)
+ // remap customdata (reproject)
// BVH...
#else
return mesh;
diff --git a/source/blender/blenkernel/intern/remesh_voxel.c
b/source/blender/blenkernel/intern/remesh_voxel.c
index 5102be6dd96..23408bb8a05 100644
--- a/source/blender/blenkernel/intern/remesh_voxel.c
+++ b/source/blender/blenkernel/intern/remesh_voxel.c
@@ -271,7 +271,7 @@ MLoopCol *BKE_remesh_remap_loop_vertex_color_layer(Mesh
*mesh)
/*map loopbased storage onto vertices*/
for (i = 0; i < mesh->totloop; i++) {
MLoopCol c = source_color[i];
- //printf("COLOR %d %d %d %d %d \n", mesh->mloop[i].v, c.r, c.g, c.b,
c.a);
+ // printf("COLOR %d %d %d %d %d \n", mesh->mloop[i].v, c.r, c.g, c.b,
c.a);
remap[mesh->mloop[i].v].r = c.r;
remap[mesh->mloop[i].v].g = c.g;
remap[mesh->mloop[i].v].b = c.b;
@@ -304,7 +304,7 @@ void BKE_remesh_voxel_reproject_remapped_vertex_paint(Mesh
*target, Mesh *source
if (nearest.index != -1) {
MLoopCol c = remap[nearest.index];
- //printf("MAPPED %d %d %d %d %d %d \n", i, nearest.index, c.r, c.g,
c.b, c.a);
+ // printf("MAPPED %d %d %d %d %d %d \n", i, nearest.index, c.r, c.g,
c.b, c.a);
target_color[i].r = c.r;
target_color[i].g = c.g;
target_color[i].b = c.b;
diff --git a/source/blender/editors/mesh/editmesh_add.c
b/source/blender/editors/mesh/editmesh_add.c
index 40ef8057fc5..452557f9d66 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -99,7 +99,7 @@ static void make_prim_finish(bContext *C,
/* userdef */
if (exit_editmode) {
ED_object_editmode_exit(C, EM_FREEDATA);
- //TODO: Find a better place to init this
+ // TODO: Find a better place to init this
Mesh *me;
me = obedit->data;
me->voxel_size = 0.1f;
diff --git a/source/blender/editors/transform/transform_conversions.c
b/source/blender/editors/transform/transform_conversions.c
index 6964783d7c4..55a10700911 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1328,7 +1328,7 @@ static void createTransPose(TransInfo *t)
}
PoseInitData_Mirror *pid = MEM_mallocN((total_mirrored + 1) *
sizeof(PoseInitData_Mirror),
- "PoseInitData_Mirror");
+ "PoseInitData_Mirror");
/* Trick to terminate iteration. */
pid[total_mirrored].pchan = NULL;
diff --git a/source/blender/makesdna/DNA_modifier_types.h
b/source/blender/makesdna/DNA_modifier_types.h
index 82aec5ecdde..039756d30d3 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -1552,7 +1552,7 @@ typedef enum eCSGVolumeOperandFlags {
typedef struct CSGVolume_Object {
struct CSGVolume_Object *next, *prev;
struct RemeshModifierData *md;
- //modifier we belong to (currently unused, probably should be
deprecated/removed ?)
+ // modifier we belong to (currently unused, probably should be
deprecated/removed ?)
struct Object *object;
float voxel_size;
float voxel_percentage;
diff --git a/source/blender/modifiers/intern/MOD_remesh.c
b/source/blender/modifiers/intern/MOD_remesh.c
index 2d10e881657..8edb0ef7b0c 100644
--- a/source/blender/modifiers/intern/MOD_remesh.c
+++ b/source/blender/modifiers/intern/MOD_remesh.c
@@ -288,7 +288,7 @@ static Mesh *applyModifier(ModifierData *md, const
ModifierEvalContext *ctx, Mes
RemeshModifierData *rmd_orig = (RemeshModifierData
*)modifiers_findByName(ob_orig, md->name);
if (((rmd->flag & MOD_REMESH_LIVE_REMESH) == 0)) {
- //access mesh cache on ORIGINAL object, cow should not copy / free this
over and over again
+ // access mesh cache on ORIGINAL object, cow should not copy / free this
over and over again
if (rmd_orig->mesh_cached) {
return copy_mesh(rmd_orig->mesh_cached);
}
@@ -298,13 +298,13 @@ static Mesh *applyModifier(ModifierData *md, const
ModifierEvalContext *ctx, Mes
mesh, rmd->gradient_size, rmd->stiffness, rmd->iter, rmd->flag &
MOD_REMESH_DIRECT_ROUND);
if (result) {
- //update cache
+ // update cache
if (rmd_orig->mesh_cached) {
BKE_mesh_free(rmd_orig->mesh_cached);
rmd_orig->mesh_cached = NULL;
}
- //save a copy
+ // save a copy
rmd_orig->mesh_cached = copy_mesh(result);
}
@@ -323,7 +323,7 @@ static Mesh *applyModifier(ModifierData *md, const
ModifierEvalContext *ctx, Mes
RemeshModifierData *rmd_orig = (RemeshModifierData
*)modifiers_findByName(ob_orig, md->name);
if (((rmd->flag & MOD_REMESH_LIVE_REMESH) == 0)) {
- //access mesh cache on ORIGINAL object, cow should not copy / free this
over and over again
+ // access mesh cache on ORIGINAL object, cow should not copy / free this
over and over again
if (rmd_orig->mesh_cached) {
return copy_mesh(rmd_orig->mesh_cached);
}
@@ -345,13 +345,13 @@ static Mesh *applyModifier(ModifierData *md, const
ModifierEvalContext *ctx, Mes
result = voxel_remesh(rmd, mesh, level_set);
if (result) {
- //update cache
+ // update cache
if (rmd_orig->mesh_cached) {
BKE_mesh_free(rmd_orig->mesh_cached);
rmd_orig->mesh_cached = NULL;
}
- //save a copy
+ // save a copy
rmd_orig->mesh_cached = copy_mesh(result);
}
@@ -480,12 +480,12 @@ static void copyData(const ModifierData *md_src,
ModifierData *md_dst, const int
Mesh *me_src = rmd_src->mesh_cached;
modifier_copyData_generic(md_src, md_dst, flag);
- //only for cow copy, because cow does shallow copy only
+ // only for cow copy, because cow does shallow copy only
if (flag & LIB_ID_CREATE_NO_MAIN) {
BLI_duplicatelist(&rmd_dst->csg_operands, &rmd_src->csg_operands);
}
- //here for both ?
+ // here for both ?
if (me_src) {
Mesh *me_dst = BKE_mesh_new_nomain(
me_src->totvert, me_src->totedge, me_src->totface, me_src->totloop,
me_src->totpoly);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs