Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index b819fe8e97d..fbdca27b018 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -144,7 +144,7 @@ static bool sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoN
SculptSession *ss = ob->sculpt;
MVert *mvert;
int *index;
-
+
if (unode->maxvert) {
/* regular mesh restore */
@@ -261,7 +261,7 @@ static bool sculpt_undo_restore_hidden(
if (unode->maxvert) {
MVert *mvert = ss->mvert;
-
+
for (i = 0; i < unode->totvert; i++) {
MVert *v = &mvert[unode->index[i]];
if ((BLI_BITMAP_TEST(unode->vert_hidden, i) != 0) != ((v->flag & ME_HIDE) != 0)) {
@@ -273,12 +273,12 @@ static bool sculpt_undo_restore_hidden(
}
else if (unode->maxgrid && dm->getGridData) {
BLI_bitmap **grid_hidden = dm->getGridHidden(dm);
-
+
for (i = 0; i < unode->totgrid; i++) {
SWAP(BLI_bitmap *,
unode->grid_hidden[i],
grid_hidden[unode->grids[i]]);
-
+
}
}
@@ -292,7 +292,7 @@ static bool sculpt_undo_restore_mask(bContext *C, DerivedMesh *dm, SculptUndoNod
MVert *mvert;
float *vmask;
int *index, i, j;
-
+
if (unode->maxvert) {
/* regular mesh restore */
@@ -671,10 +671,10 @@ static void sculpt_undo_alloc_and_store_hidden(PBVH *pbvh,
BKE_pbvh_node_get_grids(pbvh, node, &grid_indices, &totgrid,
NULL, NULL, NULL);
-
+
unode->grid_hidden = MEM_mapallocN(sizeof(*unode->grid_hidden) * totgrid,
"unode->grid_hidden");
-
+
for (i = 0; i < totgrid; i++) {
if (grid_hidden[grid_indices[i]])
unode->grid_hidden[i] = MEM_dupallocN(grid_hidden[grid_indices[i]]);
@@ -691,7 +691,7 @@ static SculptUndoNode *sculpt_undo_alloc_node(
SculptUndoNode *unode;
SculptSession *ss = ob->sculpt;
int totvert, allvert, totgrid, maxgrid, gridsize, *grids;
-
+
unode = MEM_callocN(sizeof(SculptUndoNode), "SculptUndoNode");
BLI_strncpy(unode->idname, ob->id.name, sizeof(unode->idname));
unode->type = type;
@@ -706,7 +706,7 @@ static SculptUndoNode *sculpt_undo_alloc_node(
}
else
maxgrid = 0;
-
+
/* we will use this while sculpting, is mapalloc slow to access then? */
/* general TODO, fix count_alloc */
@@ -722,7 +722,7 @@ static SculptUndoNode *sculpt_undo_alloc_node(
sculpt_undo_alloc_and_store_hidden(ss->pbvh, unode);
else
unode->vert_hidden = BLI_BITMAP_NEW(allvert, "SculptUndoNode.vert_hidden");
-
+
break;
case SCULPT_UNDO_MASK:
unode->mask = MEM_mapallocN(sizeof(float) * allvert, "SculptUndoNode.mask");
@@ -736,7 +736,7 @@ static SculptUndoNode *sculpt_undo_alloc_node(
BLI_assert(!"Dynamic topology should've already been handled");
break;
}
-
+
BLI_addtail(&usculpt->nodes, unode);
if (maxgrid) {
@@ -788,7 +788,7 @@ static void sculpt_undo_store_hidden(Object *ob, SculptUndoNode *unode)
const int *vert_indices;
int allvert;
int i;
-
+
BKE_pbvh_node_num_verts(pbvh, node, NULL, &allvert);
BKE_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert);
for (i = 0; i < allvert; i++) {
@@ -927,7 +927,7 @@ SculptUndoNode *sculpt_undo_push_node(
}
unode = sculpt_undo_alloc_node(ob, node, type);
-
+
BLI_thread_unlock(LOCK_CUSTOM1);
/* copy threaded, hopefully this is the performance critical part */