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:
authorCampbell Barton <ideasman42@gmail.com>2013-01-04 06:54:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-04 06:54:38 +0400
commit2a7ee4e3731eff5b064b14ad28bed9d55f6f2c9a (patch)
tree645f8fdda89e41c905c533303bee2f8daedc1b99 /source/blender/editors/sculpt_paint
parent27343d07326f999c097dafcc9c0809a200542f5a (diff)
no need to initialize the 2D paint node tree when project painting.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 8c9531e5554..fb62408c687 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -5142,15 +5142,13 @@ static int texture_paint_init(bContext *C, wmOperator *op)
return 0;
}
}
-
- paint_brush_init_tex(pop->s.brush);
-
+
/* note, if we have no UVs on the derived mesh, then we must return here */
if (pop->mode == PAINT_MODE_3D_PROJECT) {
/* initialize all data from the context */
project_state_init(C, OBACT, &pop->ps);
-
+
paint_brush_init_tex(pop->ps.brush);
pop->ps.source = PROJ_SRC_VIEW;
@@ -5168,6 +5166,9 @@ static int texture_paint_init(bContext *C, wmOperator *op)
if (pop->ps.dm == NULL)
return 0;
}
+ else {
+ paint_brush_init_tex(pop->s.brush);
+ }
settings->imapaint.flag |= IMAGEPAINT_DRAWING;
undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name,
@@ -5237,8 +5238,6 @@ static void paint_exit(bContext *C, wmOperator *op)
if (pop->restore_projection)
settings->imapaint.flag &= ~IMAGEPAINT_PROJECT_DISABLE;
- paint_brush_exit_tex(pop->s.brush);
-
settings->imapaint.flag &= ~IMAGEPAINT_DRAWING;
imapaint_canvas_free(&pop->s);
BKE_brush_painter_free(pop->painter);
@@ -5250,6 +5249,8 @@ static void paint_exit(bContext *C, wmOperator *op)
project_paint_end(&pop->ps);
}
else {
+ paint_brush_exit_tex(pop->s.brush);
+
/* non projection 3d paint, could move into own function of more needs adding */
if (pop->s.dm_release)
pop->s.dm->release(pop->s.dm);