[Bf-blender-cvs] [d7ddb94] master: Projective painting:

Antony Riakiotakis noreply at git.blender.org
Mon Sep 22 11:05:06 CEST 2014


Commit: d7ddb941a07b806decc867bf58e3ec84d2ec1d41
Author: Antony Riakiotakis
Date:   Mon Sep 22 11:01:50 2014 +0200
Branches: master
https://developer.blender.org/rBd7ddb941a07b806decc867bf58e3ec84d2ec1d41

Projective painting:

* Make clone UI a bit more descriptive
* Don't set images to image editors that have a pinned image.

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

M	release/scripts/startup/bl_ui/properties_paint_common.py
M	source/blender/editors/sculpt_paint/paint_image.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/makesrna/intern/rna_material.c
M	source/blender/makesrna/intern/rna_sculpt_paint.c

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

diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 113fee1..81bbc77 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -170,7 +170,7 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal
 
                     mat = ob.active_material
                     if mat:
-                        col.label("Clone Slot")
+                        col.label("Source Clone Slot")
                         col.template_list("TEXTURE_UL_texpaintslots", "",
                                           mat, "texture_paint_images",
                                           mat, "paint_clone_slot", rows=2)
@@ -179,9 +179,9 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal
                     mesh = ob.data
 
                     clone_text = mesh.uv_texture_clone.name if mesh.uv_texture_clone else ""
-                    col.label("Image")
+                    col.label("Source Clone Image")
                     col.template_ID(settings, "clone_image")
-                    col.label("UV Map")
+                    col.label("Source Clone UV Map")
                     col.menu("VIEW3D_MT_tools_projectpaint_clone", text=clone_text, translate=False)
         else:
             col.prop(brush, "clone_image", text="Image")
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index f83dd3d..0e3592f 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1399,7 +1399,8 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
 					if (sl->spacetype == SPACE_IMAGE) {
 						SpaceImage *sima = (SpaceImage *)sl;
 						
-						ED_space_image_set(sima, scene, scene->obedit, ima);
+						if (!sima->pin)
+							ED_space_image_set(sima, scene, scene->obedit, ima);
 					}
 				}
 			}
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index ef41cdd..e9d1d54 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4910,7 +4910,8 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob, wmOperator *op)
 											if (sl->spacetype == SPACE_IMAGE) {
 												SpaceImage *sima = (SpaceImage *)sl;
 												
-												ED_space_image_set(sima, scene, scene->obedit, ma->texpaintslot[0].ima);
+												if (!sima->pin)
+													ED_space_image_set(sima, scene, scene->obedit, ma->texpaintslot[0].ima);
 											}
 										}
 									}
@@ -4950,7 +4951,8 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob, wmOperator *op)
 						if (sl->spacetype == SPACE_IMAGE) {
 							SpaceImage *sima = (SpaceImage *)sl;
 							
-							ED_space_image_set(sima, scene, scene->obedit, imapaint->canvas);
+							if (!sima->pin)
+								ED_space_image_set(sima, scene, scene->obedit, imapaint->canvas);
 						}
 					}
 				}
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 1ef39ec..2e4f24f 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -204,7 +204,9 @@ static void rna_Material_active_paint_texture_index_update(Main *bmain, Scene *s
 				for (sl = sa->spacedata.first; sl; sl = sl->next) {
 					if (sl->spacetype == SPACE_IMAGE) {
 						SpaceImage *sima = (SpaceImage *)sl;
-						ED_space_image_set(sima, scene, scene->obedit, image);
+						
+						if (!sima->pin)
+							ED_space_image_set(sima, scene, scene->obedit, image);
 					}
 				}
 			}
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index d48d858..b5b938c 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -324,7 +324,9 @@ static void rna_ImaPaint_canvas_update(Main *bmain, Scene *scene, PointerRNA *UN
 			for (sl = sa->spacedata.first; sl; sl = sl->next) {
 				if (sl->spacetype == SPACE_IMAGE) {
 					SpaceImage *sima = (SpaceImage *)sl;
-					ED_space_image_set(sima, scene, scene->obedit, ima);
+					
+					if (!sima->pin)
+						ED_space_image_set(sima, scene, scene->obedit, ima);
 				}
 			}
 		}




More information about the Bf-blender-cvs mailing list