Bugfixes:
- Deleting bone in editmode did not check for pose layers when clearing pose channels or constraint targets.... - Button 'use nodes' in header of Node editor could only be pressed once - New 'normal' button messed with default material in blender - Theme options for Node window available now in Info window
This commit is contained in:
@@ -965,7 +965,7 @@ void drawnodespace(ScrArea *sa, void *spacedata)
|
||||
glLoadIdentity();
|
||||
|
||||
/* always free, blocks here have no unique identifier (1 block per node) */
|
||||
uiFreeBlocks(&sa->uiblocks);
|
||||
uiFreeBlocksWin(&sa->uiblocks, sa->win);
|
||||
|
||||
/* only set once */
|
||||
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||
|
||||
@@ -787,14 +787,14 @@ void delete_armature(void)
|
||||
TEST_EDITARMATURE;
|
||||
if(okee("Erase selected bone(s)")==0) return;
|
||||
|
||||
/* First rase any associated pose channel */
|
||||
/* First erase any associated pose channel */
|
||||
if (G.obedit->pose){
|
||||
bPoseChannel *chan, *next;
|
||||
for (chan=G.obedit->pose->chanbase.first; chan; chan=next) {
|
||||
next= chan->next;
|
||||
curBone = editbone_name_exists (chan->name);
|
||||
|
||||
if (curBone && (curBone->flag&BONE_SELECTED)) {
|
||||
if (curBone && (curBone->flag & BONE_SELECTED) && (arm->layer & curBone->layer)) {
|
||||
free_constraints(&chan->constraints);
|
||||
BLI_freelinkN (&G.obedit->pose->chanbase, chan);
|
||||
}
|
||||
@@ -803,7 +803,7 @@ void delete_armature(void)
|
||||
char *subtarget = get_con_subtarget_name(con, G.obedit);
|
||||
if (subtarget) {
|
||||
curBone = editbone_name_exists (subtarget);
|
||||
if (curBone && (curBone->flag&BONE_SELECTED)) {
|
||||
if (curBone && (curBone->flag & BONE_SELECTED) && (arm->layer & curBone->layer)) {
|
||||
con->flag |= CONSTRAINT_DISABLE;
|
||||
subtarget[0]= 0;
|
||||
}
|
||||
|
||||
@@ -1972,18 +1972,20 @@ static void ui_draw_but_NORMAL(uiBut *but)
|
||||
{
|
||||
static GLuint displist=0;
|
||||
int a, old[8];
|
||||
float vec0[3]={0.0f, 0.0f, 0.0f};
|
||||
float vec1[3]={1.0f, 1.0f, 1.0f};
|
||||
GLfloat diff[4], diffn[4]={1.0f, 1.0f, 1.0f, 1.0f};
|
||||
float vec0[4]={0.0f, 0.0f, 0.0f, 0.0f};
|
||||
float dir[4], size;
|
||||
|
||||
/* store stuff */
|
||||
glGetMaterialfv(GL_FRONT, GL_DIFFUSE, diff);
|
||||
|
||||
/* backdrop */
|
||||
BIF_ThemeColor(TH_BUT_NEUTRAL);
|
||||
uiSetRoundBox(15);
|
||||
gl_round_box(GL_POLYGON, but->x1, but->y1, but->x2, but->y2, 5.0f);
|
||||
|
||||
/* sphere color */
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
glColor3ub(200, 200, 200);
|
||||
glMaterialfv(GL_FRONT, GL_DIFFUSE, diffn);
|
||||
glCullFace(GL_BACK); glEnable(GL_CULL_FACE);
|
||||
|
||||
/* disable blender light */
|
||||
@@ -1999,7 +2001,7 @@ static void ui_draw_but_NORMAL(uiBut *but)
|
||||
VECCOPY(dir, (float *)but->poin);
|
||||
dir[3]= 0.0f; /* glLight needs 4 args, 0.0 is sun */
|
||||
glLightfv(GL_LIGHT7, GL_POSITION, dir);
|
||||
glLightfv(GL_LIGHT7, GL_DIFFUSE, vec1);
|
||||
glLightfv(GL_LIGHT7, GL_DIFFUSE, diffn);
|
||||
glLightfv(GL_LIGHT7, GL_SPECULAR, vec0);
|
||||
glLightf(GL_LIGHT7, GL_CONSTANT_ATTENUATION, 1.0f);
|
||||
glLightf(GL_LIGHT7, GL_LINEAR_ATTENUATION, 0.0f);
|
||||
@@ -2016,7 +2018,7 @@ static void ui_draw_but_NORMAL(uiBut *but)
|
||||
displist= glGenLists(1);
|
||||
glNewList(displist, GL_COMPILE_AND_EXECUTE);
|
||||
|
||||
qobj = gluNewQuadric();
|
||||
qobj= gluNewQuadric();
|
||||
gluQuadricDrawStyle(qobj, GLU_FILL);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
gluSphere( qobj, 100.0, 32, 24);
|
||||
@@ -2027,18 +2029,20 @@ static void ui_draw_but_NORMAL(uiBut *but)
|
||||
}
|
||||
else glCallList(displist);
|
||||
|
||||
/* restore */
|
||||
glPopMatrix();
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_COLOR_MATERIAL);
|
||||
glDisable(GL_CULL_FACE);
|
||||
glMaterialfv(GL_FRONT, GL_DIFFUSE, diff);
|
||||
|
||||
glDisable(GL_LIGHT7);
|
||||
|
||||
/* enable blender light */
|
||||
for(a=0; a<8; a++) {
|
||||
if(old[a])
|
||||
glEnable(GL_LIGHT0+a);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void ui_draw_roundbox(uiBut *but)
|
||||
|
||||
@@ -2249,7 +2249,7 @@ static void info_user_themebuts(uiBlock *block, short y1, short y2, short y3)
|
||||
|
||||
/* main choices pup */
|
||||
uiDefButS(block, MENU, B_CHANGE_THEME, "UI and Buttons %x1|%l|3D View %x2|%l|Ipo Curve Editor %x3|Action Editor %x4|"
|
||||
"NLA Editor %x5|%l|UV/Image Editor %x6|Video Sequence Editor %x7|Timeline %x15|Audio Window %x8|Text Editor %x9|%l|User Preferences %x10|"
|
||||
"NLA Editor %x5|%l|UV/Image Editor %x6|Video Sequence Editor %x7|Node Editor %x16|Timeline %x15|Audio Window %x8|Text Editor %x9|%l|User Preferences %x10|"
|
||||
"Outliner %x11|Buttons Window %x12|%l|File Browser %x13|Image Browser %x14",
|
||||
255,y2,200,20, &curmain, 0, 0, 0, 0, "Specify theme for...");
|
||||
if(curmain==1) spacetype= 0;
|
||||
@@ -2267,6 +2267,7 @@ static void info_user_themebuts(uiBlock *block, short y1, short y2, short y3)
|
||||
else if(curmain==13) spacetype= SPACE_FILE;
|
||||
else if(curmain==14) spacetype= SPACE_IMASEL;
|
||||
else if(curmain==15) spacetype= SPACE_TIME;
|
||||
else if(curmain==16) spacetype= SPACE_NODE;
|
||||
else return; // only needed while coding... when adding themes for more windows
|
||||
|
||||
/* color choices pup */
|
||||
|
||||
Reference in New Issue
Block a user