[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60869] branches/soc-2013-depsgraph_mt: Merging r60854 through r60868 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin
sergey.vfx at gmail.com
Sun Oct 20 14:10:37 CEST 2013
Revision: 60869
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60869
Author: nazgul
Date: 2013-10-20 12:10:37 +0000 (Sun, 20 Oct 2013)
Log Message:
-----------
Merging r60854 through r60868 from trunk into soc-2013-depsgraph_mt
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60854
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60868
Modified Paths:
--------------
branches/soc-2013-depsgraph_mt/intern/bsp/intern/BOP_CarveInterface.cpp
branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn_lockfree_impl.c
branches/soc-2013-depsgraph_mt/release/scripts/modules/bl_i18n_utils/settings.py
branches/soc-2013-depsgraph_mt/release/scripts/modules/bl_i18n_utils/utils.py
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/mesh_evaluate.c
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/tracking.c
branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_math_matrix.h
branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/math_matrix.c
branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_polygon.c
branches/soc-2013-depsgraph_mt/source/blender/compositor/nodes/COM_BlurNode.cpp
branches/soc-2013-depsgraph_mt/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
branches/soc-2013-depsgraph_mt/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
branches/soc-2013-depsgraph_mt/source/blender/editors/animation/anim_markers.c
branches/soc-2013-depsgraph_mt/source/blender/render/intern/source/pipeline.c
Property Changed:
----------------
branches/soc-2013-depsgraph_mt/
Property changes on: branches/soc-2013-depsgraph_mt
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_dev:58091-58422
/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/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835,59032,59214,59220,59251,59601
/branches/soc-2013-rigid_body_sim:60311
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-60853
+ /branches/ge_dev:58091-58422
/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/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835,59032,59214,59220,59251,59601
/branches/soc-2013-rigid_body_sim:60311
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-60868
Modified: branches/soc-2013-depsgraph_mt/intern/bsp/intern/BOP_CarveInterface.cpp
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/bsp/intern/BOP_CarveInterface.cpp 2013-10-20 12:08:51 UTC (rev 60868)
+++ branches/soc-2013-depsgraph_mt/intern/bsp/intern/BOP_CarveInterface.cpp 2013-10-20 12:10:37 UTC (rev 60869)
@@ -711,6 +711,47 @@
return outputMesh;
}
+static void meshSetMinMax(const MeshSet<3> *mesh,
+ carve::geom3d::Vector *min,
+ carve::geom3d::Vector *max)
+{
+ for (uint i = 0; i < mesh->vertex_storage.size(); ++i) {
+ min->x = MIN(min->x, mesh->vertex_storage[i].v.x);
+ min->y = MIN(min->y, mesh->vertex_storage[i].v.y);
+ min->z = MIN(min->z, mesh->vertex_storage[i].v.z);
+ max->x = MAX(max->x, mesh->vertex_storage[i].v.x);
+ max->y = MAX(max->y, mesh->vertex_storage[i].v.y);
+ max->z = MAX(max->z, mesh->vertex_storage[i].v.z);
+ }
+}
+
+static void getRescaleMinMax(const MeshSet<3> *left,
+ const MeshSet<3> *right,
+ carve::geom3d::Vector *min,
+ carve::geom3d::Vector *max)
+{
+ min->x = max->x = left->vertex_storage[0].v.x;
+ min->y = max->y = left->vertex_storage[0].v.y;
+ min->z = max->z = left->vertex_storage[0].v.z;
+
+ meshSetMinMax(left, min, max);
+ meshSetMinMax(right, min, max);
+
+ // Make sure we don't scale object with zer oscale
+ if ((min->x - max->x) < DBL_EPSILON) {
+ min->x = -1.0;
+ max->x = 1.0;
+ }
+ if ((min->y - max->y) < DBL_EPSILON) {
+ min->y = -1.0;
+ max->y = 1.0;
+ }
+ if ((min->z - max->z) < DBL_EPSILON) {
+ min->z = -1.0;
+ max->z = 1.0;
+ }
+}
+
/**
* Performs a generic booleam operation, the entry point for external modules.
* @param opType Boolean operation type BOP_INTERSECTION, BOP_UNION, BOP_DIFFERENCE
@@ -753,29 +794,11 @@
left = Carve_addMesh(obAFaces, obAVertices, oface_num, num_origfaces );
right = Carve_addMesh(obBFaces, obBVertices, oface_num, num_origfaces );
- min.x = max.x = left->vertex_storage[0].v.x;
- min.y = max.y = left->vertex_storage[0].v.y;
- min.z = max.z = left->vertex_storage[0].v.z;
- for (uint i = 1; i < left->vertex_storage.size(); ++i) {
- min.x = MIN(min.x,left->vertex_storage[i].v.x);
- min.y = MIN(min.y,left->vertex_storage[i].v.y);
- min.z = MIN(min.z,left->vertex_storage[i].v.z);
- max.x = MAX(max.x,left->vertex_storage[i].v.x);
- max.y = MAX(max.y,left->vertex_storage[i].v.y);
- max.z = MAX(max.z,left->vertex_storage[i].v.z);
- }
- for (uint i = 0; i < right->vertex_storage.size(); ++i) {
- min.x = MIN(min.x,right->vertex_storage[i].v.x);
- min.y = MIN(min.y,right->vertex_storage[i].v.y);
- min.z = MIN(min.z,right->vertex_storage[i].v.z);
- max.x = MAX(max.x,right->vertex_storage[i].v.x);
- max.y = MAX(max.y,right->vertex_storage[i].v.y);
- max.z = MAX(max.z,right->vertex_storage[i].v.z);
- }
+ getRescaleMinMax(left, right, &min, &max);
carve::rescale::rescale scaler(min.x, min.y, min.z, max.x, max.y, max.z);
carve::rescale::fwd fwd_r(scaler);
- carve::rescale::rev rev_r(scaler);
+ carve::rescale::rev rev_r(scaler);
left->transform(fwd_r);
right->transform(fwd_r);
Modified: branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn_lockfree_impl.c
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn_lockfree_impl.c 2013-10-20 12:08:51 UTC (rev 60868)
+++ branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn_lockfree_impl.c 2013-10-20 12:10:37 UTC (rev 60869)
@@ -61,6 +61,7 @@
#define MEMHEAD_FROM_PTR(ptr) (((MemHead*) vmemh) - 1)
#define PTR_FROM_MEMHEAD(memhead) (memhead + 1)
+#define MEMHEAD_IS_MMAP(memhead) ((memhead)->len & (size_t) 1)
#ifdef __GNUC__
__attribute__ ((format(printf, 1, 2)))
@@ -112,13 +113,13 @@
atomic_sub_u(&totblock, 1);
atomic_sub_z(&mem_in_use, len);
- if (memh->len & (size_t) 1) {
+ if (MEMHEAD_IS_MMAP(memh)) {
atomic_sub_z(&mmap_in_use, len);
#if defined(WIN32)
/* our windows mmap implementation is not thread safe */
mem_lock_thread();
#endif
- if (munmap(memh, memh->len + sizeof(MemHead)))
+ if (munmap(memh, len + sizeof(MemHead)))
printf("Couldn't unmap memory\n");
#if defined(WIN32)
mem_unlock_thread();
@@ -136,8 +137,14 @@
{
void *newp = NULL;
if (vmemh) {
+ MemHead *memh = MEMHEAD_FROM_PTR(vmemh);
const size_t prev_size = MEM_allocN_len(vmemh);
- newp = MEM_lockfree_mallocN(prev_size, "dupli_malloc");
+ if (MEMHEAD_IS_MMAP(memh)) {
+ newp = MEM_lockfree_mapallocN(prev_size, "dupli_mapalloc");
+ }
+ else {
+ newp = MEM_lockfree_mallocN(prev_size, "dupli_malloc");
+ }
memcpy(newp, vmemh, prev_size);
}
return newp;
Modified: branches/soc-2013-depsgraph_mt/release/scripts/modules/bl_i18n_utils/settings.py
===================================================================
--- branches/soc-2013-depsgraph_mt/release/scripts/modules/bl_i18n_utils/settings.py 2013-10-20 12:08:51 UTC (rev 60868)
+++ branches/soc-2013-depsgraph_mt/release/scripts/modules/bl_i18n_utils/settings.py 2013-10-20 12:10:37 UTC (rev 60869)
@@ -257,6 +257,16 @@
for it in ("BLF_I18N_MSGID_MULTI_CTXT",))
)
+# Check printf mismatches between msgid and msgstr.
+CHECK_PRINTF_FORMAT = (
+ r"(?!<%)(?:%%)*%" # Begining, with handling for crazy things like '%%%%%s'
+ r"[-+#0]?" # Flags (note: do not add the ' ' (space) flag here, generates too much false positives!)
+ r"(?:\*|[0-9]+)?" # Width
+ r"(?:\.(?:\*|[0-9]+))?" # Precision
+ r"(?:[hljztL]|hh|ll)?" # Length
+ r"[tldiuoxXfFeEgGaAcspn]" # Specifiers (note we have Blender-specific %t and %l ones too)
+)
+
# Should po parser warn when finding a first letter not capitalized?
WARN_MSGID_NOT_CAPITALIZED = True
Modified: branches/soc-2013-depsgraph_mt/release/scripts/modules/bl_i18n_utils/utils.py
===================================================================
--- branches/soc-2013-depsgraph_mt/release/scripts/modules/bl_i18n_utils/utils.py 2013-10-20 12:08:51 UTC (rev 60868)
+++ branches/soc-2013-depsgraph_mt/release/scripts/modules/bl_i18n_utils/utils.py 2013-10-20 12:10:37 UTC (rev 60869)
@@ -446,10 +446,10 @@
"""
ret = []
default_context = self.settings.DEFAULT_CONTEXT
- _format = re.compile("%[.0-9]*[tslfd]").findall
+ _format = re.compile(self.settings.CHECK_PRINTF_FORMAT).findall
done_keys = set()
+ rem = set()
tmp = {}
- rem = set()
for key, msg in self.msgs.items():
msgctxt, msgid, msgstr = msg.msgctxt, msg.msgid, msg.msgstr
real_key = (msgctxt or default_context, msgid)
@@ -464,7 +464,7 @@
done_keys.add(key)
if '%' in msgid and msgstr and _format(msgid) != _format(msgstr):
if not msg.is_fuzzy:
- ret.append("Error! msg's format entities are not matched in msgid and msgstr ({} / {})"
+ ret.append("Error! msg's format entities are not matched in msgid and msgstr ({} / \"{}\")"
"".format(real_key, msgstr))
if fix:
msg.msgstr = ""
Modified: branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/mesh_evaluate.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/mesh_evaluate.c 2013-10-20 12:08:51 UTC (rev 60868)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/mesh_evaluate.c 2013-10-20 12:10:37 UTC (rev 60869)
@@ -379,7 +379,8 @@
if ((e2l[0] | e2l[1]) == 0) {
/* 'Empty' edge until now, set e2l[0] (and e2l[1] to INDEX_UNSET to tag it as unset). */
e2l[0] = ml_curr_index;
- e2l[1] = INDEX_UNSET;
+ /* We have to check this here too, else we might miss some flat faces!!! */
+ e2l[1] = (mp->flag & ME_SMOOTH) ? INDEX_UNSET : INDEX_INVALID;
}
else if (e2l[1] == INDEX_UNSET) {
/* Second loop using this edge, time to test its sharpness.
Modified: branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/tracking.c
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list