Two fixes;
- Bug #1890. While render subsurf in editmode, orco coordinates were incorrect (subsurf vertices in editmode have different ordering) Bug was oldie. - IRC reported by Stefano; oops (not outliner) didnt show lamp textures nor material ipos correctly. Found error in oops curved lines too (the ones starting at right side)
This commit is contained in:
@@ -1329,8 +1329,9 @@ static void init_render_mesh(Object *ob)
|
|||||||
dl= me->disp.first;
|
dl= me->disp.first;
|
||||||
|
|
||||||
/* Force a displist rebuild if this is a subsurf and we have a different subdiv level */
|
/* Force a displist rebuild if this is a subsurf and we have a different subdiv level */
|
||||||
|
/* also when object is in editmode, displist ordering for editmode is different, giving orco probs */
|
||||||
if((dl==NULL) || ((me->subdiv != me->subdivr))) {
|
|
||||||
|
if((dl==NULL) || ((me->subdiv != me->subdivr)) || (ob==G.obedit)) {
|
||||||
/* prevent subsurf called again for duplicate use of mesh, tface pointers change */
|
/* prevent subsurf called again for duplicate use of mesh, tface pointers change */
|
||||||
if(dl==NULL || (me->subdivdone-1)!=me->subdivr) {
|
if(dl==NULL || (me->subdivdone-1)!=me->subdivr) {
|
||||||
DispList *dlVerts;
|
DispList *dlVerts;
|
||||||
@@ -2685,7 +2686,7 @@ void RE_freeRotateBlenderScene(void)
|
|||||||
a++;
|
a++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free orco. check all obejcts because of duplis and sets */
|
/* free orco. check all objects because of duplis and sets */
|
||||||
ob= G.main->object.first;
|
ob= G.main->object.first;
|
||||||
while(ob) {
|
while(ob) {
|
||||||
|
|
||||||
@@ -2702,7 +2703,7 @@ void RE_freeRotateBlenderScene(void)
|
|||||||
MEM_freeN(me->orco);
|
MEM_freeN(me->orco);
|
||||||
me->orco= 0;
|
me->orco= 0;
|
||||||
}
|
}
|
||||||
if (mesh_uses_displist(me) && ((me->subdiv!=me->subdivr) || (ob->effect.first != NULL) ) ) {
|
if (mesh_uses_displist(me) && ((me->subdiv!=me->subdivr) || (ob->effect.first != NULL) || ob==G.obedit) ) {
|
||||||
/* Need to recalc for effects since they are time dependant */
|
/* Need to recalc for effects since they are time dependant */
|
||||||
makeDispList(ob); /* XXX this should be replaced with proper caching */
|
makeDispList(ob); /* XXX this should be replaced with proper caching */
|
||||||
me->subdivdone= 0; /* needed to prevent multiple used meshes being recalculated */
|
me->subdivdone= 0; /* needed to prevent multiple used meshes being recalculated */
|
||||||
|
|||||||
@@ -157,16 +157,21 @@ void draw_oopslink(Oops *oops)
|
|||||||
give_oopslink_line(oops, ol, vec[0], vec[3]);
|
give_oopslink_line(oops, ol, vec[0], vec[3]);
|
||||||
|
|
||||||
dist= 0.5*VecLenf(vec[0], vec[3]);
|
dist= 0.5*VecLenf(vec[0], vec[3]);
|
||||||
|
|
||||||
/* check ol->xof and yof for direction */
|
/* check ol->xof and yof for direction */
|
||||||
if(ol->xof <= 0.0) {
|
if(ol->xof == 0.0) {
|
||||||
vec[1][0]= vec[0][0]-dist;
|
vec[1][0]= vec[0][0]-dist;
|
||||||
vec[1][1]= vec[0][1];
|
vec[1][1]= vec[0][1];
|
||||||
}
|
}
|
||||||
|
else if(ol->xof==OOPSX) {
|
||||||
|
vec[1][0]= vec[0][0]+dist;
|
||||||
|
vec[1][1]= vec[0][1];
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
vec[1][0]= vec[0][0];
|
vec[1][0]= vec[0][0];
|
||||||
vec[1][1]= vec[0][1]+dist;
|
vec[1][1]= vec[0][1]+dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* v3 is always pointing down */
|
/* v3 is always pointing down */
|
||||||
vec[2][0]= vec[3][0];
|
vec[2][0]= vec[3][0];
|
||||||
vec[2][1]= vec[3][1] - dist;
|
vec[2][1]= vec[3][1] - dist;
|
||||||
|
|||||||
@@ -750,6 +750,20 @@ void add_mball_oopslinks(MetaBall *mb, Oops *oops, short flag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void add_lamp_oopslinks(Lamp *la, Oops *oops, short flag)
|
||||||
|
{
|
||||||
|
int a;
|
||||||
|
|
||||||
|
if(flag & OOPS_TE) {
|
||||||
|
for(a=0; a<6; a++) {
|
||||||
|
if(la->mtex[a]) {
|
||||||
|
add_oopslink("tex", oops, ID_TE, &(la->mtex[a]->tex), 0.0, (float)(0.5*OOPSY));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Oops *add_test_oops(void *id) /* incl links */
|
Oops *add_test_oops(void *id) /* incl links */
|
||||||
{
|
{
|
||||||
Oops *oops;
|
Oops *oops;
|
||||||
@@ -793,8 +807,8 @@ Oops *add_test_oops(void *id) /* incl links */
|
|||||||
add_mball_oopslinks((MetaBall *)id, oops, G.soops->visiflag);
|
add_mball_oopslinks((MetaBall *)id, oops, G.soops->visiflag);
|
||||||
break;
|
break;
|
||||||
case ID_LA:
|
case ID_LA:
|
||||||
/* still do textures */
|
|
||||||
la= (Lamp *)id;
|
la= (Lamp *)id;
|
||||||
|
add_lamp_oopslinks(la, oops, G.soops->visiflag);
|
||||||
if(la->ipo) if(G.soops->visiflag & OOPS_IP) add_oopslink("ipo", oops, ID_IP, &la->ipo, OOPSX, (float)(0.3*OOPSY));
|
if(la->ipo) if(G.soops->visiflag & OOPS_IP) add_oopslink("ipo", oops, ID_IP, &la->ipo, OOPSX, (float)(0.3*OOPSY));
|
||||||
break;
|
break;
|
||||||
case ID_IP:
|
case ID_IP:
|
||||||
@@ -969,6 +983,7 @@ void build_oops()
|
|||||||
if(ob->mat[a]) {
|
if(ob->mat[a]) {
|
||||||
oops= add_test_oops(ob->mat[a]);
|
oops= add_test_oops(ob->mat[a]);
|
||||||
if(G.soops->visiflag & OOPS_TE) add_texture_oops(ob->mat[a]);
|
if(G.soops->visiflag & OOPS_TE) add_texture_oops(ob->mat[a]);
|
||||||
|
if(G.soops->visiflag & OOPS_IP) add_test_oops(ob->mat[a]->ipo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -987,6 +1002,7 @@ void build_oops()
|
|||||||
if(me->mat[a]) {
|
if(me->mat[a]) {
|
||||||
oops= add_test_oops(me->mat[a]);
|
oops= add_test_oops(me->mat[a]);
|
||||||
if(G.soops->visiflag & OOPS_TE) add_texture_oops(me->mat[a]);
|
if(G.soops->visiflag & OOPS_TE) add_texture_oops(me->mat[a]);
|
||||||
|
if(G.soops->visiflag & OOPS_IP) add_test_oops(me->mat[a]->ipo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1003,6 +1019,7 @@ void build_oops()
|
|||||||
if(cu->mat[a]) {
|
if(cu->mat[a]) {
|
||||||
oops= add_test_oops(cu->mat[a]);
|
oops= add_test_oops(cu->mat[a]);
|
||||||
if(G.soops->visiflag & OOPS_TE) add_texture_oops(cu->mat[a]);
|
if(G.soops->visiflag & OOPS_TE) add_texture_oops(cu->mat[a]);
|
||||||
|
if(G.soops->visiflag & OOPS_IP) add_test_oops(cu->mat[a]->ipo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1020,12 +1037,20 @@ void build_oops()
|
|||||||
if(mb->mat[a]) {
|
if(mb->mat[a]) {
|
||||||
oops= add_test_oops(mb->mat[a]);
|
oops= add_test_oops(mb->mat[a]);
|
||||||
if(G.soops->visiflag & OOPS_TE) add_texture_oops(mb->mat[a]);
|
if(G.soops->visiflag & OOPS_TE) add_texture_oops(mb->mat[a]);
|
||||||
|
if(G.soops->visiflag & OOPS_IP) add_test_oops(mb->mat[a]->ipo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(type==ID_LA && G.soops->visiflag & OOPS_LA) {
|
else if(type==ID_LA && G.soops->visiflag & OOPS_LA) {
|
||||||
|
Lamp *la= ob->data;
|
||||||
oops= add_test_oops(ob->data);
|
oops= add_test_oops(ob->data);
|
||||||
|
if(G.soops->visiflag & OOPS_IP) add_test_oops(la->ipo);
|
||||||
|
if(G.soops->visiflag & OOPS_TE) {
|
||||||
|
for(a=0; a<6; a++) {
|
||||||
|
if(la->mtex[a]) add_test_oops(la->mtex[a]->tex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user