- added to Constraint panel the 'Active Bone' or 'Active Object', like

previously was drawn in constraint buttons header.
- cleaned up buttons in panels for manual... just nicer aligning.
This commit is contained in:
Ton Roosendaal
2003-11-23 12:22:59 +00:00
parent 86a236b029
commit de77f47ac7
6 changed files with 294 additions and 244 deletions

View File

@@ -374,39 +374,39 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me)
if( uiNewPanel(curarea, block, "Mesh", "Editing", 320, 0, 318, 204)==0) return;
uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|5, REDRAWVIEW3D, "Auto Smooth",10,178,130,17, &me->flag, 0, 0, 0, 0, "Treats all faces with angles less than Degr: as 'smooth' during render");
uiDefButS(block, NUM, B_DIFF, "Degr:", 10,156,130,17, &me->smoothresh, 1, 80, 0, 0, "Defines maximum angle between face normals that 'Auto Smooth' will operate on");
uiDefButS(block, TOG|BIT|5, REDRAWVIEW3D, "Auto Smooth",10,180,154,19, &me->flag, 0, 0, 0, 0, "Treats all faces with angles less than Degr: as 'smooth' during render");
uiDefButS(block, NUM, B_DIFF, "Degr:", 10,160,154,19, &me->smoothresh, 1, 80, 0, 0, "Defines maximum angle between face normals that 'Auto Smooth' will operate on");
uiBlockBeginAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
uiDefButS(block, TOG|BIT|7, B_MAKEDISP, "SubSurf", 10,124,130,17, &me->flag, 0, 0, 0, 0, "Treats the active object as a Catmull-Clark Subdivision Surface");
uiDefButS(block, TOG|BIT|7, B_MAKEDISP, "SubSurf", 10,124,154,19, &me->flag, 0, 0, 0, 0, "Treats the active object as a Catmull-Clark Subdivision Surface");
uiBlockSetCol(block, TH_AUTO);
uiDefButS(block, NUM, B_MAKEDISP, "Subdiv:", 10,104,100,18, &me->subdiv, 0, 6, 0, 0, "Defines the level of subdivision to display in real time interactively");
uiDefButS(block, NUM, B_MAKEDISP, "", 110, 104, 30, 18, &me->subdivr, 0, 6, 0, 0, "Defines the level of subdivision to apply during rendering");
uiDefButS(block, TOG|BIT|8, B_MAKEDISP, "Optimal", 10,84,130,17, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe");
uiDefButS(block, NUM, B_MAKEDISP, "Subdiv:", 10,104,110,19, &me->subdiv, 0, 6, 0, 0, "Defines the level of subdivision to display in real time interactively");
uiDefButS(block, NUM, B_MAKEDISP, "", 120, 104, 44, 19, &me->subdivr, 0, 6, 0, 0, "Defines the level of subdivision to apply during rendering");
uiDefButS(block, TOG|BIT|8, B_MAKEDISP, "Optimal", 10,84,154,19, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe");
uiBlockBeginAlign(block);
if(me->msticky) val= 1.0; else val= 0.0;
uiDefBut(block, LABEL, 0, "Sticky", 10,55,70,20, 0, val, 0, 0, 0, "");
uiDefBut(block, LABEL, 0, "Sticky", 10,50,70,20, 0, val, 0, 0, 0, "");
if(me->msticky==0) {
uiDefBut(block, BUT, B_MAKESTICKY, "Make", 80,55,83,19, 0, 0, 0, 0, 0, "Creates Sticky coordinates for the active object from the current camera view background picture");
uiDefBut(block, BUT, B_MAKESTICKY, "Make", 80,50,84,19, 0, 0, 0, 0, 0, "Creates Sticky coordinates for the active object from the current camera view background picture");
}
else uiDefBut(block, BUT, B_DELSTICKY, "Delete", 80,55,83,19, 0, 0, 0, 0, 0, "Deletes Sticky texture coordinates");
else uiDefBut(block, BUT, B_DELSTICKY, "Delete", 80,50,84,19, 0, 0, 0, 0, 0, "Deletes Sticky texture coordinates");
if(me->mcol) val= 1.0; else val= 0.0;
uiDefBut(block, LABEL, 0, "VertCol", 10,35,70,20, 0, val, 0, 0, 0, "");
uiDefBut(block, LABEL, 0, "VertCol", 10,30,70,20, 0, val, 0, 0, 0, "");
if(me->mcol==0) {
uiDefBut(block, BUT, B_MAKEVERTCOL, "Make", 80,35,84,19, 0, 0, 0, 0, 0, "Enables vertex colour painting on active object");
uiDefBut(block, BUT, B_MAKEVERTCOL, "Make", 80,30,84,19, 0, 0, 0, 0, 0, "Enables vertex colour painting on active object");
}
else uiDefBut(block, BUT, B_DELVERTCOL, "Delete", 80,35,84,19, 0, 0, 0, 0, 0, "Deletes vertex colours on active object");
else uiDefBut(block, BUT, B_DELVERTCOL, "Delete", 80,30,84,19, 0, 0, 0, 0, 0, "Deletes vertex colours on active object");
if(me->tface) val= 1.0; else val= 0.0;
uiDefBut(block, LABEL, 0, "TexFace", 10,15,70,20, 0, val, 0, 0, 0, "");
uiDefBut(block, LABEL, 0, "TexFace", 10,10,70,20, 0, val, 0, 0, 0, "");
if(me->tface==0) {
uiDefBut(block, BUT, B_MAKE_TFACES, "Make", 80,15,84,19, 0, 0, 0, 0, 0, "Enables the active object's faces for UV coordinate mapping");
uiDefBut(block, BUT, B_MAKE_TFACES, "Make", 80,10,84,19, 0, 0, 0, 0, 0, "Enables the active object's faces for UV coordinate mapping");
}
else uiDefBut(block, BUT, B_DEL_TFACES, "Delete", 80,15,84,19, 0, 0, 0, 0, 0, "Deletes UV coordinates for active object's faces");
else uiDefBut(block, BUT, B_DEL_TFACES, "Delete", 80,10,84,19, 0, 0, 0, 0, 0, "Deletes UV coordinates for active object's faces");
uiBlockEndAlign(block);
@@ -421,34 +421,34 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me)
uiBlockBeginAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
uiDefButI(block, NUMSLI,B_DECIM_FACES, "Decimator: ", 173,176,233,19, &decim_faces, 4.0, tottria, 10, 10, "Defines the number of triangular faces to decimate the active Mesh object to");
uiDefButI(block, NUMSLI,B_DECIM_FACES, "Decimator: ", 175,180,230,19, &decim_faces, 4.0, tottria, 10, 10, "Defines the number of triangular faces to decimate the active Mesh object to");
uiBlockSetCol(block, TH_AUTO);
uiDefBut(block, BUT,B_DECIM_APPLY, "Apply", 173,156,115,18, 0, 0, 0, 0, 0, "Applies the decimation to the active Mesh object");
uiDefBut(block, BUT,B_DECIM_CANCEL, "Cancel", 290,156,116,18, 0, 0, 0, 0, 0, "Restores the Mesh to its original number of faces");
uiDefBut(block, BUT,B_DECIM_APPLY, "Apply", 175,160,110,19, 0, 0, 0, 0, 0, "Applies the decimation to the active Mesh object");
uiDefBut(block, BUT,B_DECIM_CANCEL, "Cancel", 285,160,120,19, 0, 0, 0, 0, 0, "Restores the Mesh to its original number of faces");
uiBlockEndAlign(block);
}
uiDefIDPoinBut(block, test_meshpoin_but, 0, "TexMesh: ", 174,120,234,19, &me->texcomesh, "Enter the name of a Meshblock");
uiDefIDPoinBut(block, test_meshpoin_but, 0, "TexMesh: ", 175,124,230,19, &me->texcomesh, "Enter the name of a Meshblock");
if(me->key) {
uiBlockBeginAlign(block);
uiDefButS(block, NUM, B_DIFF, "Slurph:", 174,95,100,19, &(me->key->slurph), -500.0, 500.0, 0, 0, "");
uiDefButS(block, TOG, B_RELKEY, "Relative Keys", 174,75,100,19, &me->key->type, 0, 0, 0, 0, "");
uiDefButS(block, NUM, B_DIFF, "Slurph:", 175,95,95,19, &(me->key->slurph), -500.0, 500.0, 0, 0, "");
uiDefButS(block, TOG, B_RELKEY, "Relative Keys", 175,75,95,19, &me->key->type, 0, 0, 0, 0, "");
}
uiBlockBeginAlign(block);
uiDefBut(block, BUT, B_SLOWERDRAW,"SlowerDraw", 174,35,100,19, 0, 0, 0, 0, 0, "Displays the active object with all possible edges shown");
uiDefBut(block, BUT, B_FASTERDRAW,"FasterDraw", 175,15,100,19, 0, 0, 0, 0, 0, "Displays the active object faster by omitting some edges when drawing");
uiDefBut(block, BUT, B_SLOWERDRAW,"SlowerDraw", 175,30,95,19, 0, 0, 0, 0, 0, "Displays the active object with all possible edges shown");
uiDefBut(block, BUT, B_FASTERDRAW,"FasterDraw", 175,10,95,19, 0, 0, 0, 0, 0, "Displays the active object faster by omitting some edges when drawing");
uiBlockBeginAlign(block);
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 275, 95, 133, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
uiDefBut(block, BUT,B_DOCENTRENEW, "Centre New", 275, 75, 133, 19, 0, 0, 0, 0, 0, "Shifts object's origin to center of object data");
uiDefBut(block, BUT,B_DOCENTRECURSOR, "Centre Cursor", 275, 55, 133, 19, 0, 0, 0, 0, 0, "Shifts object's origin to cursor location");
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 275, 95, 130, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
uiDefBut(block, BUT,B_DOCENTRENEW, "Centre New", 275, 75, 130, 19, 0, 0, 0, 0, 0, "Shifts object's origin to center of object data");
uiDefBut(block, BUT,B_DOCENTRECURSOR, "Centre Cursor", 275, 55, 130, 19, 0, 0, 0, 0, 0, "Shifts object's origin to cursor location");
uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|2, REDRAWVIEW3D, "Double Sided", 275,35,133,19, &me->flag, 0, 0, 0, 0, "Toggles selected faces as doublesided or single-sided");
uiDefButS(block, TOG|BIT|1, REDRAWVIEW3D, "No V.Normal Flip",275,15,133,19, &me->flag, 0, 0, 0, 0, "Disables flipping of vertexnormals during render");
uiDefButS(block, TOG|BIT|2, REDRAWVIEW3D, "Double Sided", 275,30,130,19, &me->flag, 0, 0, 0, 0, "Toggles selected faces as doublesided or single-sided");
uiDefButS(block, TOG|BIT|1, REDRAWVIEW3D, "No V.Normal Flip",275,10,130,19, &me->flag, 0, 0, 0, 0, "Disables flipping of vertexnormals during render");
uiBlockEndAlign(block);
}
@@ -666,7 +666,7 @@ static void editing_panel_font_type(Object *ob, Curve *cu)
uiDefButF(block, NUM,B_MAKEFONT, "Y offset:", 605,34,121,19, &cu->yof, -50.0,50.0, 10, 0, "");
uiDefButF(block, NUM,B_MAKEFONT, "Shear:", 482,12,121,19, &cu->shear, -1.0,1.0, 10, 0, "");
uiDefButF(block, NUM,B_MAKEFONT, "X offset:", 605,12,121,19, &cu->xof, -50.0,50.0, 10, 0, "");
uiBlockBeginAlign(block);
uiBlockEndAlign(block);
uiDefBut(block, BUT, B_TOUPPER, "ToUpper", 623,163,103,23, 0, 0, 0, 0, 0, "");
@@ -887,11 +887,11 @@ static void editing_panel_curve_tools(Object *ob, Curve *cu)
uiDefBut(block, BUT,B_SETWEIGHT,"Set Weight", 465,11,95,49, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButF(block, NUM,0,"Weight:", 564,36,102,22, &editbutweight, 0.01, 10.0, 10, 0, "");
uiDefBut(block, BUT,B_SETW1,"1.0", 669,36,50,22, 0, 0, 0, 0, 0, "");
uiDefBut(block, BUT,B_SETW2,"sqrt(2)/4",564,11,57,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, BUT,B_SETW3,"0.25", 621,11,43,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, BUT,B_SETW4,"sqrt(0.5)",664,11,57,20, 0, 0, 0, 0, 0, "");
uiDefButF(block, NUM,0,"Weight:", 565,36,102,22, &editbutweight, 0.01, 10.0, 10, 0, "");
uiDefBut(block, BUT,B_SETW1,"1.0", 670,36,50,22, 0, 0, 0, 0, 0, "");
uiDefBut(block, BUT,B_SETW2,"sqrt(2)/4",565,11,55,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, BUT,B_SETW3,"0.25", 620,11,45,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, BUT,B_SETW4,"sqrt(0.5)",665,11,55,20, 0, 0, 0, 0, 0, "");
uiBlockEndAlign(block);
if(ob==G.obedit) {
@@ -900,13 +900,13 @@ static void editing_panel_curve_tools(Object *ob, Curve *cu)
if(nu) {
uiBlockBeginAlign(block);
sp= &(nu->orderu);
uiDefButS(block, NUM, B_SETORDER, "Order U:", 565,91,102, 18, sp, 2.0, 6.0, 0, 0, "");
uiDefButS(block, NUM, B_SETORDER, "Order U:", 565,90,102, 19, sp, 2.0, 6.0, 0, 0, "");
sp= &(nu->orderv);
uiDefButS(block, NUM, B_SETORDER, "V:", 670,91,50, 18, sp, 2.0, 6.0, 0, 0, "");
uiDefButS(block, NUM, B_SETORDER, "V:", 670,90,50, 19, sp, 2.0, 6.0, 0, 0, "");
sp= &(nu->resolu);
uiDefButS(block, NUM, B_MAKEDISP, "Resol U:", 565,70,102, 18, sp, 1.0, 128.0, 0, 0, "");
uiDefButS(block, NUM, B_MAKEDISP, "Resol U:", 565,70,102, 19, sp, 1.0, 128.0, 0, 0, "");
sp= &(nu->resolv);
uiDefButS(block, NUM, B_MAKEDISP, "V:", 670,70,50, 18, sp, 1.0, 128.0, 0, 0, "");
uiDefButS(block, NUM, B_MAKEDISP, "V:", 670,70,50, 19, sp, 1.0, 128.0, 0, 0, "");
}
}
@@ -1626,42 +1626,40 @@ static void editing_panel_mesh_tools(Object *ob, Mesh *me)
if(uiNewPanel(curarea, block, "Mesh Tools", "Editing", 640, 0, 318, 204)==0) return;
uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|2, 0, "Beauty", 477,195,80,19, &editbutflag, 0, 0, 0, 0, "Causes 'Subdivide' to split faces in halves instead of quarters");
uiDefBut(block, BUT,B_SUBDIV,"Subdivide", 557,195,80,19, 0, 0, 0, 0, 0, "Splits selected faces into halves or quarters");
uiDefBut(block, BUT,B_FRACSUBDIV, "Fract Subd", 637,195,85,19, 0, 0, 0, 0, 0, "Subdivides selected faces with a random factor");
uiDefButS(block, TOG|BIT|2, 0, "Beauty", 10,195,80,19, &editbutflag, 0, 0, 0, 0, "Causes 'Subdivide' to split faces in halves instead of quarters");
uiDefBut(block, BUT,B_SUBDIV,"Subdivide", 90,195,80,19, 0, 0, 0, 0, 0, "Splits selected faces into halves or quarters");
uiDefBut(block, BUT,B_FRACSUBDIV, "Fract Subd", 170,195,85,19, 0, 0, 0, 0, 0, "Subdivides selected faces with a random factor");
uiDefBut(block, BUT,B_VERTEXNOISE,"Noise", 477,175,80,19, 0, 0, 0, 0, 0, "Use vertex coordinate as texture coordinate");
uiDefBut(block, BUT,B_HASH,"Hash", 557,175,80,19, 0, 0, 0, 0, 0, "Randomizes selected vertice sequence data");
uiDefBut(block, BUT,B_XSORT,"Xsort", 637,175,85,19, 0, 0, 0, 0, 0, "Sorts selected vertice data in the X direction");
uiDefBut(block, BUT,B_VERTEXNOISE,"Noise", 10,175,80,19, 0, 0, 0, 0, 0, "Use vertex coordinate as texture coordinate");
uiDefBut(block, BUT,B_HASH,"Hash", 90,175,80,19, 0, 0, 0, 0, 0, "Randomizes selected vertice sequence data");
uiDefBut(block, BUT,B_XSORT,"Xsort", 170,175,85,19, 0, 0, 0, 0, 0, "Sorts selected vertice data in the X direction");
uiDefBut(block, BUT,B_TOSPHERE,"To Sphere", 477,155,80,19, 0, 0, 0, 0, 0, "Moves selected vertices outwards into a spherical shape");
uiDefBut(block, BUT,B_VERTEXSMOOTH,"Smooth", 557,155,80,19, 0, 0, 0, 0, 0, "Flattens angles of selected faces");
uiDefBut(block, BUT,B_SPLIT,"Split", 637,155,85,19, 0, 0, 0, 0, 0, "Flattens angles of selected faces");
uiDefBut(block, BUT,B_TOSPHERE,"To Sphere", 10,155,80,19, 0, 0, 0, 0, 0, "Moves selected vertices outwards into a spherical shape");
uiDefBut(block, BUT,B_VERTEXSMOOTH,"Smooth", 90,155,80,19, 0, 0, 0, 0, 0, "Flattens angles of selected faces");
uiDefBut(block, BUT,B_SPLIT,"Split", 170,155,85,19, 0, 0, 0, 0, 0, "Flattens angles of selected faces");
uiDefBut(block, BUT,B_FLIPNORM,"Flip Normals", 477,135,80,19, 0, 0, 0, 0, 0, "Toggles the direction of the selected face's normals");
uiDefBut(block, BUT,B_REMDOUB,"Rem Doubles", 557,135,80,19, 0, 0, 0, 0, 0, "Removes duplicates from selected vertices");
uiDefButF(block, NUM, B_DIFF, "Limit:", 637,135,85,19, &doublimit, 0.0001, 1.0, 10, 0, "Specifies the max distance 'Rem Doubles' will consider vertices as 'doubled'");
uiDefBut(block, BUT,B_FLIPNORM,"Flip Normals", 10,135,80,19, 0, 0, 0, 0, 0, "Toggles the direction of the selected face's normals");
uiDefBut(block, BUT,B_REMDOUB,"Rem Doubles", 90,135,80,19, 0, 0, 0, 0, 0, "Removes duplicates from selected vertices");
uiDefButF(block, NUM, B_DIFF, "Limit:", 170,135,85,19, &doublimit, 0.0001, 1.0, 10, 0, "Specifies the max distance 'Rem Doubles' will consider vertices as 'doubled'");
uiBlockEndAlign(block);
uiDefBut(block, BUT,B_EXTR,"Extrude", 477,105,249,24, 0, 0, 0, 0, 0, "Converts selected edges to faces and selects the new vertices");
uiDefBut(block, BUT,B_EXTR,"Extrude", 10,105,245,24, 0, 0, 0, 0, 0, "Converts selected edges to faces and selects the new vertices");
uiBlockBeginAlign(block);
uiDefBut(block, BUT,B_SCREW,"Screw", 477,75,79,24, 0, 0, 0, 0, 0, "Activates the screw tool"); // Bish - This could use some more definition
uiDefBut(block, BUT,B_SPIN, "Spin", 558,75,78,24, 0, 0, 0, 0, 0, "Extrudes the selected vertices in a circle around the cursor in the indicated viewport");
uiDefBut(block, BUT,B_SPINDUP,"Spin Dup", 639,75,87,24, 0, 0, 0, 0, 0, "Creates copies of the selected vertices in a circle around the cursor in the indicated viewport");
uiDefBut(block, BUT,B_SCREW,"Screw", 10,75,80,24, 0, 0, 0, 0, 0, "Activates the screw tool"); // Bish - This could use some more definition
uiDefBut(block, BUT,B_SPIN, "Spin", 90,75,80,24, 0, 0, 0, 0, 0, "Extrudes the selected vertices in a circle around the cursor in the indicated viewport");
uiDefBut(block, BUT,B_SPINDUP,"Spin Dup", 170,75,85,24, 0, 0, 0, 0, 0, "Creates copies of the selected vertices in a circle around the cursor in the indicated viewport");
uiDefButS(block, NUM, B_DIFF, "Degr:", 477,55,78,19, &degr,10.0,360.0, 0, 0, "Specifies the number of degrees 'Spin' revolves");
uiDefButS(block, NUM, B_DIFF, "Steps:", 558,55,78,19, &step,1.0,180.0, 0, 0, "Specifies the total number of 'Spin' slices");
uiDefButS(block, NUM, B_DIFF, "Turns:", 639,55,86,19, &turn,1.0,360.0, 0, 0, "Specifies the number of revolutions the screw turns");
uiDefButS(block, TOG|BIT|1, B_DIFF, "Keep Original",477,35,156,19, &editbutflag, 0, 0, 0, 0, "Keeps a copy of the original vertices and faces after executing tools");
uiDefButS(block, TOG|BIT|0, B_DIFF, "Clockwise", 639,35,86,19, &editbutflag, 0, 0, 0, 0, "Specifies the direction for 'Screw' and 'Spin'");
uiDefButS(block, NUM, B_DIFF, "Degr:", 10,55,80,19, &degr,10.0,360.0, 0, 0, "Specifies the number of degrees 'Spin' revolves");
uiDefButS(block, NUM, B_DIFF, "Steps:", 90,55,80,19, &step,1.0,180.0, 0, 0, "Specifies the total number of 'Spin' slices");
uiDefButS(block, NUM, B_DIFF, "Turns:", 170,55,85,19, &turn,1.0,360.0, 0, 0, "Specifies the number of revolutions the screw turns");
uiDefButS(block, TOG|BIT|1, B_DIFF, "Keep Original",10,35,160,19, &editbutflag, 0, 0, 0, 0, "Keeps a copy of the original vertices and faces after executing tools");
uiDefButS(block, TOG|BIT|0, B_DIFF, "Clockwise", 170,35,85,19, &editbutflag, 0, 0, 0, 0, "Specifies the direction for 'Screw' and 'Spin'");
uiBlockBeginAlign(block);
uiDefBut(block, BUT,B_EXTREP, "Extrude Dup", 477,15,128,19, 0, 0, 0, 0, 0, "Creates copies of the selected vertices in a straight line away from the current viewport");
uiDefButF(block, NUM, B_DIFF, "Offset:", 608,15,117,19, &extr_offs, 0.01, 10.0, 100, 0, "Sets the distance between each copy for 'Extrude Dup'");
uiDefBut(block, BUT,B_EXTREP, "Extrude Dup", 10,10,120,19, 0, 0, 0, 0, 0, "Creates copies of the selected vertices in a straight line away from the current viewport");
uiDefButF(block, NUM, B_DIFF, "Offset:", 130,10,125,19, &extr_offs, 0.01, 10.0, 100, 0, "Sets the distance between each copy for 'Extrude Dup'");
uiBlockEndAlign(block);
}
static void verify_vertexgroup_name_func(void *datav, void *data2_unused)
@@ -1679,7 +1677,7 @@ static void editing_panel_mesh_tools1(Object *ob, Mesh *me)
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_tools1", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Mesh Tools 1", "Editing", 960, 0, 318, 204)==0) return;
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 1091, 200, 100, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 1091, 200, 166, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
uiBlockBeginAlign(block);
uiDefBut(block, BUT,B_HIDE, "Hide", 1091,155,77,24, 0, 0, 0, 0, 0, "Hides selected faces");
uiDefBut(block, BUT,B_REVEAL, "Reveal", 1171,155,86,24, 0, 0, 0, 0, 0, "Reveals selected faces");
@@ -1767,7 +1765,7 @@ static void editing_panel_links(Object *ob)
if(ob->type==OB_MESH) poin= &( ((Mesh *)ob->data)->texflag );
else if(ob->type==OB_MBALL) poin= &( ((MetaBall *)ob->data)->texflag );
else poin= &( ((Curve *)ob->data)->texflag );
uiDefButI(block, TOG|BIT|0, B_AUTOTEX, "AutoTexSpace", 143,15,130,19, poin, 0, 0, 0, 0, "Adjusts active object's texture space automatically when transforming object");
uiDefButI(block, TOG|BIT|0, B_AUTOTEX, "AutoTexSpace", 143,15,140,19, poin, 0, 0, 0, 0, "Adjusts active object's texture space automatically when transforming object");
sprintf(str,"%d Mat:", ob->totcol);
if(ob->totcol) min= 1.0; else min= 0.0;
@@ -1793,7 +1791,7 @@ static void editing_panel_links(Object *ob)
uiBlockEndAlign(block);
/* vertex group... partially editmode... */
{
if(ob->type==OB_MESH) {
uiBut *but;
int defCount;
bDeformGroup *defGroup;

View File

@@ -803,7 +803,25 @@ static void object_panel_constraint(void)
if (conlist) {
uiDefBlockBut(block, add_constraintmenu, NULL, "Add|>> ", 10, 190, 70, 20, "Add a new constraint");
uiDefBlockBut(block, add_constraintmenu, NULL, "Add|>> ", 10, 190, 100, 20, "Add a new constraint");
/* print active object or bone */
{
short type;
void *data=NULL;
char str[64];
str[0]= 0;
get_constraint_client(NULL, &type, &data);
if (data && type==TARGET_BONE){
sprintf(str, "To Bone: %s", ((Bone*)data)->name);
}
else if(OBACT) {
Object *ob= OBACT;
sprintf(str, "To Object: %s", ob->id.name+2);
}
uiDefBut(block, LABEL, 1, str, 110, 190, 200, 20, NULL, 0.0, 0.0, 0, 0, "Displays Active Object or Bone name");
}
/* Go through the list of constraints and draw them */
xco = 10;

View File

@@ -667,6 +667,7 @@ static void texture_panel_magic(Tex *tex)
if(uiNewPanel(curarea, block, "Magic", "Texture", 640, 0, 318, 204)==0) return;
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_TEXPRV, "Size :", 10, 110, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the pattern");
uiDefButS(block, NUM, B_TEXPRV, "Depth:", 10, 90, 150, 19, &tex->noisedepth, 0.0, 10.0, 0, 0, "Set the depth of the pattern");
uiDefButF(block, NUM, B_TEXPRV, "Turbulence:", 10, 70, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the strength of the pattern");
@@ -680,14 +681,15 @@ static void texture_panel_blend(Tex *tex)
if(uiNewPanel(curarea, block, "Blend", "Texture", 640, 0, 318, 204)==0) return;
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_TEXPRV, "Lin", 10, 180, 75, 19, &tex->stype, 2.0, 0.0, 0, 0, "Use a linear progresion");
uiDefButS(block, ROW, B_TEXPRV, "Quad", 85, 180, 75, 19, &tex->stype, 2.0, 1.0, 0, 0, "Use a quadratic progression");
uiDefButS(block, ROW, B_TEXPRV, "Ease", 160, 180, 75, 19, &tex->stype, 2.0, 2.0, 0, 0, "");
uiDefButS(block, TOG|BIT|1, B_TEXPRV, "Flip XY", 235, 180, 75, 19, &tex->flag, 0, 0, 0, 0, "Flip the direction of the progression a quarter turn");
uiDefButS(block, ROW, B_TEXPRV, "Diag", 10, 160, 75, 19, &tex->stype, 2.0, 3.0, 0, 0, "Use a diagonal progression");
uiDefButS(block, ROW, B_TEXPRV, "Sphere", 85, 160, 75, 19, &tex->stype, 2.0, 4.0, 0, 0, "Use progression with the shape of a sphere");
uiDefButS(block, ROW, B_TEXPRV, "Halo", 160, 160, 75, 19, &tex->stype, 2.0, 5.0, 0, 0, "Use a quadratic progression with the shape of a sphere");
uiDefButS(block, ROW, B_TEXPRV, "Diag", 10, 160, 100, 19, &tex->stype, 2.0, 3.0, 0, 0, "Use a diagonal progression");
uiDefButS(block, ROW, B_TEXPRV, "Sphere", 110, 160, 100, 19, &tex->stype, 2.0, 4.0, 0, 0, "Use progression with the shape of a sphere");
uiDefButS(block, ROW, B_TEXPRV, "Halo", 210, 160, 100, 19, &tex->stype, 2.0, 5.0, 0, 0, "Use a quadratic progression with the shape of a sphere");
}
@@ -700,15 +702,17 @@ static void texture_panel_wood(Tex *tex)
block= uiNewBlock(&curarea->uiblocks, "texture_panel_wood", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Wood", "Texture", 640, 0, 318, 204)==0) return;
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_TEXPRV, "Bands", 10, 180, 75, 18, &tex->stype, 2.0, 0.0, 0, 0, "Use standard wood texture");
uiDefButS(block, ROW, B_TEXPRV, "Rings", 85, 180, 75, 18, &tex->stype, 2.0, 1.0, 0, 0, "Use wood rings");
uiDefButS(block, ROW, B_TEXPRV, "BandNoise", 160, 180, 75, 18, &tex->stype, 2.0, 2.0, 0, 0, "Add noise to standard wood");
uiDefButS(block, ROW, B_TEXPRV, "RingNoise", 235, 180, 75, 18, &tex->stype, 2.0, 3.0, 0, 0, "Add noise to rings");
uiDefButS(block, ROW, B_TEXPRV, "Soft noise", 10, 160, 75, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
uiDefButS(block, ROW, B_TEXPRV, "Hard noise", 85, 160, 75, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
uiDefButS(block, ROW, B_TEXPRV, "Soft noise", 10, 160, 150, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
uiDefButS(block, ROW, B_TEXPRV, "Hard noise", 160, 160, 150, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_TEXPRV, "NoiseSize :", 10, 130, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
uiDefButF(block, NUM, B_TEXPRV, "Turbulence:", 160, 130, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the turbulence of the bandnoise and ringnoise types");
@@ -723,12 +727,15 @@ static void texture_panel_stucci(Tex *tex)
if(uiNewPanel(curarea, block, "Stucci", "Texture", 640, 0, 318, 204)==0) return;
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
uiDefButS(block, ROW, B_TEXPRV, "Plastic", 10, 180, 100, 19, &tex->stype, 2.0, 0.0, 0, 0, "Use standard stucci");
uiDefButS(block, ROW, B_TEXPRV, "Wall In", 110, 180, 100, 19, &tex->stype, 2.0, 1.0, 0, 0, "Set start value");
uiDefButS(block, ROW, B_TEXPRV, "Wall Out", 210, 180, 100, 19, &tex->stype, 2.0, 2.0, 0, 0, "Set end value");
uiDefButS(block, ROW, B_TEXPRV, "Soft noise", 10, 160, 100, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
uiDefButS(block, ROW, B_TEXPRV, "Hard noise", 110, 160, 100, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_TEXPRV, "Plastic", 10, 180, 75, 19, &tex->stype, 2.0, 0.0, 0, 0, "Use standard stucci");
uiDefButS(block, ROW, B_TEXPRV, "Wall In", 85, 180, 75, 19, &tex->stype, 2.0, 1.0, 0, 0, "Set start value");
uiDefButS(block, ROW, B_TEXPRV, "Wall Out", 160, 180, 75, 19, &tex->stype, 2.0, 2.0, 0, 0, "Set end value");
uiDefButS(block, ROW, B_TEXPRV, "Soft noise", 10, 160, 112, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
uiDefButS(block, ROW, B_TEXPRV, "Hard noise", 122, 160, 113, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_TEXPRV, "NoiseSize :", 10, 110, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
uiDefButF(block, NUM, B_TEXPRV, "Turbulence:", 10, 90, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the depth of the stucci");
}
@@ -741,13 +748,15 @@ static void texture_panel_marble(Tex *tex)
if(uiNewPanel(curarea, block, "Marble", "Texture", 640, 0, 318, 204)==0) return;
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_TEXPRV, "Soft", 10, 180, 75, 18, &tex->stype, 2.0, 0.0, 0, 0, "Use soft marble");
uiDefButS(block, ROW, B_TEXPRV, "Sharp", 85, 180, 75, 18, &tex->stype, 2.0, 1.0, 0, 0, "Use more clearly defined marble");
uiDefButS(block, ROW, B_TEXPRV, "Sharper", 160, 180, 75, 18, &tex->stype, 2.0, 2.0, 0, 0, "Use very clear defined marble");
uiDefButS(block, ROW, B_TEXPRV, "Soft noise", 10, 160, 100, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
uiDefButS(block, ROW, B_TEXPRV, "Hard noise", 110, 160, 100, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
uiDefButS(block, ROW, B_TEXPRV, "Soft noise", 10, 160, 112, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
uiDefButS(block, ROW, B_TEXPRV, "Hard noise", 122, 160, 113, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_TEXPRV, "NoiseSize :", 10, 110, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
uiDefButS(block, NUM, B_TEXPRV, "NoiseDepth:", 10, 90, 150, 19, &tex->noisedepth, 0.0, 6.0, 0, 0, "Set the depth of the marble calculation");
uiDefButF(block, NUM, B_TEXPRV, "Turbulence:", 10, 70, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the turbulence of the sine bands");
@@ -763,11 +772,12 @@ static void texture_panel_clouds(Tex *tex)
if(uiNewPanel(curarea, block, "Clouds", "Texture", 640, 0, 318, 204)==0) return;
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_TEXPRV, "Default", 10, 180, 70, 18, &tex->stype, 2.0, 0.0, 0, 0, "Use standard noise");
uiDefButS(block, ROW, B_TEXPRV, "Color", 80, 180, 70, 18, &tex->stype, 2.0, 1.0, 0, 0, "Let Noise give RGB value");
uiDefButS(block, ROW, B_TEXPRV, "Soft noise", 155, 180, 75, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
uiDefButS(block, ROW, B_TEXPRV, "Hard noise", 230, 180, 80, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_TEXPRV, "NoiseSize :", 10, 130, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
uiDefButS(block, NUM, B_TEXPRV, "NoiseDepth:", 160, 130, 150, 19, &tex->noisedepth, 0.0, 6.0, 0, 0, "Set the depth of the cloud calculation");
@@ -801,50 +811,65 @@ static void texture_panel_envmap(Tex *tex)
/* file input */
id= (ID *)tex->ima;
IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->image), id, &(G.buts->menunr));
if(strp[0])
uiDefButS(block, MENU, B_TEXIMABROWSE, strp, 10,135,23,20, &(G.buts->menunr), 0, 0, 0, 0, "Browse");
if(strp[0]) {
uiBlockBeginAlign(block);
uiDefButS(block, MENU, B_TEXIMABROWSE, strp, 10,145,23,20, &(G.buts->menunr), 0, 0, 0, 0, "Browse");
if(tex->ima) {
uiDefBut(block, TEX, B_NAMEIMA, "", 35,145,255,20, tex->ima->name, 0.0, 79.0, 0, 0, "Texture name");
sprintf(str, "%d", tex->ima->id.us);
uiDefBut(block, BUT, 0, str, 290,145,20,20, 0, 0, 0, 0, 0, "Number of users");
uiBlockEndAlign(block);
uiDefBut(block, BUT, B_RELOADIMA, "Reload", 230,125,80,20, 0, 0, 0, 0, 0, "Reload");
if (tex->ima->packedfile) packdummy = 1;
else packdummy = 0;
uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,125,24,20, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Image");
}
else uiBlockEndAlign(block);
}
MEM_freeN(strp);
uiDefBut(block, BUT, B_LOADTEXIMA, "Load Image", 10,115,150,20, 0, 0, 0, 0, 0, "Load image - file select");
if(tex->ima) {
uiDefBut(block, TEX, B_NAMEIMA, "", 35,135,255,20, tex->ima->name, 0.0, 79.0, 0, 0, "Texture name");
sprintf(str, "%d", tex->ima->id.us);
uiDefBut(block, BUT, 0, str, 290,135,20,20, 0, 0, 0, 0, 0, "Number of users");
uiDefBut(block, BUT, B_RELOADIMA, "Reload", 230,115,80,20, 0, 0, 0, 0, 0, "Reload");
if (tex->ima->packedfile) packdummy = 1;
else packdummy = 0;
uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,115,24,20, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Image");
}
uiDefBut(block, BUT, B_LOADTEXIMA, "Load Image", 10,125,150,20, 0, 0, 0, 0, 0, "Load image - file select");
}
else {
uiBlockBeginAlign(block);
uiDefBut(block, BUT, B_ENV_FREE, "Free Data", 10,135,100,20, 0, 0, 0, 0, 0, "Release all images associated with environment map");
uiDefBut(block, BUT, B_ENV_SAVE, "Save EnvMap", 110,135,100,20, 0, 0, 0, 0, 0, "Save environment map");
uiDefBut(block, BUT, B_ENV_FREE_ALL, "Free all EnvMaps", 210,135,100,20, 0, 0, 0, 0, 0, "Frees all rendered environment maps");
uiBlockEndAlign(block);
}
uiDefIDPoinBut(block, test_obpoin_but, B_ENV_OB, "Ob:", 10,90,150,20, &(env->object), "Object name");
if(env->stype!=ENV_LOAD)
uiDefButS(block, NUM, B_ENV_FREE, "CubeRes", 160,90,150,20, &env->cuberes, 50, 2048.0, 0, 0, "Set the resolution in pixels");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_TEXPRV, "Filter :", 10,65,150,20, &tex->filtersize, 0.1, 25.0, 0, 0, "Adjust sharpness or blurriness of the reflection"),
uiDefButS(block, NUM, B_ENV_FREE, "Depth:", 160,65,150,20, &env->depth, 0, 5.0, 0, 0, "Number of times a map gets rendered again, for recursive mirror effect"),
uiDefButF(block, NUM, REDRAWVIEW3D, "ClipSta", 10,40,150,20, &env->clipsta, 0.01, 50.0, 100, 0, "Set start value for clipping");
uiDefButF(block, NUM, 0, "ClipEnd", 160,40,150,20, &env->clipend, 0.1, 5000.0, 1000, 0, "Set end value for clipping");
uiBlockEndAlign(block);
uiDefBut(block, LABEL, 0, "Don't render layer:", 10,10,140,22, 0, 0.0, 0.0, 0, 0, "");
xco= 160;
yco= 10;
dx= 28;
dy= 26;
for(a=0; a<10; a++) {
uiDefButI(block, TOG|BIT|(a+10), 0, "",(xco+a*(dx/2)), yco, (dx/2), (dy/2), &env->notlay, 0, 0, 0, 0, "Render this layer");
uiBlockBeginAlign(block);
for(a=0; a<5; a++)
uiDefButI(block, TOG|BIT|a, 0, "", (xco+a*(dx/2)), (yco+dy/2), (dx/2), (1+dy/2), &env->notlay, 0, 0, 0, 0, "Render this layer");
if(a==4) xco+= 5;
}
for(a=0; a<5; a++)
uiDefButI(block, TOG|BIT|(a+10), 0, "",(xco+a*(dx/2)), yco, (dx/2), (dy/2), &env->notlay, 0, 0, 0, 0, "Render this layer");
uiBlockBeginAlign(block);
xco+= 5;
for(a=5; a<10; a++)
uiDefButI(block, TOG|BIT|a, 0, "", (xco+a*(dx/2)), (yco+dy/2), (dx/2), (1+dy/2), &env->notlay, 0, 0, 0, 0, "Render this layer");
for(a=5; a<10; a++)
uiDefButI(block, TOG|BIT|(a+10), 0, "",(xco+a*(dx/2)), yco, (dx/2), (dy/2), &env->notlay, 0, 0, 0, 0, "Render this layer");
}
}
@@ -906,7 +931,7 @@ static void texture_panel_image(Tex *tex)
uiDefButS(block, TOG|BIT|1, B_TEXPRV, "UseAlpha", 85, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Use the alpha layer");
uiDefButS(block, TOG|BIT|5, B_TEXPRV, "CalcAlpha", 160, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Calculate an alpha based on the RGB");
uiDefButS(block, TOG|BIT|2, B_TEXPRV, "NegAlpha", 235, 180, 75, 18, &tex->flag, 0, 0, 0, 0, "Reverse the alpha value");
uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|2, B_IMAPTEST, "MipMap", 10, 160, 60, 18, &tex->imaflag, 0, 0, 0, 0, "Generate a series of pictures used for mipmapping");
uiDefButS(block, TOG|BIT|3, B_IMAPTEST, "Fields", 70, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Work with field images");
uiDefButS(block, TOG|BIT|4, B_TEXPRV, "Rot90", 120, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Rotate image 90 degrees when rendered");
@@ -918,23 +943,28 @@ static void texture_panel_image(Tex *tex)
/* file input */
id= (ID *)tex->ima;
IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->image), id, &(G.buts->menunr));
if(strp[0])
if(strp[0]) {
uiBlockBeginAlign(block);
uiDefButS(block, MENU, B_TEXIMABROWSE, strp, 10,135,23,20, &(G.buts->menunr), 0, 0, 0, 0, "Browse");
if(tex->ima) {
uiDefBut(block, TEX, B_NAMEIMA, "", 35,135,255,20, tex->ima->name, 0.0, 79.0, 0, 0, "Texture name");
sprintf(str, "%d", tex->ima->id.us);
uiDefBut(block, BUT, 0, str, 290,135,20,20, 0, 0, 0, 0, 0, "Number of users");
uiBlockEndAlign(block);
uiDefBut(block, BUT, B_RELOADIMA, "Reload", 230,115,80,19, 0, 0, 0, 0, 0, "Reload");
if (tex->ima->packedfile) packdummy = 1;
else packdummy = 0;
uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,115,24,19, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Image");
}
else uiBlockEndAlign(block);
}
MEM_freeN(strp);
uiDefBut(block, BUT, B_LOADTEXIMA, "Load Image", 10,115,150,20, 0, 0, 0, 0, 0, "Load image - file view");
if(tex->ima) {
uiDefBut(block, TEX, B_NAMEIMA, "", 35,135,255,20, tex->ima->name, 0.0, 79.0, 0, 0, "Texture name");
sprintf(str, "%d", tex->ima->id.us);
uiDefBut(block, BUT, 0, str, 290,135,20,20, 0, 0, 0, 0, 0, "Number of users");
uiDefBut(block, BUT, B_RELOADIMA, "Reload", 230,115,80,20, 0, 0, 0, 0, 0, "Reload");
if (tex->ima->packedfile) packdummy = 1;
else packdummy = 0;
uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,115,24,20, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Image");
}
uiDefBut(block, BUT, B_LOADTEXIMA, "Load Image", 10,115,150,19, 0, 0, 0, 0, 0, "Load image - file view");
/* crop extend clip */
@@ -979,6 +1009,7 @@ static void texture_panel_colors(Tex *tex)
/* COLORBAND */
uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|0, B_COLORBAND, "Colorband",10,180,100,20, &tex->flag, 0, 0, 0, 0, "Use colorband");
if(tex->flag & TEX_COLORBAND) {
@@ -1001,20 +1032,19 @@ static void texture_panel_colors(Tex *tex)
uiDefButF(block, NUMSLI, B_TEXPRV, "R ", 10,100,100,20, &cbd->r, 0.0, 1.0, B_BANDCOL, 0, "Set the red value");
uiDefButF(block, NUMSLI, B_TEXPRV, "G ", 110,100,100,20, &cbd->g, 0.0, 1.0, B_BANDCOL, 0, "Set the green value");
uiDefButF(block, NUMSLI, B_TEXPRV, "B ", 210,100,100,20, &cbd->b, 0.0, 1.0, B_BANDCOL, 0, "Set the blue value");
uiBlockEndAlign(block);
}
/* RGB-BRICON */
if((tex->flag & TEX_COLORBAND)==0) {
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_TEXPRV, "R ", 60,80,200,20, &tex->rfac, 0.0, 2.0, 0, 0, "Set the red value");
uiDefButF(block, NUMSLI, B_TEXPRV, "G ", 60,60,200,20, &tex->gfac, 0.0, 2.0, 0, 0, "Set the green value");
uiDefButF(block, NUMSLI, B_TEXPRV, "B ", 60,40,200,20, &tex->bfac, 0.0, 2.0, 0, 0, "Set the blue value");
uiBlockEndAlign(block);
}
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_TEXPRV, "Bright", 10,10,150,20, &tex->bright, 0.0, 2.0, 0, 0, "Set the brightness of the colour or intensity of a texture");
uiDefButF(block, NUMSLI, B_TEXPRV, "Contr", 160,10,150,20, &tex->contrast, 0.01, 2.0, 0, 0, "Set the contrast of the colour or intensity of a texture");
}
@@ -1089,19 +1119,19 @@ static void texture_panel_texture(MTex *mtex, Material *ma, World *wrld, Lamp *l
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_IMAGE], 160, 110, 70, 20, &tex->type, 1.0, (float)TEX_IMAGE, 0, 0, "Use image texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_ENVMAP],240, 110, 70, 20, &tex->type, 1.0, (float)TEX_ENVMAP, 0, 0, "Use environment maps");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_CLOUDS],160, 70, 70, 20, &tex->type, 1.0, (float)TEX_CLOUDS, 0, 0, "Use clouds texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_MARBLE],240, 70, 70, 20, &tex->type, 1.0, (float)TEX_MARBLE, 0, 0, "Use marble texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_CLOUDS],160, 90, 70, 20, &tex->type, 1.0, (float)TEX_CLOUDS, 0, 0, "Use clouds texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_MARBLE],240, 90, 70, 20, &tex->type, 1.0, (float)TEX_MARBLE, 0, 0, "Use marble texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_STUCCI],160, 50, 70, 20, &tex->type, 1.0, (float)TEX_STUCCI, 0, 0, "Use strucci texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_WOOD], 240, 50, 70, 20, &tex->type, 1.0, (float)TEX_WOOD, 0, 0, "Use wood texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_STUCCI],160, 70, 70, 20, &tex->type, 1.0, (float)TEX_STUCCI, 0, 0, "Use strucci texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_WOOD], 240, 70, 70, 20, &tex->type, 1.0, (float)TEX_WOOD, 0, 0, "Use wood texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_MAGIC], 160, 30, 70, 20, &tex->type, 1.0, (float)TEX_MAGIC, 0, 0, "Use magic texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_BLEND], 240, 30, 70, 20, &tex->type, 1.0, (float)TEX_BLEND, 0, 0, "Use blend texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_MAGIC], 160, 50, 70, 20, &tex->type, 1.0, (float)TEX_MAGIC, 0, 0, "Use magic texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_BLEND], 240, 50, 70, 20, &tex->type, 1.0, (float)TEX_BLEND, 0, 0, "Use blend texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_NOISE], 160, 30, 70, 20, &tex->type, 1.0, (float)TEX_NOISE, 0, 0, "Use noise texture");
uiDefButS(block, ROW, B_TEXTYPE, texstr[TEX_NOISE], 160, 10, 70, 20, &tex->type, 1.0, (float)TEX_NOISE, 0, 0, "Use noise texture");
if(tex->plugin && tex->plugin->doit) strp= tex->plugin->pname; else strp= texstr[TEX_PLUGIN];
uiDefButS(block, ROW, B_TEXTYPE, strp, 240, 30, 70, 20, &tex->type, 1.0, (float)TEX_PLUGIN, 0, 0, "Use plugin");
uiDefButS(block, ROW, B_TEXTYPE, strp, 240, 10, 70, 20, &tex->type, 1.0, (float)TEX_PLUGIN, 0, 0, "Use plugin");
}
else {
// label to avoid centering
@@ -1388,33 +1418,35 @@ static void world_panel_mapto(World *wrld)
/* TEXTURE OUTPUT */
uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 920,114,52,18, &(mtex->texflag), 0, 0, 0, 0, "Use stencil mode");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 974,114,38,18, &(mtex->texflag), 0, 0, 0, 0, "Inverse texture operation");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "RGBtoInt", 1014,114,69,18, &(mtex->texflag), 0, 0, 0, 0, "Use RGB values for intensity texure");
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 920,130,52,19, &(mtex->texflag), 0, 0, 0, 0, "Use stencil mode");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 974,130,38,19, &(mtex->texflag), 0, 0, 0, 0, "Inverse texture operation");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "RGBtoInt", 1014,130,69,19, &(mtex->texflag), 0, 0, 0, 0, "Use RGB values for intensity texure");
uiBlockEndAlign(block);
uiDefButF(block, COL, B_MTEXCOL, "", 920,100,163,12, &(mtex->r), 0, 0, 0, 0, "");
uiDefButF(block, COL, B_MTEXCOL, "", 920,105,163,19, &(mtex->r), 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 920,80,163,18, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "The amount of red that blends with the intensity colour");
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 920,60,163,18, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "The amount of green that blends with the intensity colour");
uiDefButF(block, NUMSLI, B_MATPRV, "B ", 920,40,163,18, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "The amount of blue that blends with the intensity colour");
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 920,10,163,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "The value that an intensity texture blends with the current value");
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 920,80,163,19, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "The amount of red that blends with the intensity colour");
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 920,60,163,19, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "The amount of green that blends with the intensity colour");
uiDefButF(block, NUMSLI, B_MATPRV, "B ", 920,40,163,19, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "The amount of blue that blends with the intensity colour");
uiBlockEndAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 920,10,163,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "The value that an intensity texture blends with the current value");
/* MAP TO */
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Blend", 1087,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour progression in the sky");
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Hori", 1172,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the horizon");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "ZenUp", 1087,147,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith above");
uiDefButS(block, TOG|BIT|3, B_MATPRV, "ZenDo", 1172,147,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith below");
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,114,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values");
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,114,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values");
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,114,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values");
uiDefButS(block, ROW, B_MATPRV, "Sub", 1226,114,40,18, &(mtex->blendtype), 9.0, (float)MTEX_SUB, 0, 0, "The texture subtracts the values");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Blend", 920,180,86,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour progression in the sky");
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Hori", 1006,180,87,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the horizon");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "ZenUp", 1093,180,86,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith above");
uiDefButS(block, TOG|BIT|3, B_MATPRV, "ZenDo", 1179,180,86,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith below");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Col ", 1087,50,179,18, &(mtex->colfac), 0.0, 1.0, 0, 0, "Specify the extent to which the texture works on colour");
uiDefButF(block, NUMSLI, B_MATPRV, "Nor ", 1087,30,179,18, &(mtex->norfac), 0.0, 1.0, 0, 0, "Specify the extent to which the texture works on the normal");
uiDefButF(block, NUMSLI, B_MATPRV, "Var ", 1087,10,179,18, &(mtex->varfac), 0.0, 1.0, 0, 0, "Specify the extent to which the texture works on a value");
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,130,48,19, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values");
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,130,44,19, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values");
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,130,41,19, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values");
uiDefButS(block, ROW, B_MATPRV, "Sub", 1226,130,40,19, &(mtex->blendtype), 9.0, (float)MTEX_SUB, 0, 0, "The texture subtracts the values");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Col ", 1087,50,179,19, &(mtex->colfac), 0.0, 1.0, 0, 0, "Specify the extent to which the texture works on colour");
uiDefButF(block, NUMSLI, B_MATPRV, "Nor ", 1087,30,179,19, &(mtex->norfac), 0.0, 1.0, 0, 0, "Specify the extent to which the texture works on the normal");
uiDefButF(block, NUMSLI, B_MATPRV, "Var ", 1087,10,179,19, &(mtex->varfac), 0.0, 1.0, 0, 0, "Specify the extent to which the texture works on a value");
}
@@ -1439,7 +1471,7 @@ static void world_panel_texture(World *wrld)
if(mtex && mtex->tex) splitIDname(mtex->tex->id.name+2, str, &loos);
else strcpy(str, "");
str[10]= 0;
uiDefButS(block, ROW, REDRAWBUTSSHADING, str,10, 140-20*a, 80, 20, &(wrld->texact), 3.0, (float)a, 0, 0, "Texture channel");
uiDefButS(block, ROW, REDRAWBUTSSHADING, str,10, 160-20*a, 80, 20, &(wrld->texact), 3.0, (float)a, 0, 0, "Texture channel");
}
uiBlockEndAlign(block);
@@ -1458,37 +1490,38 @@ static void world_panel_texture(World *wrld)
MEM_freeN(strp);
if(id) {
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,163,19, id->name+2, 0.0, 18.0, 0, 0, "Specify the texture name");
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,200,19, id->name+2, 0.0, 18.0, 0, 0, "Specify the texture name");
sprintf(str, "%d", id->us);
uiDefBut(block, BUT, 0, str, 196,140,21,19, 0, 0, 0, 0, 0, "Number of users");
uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 241,140,21,19, 0, 0, 0, 0, 0, "Auto assign name to texture");
uiDefBut(block, BUT, 0, str, 196,140,21,19, 0, 0, 0, 0, 0, "Number of users");
uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 279,140,21,19, 0, 0, 0, 0, 0, "Auto assign name to texture");
if(id->lib) {
if(wrld->id.lib) uiDefIconBut(block, BUT, 0, ICON_DATALIB, 1019,146,21,19, 0, 0, 0, 0, 0, "");
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, "Erase link to texture");
}
else
uiDefButS(block, TOG, B_WTEXBROWSE, "Add New" ,100, 160, 163, 19, &(G.buts->texnr), -1.0, 32767.0, 0, 0, "Add new data block");
uiDefButS(block, TOG, B_WTEXBROWSE, "Add New" ,100, 160, 200, 19, &(G.buts->texnr), -1.0, 32767.0, 0, 0, "Add new data block");
uiBlockSetCol(block, TH_AUTO);
/* TEXCO */
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "View", 100,110,50,19, &(mtex->texco), 4.0, (float)TEXCO_VIEW, 0, 0, "Pass camera view vector on to the texture");
uiDefButS(block, ROW, B_MATPRV, "Object", 150,110,50,19, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "The name of the object used as a source for texture coordinates");
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "", 100,90,100,19, &(mtex->object), "");
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "", 200,110,100,19, &(mtex->object), "");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_MATPRV, "dX", 100,50,100,18, mtex->ofs, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "dY", 100,30,100,18, mtex->ofs+1, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "dZ", 100,10,100,18, mtex->ofs+2, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "dX", 100,50,100,19, mtex->ofs, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "dY", 100,30,100,19, mtex->ofs+1, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "dZ", 100,10,100,19, mtex->ofs+2, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_MATPRV, "sizeX", 200,50,100,18, mtex->size, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeY", 200,30,100,18, mtex->size+1, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeZ", 200,10,100,18, mtex->size+2, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
uiBlockEndAlign(block);
uiDefButF(block, NUM, B_MATPRV, "sizeX", 200,50,100,19, mtex->size, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeY", 200,30,100,19, mtex->size+1, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeZ", 200,10,100,19, mtex->size+2, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
}
static void world_panel_mistaph(World *wrld)
@@ -1664,31 +1697,31 @@ static void lamp_panel_mapto(Object *ob, Lamp *la)
/* TEXTURE OUTPUT */
uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 920,114,52,18, &(mtex->texflag), 0, 0, 0, 0, "Set the mapping to stencil mode");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 974,114,38,18, &(mtex->texflag), 0, 0, 0, 0, "Apply the inverse of the texture");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "RGBtoInt", 1014,114,69,18, &(mtex->texflag), 0, 0, 0, 0, "Use an RGB texture as an intensity texture");
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 920,130,52,19, &(mtex->texflag), 0, 0, 0, 0, "Set the mapping to stencil mode");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 974,130,38,19, &(mtex->texflag), 0, 0, 0, 0, "Apply the inverse of the texture");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "RGBtoInt", 1014,130,69,19, &(mtex->texflag), 0, 0, 0, 0, "Use an RGB texture as an intensity texture");
uiBlockEndAlign(block);
uiDefButF(block, COL, B_MTEXCOL, "", 920,100,163,12, &(mtex->r), 0, 0, 0, 0, "");
uiDefButF(block, COL, B_MTEXCOL, "", 920,105,163,19, &(mtex->r), 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 920,80,163,18, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "Set the red component of the intensity texture to blend with");
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 920,60,163,18, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "Set the green component of the intensity texture to blend with");
uiDefButF(block, NUMSLI, B_MATPRV, "B ", 920,40,163,18, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "Set the blue component of the intensity texture to blend with");
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 920,10,163,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "Set the value the texture blends with");
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 920,80,163,19, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "Set the red component of the intensity texture to blend with");
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 920,60,163,19, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "Set the green component of the intensity texture to blend with");
uiDefButF(block, NUMSLI, B_MATPRV, "B ", 920,40,163,19, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "Set the blue component of the intensity texture to blend with");
uiBlockEndAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 920,10,163,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "Set the value the texture blends with");
/* MAP TO */
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 1107,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the colour of the lamp");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 920,180,81,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the colour of the lamp");
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,114,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "Mix the values");
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,114,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "Multiply the values");
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,114,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "Add the values");
uiDefButS(block, ROW, B_MATPRV, "Sub", 1226,114,40,18, &(mtex->blendtype), 9.0, (float)MTEX_SUB, 0, 0, "Subtract the values");
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,130,48,19, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "Mix the values");
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,130,44,19, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "Multiply the values");
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,130,41,19, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "Add the values");
uiDefButS(block, ROW, B_MATPRV, "Sub", 1226,130,40,19, &(mtex->blendtype), 9.0, (float)MTEX_SUB, 0, 0, "Subtract the values");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Col ", 1087,50,179,18, &(mtex->colfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects the colour");
uiDefButF(block, NUMSLI, B_MATPRV, "Nor ", 1087,30,179,18, &(mtex->norfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects the normal");
uiDefButF(block, NUMSLI, B_MATPRV, "Var ", 1087,10,179,18, &(mtex->varfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects the value");
uiDefButF(block, NUMSLI, B_MATPRV, "Col ", 1087,50,179,19, &(mtex->colfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects the colour");
uiDefButF(block, NUMSLI, B_MATPRV, "Nor ", 1087,30,179,19, &(mtex->norfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects the normal");
uiDefButF(block, NUMSLI, B_MATPRV, "Var ", 1087,10,179,19, &(mtex->varfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects the value");
uiBlockEndAlign(block);
}
@@ -1714,7 +1747,7 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
if(mtex && mtex->tex) splitIDname(mtex->tex->id.name+2, str, &loos);
else strcpy(str, "");
str[10]= 0;
uiDefButS(block, ROW, B_REDR, str, 10, 140-20*a, 80, 20, &(la->texact), 3.0, (float)a, 0, 0, "");
uiDefButS(block, ROW, B_REDR, str, 10, 160-20*a, 80, 20, &(la->texact), 3.0, (float)a, 0, 0, "");
}
uiBlockEndAlign(block);
@@ -1735,7 +1768,7 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
MEM_freeN(strp);
if(id) {
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,163,19, id->name+2, 0.0, 18.0, 0, 0, "Name of the texture block");
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,200,19, id->name+2, 0.0, 18.0, 0, 0, "Name of the texture block");
sprintf(str, "%d", id->us);
uiDefBut(block, BUT, 0, str, 196,140,21,19, 0, 0, 0, 0, 0, "Select an existing texture, or create new");
uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 241,140,21,19, 0, 0, 0, 0, 0, "Auto assign a name to the texture");
@@ -1747,7 +1780,7 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
uiDefBut(block, BUT, B_TEXCLEARLAMP, "Clear", 122, 140, 72, 19, 0, 0, 0, 0, 0, "Erase link to texture");
}
else
uiDefButS(block, TOG, B_LTEXBROWSE, "Add New" ,100, 160, 163, 19, &(G.buts->texnr), -1.0, 32767.0, 0, 0, "Add new data block");
uiDefButS(block, TOG, B_LTEXBROWSE, "Add New" ,100, 160, 200, 19, &(G.buts->texnr), -1.0, 32767.0, 0, 0, "Add new data block");
/* TEXCO */
uiBlockSetCol(block, TH_AUTO);
@@ -1755,7 +1788,6 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
uiDefButS(block, ROW, B_MATPRV, "Glob", 100,110,60,20, &(mtex->texco), 4.0, (float)TEXCO_GLOB, 0, 0, "Generate texture coordinates from global coordinates");
uiDefButS(block, ROW, B_MATPRV, "View", 160,110,70,20, &(mtex->texco), 4.0, (float)TEXCO_VIEW, 0, 0, "Generate texture coordinates from view coordinates");
uiDefButS(block, ROW, B_MATPRV, "Object", 230,110,70,20, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "Use linked object's coordinates for texture coordinates");
uiBlockEndAlign(block);
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "", 100,90,200,20, &(mtex->object), "");
uiBlockBeginAlign(block);
@@ -1976,48 +2008,48 @@ static void material_panel_map_to(Material *ma)
/* TEXTURE OUTPUT */
uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 900,116,54,18, &(mtex->texflag), 0, 0, 0, 0, "Set the mapping to stencil mode");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 956,116,39,18, &(mtex->texflag), 0, 0, 0, 0, "Reverse the effect of the texture");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "No RGB", 997,116,71,18, &(mtex->texflag), 0, 0, 0, 0, "Use an RGB texture as an intensity texture");
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 900,120,54,19, &(mtex->texflag), 0, 0, 0, 0, "Set the mapping to stencil mode");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 956,120,39,19, &(mtex->texflag), 0, 0, 0, 0, "Reverse the effect of the texture");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "No RGB", 997,120,71,19, &(mtex->texflag), 0, 0, 0, 0, "Use an RGB texture as an intensity texture");
uiBlockEndAlign(block);
uiDefButF(block, COL, B_MTEXCOL, "", 900,100,168,12, &(mtex->r), 0, 0, 0, 0, "Browse datablocks");
uiDefButF(block, COL, B_MTEXCOL, "", 900,100,168,18, &(mtex->r), 0, 0, 0, 0, "Browse datablocks");
uiBlockBeginAlign(block);
if(ma->colormodel==MA_HSV) {
uiBlockSetCol(block, TH_BUT_SETTING1);
uiDefButF(block, HSVSLI, B_MATPRV, "H ", 900,80,168,18, &(mtex->r), 0.0, 0.9999, B_MTEXCOL, 0, "");
uiDefButF(block, HSVSLI, B_MATPRV, "S ", 900,60,168,18, &(mtex->r), 0.0001, 1.0, B_MTEXCOL, 0, "");
uiDefButF(block, HSVSLI, B_MATPRV, "V ", 900,40,168,18, &(mtex->r), 0.0001, 1.0, B_MTEXCOL, 0, "");
uiDefButF(block, HSVSLI, B_MATPRV, "H ", 900,80,168,19, &(mtex->r), 0.0, 0.9999, B_MTEXCOL, 0, "");
uiDefButF(block, HSVSLI, B_MATPRV, "S ", 900,60,168,19, &(mtex->r), 0.0001, 1.0, B_MTEXCOL, 0, "");
uiDefButF(block, HSVSLI, B_MATPRV, "V ", 900,40,168,19, &(mtex->r), 0.0001, 1.0, B_MTEXCOL, 0, "");
uiBlockSetCol(block, TH_AUTO);
}
else {
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 900,80,168,18, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "Set the amount of red the intensity texture blends with");
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 900,60,168,18, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "Set the amount of green the intensity texture blends with");
uiDefButF(block, NUMSLI, B_MATPRV, "B ", 900,40,168,18, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "Set the amount of blue the intensity texture blends with");
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 900,80,168,19, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "Set the amount of red the intensity texture blends with");
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 900,60,168,19, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "Set the amount of green the intensity texture blends with");
uiDefButF(block, NUMSLI, B_MATPRV, "B ", 900,40,168,19, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "Set the amount of blue the intensity texture blends with");
}
uiBlockEndAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 900,10,168,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "Set the value the texture blends with the current value");
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 900,10,168,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "Set the value the texture blends with the current value");
/* MAP TO */
uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 900,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect basic colour of the material");
uiDefButS(block, TOG3|BIT|1, B_MATPRV, "Nor", 952,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the rendered normal");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Csp", 1004,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the specularity colour");
uiDefButS(block, TOG|BIT|3, B_MATPRV, "Cmir", 1056,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affext the mirror colour");
uiDefButS(block, TOG3|BIT|4, B_MATPRV, "Ref", 1108,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the value of the materials reflectivity");
uiBlockBeginAlign(block);
uiDefButS(block, TOG3|BIT|5, B_MATPRV, "Spec", 900,166,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the value of specularity");
uiDefButS(block, TOG3|BIT|8, B_MATPRV, "Hard", 952,166,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the hardness value");
uiDefButS(block, TOG3|BIT|7, B_MATPRV, "Alpha", 1004,166,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the alpha value");
uiDefButS(block, TOG3|BIT|6, B_MATPRV, "Emit", 1056,166,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the emit value");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 900,180,73,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect basic colour of the material");
uiDefButS(block, TOG3|BIT|1, B_MATPRV, "Nor", 973,180,73,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the rendered normal");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Csp", 1046,180,73,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the specularity colour");
uiDefButS(block, TOG|BIT|3, B_MATPRV, "Cmir", 1119,180,73,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affext the mirror colour");
uiDefButS(block, TOG3|BIT|4, B_MATPRV, "Ref", 1192,180,74,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the value of the materials reflectivity");
uiDefButS(block, TOG3|BIT|5, B_MATPRV, "Spec", 900,160,91,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the value of specularity");
uiDefButS(block, TOG3|BIT|8, B_MATPRV, "Hard", 991,160,92,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the hardness value");
uiDefButS(block, TOG3|BIT|7, B_MATPRV, "Alpha", 1083,160,91,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the alpha value");
uiDefButS(block, TOG3|BIT|6, B_MATPRV, "Emit", 1174,160,92,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the emit value");
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "Mix", 1087,94,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,94,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,94,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Sub", 1226,94,40,18, &(mtex->blendtype), 9.0, (float)MTEX_SUB, 0, 0, "The texture subtracts the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Mix", 1087,120,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,120,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,120,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Sub", 1226,120,40,18, &(mtex->blendtype), 9.0, (float)MTEX_SUB, 0, 0, "The texture subtracts the values or colour");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Col ", 1087,50,179,18, &(mtex->colfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects colour");
uiDefButF(block, NUMSLI, B_MATPRV, "Nor ", 1087,30,179,18, &(mtex->norfac), 0.0, 5.0, 0, 0, "Set the amount the texture affects the normal");
@@ -2057,10 +2089,10 @@ static void material_panel_map_input(Material *ma)
/* COORDS */
uiBlockBeginAlign(block);
uiDefButC(block, ROW, B_MATPRV, "Flat", 666,114,48,18, &(mtex->mapping), 5.0, (float)MTEX_FLAT, 0, 0, "Map X and Y coordinates directly");
uiDefButC(block, ROW, B_MATPRV, "Cube", 717,114,50,18, &(mtex->mapping), 5.0, (float)MTEX_CUBE, 0, 0, "Map using the normal vector");
uiDefButC(block, ROW, B_MATPRV, "Tube", 666,94,48,18, &(mtex->mapping), 5.0, (float)MTEX_TUBE, 0, 0, "Map with Z as central axis (tube-like)");
uiDefButC(block, ROW, B_MATPRV, "Sphe", 716,94,50,18, &(mtex->mapping), 5.0, (float)MTEX_SPHERE, 0, 0, "Map with Z as central axis (sphere-like)");
uiDefButC(block, ROW, B_MATPRV, "Flat", 630,114,48,18, &(mtex->mapping), 5.0, (float)MTEX_FLAT, 0, 0, "Map X and Y coordinates directly");
uiDefButC(block, ROW, B_MATPRV, "Cube", 681,114,50,18, &(mtex->mapping), 5.0, (float)MTEX_CUBE, 0, 0, "Map using the normal vector");
uiDefButC(block, ROW, B_MATPRV, "Tube", 630,94,48,18, &(mtex->mapping), 5.0, (float)MTEX_TUBE, 0, 0, "Map with Z as central axis (tube-like)");
uiDefButC(block, ROW, B_MATPRV, "Sphe", 681,94,50,18, &(mtex->mapping), 5.0, (float)MTEX_SPHERE, 0, 0, "Map with Z as central axis (sphere-like)");
uiBlockBeginAlign(block);
for(b=0; b<3; b++) {
@@ -2069,10 +2101,10 @@ static void material_panel_map_input(Material *ma)
else if(b==1) cp= &(mtex->projy);
else cp= &(mtex->projz);
uiDefButC(block, ROW, B_MATPRV, "", 665, 50-20*b, 24, 18, cp, 6.0+b, 0.0, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV, "X", 691, 50-20*b, 24, 18, cp, 6.0+b, 1.0, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV, "Y", 717, 50-20*b, 24, 18, cp, 6.0+b, 2.0, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV, "Z", 743, 50-20*b, 24, 18, cp, 6.0+b, 3.0, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV, "", 630, 50-20*b, 24, 18, cp, 6.0+b, 0.0, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV, "X", 656, 50-20*b, 24, 18, cp, 6.0+b, 1.0, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV, "Y", 682, 50-20*b, 24, 18, cp, 6.0+b, 2.0, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV, "Z", 708, 50-20*b, 24, 18, cp, 6.0+b, 3.0, 0, 0, "");
}
uiBlockBeginAlign(block);
@@ -2109,7 +2141,7 @@ static void material_panel_texture(Material *ma)
if(mtex && mtex->tex) splitIDname(mtex->tex->id.name+2, str, &loos);
else strcpy(str, "");
str[10]= 0;
uiDefButC(block, ROW, B_MATPRV_DRAW, str, 10, 180-22*a, 70, 20, &(ma->texact), 3.0, (float)a, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV_DRAW, str, 10, 180-20*a, 70, 20, &(ma->texact), 3.0, (float)a, 0, 0, "");
}
uiBlockEndAlign(block);
@@ -2120,7 +2152,7 @@ static void material_panel_texture(Material *ma)
mtex= ma->mtex[a];
if(mtex && mtex->tex) {
if(ma->septex & (1<<a))
uiDefButC(block, TOG|BIT|a, B_MATPRV_DRAW, " ", -20, 180-22*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Disable or enable this channel");
uiDefButC(block, TOG|BIT|a, B_MATPRV_DRAW, " ", -20, 180-20*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Disable or enable this channel");
else uiDefIconButC(block, TOG|BIT|a, B_MATPRV_DRAW, ICON_CHECKBOX_HLT, -20, 180-22*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Disable or enable this channel");
}
}
@@ -2212,37 +2244,37 @@ static void material_panel_shading(Material *ma)
char *str2= "Specular Shader%t|CookTorr %x0|Phong %x1|Blinn %x2|Toon %x3";
/* diff shader buttons */
uiDefButS(block, MENU, B_MATPRV_DRAW, str1, 9, 155,78,19, &(ma->diff_shader), 0.0, 0.0, 0, 0, "Set a diffuse shader");
uiDefButS(block, MENU, B_MATPRV_DRAW, str1, 9, 180,78,19, &(ma->diff_shader), 0.0, 0.0, 0, 0, "Set a diffuse shader");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Ref ", 90,155,150,19, &(ma->ref), 0.0, 1.0, 0, 0, "Set the amount of reflection");
uiDefButF(block, NUMSLI, B_MATPRV, "Ref ", 90,180,150,19, &(ma->ref), 0.0, 1.0, 0, 0, "Set the amount of reflection");
if(ma->diff_shader==MA_DIFF_ORENNAYAR)
uiDefButF(block, NUMSLI, B_MATPRV, "Rough:",90,135, 150,19, &(ma->roughness), 0.0, 3.14, 0, 0, "Oren Nayar Roughness");
uiDefButF(block, NUMSLI, B_MATPRV, "Rough:",90,160, 150,19, &(ma->roughness), 0.0, 3.14, 0, 0, "Oren Nayar Roughness");
else if(ma->diff_shader==MA_DIFF_TOON) {
uiDefButF(block, NUMSLI, B_MATPRV, "Size:", 90, 135,150,19, &(ma->param[0]), 0.0, 3.14, 0, 0, "Size of diffuse toon area");
uiDefButF(block, NUMSLI, B_MATPRV, "Smooth:",90,115,150,19, &(ma->param[1]), 0.0, 1.0, 0, 0, "Smoothness of diffuse toon area");
uiDefButF(block, NUMSLI, B_MATPRV, "Size:", 90, 160,150,19, &(ma->param[0]), 0.0, 3.14, 0, 0, "Size of diffuse toon area");
uiDefButF(block, NUMSLI, B_MATPRV, "Smooth:",90,140,150,19, &(ma->param[1]), 0.0, 1.0, 0, 0, "Smoothness of diffuse toon area");
}
uiBlockEndAlign(block);
/* spec shader buttons */
uiDefButS(block, MENU, B_MATPRV_DRAW, str2, 9,95,77,19, &(ma->spec_shader), 0.0, 0.0, 0, 0, "Set a specular shader");
uiDefButS(block, MENU, B_MATPRV_DRAW, str2, 9,120,77,19, &(ma->spec_shader), 0.0, 0.0, 0, 0, "Set a specular shader");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Spec ", 90,95,150,19, &(ma->spec), 0.0, 2.0, 0, 0, "Set the degree of specularity");
uiDefButF(block, NUMSLI, B_MATPRV, "Spec ", 90,120,150,19, &(ma->spec), 0.0, 2.0, 0, 0, "Set the degree of specularity");
if ELEM3(ma->spec_shader, MA_SPEC_COOKTORR, MA_SPEC_PHONG, MA_SPEC_BLINN) {
uiDefButS(block, NUMSLI, B_MATPRV, "Hard:", 90, 75, 150,19, &(ma->har), 1.0, 255, 0, 0, "Set the hardness of the specularity");
uiDefButS(block, NUMSLI, B_MATPRV, "Hard:", 90, 100, 150,19, &(ma->har), 1.0, 255, 0, 0, "Set the hardness of the specularity");
}
if(ma->spec_shader==MA_SPEC_BLINN)
uiDefButF(block, NUMSLI, B_MATPRV, "Refr:", 90, 55,150,19, &(ma->refrac), 1.0, 10.0, 0, 0, "Refraction index");
uiDefButF(block, NUMSLI, B_MATPRV, "Refr:", 90, 80,150,19, &(ma->refrac), 1.0, 10.0, 0, 0, "Refraction index");
if(ma->spec_shader==MA_SPEC_TOON) {
uiDefButF(block, NUMSLI, B_MATPRV, "Size:", 90, 75,150,19, &(ma->param[2]), 0.0, 1.53, 0, 0, "Size of specular toon area");
uiDefButF(block, NUMSLI, B_MATPRV, "Smooth:",90, 55,150,19, &(ma->param[3]), 0.0, 1.0, 0, 0, "Smoothness of specular toon area");
uiDefButF(block, NUMSLI, B_MATPRV, "Size:", 90, 100,150,19, &(ma->param[2]), 0.0, 1.53, 0, 0, "Size of specular toon area");
uiDefButF(block, NUMSLI, B_MATPRV, "Smooth:",90, 80,150,19, &(ma->param[3]), 0.0, 1.0, 0, 0, "Smoothness of specular toon area");
}
uiBlockEndAlign(block);
/* default shading variables */
uiDefButF(block, NUMSLI, B_MATPRV, "Amb ", 9,30,117,19, &(ma->amb), 0.0, 1.0, 0, 0, "Set the amount of global ambient color");
uiDefButF(block, NUMSLI, B_MATPRV, "Emit ", 133,30,110,19, &(ma->emit), 0.0, 1.0, 0, 0, "Set the amount of emitting light");
uiDefButF(block, NUMSLI, B_MATPRV, "Amb ", 9,35,117,19, &(ma->amb), 0.0, 1.0, 0, 0, "Set the amount of global ambient color");
uiDefButF(block, NUMSLI, B_MATPRV, "Emit ", 133,35,110,19, &(ma->emit), 0.0, 1.0, 0, 0, "Set the amount of emitting light");
uiDefButF(block, NUMSLI, B_MATPRV, "Add ", 9,10,117,19, &(ma->add), 0.0, 1.0, 0, 0, "Glow factor for transparant");
uiDefButF(block, NUM, 0, "Zoffs:", 133,10,110,19, &(ma->zoffs), 0.0, 10.0, 0, 0, "Give face an artificial offset");
@@ -2344,6 +2376,7 @@ static void material_panel_material(Object *ob, Material *ma)
uiBlockEndAlign(block);
}
uiBlockSetCol(block, TH_AUTO);
uiBlockBeginAlign(block);
uiDefButF(block, COL, B_MATCOL, "", 8,115,72,24, &(ma->r), 0, 0, 0, 0, "");
uiDefButF(block, COL, B_SPECCOL, "", 8,88,72,24, &(ma->specr), 0, 0, 0, 0, "");
uiDefButF(block, COL, B_MIRCOL, "", 8,61,72,24, &(ma->mirr), 0, 0, 0, 0, "");

View File

@@ -552,6 +552,8 @@ void ui_autofill(uiBlock *block)
but= block->buttons.first;
lasti= -1;
while(but) {
// signal for aligning code
but->flag |= UI_BUT_ALIGN_DOWN;
i= but->x1;
@@ -576,6 +578,8 @@ void ui_autofill(uiBlock *block)
but= but->next;
}
uiBlockEndAlign(block);
MEM_freeN(maxw); MEM_freeN(maxh);
block->autofill= 0;
}

View File

@@ -1474,16 +1474,15 @@ static void ui_draw_slider(int colorid, float fac, float aspect, float x1, float
else
BIF_ThemeColorShade(colorid, -40);
glRectf(x1, ymid-yc, x2, ymid+yc);
/* left part */
glRectf(x1, ymid-2.0*yc, x1+fac, ymid+2.0*yc);
/* right part */
glRectf(x1+fac, ymid-yc, x2, ymid+yc);
/* the movable slider */
if(flag & UI_ACTIVE)
BIF_ThemeColorShade(colorid, +50);
else
BIF_ThemeColorShade(colorid, +40);
glRectf(x1+fac-aspect, ymid-yc, x1+fac+aspect, ymid+yc);
BIF_ThemeColorShade(colorid, +70);
glRectf(x1+fac-aspect, ymid-2.0*yc, x1+fac+aspect, ymid+2.0*yc);
}
@@ -1716,11 +1715,9 @@ void ui_set_embossfunc(uiBut *but, int drawtype)
}
else if(theme==2) {
but->embossfunc= ui_draw_round;
but->sliderfunc= ui_default_slider;
}
else if(theme==3) {
but->embossfunc= ui_draw_oldskool;
but->sliderfunc= ui_default_slider; // should be oldskool.... later
}
else {
but->embossfunc= ui_draw_minimal;

View File

@@ -736,7 +736,7 @@ int blenderqread(unsigned short event, short val)
else
enter_posemode();
allqueue(REDRAWHEADERS, 0);
allqueue(REDRAWBUTSALL, 0);
}
else if(G.qual==LR_SHIFTKEY) {
if(G.obedit)