A couple of smaller fixes;

- Modifier Panel, name label for "Virtual" modifiers was too short
- On extrude Bones, "soft distance" now is always set based on length
  of the bone (also on CTRL+click, also when Envelope drawmode is not set)
- Added undo-push for "Apply Bone Envelopees to VertexGroup" in WeightPaint.
- Menu-buttons in floating panels sometimes gave drawing error
- InfoWindow buttons were always allocated & drawn, even when window was
  zero sized... waste of cpu, tsk!
This commit is contained in:
2005-08-20 09:55:11 +00:00
parent 74be13ba8b
commit 29429d73f2
9 changed files with 28 additions and 20 deletions

View File

@@ -925,7 +925,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
if (isVirtual) {
sprintf(str, "%s (virtual)", md->name);
uiDefBut(block, LABEL, 0, str, x+10, y-1, buttonWidth-60, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name");
uiDefBut(block, LABEL, 0, str, x+10, y-1, width-90, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name");
uiClearButLock();

View File

@@ -1173,7 +1173,7 @@ static EditBone *add_editbone(void)
bone->flag |= BONE_TIPSEL;
bone->weight= 1.0F;
bone->dist= 1.0F;
bone->dist= 0.5F;
bone->xwidth= 0.1;
bone->zwidth= 0.1;
bone->ease1= 1.0;
@@ -1300,6 +1300,10 @@ void addvert_armature(void)
Mat3Inv(imat, mat);
Mat3MulVecfl(imat, newbone->tail);
newbone->length= VecLenf(newbone->head, newbone->tail);
newbone->rad_tail= newbone->length*0.1f;
newbone->dist= newbone->length*0.25f;
countall();
BIF_undo_push("Add Bone");

View File

@@ -1958,10 +1958,13 @@ void special_editmenu(void)
else if(G.f & G_WEIGHTPAINT) {
if(ob->parent && (ob->parent->flag & OB_POSEMODE)) {
nr= pupmenu("Specials%t|Apply Bone Envelopes to VertexGroups %x1");
if(nr==1)
if(nr==1) {
Mesh *me= ob->data;
copy_wpaint_undo(me->dvert, me->totvert);
pose_adds_vgroups(ob);
}
}
}
else {
Base *base, *base_select= NULL;

View File

@@ -1210,7 +1210,8 @@ static int ui_do_but_MENU(uiBut *but)
but->flag &= ~UI_SELECT;
ui_check_but(but);
ui_draw_but(but);
/* no draw of button now, for floating panels the matrix now is invalid...
the button still is active, and will be redrawn in main loop to de-activate it */
uibut_do_func(but);

View File

@@ -721,7 +721,7 @@ void uiMatchPanel_view2d(ScrArea *sa)
}
}
/* extern used ny previewrender */
/* extern used by previewrender */
void uiPanelPush(uiBlock *block)
{
glPushMatrix();
@@ -896,7 +896,7 @@ static void ui_draw_panel_header(uiBlock *block)
/* active tab */
/* draw text label */
BIF_ThemeColor(TH_TEXT_HI);
ui_rasterpos_safe(4+block->minx+pnl_icons, block->maxy+5, block->aspect);
ui_rasterpos_safe(4.0f+block->minx+pnl_icons, block->maxy+5.0f, block->aspect);
BIF_DrawString(block->curfont, block->panel->panelname, (U.transopts & USER_TR_BUTTONS));
return;
}
@@ -960,7 +960,7 @@ void ui_draw_panel(uiBlock *block)
if(panel->paneltab) return;
/* if the panel is minimised vertically:
/* if the panel is minimized vertically:
* (------)
*/
if(panel->flag & PNL_CLOSEDY) {
@@ -988,7 +988,7 @@ void ui_draw_panel(uiBlock *block)
}
}
/* if the panel is minimised horizontally:
/* if the panel is minimized horizontally:
* /-\
* |
* |

View File

@@ -1,7 +1,7 @@
/**
* $Id$
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -22,7 +22,7 @@
*
* Contributor(s): Ton Roosendaal, Blender Foundation '05, full recode.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
* ***** END GPL LICENSE BLOCK *****
* support for animation modes - Reevan McKay
*/

View File

@@ -2297,7 +2297,7 @@ void drawinfospace(ScrArea *sa, void *spacedata)
short edgsp, midsp;
char naam[32];
if(curarea->win==0) return;
if(curarea->win==0 || curarea->winy<2) return;
BIF_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0.0);

View File

@@ -552,7 +552,7 @@ static void createTransArmatureVerts(TransInfo *t)
for (ebo=G.edbo.first;ebo;ebo=ebo->next){
ebo->oldlength= ebo->length; // might be used for scaling
ebo->oldlength= ebo->length; // length==0.0 on extrude, used for scaling radius of bone points
if (t->mode==TFM_BONE_ENVELOPE) {

View File

@@ -183,17 +183,17 @@ void recalcData(TransInfo *t)
}
}
if(arm->drawtype==ARM_ENVELOPE) {
/* on extrude bones, oldlength==0.0f, so we scale radius of points */
if(ebo->oldlength==0.0f) {
ebo->rad_head= 0.25f*ebo->length;
ebo->rad_tail= 0.10f*ebo->length;
ebo->dist= 0.25f*ebo->length;
if(ebo->parent) {
if(ebo->rad_head > ebo->parent->rad_tail)
ebo->rad_head= ebo->parent->rad_tail;
}
}
}
}
if(arm->flag & ARM_MIRROR_EDIT)
transform_armature_mirror_update();