~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/render/intern/source/renderdatabase.c

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: renderdatabase.c,v 1.21 2006/12/27 10:20:29 blendix Exp $
 
2
 * $Id: renderdatabase.c,v 1.24 2007/05/03 21:37:52 blendix Exp $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
429
429
                layer= &data->layers[i];
430
430
 
431
431
                if (layer->type == CD_MTFACE) {
432
 
                        n= vlakren_remap_layer_num(mtfn++, layer->active);
 
432
                        n= vlakren_remap_layer_num(mtfn++, layer->active_rnd);
433
433
                        strcpy(cdn->mtface[n], layer->name);
434
434
                }
435
435
                else if (layer->type == CD_MCOL) {
436
 
                        n= vlakren_remap_layer_num(mcn++, layer->active);
 
436
                        n= vlakren_remap_layer_num(mcn++, layer->active_rnd);
437
437
                        strcpy(cdn->mcol[n], layer->name);
438
438
                }
439
439
        }
660
660
                har->hasize= vectsize*zn + (1.0-vectsize)*hasize;
661
661
                
662
662
                VecSubf(har->no, vec, vec1);
663
 
                Normalise(har->no);
 
663
                Normalize(har->no);
664
664
        }
665
665
 
666
666
        if(ma->mode & MA_HALO_XALPHA) har->type |= HA_XALPHA;
894
894
                if((a1 & 255)==0) vlr= re->vlaknodes[a1>>8].vlak;
895
895
                else vlr++;
896
896
                
 
897
                vlr->noflag= 0;
 
898
 
897
899
                /* abuse of this flag... this is code that just sets face normal in direction of camera */
898
900
                /* that convention we should get rid of */
899
901
                if((vlr->flag & R_NOPUNOFLIP)==0) {
910
912
                                vlr->n[0]= -vlr->n[0];
911
913
                                vlr->n[1]= -vlr->n[1];
912
914
                                vlr->n[2]= -vlr->n[2];
 
915
                                vlr->noflag |= R_FLIPPED_NO;
913
916
                        }
914
917
                }
915
918
                
924
927
                xn= fabs(vlr->n[0]);
925
928
                yn= fabs(vlr->n[1]);
926
929
                zn= fabs(vlr->n[2]);
927
 
                if(zn>=xn && zn>=yn) vlr->snproj= 0;
928
 
                else if(yn>=xn && yn>=zn) vlr->snproj= 1;
929
 
                else vlr->snproj= 2;
 
930
                if(zn>=xn && zn>=yn) vlr->noflag |= R_SNPROJ_X;
 
931
                else if(yn>=xn && yn>=zn) vlr->noflag |= R_SNPROJ_Y;
 
932
                else vlr->noflag |= R_SNPROJ_Z;
930
933
 
931
934
        }
932
935
}