forked from bartvdbraak/blender
Remove MTEX_BUMP_FLIPPED flag which was added temporary when white/black colors
for bump maps were toggled.
This commit is contained in:
parent
343c2bb5aa
commit
af5adbad3f
@ -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;
|
||||
|
@ -12427,34 +12427,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){
|
||||
|
@ -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