[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30819] branches/soc-2010-nicolasbishop/ source/blender/editors/sculpt_paint: == Paint ==
Nicholas Bishop
nicholasbishop at gmail.com
Wed Jul 28 02:39:12 CEST 2010
Revision: 30819
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30819
Author: nicholasbishop
Date: 2010-07-28 02:39:12 +0200 (Wed, 28 Jul 2010)
Log Message:
-----------
== Paint ==
* Replaced sd->flags with paint->flags
Modified Paths:
--------------
branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/sculpt.c
Modified: branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-28 00:34:04 UTC (rev 30818)
+++ branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-28 00:39:12 UTC (rev 30819)
@@ -335,7 +335,7 @@
buffer = MEM_mallocN(sizeof(GLubyte)*size*size, "load_tex");
- #pragma omp parallel for schedule(static) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(static) if (sd->paint.flags & PAINT_USE_OPENMP)
for (j= 0; j < size; j++) {
int i;
float y;
Modified: branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/sculpt.c 2010-07-28 00:34:04 UTC (rev 30818)
+++ branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/sculpt.c 2010-07-28 00:39:12 UTC (rev 30819)
@@ -464,7 +464,7 @@
zero_v3(an);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -770,7 +770,7 @@
last = max_iterations*(bstrength - count*fract);
for(iteration = 0; iteration <= count; ++iteration) {
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
if(ss->multires) {
do_multires_smooth_brush(sd, ob, nodes[n], iteration != count ? 1.0f : last);
@@ -806,7 +806,7 @@
mul_v3_fl(offset, bstrength);
/* threaded loop over nodes */
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -861,7 +861,7 @@
if(brush->sculpt_tool == SCULPT_TOOL_BLOB) flippedbstrength *= -1.0f;
/* threaded loop over nodes */
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -903,7 +903,7 @@
float bstrength= ss->cache->bstrength;
int n;
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -951,7 +951,7 @@
add_v3_v3(grab_delta, an);
}
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptUndoNode* unode;
@@ -999,7 +999,7 @@
cross_v3_v3v3(tmp, an, grab_delta);
cross_v3_v3v3(cono, tmp, an);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n = 0; n < totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1048,7 +1048,7 @@
add_v3_v3(grab_delta, an);
}
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n = 0; n < totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1089,7 +1089,7 @@
cross_v3_v3v3(tmp, an, grab_delta);
cross_v3_v3v3(cono, tmp, an);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n = 0; n < totnode; n++) {
PBVHVertexIter vd;
SculptUndoNode* unode;
@@ -1135,7 +1135,7 @@
axis_angle_to_mat3(m, an, angle);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptUndoNode* unode;
@@ -1184,7 +1184,7 @@
mul_v3_v3v3(offset, ss->cache->scale, area_normal);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1247,7 +1247,7 @@
float bstrength= ss->cache->bstrength;
int n;
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1285,7 +1285,7 @@
zero_v3(fc);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1344,7 +1344,7 @@
// fc
zero_v3(fc);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1567,7 +1567,7 @@
mul_v3_fl(temp, displace);
add_v3_v3(fc, temp);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n = 0; n < totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1638,7 +1638,7 @@
//add_v3_v3v3(p, ss->cache->location, an);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for (n = 0; n < totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1730,7 +1730,7 @@
mul_m4_m4m4(tmat, scale, mat);
invert_m4_m4(mat, tmat);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for (n = 0; n < totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1791,7 +1791,7 @@
mul_v3_fl(temp, displace);
add_v3_v3(fc, temp);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for (n = 0; n < totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1852,7 +1852,7 @@
mul_v3_fl(temp, displace);
add_v3_v3(fc, temp);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for (n = 0; n < totnode; n++) {
PBVHVertexIter vd;
PaintStrokeTest test;
@@ -1968,7 +1968,7 @@
/* Only act if some verts are inside the brush area */
if (totnode) {
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for (n= 0; n < totnode; n++) {
sculpt_undo_push_node(ob, nodes[n]);
BLI_pbvh_node_mark_update(nodes[n]);
@@ -2072,7 +2072,7 @@
case SCULPT_TOOL_GRAB:
case SCULPT_TOOL_ROTATE:
case SCULPT_TOOL_THUMB:
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for (n= 0; n < totnode; n++) {
PBVHVertexIter vd;
PBVHProxyNode* proxies;
@@ -2113,7 +2113,7 @@
case SCULPT_TOOL_PINCH:
case SCULPT_TOOL_SCRAPE:
case SCULPT_TOOL_SNAKE_HOOK:
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for (n= 0; n < totnode; n++) {
PBVHVertexIter vd;
PBVHProxyNode* proxies;
@@ -2755,7 +2755,7 @@
BLI_pbvh_search_gather(ob->paint->pbvh, NULL, NULL, &nodes, &totnode);
- #pragma omp parallel for schedule(guided) if (sd->flags & PAINT_USE_OPENMP)
+ #pragma omp parallel for schedule(guided) if (sd->paint.flags & PAINT_USE_OPENMP)
for(n=0; n<totnode; n++) {
SculptUndoNode *unode;
@@ -2840,7 +2840,7 @@
number of processor cores.
Justification: Empirically I've found that two threads per
processor gives higher throughput. */
- if (sd->flags & PAINT_USE_OPENMP) {
+ if (sd->paint.flags & PAINT_USE_OPENMP) {
int num_procs;
num_procs = omp_get_num_procs();
More information about the Bf-blender-cvs
mailing list