Merged changes in the trunk up to revision 54171.
[blender-staging.git] / source / blender / blenkernel / intern / anim_sys.c
index df2cc7cc461a056d06e418674ce9515d422daadf..c8fd8aa93e53fcbb57e9b170128b99d9de357bdc 100644 (file)
@@ -86,6 +86,9 @@ 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:
+#ifdef WITH_FREESTYLE
+               case ID_LS:
+#endif
                case ID_SPK:
                case ID_SCE:
                case ID_MC:
@@ -827,7 +830,12 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u
 
        /* scenes */
        ANIMDATA_NODETREE_IDS_CB(mainptr->scene.first, Scene);
-}
+
+#ifdef WITH_FREESTYLE
+       /* line styles */
+       ANIMDATA_IDS_CB(mainptr->linestyle.first);
+#endif
+       }
 
 /* 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,6 +920,11 @@ void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const cha
        /* worlds */
        RENAMEFIX_ANIM_NODETREE_IDS(mainptr->world.first, World);
        
+#ifdef WITH_FREESTYLE
+       /* linestyles */
+       RENAMEFIX_ANIM_IDS(mainptr->linestyle.first);
+#endif
+       
        /* scenes */
        RENAMEFIX_ANIM_NODETREE_IDS(mainptr->scene.first, Scene);
 }
@@ -2397,6 +2410,11 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime)
        /* movie clips */
        EVAL_ANIM_IDS(main->movieclip.first, ADT_RECALC_ANIM);
 
+#ifdef WITH_FREESTYLE
+       /* linestyles */
+       EVAL_ANIM_IDS(main->linestyle.first, ADT_RECALC_ANIM);
+#endif
+       
        /* 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