[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18038] trunk/blender/source/blender/src/ buttons_editing.c: fix for own mistake - [#18119] Texture Paint: " clone from layer" button not drawn in buttons window

Campbell Barton ideasman42 at gmail.com
Wed Dec 24 03:06:38 CET 2008


Revision: 18038
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18038
Author:   campbellbarton
Date:     2008-12-24 03:06:34 +0100 (Wed, 24 Dec 2008)

Log Message:
-----------
fix for own mistake - [#18119] Texture Paint: "clone from layer" button not drawn in buttons window

Modified Paths:
--------------
    trunk/blender/source/blender/src/buttons_editing.c

Modified: trunk/blender/source/blender/src/buttons_editing.c
===================================================================
--- trunk/blender/source/blender/src/buttons_editing.c	2008-12-24 00:05:56 UTC (rev 18037)
+++ trunk/blender/source/blender/src/buttons_editing.c	2008-12-24 02:06:34 UTC (rev 18038)
@@ -6416,7 +6416,7 @@
 		uiDefButF(block, NUMSLI, evt_nop, "Falloff ",		0,yco-60,180,19, &brush->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush");
 		uiDefButBitS(block, TOG|BIT, BRUSH_RAD_PRESSURE, evt_nop, "P",	180,yco-60,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
 		uiDefButF(block, NUMSLI, evt_nop, "Spacing ",0,yco-80,180,19, &brush->spacing, 1.0, 100.0, 0, 0, "Repeating paint on %% of brush diameter");
-	uiDefButBitS(block, TOG|BIT, BRUSH_SPACING_PRESSURE, evt_nop, "P",	180,yco-80,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
+		uiDefButBitS(block, TOG|BIT, BRUSH_SPACING_PRESSURE, evt_nop, "P",	180,yco-80,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
 		uiBlockEndAlign(block);
 
 		yco -= 110;
@@ -6432,13 +6432,23 @@
 			}
 		}
 		else {
-			MTex *mtex= brush->mtex[brush->texact];
-			
-			uiBlockSetCol(block, TH_BUT_SETTING2);
-			id= (mtex)? (ID*)mtex->tex: NULL;
-			xco= std_libbuttons(block, 0, yco, 0, NULL, evt_texbrowse, ID_TE, 0, id, NULL, menupoin, 0, 0, evt_texdel, 0, 0);
-			/*uiDefButBitS(block, TOG|BIT, BRUSH_FIXED_TEX, evt_change, "Fixed",	xco+5,yco,butw,19, &brush->flag, 0, 0, 0, 0, "Keep texture origin in fixed position");*/
-			uiBlockSetCol(block, TH_AUTO);
+			if (
+				(sima==NULL) && /* 3D View */
+				(settings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)==0 && /* Projection Painting */
+				(settings->imapaint.tool == PAINT_TOOL_CLONE)
+			) {
+				butw = 130;
+				uiDefButBitS(block, TOG|BIT, IMAGEPAINT_PROJECT_LAYER_CLONE, B_REDR, "Clone Layer",	0,yco,butw,20, &settings->imapaint.flag, 0, 0, 0, 0, "Use another UV layer as clone source, otherwise use 3D the cursor as the source");
+			}
+			else {
+				MTex *mtex= brush->mtex[brush->texact];
+				
+				uiBlockSetCol(block, TH_BUT_SETTING2);
+				id= (mtex)? (ID*)mtex->tex: NULL;
+				xco= std_libbuttons(block, 0, yco, 0, NULL, evt_texbrowse, ID_TE, 0, id, NULL, menupoin, 0, 0, evt_texdel, 0, 0);
+				/*uiDefButBitS(block, TOG|BIT, BRUSH_FIXED_TEX, evt_change, "Fixed",	xco+5,yco,butw,19, &brush->flag, 0, 0, 0, 0, "Keep texture origin in fixed position");*/
+				uiBlockSetCol(block, TH_AUTO);
+			}
 		}
 	}
 	





More information about the Bf-blender-cvs mailing list