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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-16 05:22:56 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-16 05:22:56 +0400
commit401b58cb45dd23d4b92143f29b77060c105ba127 (patch)
treed9e91ddd4ad0bd103f9c80e5eb82d47f7b4a7f7c /source/blender/editors/sculpt_paint/paint_image.c
parent18d8454f2e5dbf217e5a40ff96296c6d3cffa5c4 (diff)
2.5: Image Editor
* Started porting over to python, menus nearly done, header WIP. * Game Properties panel is in python too * Deprecated "Tiles" as a per face flag here, now it's always on the image, used to be both, working in a very confusing way. Unlikely someone actually had a purpose for this being per face. * Remove GPC_PolygonMaterial.cpp/h, it's not actually used anymore, so I don't want to bother updating it. * Fix crash in image painting (own mistake in porting over bugfix from 2.4x).
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 1effd8fd377..a163ef5f8e2 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -4517,6 +4517,9 @@ static int paint_init(bContext *C, wmOperator *op)
pop->ps.ar= CTX_wm_region(C);
/* intialize brush */
+ if(!settings->imapaint.brush)
+ return 0;
+
pop->s.brush = settings->imapaint.brush;
pop->s.tool = settings->imapaint.tool;
if(pop->mode == PAINT_MODE_3D && (pop->s.tool == PAINT_TOOL_CLONE))
@@ -4536,6 +4539,10 @@ static int paint_init(bContext *C, wmOperator *op)
if (!pop->s.ob || !(pop->s.ob->lay & pop->ps.v3d->lay)) return 0;
pop->s.me = get_mesh(pop->s.ob);
if (!pop->s.me) return 0;
+
+ /* Dont allow brush size below 2 */
+ if (pop->ps.brush && pop->ps.brush->size<=1)
+ pop->ps.brush->size = 2;
}
else {
pop->s.image = pop->s.sima->image;
@@ -4548,10 +4555,6 @@ static int paint_init(bContext *C, wmOperator *op)
return 0;
}
-
- /* Dont allow brush size below 2 */
- if (pop->ps.brush->size<=1)
- pop->ps.brush->size = 2;
}
/* note, if we have no UVs on the derived mesh, then we must return here */