[Bf-blender-cvs] [efc3ef2] master: Change previous commit that uses transparency by default.

Antony Riakiotakis noreply at git.blender.org
Tue Aug 12 16:17:42 CEST 2014


Commit: efc3ef2d3b8829101d7ab41f0b43c05753152ea3
Author: Antony Riakiotakis
Date:   Tue Aug 12 16:17:07 2014 +0200
Branches: master
https://developer.blender.org/rBefc3ef2d3b8829101d7ab41f0b43c05753152ea3

Change previous commit that uses transparency by default.

Sampling still samples the texture color in transparent areas. This is
not so bad but users may get confused when clicking on a white spot and
picking black instead of the mesh color.

Krita also has this uncertainty when picking in transparent areas but we
do not interpolate with an explicit "transparent" looking texture during
viewport drawing (maybe we should), so it's not so apparent what happens
here.

===================================================================

M	source/blender/editors/sculpt_paint/paint_image_proj.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index e86de26..1bad066 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4855,7 +4855,7 @@ bool proj_paint_add_slot(bContext *C, Material *ma, wmOperator *op)
 				mtex->mapto = type;
 
 				if (mtex->tex) {
-					float color[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+					float color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
 					char imagename[MAX_ID_NAME - 2] = "Material Diffuse Color";
 					int width = 1024;
 					int height = 1024;
@@ -4923,7 +4923,7 @@ static int texture_paint_add_texture_paint_slot_invoke(bContext *C, wmOperator *
 void PAINT_OT_add_texture_paint_slot(wmOperatorType *ot)
 {
 	PropertyRNA *prop;
-	static float default_color[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+	static float default_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
 
 	/* identifiers */
 	ot->name = "Add Texture Paint Slot";




More information about the Bf-blender-cvs mailing list