[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49036] branches/soc-2011-tomato: svn merge ^/trunk/blender -r49029:49035
Campbell Barton
ideasman42 at gmail.com
Wed Jul 18 18:26:07 CEST 2012
Revision: 49036
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49036
Author: campbellbarton
Date: 2012-07-18 16:26:07 +0000 (Wed, 18 Jul 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r49029:49035
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49029
Modified Paths:
--------------
branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/merge_po.py
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask_rasterize.c
branches/soc-2011-tomato/source/blender/compositor/intern/COM_WorkScheduler.cpp
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_buttons.c
branches/soc-2011-tomato/source/blender/editors/transform/transform.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49029
+ /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49035
Modified: branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/merge_po.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/merge_po.py 2012-07-18 16:24:13 UTC (rev 49035)
+++ branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/merge_po.py 2012-07-18 16:26:07 UTC (rev 49036)
@@ -31,16 +31,17 @@
import sys
try:
+ import settings
import utils
except:
- from . import utils
+ from . import (settings, utils)
def main():
import argparse
parser = argparse.ArgumentParser(description="" \
"Merge one or more .po files into the first dest one.\n" \
- "If a msgkey (msgid, msgctxt) is present in more than " \
+ "If a msgkey (msgctxt, msgid) is present in more than " \
"one merged po, the one in the first file wins, unless " \
"it’s marked as fuzzy and one later is not.\n" \
"The fuzzy flag is removed if necessary.\n" \
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask_rasterize.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask_rasterize.c 2012-07-18 16:24:13 UTC (rev 49035)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask_rasterize.c 2012-07-18 16:26:07 UTC (rev 49036)
@@ -47,11 +47,16 @@
#ifndef USE_RASKTER
+/* this is rather and annoying hack, use define to isolate it.
+ * problem is caused by scanfill removing edges on us. */
+#define USE_SCANFILL_EDGE_WORKAROUND
+
#define SPLINE_RESOL_CAP_PER_PIXEL 2
#define SPLINE_RESOL_CAP_MIN 8
#define SPLINE_RESOL_CAP_MAX 64
-#define BUCKET_PIXELS_PER_CELL 8
+/* found this gives best performance for high detail masks, values between 2 and 8 work best */
+#define BUCKET_PIXELS_PER_CELL 4
#define SF_EDGE_IS_BOUNDARY 0xff
#define SF_KEYINDEX_TEMP_ID ((unsigned int) -1)
@@ -60,8 +65,9 @@
#define TRI_VERT ((unsigned int) -1)
/* for debugging add... */
+#ifndef NDEBUG
/* printf("%u %u %u %u\n", _t[0], _t[1], _t[2], _t[3]); \ */
-#define FACE_ASSERT(face, vert_max) \
+# define FACE_ASSERT(face, vert_max) \
{ \
unsigned int *_t = face; \
BLI_assert(_t[0] < vert_max); \
@@ -69,6 +75,10 @@
BLI_assert(_t[2] < vert_max); \
BLI_assert(_t[3] < vert_max || _t[3] == TRI_VERT); \
} (void)0
+#else
+ /* do nothing */
+# define FACE_ASSERT(face, vert_max)
+#endif
static void rotate_point_v2(float r_p[2], const float p[2], const float cent[2], const float angle, const float asp[2])
{
@@ -542,6 +552,11 @@
unsigned int sf_vert_tot = 0;
unsigned int tot_feather_quads = 0;
+#ifdef USE_SCANFILL_EDGE_WORKAROUND
+ unsigned int tot_boundary_used = 0;
+ unsigned int tot_boundary_found = 0;
+#endif
+
if (masklay->restrictflag & MASK_RESTRICT_RENDER) {
/* skip the layer */
mr_handle->layers_tot--;
@@ -574,6 +589,7 @@
if (do_feather) {
diff_feather_points = BKE_mask_spline_feather_differentiated_points_with_resolution_ex(
spline, &tot_diff_feather_points, resol, TRUE);
+ BLI_assert(diff_feather_points);
}
else {
tot_diff_feather_points = 0;
@@ -655,8 +671,15 @@
for (j = 0; j < tot_diff_point; j++) {
ScanFillEdge *sf_edge = BLI_scanfill_edge_add(&sf_ctx, sf_vert_prev, sf_vert);
- sf_edge->tmp.c = SF_EDGE_IS_BOUNDARY;
+#ifdef USE_SCANFILL_EDGE_WORKAROUND
+ if (diff_feather_points) {
+ sf_edge->tmp.c = SF_EDGE_IS_BOUNDARY;
+ tot_boundary_used++;
+ }
+#else
+ (void)sf_edge;
+#endif
sf_vert_prev = sf_vert;
sf_vert = sf_vert->next;
}
@@ -871,10 +894,20 @@
*(face++) = sf_edge->v1->keyindex;
face_index++;
FACE_ASSERT(face - 4, sf_vert_tot);
+
+#ifdef USE_SCANFILL_EDGE_WORKAROUND
+ tot_boundary_found++;
+#endif
}
}
}
+#ifdef USE_SCANFILL_EDGE_WORKAROUND
+ if (tot_boundary_found != tot_boundary_used) {
+ BLI_assert(tot_boundary_found < tot_boundary_used);
+ }
+#endif
+
/* feather only splines */
while (open_spline_index > 0) {
const unsigned int vertex_offset = open_spline_ranges[--open_spline_index].vertex_offset;
@@ -993,15 +1026,22 @@
MEM_freeN(open_spline_ranges);
- // fprintf(stderr, "%d %d\n", face_index, sf_face_tot + tot_feather_quads);
+// fprintf(stderr, "%u %u (%u %u), %u\n", face_index, sf_tri_tot + tot_feather_quads, sf_tri_tot, tot_feather_quads, tot_boundary_used - tot_boundary_found);
+#ifdef USE_SCANFILL_EDGE_WORKAROUND
+ BLI_assert(face_index + (tot_boundary_used - tot_boundary_found) == sf_tri_tot + tot_feather_quads);
+#else
BLI_assert(face_index == sf_tri_tot + tot_feather_quads);
-
+#endif
{
MaskRasterLayer *layer = &mr_handle->layers[masklay_index];
if (BLI_rctf_isect(&default_bounds, &bounds, &bounds)) {
- layer->face_tot = sf_tri_tot + tot_feather_quads;
+#ifdef USE_SCANFILL_EDGE_WORKAROUND
+ layer->face_tot = (sf_tri_tot + tot_feather_quads) - (tot_boundary_used - tot_boundary_found);
+#else
+ layer->face_tot = (sf_tri_tot + tot_feather_quads);
+#endif
layer->face_coords = face_coords;
layer->face_array = face_array;
layer->bounds = bounds;
@@ -1229,14 +1269,21 @@
case MASK_BLEND_REPLACE:
value = (value * (1.0f - layer->alpha)) + (value_layer * layer->alpha);
break;
+ case MASK_BLEND_DIFFERENCE:
+ value = fabsf(value - value_layer);
+ break;
default: /* same as add */
BLI_assert(0);
value += value_layer;
break;
}
+
+ /* clamp after applying each layer so we don't get
+ * issues subtracting after accumulating over 1.0f */
+ CLAMP(value, 0.0f, 1.0f);
}
- return CLAMPIS(value, 0.0f, 1.0f);
+ return value;
}
#endif /* USE_RASKTER */
Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_WorkScheduler.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_WorkScheduler.cpp 2012-07-18 16:24:13 UTC (rev 49035)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_WorkScheduler.cpp 2012-07-18 16:26:07 UTC (rev 49036)
@@ -36,10 +36,13 @@
#include "BLI_threads.h"
#if COM_CURRENT_THREADING_MODEL == COM_TM_NOTHREAD
-#warning COM_CURRENT_THREADING_MODEL COM_TM_NOTHREAD is activated. Use only for debugging.
+# ifndef DEBUG /* test this so we dont get warnings in debug builds */
+# warning COM_CURRENT_THREADING_MODEL COM_TM_NOTHREAD is activated. Use only for debugging.
+# endif
#elif COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
+ /* do nothing - default */
#else
-#error COM_CURRENT_THREADING_MODEL No threading model selected
+# error COM_CURRENT_THREADING_MODEL No threading model selected
#endif
Property changes on: branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-49029
+ /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-49035
Property changes on: branches/soc-2011-tomato/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-49029
+ /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-49035
Modified: branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_buttons.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_buttons.c 2012-07-18 16:24:13 UTC (rev 49035)
+++ branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_buttons.c 2012-07-18 16:26:07 UTC (rev 49036)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list