forked from bartvdbraak/blender
svn merge ^/trunk/blender -r42292:42303
This commit is contained in:
commit
25098c741b
@ -94,11 +94,11 @@ __device_inline void bvh_node_intersect(KernelGlobals *kg,
|
||||
float c0hiy = n0xy.w * idir.y - ood.y;
|
||||
float c0loz = nz.x * idir.z - ood.z;
|
||||
float c0hiz = nz.y * idir.z - ood.z;
|
||||
float c1loz = nz.z * idir.z - ood.z;
|
||||
float c1hiz = nz.w * idir.z - ood.z;
|
||||
|
||||
float c0min = max4(min(c0lox, c0hix), min(c0loy, c0hiy), min(c0loz, c0hiz), 0.0f);
|
||||
float c0max = min4(max(c0lox, c0hix), max(c0loy, c0hiy), max(c0loz, c0hiz), t);
|
||||
|
||||
float c1loz = nz.z * idir.z - ood.z;
|
||||
float c1hiz = nz.w * idir.z - ood.z;
|
||||
float c1lox = n1xy.x * idir.x - ood.x;
|
||||
float c1hix = n1xy.y * idir.x - ood.x;
|
||||
float c1loy = n1xy.z * idir.y - ood.y;
|
||||
|
@ -709,11 +709,7 @@ void default_mtex(MTex *mtex)
|
||||
mtex->size[1]= 1.0;
|
||||
mtex->size[2]= 1.0;
|
||||
mtex->tex= NULL;
|
||||
|
||||
/* MTEX_BUMP_FLIPPED is temporary before 2.61 release to prevent flipping normals
|
||||
when creating file in 2.60, opening it in 2.59, saving and opening in 2.60 again */
|
||||
mtex->texflag= MTEX_3TAP_BUMP | MTEX_BUMP_OBJECTSPACE | MTEX_BUMP_FLIPPED;
|
||||
|
||||
mtex->texflag= MTEX_3TAP_BUMP | MTEX_BUMP_OBJECTSPACE;
|
||||
mtex->colormodel= 0;
|
||||
mtex->r= 1.0;
|
||||
mtex->g= 0.0;
|
||||
|
@ -12509,34 +12509,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
sce->gm.recastData.detailsamplemaxerror = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
/* flip normals */
|
||||
Material *ma= main->mat.first;
|
||||
while(ma) {
|
||||
int a;
|
||||
for(a= 0; a<MAX_MTEX; a++) {
|
||||
MTex *mtex= ma->mtex[a];
|
||||
|
||||
if(mtex) {
|
||||
if((mtex->texflag&MTEX_BUMP_FLIPPED)==0) {
|
||||
if((mtex->mapto&MAP_DISPLACE)==0) {
|
||||
if((mtex->mapto&MAP_NORM) && mtex->texflag&(MTEX_COMPAT_BUMP|MTEX_3TAP_BUMP|MTEX_5TAP_BUMP)) {
|
||||
Tex *tex= newlibadr(fd, lib, mtex->tex);
|
||||
|
||||
if(!tex || (tex->imaflag&TEX_NORMALMAP)==0) {
|
||||
mtex->norfac= -mtex->norfac;
|
||||
mtex->texflag|= MTEX_BUMP_FLIPPED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ma= ma->id.next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (main->versionfile < 260){
|
||||
|
@ -1083,6 +1083,8 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
|
||||
|
||||
ob= base->object;
|
||||
|
||||
multires_force_update(ob);
|
||||
|
||||
/* copy data stored in job descriptor */
|
||||
bkr.bake_filter= scene->r.bake_filter;
|
||||
bkr.mode= scene->r.bake_mode;
|
||||
@ -1120,6 +1122,8 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
|
||||
MultiresBakerJobData *data;
|
||||
ob= base->object;
|
||||
|
||||
multires_force_update(ob);
|
||||
|
||||
data= MEM_callocN(sizeof(MultiresBakerJobData), "multiresBaker derivedMesh_data");
|
||||
data->lores_dm = multiresbake_create_loresdm(scene, ob, &data->lvl);
|
||||
data->hires_dm = multiresbake_create_hiresdm(scene, ob, &data->tot_lvl, &data->simple);
|
||||
|
@ -1689,6 +1689,9 @@ void draw_text_main(SpaceText *st, ARegion *ar)
|
||||
int i, x, y, winx, linecount= 0, lineno= 0;
|
||||
int wraplinecount= 0, wrap_skip= 0;
|
||||
|
||||
if(st->lheight) st->viewlines= (int)ar->winy/st->lheight;
|
||||
else st->viewlines= 0;
|
||||
|
||||
/* if no text, nothing to do */
|
||||
if(!text)
|
||||
return;
|
||||
@ -1699,9 +1702,6 @@ void draw_text_main(SpaceText *st, ARegion *ar)
|
||||
if(!text->curl || !text->sell || !text->lines.first || !text->lines.last)
|
||||
txt_clean_text(text);
|
||||
|
||||
if(st->lheight) st->viewlines= (int)ar->winy/st->lheight;
|
||||
else st->viewlines= 0;
|
||||
|
||||
/* update rects for scroll */
|
||||
calc_text_rcts(st, ar, &scroll, &back); /* scroll will hold the entire bar size */
|
||||
|
||||
|
@ -492,7 +492,7 @@ typedef struct ColorMapping {
|
||||
#define MTEX_5TAP_BUMP 512
|
||||
#define MTEX_BUMP_OBJECTSPACE 1024
|
||||
#define MTEX_BUMP_TEXTURESPACE 2048
|
||||
#define MTEX_BUMP_FLIPPED 4096 /* temp flag for 2.59/2.60 */
|
||||
/* #define MTEX_BUMP_FLIPPED 4096 */ /* UNUSED */
|
||||
|
||||
/* blendtype */
|
||||
#define MTEX_BLEND 0
|
||||
|
Loading…
Reference in New Issue
Block a user