Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/displist.c')
-rw-r--r--source/blender/blenkernel/intern/displist.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 219ef69d6d2..c27245fc11e 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -840,8 +840,10 @@ void mesh_create_shadedColors(Object *ob, int onlyForMesh, unsigned int **col1_r
}
-void shadeDispList(Object *ob)
+/* has base pointer, to check for layer */
+void shadeDispList(Base *base)
{
+ Object *ob= base->object;
DispList *dl, *dlob;
Material *ma = NULL;
Curve *cu;
@@ -850,8 +852,6 @@ void shadeDispList(Object *ob)
unsigned int *col1;
int a;
- if(ob->flag & OB_FROMDUPLI) return;
-
dl = find_displist(&ob->disp, DL_VERTCOL);
if (dl) {
BLI_remlink(&ob->disp, dl);
@@ -986,16 +986,13 @@ void reshadeall_displist(void)
freefastshade();
- base= G.scene->base.first;
- while(base) {
+ for(base= G.scene->base.first; base; base= base->next) {
+ ob= base->object;
+ freedisplist(&ob->disp);
if(base->lay & G.scene->lay) {
- ob= base->object;
-
/* Metaballs have standard displist at the Object */
- if(ob->type==OB_MBALL) shadeDispList(ob);
- else freedisplist(&ob->disp);
+ if(ob->type==OB_MBALL) shadeDispList(base);
}
- base= base->next;
}
}
@@ -1388,7 +1385,7 @@ static float calc_taper(Object *taperobj, int cur, int tot)
void makeDispListMBall(Object *ob)
{
- if(!ob || (ob->flag&OB_FROMDUPLI) || ob->type!=OB_MBALL) return;
+ if(!ob || ob->type!=OB_MBALL) return;
freedisplist(&(ob->disp));