Diego Borghetti 2007-06-14 21:19:41 +00:00
parent 0a3ed2c93e
commit cf2705caaf
6 changed files with 19 additions and 21 deletions

View File

@ -2530,7 +2530,6 @@ void logic_buts(void)
int a;
short xco, yco, count, width, ycoo;
char *pupstr, name[32];
int butreturn = 0;
wrld= G.scene->world;
@ -2576,26 +2575,20 @@ void logic_buts(void)
but= uiDefBut(block, TEX, 1, "Name:", 110, (short)(70-20*a), 110, 20, prop->name, 0, 31, 0, 0, "");
uiButSetFunc(but, make_unique_prop_names_cb, prop->name, (void*) 1);
if (strcmp(prop->name, "Text") == 0) {
butreturn = REDRAWVIEW3D;
} else {
butreturn = 0;
}
if(prop->type==PROP_BOOL) {
uiDefButBitI(block, TOG, 1, B_REDR, "True", 220, (short)(70-20*a), 55, 20, &prop->data, 0, 0, 0, 0, "");
uiDefButBitI(block, TOGN, 1, B_REDR, "False", 270, (short)(70-20*a), 55, 20, &prop->data, 0, 0, 0, 0, "");
}
else if(prop->type==PROP_INT)
uiDefButI(block, NUM, butreturn, "", 220, (short)(70-20*a), 110, 20, &prop->data, -10000, 10000, 0, 0, "");
uiDefButI(block, NUM, B_REDR, "", 220, (short)(70-20*a), 110, 20, &prop->data, -10000, 10000, 0, 0, "");
else if(prop->type==PROP_FLOAT)
uiDefButF(block, NUM, butreturn, "", 220, (short)(70-20*a), 110, 20, (float*) &prop->data, -10000, 10000, 100, 3, "");
uiDefButF(block, NUM, B_REDR, "", 220, (short)(70-20*a), 110, 20, (float*) &prop->data, -10000, 10000, 100, 3, "");
else if(prop->type==PROP_STRING)
uiDefBut(block, TEX, butreturn, "", 220, (short)(70-20*a), 110, 20, prop->poin, 0, 127, 0, 0, "");
uiDefBut(block, TEX, B_REDR, "", 220, (short)(70-20*a), 110, 20, prop->poin, 0, 127, 0, 0, "");
else if(prop->type==PROP_TIME)
uiDefButF(block, NUM, butreturn, "", 220, (short)(70-20*a), 110, 20, (float*) &prop->data, -10000, 10000, 0, 0, "");
uiDefButF(block, NUM, B_REDR, "", 220, (short)(70-20*a), 110, 20, (float*) &prop->data, -10000, 10000, 100, 3, "");
uiDefButBitS(block, TOG, PROP_DEBUG, 0, "D", 330, (short)(70-20*a), 20, 20, &prop->flag, 0, 0, 0, 0, "Print Debug info");
uiDefButBitS(block, TOG, PROP_DEBUG, B_REDR, "D", 330, (short)(70-20*a), 20, 20, &prop->flag, 0, 0, 0, 0, "Print Debug info");
a++;
prop= prop->next;

View File

@ -1277,7 +1277,7 @@ static void render_panel_render(void)
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, R_MBLUR, 0, "MBLUR", 496,109,64,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation");
uiDefButBitI(block, TOG, R_MBLUR, B_REDR, "MBLUR", 496,109,64,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation");
uiDefButF(block, NUM,B_DIFF,"Bf:", 496,88,64,20,&G.scene->r.blurfac, 0.01, 5.0, 10, 2, "Sets motion blur factor");
uiBlockEndAlign(block);
@ -1296,11 +1296,11 @@ static void render_panel_render(void)
uiDefButS(block, MENU, B_DIFF,"Octree resolution %t|64 %x64|128 %x128|256 %x256|512 %x512", 496,13,64,20,&G.scene->r.ocres,0.0,0.0, 0, 0, "Octree resolution for ray tracing");
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, R_SHADOW, 0,"Shadow", 565,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation");
uiDefButBitI(block, TOG, R_ENVMAP, 0,"EnvMap", 627,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable environment map rendering");
uiDefButBitI(block, TOG, R_PANORAMA, 0,"Pano", 565,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)");
uiDefButBitI(block, TOG, R_SHADOW, B_REDR,"Shadow", 565,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation");
uiDefButBitI(block, TOG, R_ENVMAP, B_REDR,"EnvMap", 627,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable environment map rendering");
uiDefButBitI(block, TOG, R_PANORAMA, B_REDR,"Pano", 565,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)");
uiDefButBitI(block, TOG, R_RAYTRACE, B_REDR,"Ray",606,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable ray tracing");
uiDefButBitI(block, TOG, R_RADIO, 0,"Radio", 647,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable radiosity rendering");
uiDefButBitI(block, TOG, R_RADIO, B_REDR,"Radio", 647,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable radiosity rendering");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
@ -1311,9 +1311,9 @@ static void render_panel_render(void)
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, R_FIELDS, 0,"Fields", 565,55,60,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables field rendering");
uiDefButBitI(block, TOG, R_ODDFIELD, 0,"Odd", 627,55,39,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Odd field first rendering (Default: Even field)");
uiDefButBitI(block, TOG, R_FIELDSTILL, 0,"X", 668,55,19,20,&G.scene->r.mode, 0, 0, 0, 0, "Disables time difference in field calculations");
uiDefButBitI(block, TOG, R_FIELDS, B_REDR,"Fields", 565,55,60,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables field rendering");
uiDefButBitI(block, TOG, R_ODDFIELD, B_REDR,"Odd", 627,55,39,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Odd field first rendering (Default: Even field)");
uiDefButBitI(block, TOG, R_FIELDSTILL, B_REDR,"X", 668,55,19,20,&G.scene->r.mode, 0, 0, 0, 0, "Disables time difference in field calculations");
sprintf(str, "Filter%%t|Box %%x%d|Tent %%x%d|Quad %%x%d|Cubic %%x%d|Gauss %%x%d|CatRom %%x%d|Mitch %%x%d", R_FILTER_BOX, R_FILTER_TENT, R_FILTER_QUAD, R_FILTER_CUBIC, R_FILTER_GAUSS, R_FILTER_CATROM, R_FILTER_MITCH);
uiDefButS(block, MENU, B_DIFF,str, 565,34,60,20, &G.scene->r.filtertype, 0, 0, 0, 0, "Set sampling filter for antialiasing");

View File

@ -197,6 +197,7 @@ static void load_image_cb(char *str, void *ima_pp_v, void *iuser_v) /* called fr
if(GS(tex->id.name)==ID_TE) {
BIF_preview_changed(ID_TE);
allqueue(REDRAWBUTSSHADING, 0);
allqueue(REDRAWOOPS, 0);
}
}
}

View File

@ -3351,6 +3351,7 @@ static void namebutton_cb(void *tep, void *oldnamep)
switch(tselem->type) {
case TSE_DEFGROUP:
unique_vertexgroup_name(te->directdata, (Object *)tselem->id); // id = object
allqueue(REDRAWBUTSEDIT, 0);
break;
case TSE_NLA_ACTION:
test_idbutton(tselem->id->name+2);

View File

@ -674,8 +674,11 @@ void paste_posebuf (int flip)
return;
}
/*
// disabled until protected bones in proxies follow the rules everywhere else!
if(pose_has_protected_selected(ob, 1))
return;
*/
/* Safely merge all of the channels in this pose into
any existing pose */

View File

@ -218,7 +218,7 @@ static void planeProjection(TransInfo *t, float in[3], float out[3]) {
VecSubf(vec, out, in);
factor = Inpf(vec, norm);
if (fabs(factor) <= FLT_EPSILON) {
if (fabs(factor) <= 0.001) {
return; /* prevent divide by zero */
}
factor = Inpf(vec, vec) / factor;