Bugfix #3426
authorTon Roosendaal <ton@blender.org>
Mon, 21 Nov 2005 11:30:53 +0000 (11:30 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 21 Nov 2005 11:30:53 +0000 (11:30 +0000)
Object duplicators didn't draw when not selected. Was one 'else' to many in
the code!

Also noticed that duplicators couldn't be transformed when they have Ipos,
was an improper call to do_ipo in duplicator code... also made sure the
transformation info in the object is stored/restored before duplicating.

source/blender/blenkernel/intern/anim.c
source/blender/src/drawview.c

index dcd49f9f0b2c04a1ecca2e89093d837497f70a4c..b8178dd98cd07b45945106ed6d81e2025a7887b9 100644 (file)
@@ -296,13 +296,14 @@ static Object *new_dupli_object(ListBase *lb, Object *ob, Object *par)
 void frames_duplilist(Object *ob)
 {
        extern int enable_cu_speed;     /* object.c */
-       Object *newob;
+       Object *newob, copyob;
        int cfrao, ok;
        
        cfrao= G.scene->r.cfra;
        if(ob->parent==NULL && ob->track==NULL && ob->ipo==NULL && ob->constraints.first==NULL) return;
 
        if(ob->transflag & OB_DUPLINOSPEED) enable_cu_speed= 0;
+       copyob= *ob;    /* store transform info */
 
        for(G.scene->r.cfra= ob->dupsta; G.scene->r.cfra<=ob->dupend; G.scene->r.cfra++) {
 
@@ -321,9 +322,9 @@ void frames_duplilist(Object *ob)
                }
        }
 
+       *ob= copyob;    /* restore transform info */
        G.scene->r.cfra= cfrao;
        enable_cu_speed= 1;
-       do_ob_ipo(ob);
 }
 
 struct vertexDupliData {
index 6faf298c35b759245e33b94171b13dab1dcc4423..ee8f943f31c5e53f004c5ca08b6ef0a8c719fde5 100644 (file)
@@ -2262,7 +2262,7 @@ void drawview3dspace(ScrArea *sa, void *spacedata)
                                
                                G.f &= ~G_PICKSEL;                              
                        }
-                       else if((base->flag & SELECT)==0) {
+                       if((base->flag & SELECT)==0) {
                                if(base->object!=G.obedit) draw_object(base);
                        }
                }