Page Menu
Home
Search
Configure Global Search
Log In
Files
F5683
blender_patch2008-02-23_22:42:46.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Markus Schulz (alpharesearch)
Nov 13 2013, 1:24 PM
Size
8 KB
Subscribers
None
blender_patch2008-02-23_22:42:46.diff
View Options
Index: source/blender/include/butspace.h
===================================================================
--- source/blender/include/butspace.h (revision 13833)
+++ source/blender/include/butspace.h (working copy)
@@ -185,6 +185,8 @@
#define B_LMTEXPASTE 1107
#define B_LMTEXCOPY 1108
#define B_LFALLOFFCHANGED 1109
+#define B_LMTEXMOVEUP 1110
+#define B_LMTEXMOVEDOWN 1111
/* *********************** */
#define B_MATBUTS 1300
@@ -219,6 +221,9 @@
#define B_MAT_PARTICLE 1225
+#define B_MTEXMOVEUP 1226
+#define B_MTEXMOVEDOWN 1227
+
/* *********************** */
#define B_TEXBUTS 1400
@@ -306,6 +311,8 @@
#define B_WMTEXPASTE 1504
#define B_WMTEXCOPY 1505
#define B_AO_FALLOFF 1506
+#define B_WMTEXMOVEUP 1507
+#define B_WMTEXMOVEDOWN 1508
/* *********************** */
#define B_RENDERBUTS 1690
Index: source/blender/src/buttons_shading.c
===================================================================
--- source/blender/src/buttons_shading.c (revision 13833)
+++ source/blender/src/buttons_shading.c (working copy)
@@ -1895,6 +1895,7 @@
static MTex mtexcopybuf;
World *wrld;
MTex *mtex;
+ MTex *mtexswap;
switch(event) {
case B_TEXCLEARWORLD:
@@ -1939,6 +1940,24 @@
scrarea_queue_winredraw(curarea);
}
break;
+ case B_WMTEXMOVEUP:
+ wrld= G.buts->lockpoin;
+ if(wrld && (int)wrld->texact > 0) {
+ mtexswap = wrld->mtex[(int)wrld->texact];
+ wrld->mtex[(int)wrld->texact] = wrld->mtex[((int)wrld->texact)-1];
+ wrld->mtex[((int)wrld->texact)-1] = mtexswap;
+ wrld->texact--;
+ }
+ break;
+ case B_WMTEXMOVEDOWN:
+ wrld= G.buts->lockpoin;
+ if(wrld && (int)wrld->texact < MAX_MTEX-1) {
+ mtexswap = wrld->mtex[(int)wrld->texact];
+ wrld->mtex[(int)wrld->texact] = wrld->mtex[((int)wrld->texact)+1];
+ wrld->mtex[((int)wrld->texact)+1] = mtexswap;
+ wrld->texact++;
+ }
+ break;
case B_AO_FALLOFF:
/* falloff distances option only supports plain */
wrld= G.buts->lockpoin;
@@ -2043,24 +2062,26 @@
if(id) {
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,200,19, id->name+2, 0.0, 21.0, 0, 0, "Displays name of the texture block: click to change");
sprintf(str, "%d", id->us);
- uiDefBut(block, BUT, 0, str, 196,140,21,19, 0, 0, 0, 0, 0, "Displays number of users of texture: click to make single user");
- uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 220,140,21,19, 0, 0, 0, 0, 0, "Auto-assigns name to texture");
+ uiDefBut(block, BUT, 0, str, 177,140,21,19, 0, 0, 0, 0, 0, "Displays number of users of texture: click to make single user");
+ uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 155,140,21,19, 0, 0, 0, 0, 0, "Auto-assigns name to texture");
if(id->lib) {
if(wrld->id.lib) uiDefIconBut(block, BUT, 0, ICON_DATALIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
else uiDefIconBut(block, BUT, 0, ICON_PARLIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
}
uiBlockSetCol(block, TH_AUTO);
- uiDefBut(block, BUT, B_TEXCLEARWORLD, "Clear", 122, 140, 72, 19, 0, 0, 0, 0, 0, "Erases link to texture");
+ uiDefBut(block, BUT, B_TEXCLEARWORLD, "Clear", 122, 140, 32, 19, 0, 0, 0, 0, 0, "Erases link to texture");
}
else
uiDefButS(block, TOG, B_WTEXBROWSE, "Add New" ,100, 160, 200, 19, &(G.buts->texnr), -1.0, 32767.0, 0, 0, "Adds a new texture datablock");
uiBlockSetCol(block, TH_AUTO);
- /* copy/paste */
+ /* copy/paste/up/down */
uiBlockBeginAlign(block);
- uiDefIconBut(block, BUT, B_WMTEXCOPY, ICON_COPYUP, 250,140,25,19, 0, 0, 0, 0, 0, "Copies the mapping settings to the buffer");
- uiDefIconBut(block, BUT, B_WMTEXPASTE, ICON_PASTEUP,275,140,25,19, 0, 0, 0, 0, 0, "Pastes the mapping settings from the buffer");
+ uiDefIconBut(block, BUT, B_WMTEXCOPY, ICON_COPYUP, 200,140,25,19, 0, 0, 0, 0, 0, "Copies the mapping settings to the buffer");
+ uiDefIconBut(block, BUT, B_WMTEXPASTE, ICON_PASTEUP, 225,140,25,19, 0, 0, 0, 0, 0, "Pastes the mapping settings from the buffer");
+ uiDefIconBut(block, BUT, B_WMTEXMOVEUP, VICON_MOVE_UP, 250,140,25,19, 0, 0, 0, 0, 0, "Move texture channel up");
+ uiDefIconBut(block, BUT, B_WMTEXMOVEDOWN, VICON_MOVE_DOWN, 275,140,25,19, 0, 0, 0, 0, 0, "Move texture channel down");
/* TEXCO */
uiBlockBeginAlign(block);
@@ -2325,6 +2346,7 @@
static MTex mtexcopybuf;
Lamp *la;
MTex *mtex;
+ MTex *mtexswap;
switch(event) {
case B_LAMPREDRAW:
@@ -2395,6 +2417,24 @@
scrarea_queue_winredraw(curarea);
}
break;
+ case B_LMTEXMOVEUP:
+ la= G.buts->lockpoin;
+ if(la && (int)la->texact > 0) {
+ mtexswap = la->mtex[(int)la->texact];
+ la->mtex[(int)la->texact] = la->mtex[((int)la->texact)-1];
+ la->mtex[((int)la->texact)-1] = mtexswap;
+ la->texact--;
+ }
+ break;
+ case B_LMTEXMOVEDOWN:
+ la= G.buts->lockpoin;
+ if(la && (int)la->texact < MAX_MTEX-1) {
+ mtexswap = la->mtex[(int)la->texact];
+ la->mtex[(int)la->texact] = la->mtex[((int)la->texact)+1];
+ la->mtex[((int)la->texact)+1] = mtexswap;
+ la->texact++;
+ }
+ break;
case B_LFALLOFFCHANGED:
la= G.buts->lockpoin;
curvemapping_changed(la->curfalloff, 1);
@@ -2496,22 +2536,25 @@
if(id) {
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,200,19, id->name+2, 0.0, 21.0, 0, 0, "Displays name of the texture block: click to change");
sprintf(str, "%d", id->us);
- uiDefBut(block, BUT, 0, str, 196,140,21,19, 0, 0, 0, 0, 0, "Displays number of users of texture: click to make single user");
- uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 221,140,21,19, 0, 0, 0, 0, 0, "Auto-assigns name to texture");
+ uiDefBut(block, BUT, 0, str, 155,140,21,19, 0, 0, 0, 0, 0, "Displays number of users of texture: click to make single user");
+ uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 177,140,21,19, 0, 0, 0, 0, 0, "Auto-assigns name to texture");
if(id->lib) {
if(la->id.lib) uiDefIconBut(block, BUT, 0, ICON_DATALIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
else uiDefIconBut(block, BUT, 0, ICON_PARLIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
}
uiBlockSetCol(block, TH_AUTO);
- uiDefBut(block, BUT, B_TEXCLEARLAMP, "Clear", 122, 140, 72, 19, 0, 0, 0, 0, 0, "Erases link to texture");
+ uiDefBut(block, BUT, B_TEXCLEARLAMP, "Clear", 122, 140, 32, 19, 0, 0, 0, 0, 0, "Erases link to texture");
}
else
uiDefButS(block, TOG, B_LTEXBROWSE, "Add New" ,100, 160, 200, 19, &(G.buts->texnr), -1.0, 32767.0, 0, 0, "Adds a new texture datablock");
- /* copy/paste */
+ /* copy/paste/up/down */
uiBlockBeginAlign(block);
- uiDefIconBut(block, BUT, B_LMTEXCOPY, ICON_COPYUP, 250,140,25,19, 0, 0, 0, 0, 0, "Copies the mapping settings to the buffer");
- uiDefIconBut(block, BUT, B_LMTEXPASTE, ICON_PASTEUP, 275,140,25,19, 0, 0, 0, 0, 0, "Pastes the mapping settings from the buffer");
+ uiDefIconBut(block, BUT, B_LMTEXCOPY, ICON_COPYUP, 200,140,25,19, 0, 0, 0, 0, 0, "Copies the mapping settings to the buffer");
+ uiDefIconBut(block, BUT, B_LMTEXPASTE, ICON_PASTEUP, 225,140,25,19, 0, 0, 0, 0, 0, "Pastes the mapping settings from the buffer");
+ uiDefIconBut(block, BUT, B_LMTEXMOVEUP, VICON_MOVE_UP, 250,140,25,19, 0, 0, 0, 0, 0, "Move texture channel up");
+ uiDefIconBut(block, BUT, B_LMTEXMOVEDOWN, VICON_MOVE_DOWN, 275,140,25,19, 0, 0, 0, 0, 0, "Move texture channel down");
+
/* TEXCO */
uiBlockSetCol(block, TH_AUTO);
@@ -2879,6 +2922,7 @@
static MTex mtexcopybuf;
Material *ma;
MTex *mtex;
+ MTex *mtexswap;
/* all operations default on active material layer here */
/* but this also gets called for lamp and world... */
@@ -3027,6 +3071,22 @@
scrarea_queue_winredraw(curarea);
}
break;
+ case B_MTEXMOVEUP:
+ if(ma && (int)ma->texact > 0) {
+ mtexswap = ma->mtex[(int)ma->texact];
+ ma->mtex[(int)ma->texact] = ma->mtex[((int)ma->texact)-1];
+ ma->mtex[((int)ma->texact)-1] = mtexswap;
+ ma->texact--;
+ }
+ break;
+ case B_MTEXMOVEDOWN:
+ if(ma && (int)ma->texact < MAX_MTEX-1) {
+ mtexswap = ma->mtex[(int)ma->texact];
+ ma->mtex[(int)ma->texact] = ma->mtex[((int)ma->texact)+1];
+ ma->mtex[((int)ma->texact)+1] = mtexswap;
+ ma->texact++;
+ }
+ break;
case B_MATZTRANSP:
if(ma) {
ma->mode &= ~MA_RAYTRANSP;
@@ -3437,9 +3497,12 @@
uiButSetFunc(but, particle_recalc_material, ma, NULL);
}
}
+ /* copy/paste/up/down */
uiBlockBeginAlign(block);
- uiDefIconBut(block, BUT, B_MTEXCOPY, ICON_COPYUP, 100,180,23,21, 0, 0, 0, 0, 0, "Copies the mapping settings to the buffer");
- uiDefIconBut(block, BUT, B_MTEXPASTE, ICON_PASTEUP, 125,180,23,21, 0, 0, 0, 0, 0, "Pastes the mapping settings from the buffer");
+ uiDefIconBut(block, BUT, B_MTEXCOPY, ICON_COPYUP, 100,180,25,19, 0, 0, 0, 0, 0, "Copies the mapping settings to the buffer");
+ uiDefIconBut(block, BUT, B_MTEXPASTE, ICON_PASTEUP, 125,180,25,19, 0, 0, 0, 0, 0, "Pastes the mapping settings from the buffer");
+ uiDefIconBut(block, BUT, B_MTEXMOVEUP, VICON_MOVE_UP, 150,180,25,19, 0, 0, 0, 0, 0, "Move texture channel up");
+ uiDefIconBut(block, BUT, B_MTEXMOVEDOWN, VICON_MOVE_DOWN, 175,180,25,19, 0, 0, 0, 0, 0, "Move texture channel down");
uiBlockEndAlign(block);
uiBlockSetCol(block, TH_AUTO);
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
02/ea/3fe502dea847c7b4a5fe7bc95083
Event Timeline
Log In to Comment