[Bf-blender-cvs] [17074c2] soc-2016-pbvh-painting: merged master, but something in the merge broke my windows build, so I had to change something. Also fixed a bug in mirrored painting.
Nathan Vollmer
noreply at git.blender.org
Sat Jul 2 02:59:29 CEST 2016
Commit: 17074c2871a7ad5d2a45d194e33376dc0aaa598b
Author: Nathan Vollmer
Date: Fri Jul 1 17:59:24 2016 -0700
Branches: soc-2016-pbvh-painting
https://developer.blender.org/rB17074c2871a7ad5d2a45d194e33376dc0aaa598b
merged master, but something in the merge broke my windows build, so I had to change something. Also fixed a bug in mirrored painting.
===================================================================
M source/blender/collada/collada_utils.cpp
M source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index be54bdd..f92229a 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -357,10 +357,12 @@ void bc_triangulate_mesh(Mesh *me)
bool use_beauty = false;
bool tag_only = false;
int quad_method = MOD_TRIANGULATE_QUAD_SHORTEDGE; /* XXX: The triangulation method selection could be offered in the UI */
-
+
+ struct BMeshCreateParams params;
+ params.use_toolflags = false;
BMesh *bm = BM_mesh_create(
&bm_mesh_allocsize_default,
- &((struct BMeshCreateParams){.use_toolflags = false,}));
+ ¶ms);
BMeshFromMeshParams bm_from_me_params = {0};
bm_from_me_params.calc_face_normal = true;
BM_mesh_bm_from_me(bm, me, &bm_from_me_params);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 2bb4e34..13f32ac 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -3287,7 +3287,7 @@ static void do_radial_symmetry(Sculpt *sd, VPaint *vd, VPaintData *vpd, Object *
SculptSession *ss = ob->sculpt;
int i;
- for (i = 1; i < vd->radial_symm[axis - 'X']; ++i) {
+ for (i = 0; i < vd->radial_symm[axis - 'X']; ++i) {
const float angle = (2.0 * M_PI) * i / vd->radial_symm[axis - 'X'];
ss->cache->radial_symmetry_pass = i;
calc_brushdata_symm(vd, ss->cache, symm, axis, angle);
@@ -3331,8 +3331,10 @@ static void do_symmetrical_brush_actions(Sculpt *sd, VPaint *vd, VPaintData *vpd
calc_brushdata_symm(vd, cache, i, 0, 0);
do_radial_symmetry(sd, vd, vpd, ob, me, brush, i, 'X');
- do_radial_symmetry(sd, vd, vpd, ob, me, brush, i, 'Y');
- do_radial_symmetry(sd, vd, vpd, ob, me, brush, i, 'Z');
+ if (i != 0) {
+ do_radial_symmetry(sd, vd, vpd, ob, me, brush, i, 'Y');
+ do_radial_symmetry(sd, vd, vpd, ob, me, brush, i, 'Z');
+ }
}
}
}
@@ -3394,24 +3396,24 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
memset(vpd->mlooptag, 0, sizeof(bool) * me->totloop);
// Paint happens here.
- SculptSession *ss = ob->sculpt;
- copy_v3_v3(ss->cache->location, ss->cache->true_location);
- SculptSearchSphereData data;
- PBVHNode **nodes = NULL;
- int totnode;
-
- /* Build a list of all nodes that are potentially within the brush's area of influence */
- data.ss = ss;
- data.sd = sd;
- data.radius_squared = ss->cache->radius_squared;
- data.original = true;
- BKE_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode);
-
- //Paint those leaves.
- vpaint_paint_leaves(sd, vp, vpd, ob, me, nodes, totnode);
-
- if (nodes)
- MEM_freeN(nodes);
+ //SculptSession *ss = ob->sculpt;
+ //copy_v3_v3(ss->cache->location, ss->cache->true_location);
+ //SculptSearchSphereData data;
+ //PBVHNode **nodes = NULL;
+ //int totnode;
+
+ ///* Build a list of all nodes that are potentially within the brush's area of influence */
+ //data.ss = ss;
+ //data.sd = sd;
+ //data.radius_squared = ss->cache->radius_squared;
+ //data.original = true;
+ //BKE_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode);
+
+ ////Paint those leaves.
+ //vpaint_paint_leaves(sd, vp, vpd, ob, me, nodes, totnode);
+
+ //if (nodes)
+ // MEM_freeN(nodes);
do_symmetrical_brush_actions(sd, vp, vpd, ob);
More information about the Bf-blender-cvs
mailing list