[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29887] branches/soc-2010-nicolasbishop/ source/blender: * Fixed masks not updating after undo
Nicholas Bishop
nicholasbishop at gmail.com
Sat Jul 3 07:31:08 CEST 2010
Revision: 29887
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29887
Author: nicholasbishop
Date: 2010-07-03 07:31:06 +0200 (Sat, 03 Jul 2010)
Log Message:
-----------
* Fixed masks not updating after undo
Modified Paths:
--------------
branches/soc-2010-nicolasbishop/source/blender/blenlib/BLI_pbvh.h
branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/sculpt.c
Modified: branches/soc-2010-nicolasbishop/source/blender/blenlib/BLI_pbvh.h
===================================================================
--- branches/soc-2010-nicolasbishop/source/blender/blenlib/BLI_pbvh.h 2010-07-03 03:53:06 UTC (rev 29886)
+++ branches/soc-2010-nicolasbishop/source/blender/blenlib/BLI_pbvh.h 2010-07-03 05:31:06 UTC (rev 29887)
@@ -109,7 +109,14 @@
/* Update color data (used for masks) */
PBVH_UpdateColorBuffers = 32,
- PBVH_UpdateRedraw = 64
+ PBVH_UpdateRedraw = 64,
+
+ PBVH_UpdateAll = PBVH_UpdateNormals |
+ PBVH_UpdateBB |
+ PBVH_UpdateOriginalBB |
+ PBVH_UpdateVertBuffers |
+ PBVH_UpdateColorBuffers |
+ PBVH_UpdateRedraw
} PBVHNodeFlags;
void BLI_pbvh_node_mark_update(PBVHNode *node);
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-03 03:53:06 UTC (rev 29886)
+++ branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/sculpt.c 2010-07-03 05:31:06 UTC (rev 29887)
@@ -294,11 +294,6 @@
char *shapeName[32]; /* keep size in sync with keyblock dna */
} SculptUndoNode;
-static void update_cb(PBVHNode *node, void *data)
-{
- BLI_pbvh_node_mark_update(node);
-}
-
/* Checks whether full update mode (slower) needs to be used to work with modifiers */
static int sculpt_modifiers_active(Scene *scene, Object *ob)
{
@@ -452,7 +447,8 @@
/* we update all nodes still, should be more clever, but also
needs to work correct when exiting/entering sculpt mode and
the nodes get recreated, though in that case it could do all */
- BLI_pbvh_search_callback(ss->pbvh, NULL, NULL, update_cb, NULL);
+ BLI_pbvh_search_callback(ss->pbvh, NULL, NULL, BLI_pbvh_node_set_flags,
+ SET_INT_IN_POINTER(PBVH_UpdateAll));
BLI_pbvh_update(ss->pbvh, PBVH_UpdateBB|PBVH_UpdateOriginalBB|PBVH_UpdateRedraw, NULL);
if((mmd=paint_multires_active(scene, ob)))
@@ -2391,7 +2387,8 @@
/* Avoid cracks in multires */
if(ss->multires) {
BLI_pbvh_search_callback(ss->pbvh, NULL, NULL,
- update_cb, NULL);
+ BLI_pbvh_node_set_flags,
+ SET_INT_IN_POINTER(PBVH_UpdateAll));
multires_stitch_grids(ss->ob);
}
More information about the Bf-blender-cvs
mailing list