[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59303] branches/soc-2013-depsgraph_mt: Merging r59294 through r59302 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin
sergey.vfx at gmail.com
Mon Aug 19 16:27:48 CEST 2013
Revision: 59303
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59303
Author: nazgul
Date: 2013-08-19 14:27:48 +0000 (Mon, 19 Aug 2013)
Log Message:
-----------
Merging r59294 through r59302 from trunk into soc-2013-depsgraph_mt
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59294
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59302
Modified Paths:
--------------
branches/soc-2013-depsgraph_mt/intern/atomic/atomic_ops.h
branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/properties.py
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/displist.c
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/pbvh_bmesh.c
branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_log.c
branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_log.h
branches/soc-2013-depsgraph_mt/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2013-depsgraph_mt/source/blender/makesrna/intern/rna_scene.c
Property Changed:
----------------
branches/soc-2013-depsgraph_mt/
branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface.c
branches/soc-2013-depsgraph_mt/source/blender/editors/space_outliner/
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
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-59293
+ /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
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-59302
Modified: branches/soc-2013-depsgraph_mt/intern/atomic/atomic_ops.h
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/atomic/atomic_ops.h 2013-08-19 14:22:02 UTC (rev 59302)
+++ branches/soc-2013-depsgraph_mt/intern/atomic/atomic_ops.h 2013-08-19 14:27:48 UTC (rev 59303)
@@ -29,6 +29,8 @@
#ifndef ATOMIC_OPS_H__
#define ATOMIC_OPS_H__
+#include <assert.h>
+
#if defined (__APPLE__)
# include <libkern/OSAtomic.h>
#elif defined(_MSC_VER)
@@ -52,7 +54,7 @@
#if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__)
# define LG_SIZEOF_PTR 3
-# define LG_SIZEOF_INT 3
+# define LG_SIZEOF_INT 2
#else
# define LG_SIZEOF_PTR 2
# define LG_SIZEOF_INT 2
@@ -251,6 +253,8 @@
ATOMIC_INLINE size_t
atomic_add_z(size_t *p, size_t x)
{
+ assert(sizeof(size_t) == 1 << LG_SIZEOF_PTR);
+
#if (LG_SIZEOF_PTR == 3)
return ((size_t)atomic_add_uint64((uint64_t *)p, (uint64_t)x));
#elif (LG_SIZEOF_PTR == 2)
@@ -261,6 +265,8 @@
ATOMIC_INLINE size_t
atomic_sub_z(size_t *p, size_t x)
{
+ assert(sizeof(size_t) == 1 << LG_SIZEOF_PTR);
+
#if (LG_SIZEOF_PTR == 3)
return ((size_t)atomic_add_uint64((uint64_t *)p,
(uint64_t)-((int64_t)x)));
@@ -275,6 +281,8 @@
ATOMIC_INLINE unsigned
atomic_add_u(unsigned *p, unsigned x)
{
+ assert(sizeof(unsigned) == 1 << LG_SIZEOF_INT);
+
#if (LG_SIZEOF_INT == 3)
return ((unsigned)atomic_add_uint64((uint64_t *)p, (uint64_t)x));
#elif (LG_SIZEOF_INT == 2)
@@ -285,6 +293,8 @@
ATOMIC_INLINE unsigned
atomic_sub_u(unsigned *p, unsigned x)
{
+ assert(sizeof(unsigned) == 1 << LG_SIZEOF_INT);
+
#if (LG_SIZEOF_INT == 3)
return ((unsigned)atomic_add_uint64((uint64_t *)p,
(uint64_t)-((int64_t)x)));
Modified: branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/properties.py
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/properties.py 2013-08-19 14:22:02 UTC (rev 59302)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/properties.py 2013-08-19 14:27:48 UTC (rev 59303)
@@ -385,6 +385,7 @@
description="Tile order for rendering",
items=enum_tile_order,
default='CENTER',
+ options=set(), # Not animatable!
)
cls.use_progressive_refine = BoolProperty(
name="Progressive Refine",
Modified: branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/displist.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/displist.c 2013-08-19 14:22:02 UTC (rev 59302)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/displist.c 2013-08-19 14:27:48 UTC (rev 59303)
@@ -1604,11 +1604,19 @@
void BKE_displist_make_curveTypes_forRender(Scene *scene, Object *ob, ListBase *dispbase,
DerivedMesh **derivedFinal, int forOrco, int renderResolution)
{
+ if (ob->curve_cache == NULL) {
+ ob->curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for MBall");
+ }
+
do_makeDispListCurveTypes(scene, ob, dispbase, derivedFinal, 1, forOrco, renderResolution);
}
void BKE_displist_make_curveTypes_forOrco(struct Scene *scene, struct Object *ob, struct ListBase *dispbase)
{
+ if (ob->curve_cache == NULL) {
+ ob->curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for MBall");
+ }
+
do_makeDispListCurveTypes(scene, ob, dispbase, NULL, 1, 1, 1);
}
Modified: branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/pbvh_bmesh.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/pbvh_bmesh.c 2013-08-19 14:22:02 UTC (rev 59302)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/pbvh_bmesh.c 2013-08-19 14:27:48 UTC (rev 59303)
@@ -1026,9 +1026,11 @@
GHASH_ITER (gh_iter, node->bm_unique_verts) {
BM_vert_normal_update(BLI_ghashIterator_getKey(&gh_iter));
}
+ /* This should be unneeded normally */
GHASH_ITER (gh_iter, node->bm_other_verts) {
BM_vert_normal_update(BLI_ghashIterator_getKey(&gh_iter));
}
+ node->flag &= ~PBVH_UpdateNormals;
}
}
@@ -1365,7 +1367,9 @@
void pbvh_bmesh_verify(PBVH *bvh)
{
GHashIterator gh_iter;
- int i;
+ int i, vert_count = 0;
+ BMIter iter;
+ BMVert *vi;
/* Check faces */
BLI_assert(bvh->bm->totface == BLI_ghash_size(bvh->bm_face_to_node));
@@ -1431,8 +1435,37 @@
}
}
BLI_assert(found);
+
+ #if 0
+ /* total freak stuff, check if node exists somewhere else */
+ /* Slow */
+ for (i = 0; i < bvh->totnode; i++) {
+ PBVHNode *n = &bvh->nodes[i];
+ if (i != ni && n->bm_unique_verts)
+ BLI_assert(!BLI_ghash_haskey(n->bm_unique_verts, v));
+ }
+
+ #endif
}
+ #if 0
+ /* check that every vert belongs somewhere */
+ /* Slow */
+ BM_ITER_MESH (vi, &iter, bvh->bm, BM_VERTS_OF_MESH) {
+ bool has_unique = false;
+ for (i = 0; i < bvh->totnode; i++) {
+ PBVHNode *n = &bvh->nodes[i];
+ if ((n->bm_unique_verts != NULL) && BLI_ghash_haskey(n->bm_unique_verts, vi))
+ has_unique = true;
+ }
+ BLI_assert(has_unique);
+ vert_count++;
+ }
+
+ /* if totvert differs from number of verts inside the hash. hash-totvert is checked above */
+ BLI_assert(vert_count == bvh->bm->totvert);
+ #endif
+
/* Check that node elements are recorded in the top level */
for (i = 0; i < bvh->totnode; i++) {
PBVHNode *n = &bvh->nodes[i];
Modified: branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_log.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_log.c 2013-08-19 14:22:02 UTC (rev 59302)
+++ branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_log.c 2013-08-19 14:27:48 UTC (rev 59303)
@@ -95,6 +95,7 @@
typedef struct {
float co[3];
+ short no[3];
float mask;
char hflag;
} BMLogVert;
@@ -187,6 +188,7 @@
static void bm_log_vert_bmvert_copy(BMesh *bm, BMLogVert *lv, BMVert *v)
{
copy_v3_v3(lv->co, v->co);
+ normal_float_to_short_v3(lv->no, v->no);
lv->mask = vert_mask_get(bm, v);
lv->hflag = v->head.hflag;
}
@@ -276,6 +278,7 @@
BMVert *v = BM_vert_create(bm, lv->co, NULL, 0);
v->head.hflag = lv->hflag;
vert_mask_set(bm, v, lv->mask);
+ normal_short_to_float_v3(v->no, lv->no);
bm_log_vert_id_set(log, v, GET_INT_FROM_POINTER(key));
}
}
@@ -305,8 +308,12 @@
unsigned int id = GET_INT_FROM_POINTER(key);
BMVert *v = bm_log_vert_from_id(log, id);
float mask;
+ short normal[3];
swap_v3_v3(v->co, lv->co);
+ copy_v3_v3_short(normal, lv->no);
+ normal_float_to_short_v3(lv->no, v->no);
+ normal_short_to_float_v3(v->no, normal);
SWAP(char, v->head.hflag, lv->hflag);
mask = lv->mask;
lv->mask = vert_mask_get(bm, v);
@@ -927,6 +934,24 @@
return lv->co;
}
+/* Get the logged normal of a vertex
+ *
+ * Does not modify the log or the vertex */
+const short *BM_log_original_vert_no(BMLog *log, BMVert *v)
+{
+ BMLogEntry *entry = log->current_entry;
+ const BMLogVert *lv;
+ unsigned v_id = bm_log_vert_id_get(log, v);
+ void *key = SET_INT_IN_POINTER(v_id);
+
+ BLI_assert(entry);
+
+ BLI_assert(BLI_ghash_haskey(entry->modified_verts, key));
+
+ lv = BLI_ghash_lookup(entry->modified_verts, key);
+ return lv->no;
+}
+
/* Get the logged mask of a vertex
*
* Does not modify the log or the vertex */
Modified: branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_log.h
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_log.h 2013-08-19 14:22:02 UTC (rev 59302)
+++ branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_log.h 2013-08-19 14:27:48 UTC (rev 59303)
@@ -92,6 +92,9 @@
/* Get the logged coordinates of a vertex */
const float *BM_log_original_vert_co(BMLog *log, BMVert *v);
+/* Get the logged normal of a vertex */
+const short *BM_log_original_vert_no(BMLog *log, BMVert *v);
+
/* Get the logged mask of a vertex */
float BM_log_original_mask(BMLog *log, BMVert *v);
Property changes on: branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface.c
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list