Bugreport #3891
authorTon Roosendaal <ton@blender.org>
Sat, 3 Jun 2006 10:08:16 +0000 (10:08 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 3 Jun 2006 10:08:16 +0000 (10:08 +0000)
Object Layer Ipos didn't work when the Ipo was moved an Object Action.
Can't get this to work though... this option has been added with a lot
of exception handling already, and for action/nla it's very nasty to
blend/mix/add layer bit values. So; better not support that.

As feedback for users, I've added a notice popup when you try to move
layer-ipos to an action.

source/blender/blenkernel/intern/action.c
source/blender/src/header_ipo.c

index 84656414ea953a333f22a154fc87d20e12781d95..084624724067534e4336e9b54c5a7f3d210bd5a7 100644 (file)
@@ -593,11 +593,13 @@ static void extract_ipochannels_from_action(ListBase *lb, ID *id, bAction *act,
                calc_ipo(achan->ipo, ctime);
                
                for(icu= achan->ipo->curve.first; icu; icu= icu->next) {
-                       
-                       nic= MEM_callocN(sizeof(NlaIpoChannel), "NlaIpoChannel");
-                       BLI_addtail(lb, nic);
-                       nic->val= icu->curval;
-                       nic->poin= get_ipo_poin(id, icu, &nic->type);
+                       /* skip IPO_BITS, is for layers and cannot be blended */
+                       if(icu->vartype != IPO_BITS) {
+                               nic= MEM_callocN(sizeof(NlaIpoChannel), "NlaIpoChannel");
+                               BLI_addtail(lb, nic);
+                               nic->val= icu->curval;
+                               nic->poin= get_ipo_poin(id, icu, &nic->type);
+                       }
                }
        }
        
index 48b98e9a65d0a102c3f9c0ba306bb6b3ed2023b0..c085ef9f3d99e98299c707fb2731a9fd4aff9f38 100644 (file)
@@ -941,6 +941,9 @@ void do_ipo_buttons(short event)
                        if(ob->ipoflag & OB_ACTION_OB) {        /* check if channel exists, and flip ipo link */
                                bActionChannel *achan;
                                
+                               if(has_ipo_code(ob->ipo, OB_LAY))
+                                       notice("Note: Layer Ipo doesn't work in Actions");
+                               
                                if(ob->action==NULL) 
                                        ob->action= add_empty_action(ID_OB);
                                achan= verify_action_channel(ob->action, "Object");