Merged changes in the trunk up to revision 51718.
[blender.git] / source / blender / blenkernel / intern / anim_sys.c
index 66ed31c5b7252e7656f67245f95f934222763b2e..d3b7b3852fc5b743433c40622be28b094cbd9b52 100644 (file)
@@ -86,6 +86,7 @@ short id_type_can_have_animdata(ID *id)
                case ID_PA:
                case ID_MA: case ID_TE: case ID_NT:
                case ID_LA: case ID_CA: case ID_WO:
+               case ID_LS:
                case ID_SPK:
                case ID_SCE:
                case ID_MC:
@@ -761,7 +762,7 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u
                AnimData *adt = BKE_animdata_from_id(id); \
                if (adt) func(id, adt, user_data); \
        } (void)0
-       
+
        /* "embedded" nodetree cases (i.e. scene/material/texture->nodetree) */
 #define ANIMDATA_NODETREE_IDS_CB(first, NtId_Type) \
        for (id = first; id; id = id->next) { \
@@ -773,13 +774,13 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u
                } \
                if (adt) func(id, adt, user_data); \
        } (void)0
-       
+
        /* nodes */
        ANIMDATA_IDS_CB(mainptr->nodetree.first);
-       
+               
        /* textures */
        ANIMDATA_NODETREE_IDS_CB(mainptr->tex.first, Tex);
-       
+               
        /* lamps */
        ANIMDATA_IDS_CB(mainptr->lamp.first);
        
@@ -827,7 +828,10 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u
 
        /* scenes */
        ANIMDATA_NODETREE_IDS_CB(mainptr->scene.first, Scene);
-}
+       
+       /* line styles */
+       ANIMDATA_IDS_CB(mainptr->linestyle.first);
+       }
 
 /* Fix all RNA-Paths throughout the database (directly access the Global.main version)
  * NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]>
@@ -912,10 +916,13 @@ void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const cha
        /* worlds */
        RENAMEFIX_ANIM_IDS(mainptr->world.first);
        
+       /* linestyles */
+       RENAMEFIX_ANIM_IDS(mainptr->linestyle.first);
+       
        /* scenes */
        RENAMEFIX_ANIM_NODETREE_IDS(mainptr->scene.first, Scene);
-}
-
+               }
+               
 /* *********************************** */ 
 /* KeyingSet API */
 
@@ -2398,6 +2405,9 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime)
        /* movie clips */
        EVAL_ANIM_IDS(main->movieclip.first, ADT_RECALC_ANIM);
 
+       /* linestyles */
+       EVAL_ANIM_IDS(main->linestyle.first, ADT_RECALC_ANIM);
+       
        /* objects */
        /* ADT_RECALC_ANIM doesn't need to be supplied here, since object AnimData gets
         * this tagged by Depsgraph on framechange. This optimization means that objects