[Bf-blender-cvs] [e32fff0] soc-2013-paint: Mask brush:
Antony Riakiotakis
noreply at git.blender.org
Sat Apr 26 01:19:33 CEST 2014
Commit: e32fff032d8d043f3bc9fb2cfb5294b69ade64e3
Author: Antony Riakiotakis
Date: Sat Apr 26 02:19:27 2014 +0300
https://developer.blender.org/rBe32fff032d8d043f3bc9fb2cfb5294b69ade64e3
Mask brush:
* On painting, enable stencil
* Stencil checkbox forces redraw.
===================================================================
M source/blender/editors/sculpt_paint/paint_image.c
M source/blender/makesrna/intern/rna_sculpt_paint.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 205e1af..58acfd6 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1404,6 +1404,7 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob)
width = imapaint->new_slot_xresolution;
height = imapaint->new_slot_yresolution;
imapaint->stencil = BKE_image_add_generated(bmain, width, height, "Stencil", 32, false, IMA_GENTYPE_BLANK, color);
+ imapaint->flag |= IMAGEPAINT_PROJECT_LAYER_STENCIL;
}
}
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index c2f3fe5..304348e 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -592,7 +592,7 @@ static void rna_def_image_paint(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_stencil_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_STENCIL);
RNA_def_property_ui_text(prop, "Stencil Layer", "Set the mask layer from the UV map buttons");
- RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_ImaPaint_stencil_update");
prop = RNA_def_property(srna, "invert_stencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_STENCIL_INV);
More information about the Bf-blender-cvs
mailing list