diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 75 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 22 |
2 files changed, 4 insertions, 93 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 93023b5e1db..462849a5c29 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2688,52 +2688,9 @@ static void lib_link_constraint_channels(BlendLibReader *reader, ID *id, ListBas /** \} */ /* -------------------------------------------------------------------- */ -/** \name Read ID: Action +/** \name Read: Keyingsets * \{ */ -static void lib_link_action(BlendLibReader *reader, bAction *act) -{ - // XXX deprecated - old animation system <<< - LISTBASE_FOREACH (bActionChannel *, chan, &act->chanbase) { - BLO_read_id_address(reader, act->id.lib, &chan->ipo); - lib_link_constraint_channels(reader, &act->id, &chan->constraintChannels); - } - // >>> XXX deprecated - old animation system - - BKE_fcurve_blend_read_lib(reader, &act->id, &act->curves); - - LISTBASE_FOREACH (TimeMarker *, marker, &act->markers) { - if (marker->camera) { - BLO_read_id_address(reader, act->id.lib, &marker->camera); - } - } -} - -static void direct_link_action(BlendDataReader *reader, bAction *act) -{ - BLO_read_list(reader, &act->curves); - BLO_read_list(reader, &act->chanbase); // XXX deprecated - old animation system - BLO_read_list(reader, &act->groups); - BLO_read_list(reader, &act->markers); - - // XXX deprecated - old animation system <<< - LISTBASE_FOREACH (bActionChannel *, achan, &act->chanbase) { - BLO_read_data_address(reader, &achan->grp); - - BLO_read_list(reader, &achan->constraintChannels); - } - // >>> XXX deprecated - old animation system - - BKE_fcurve_blend_read_data(reader, &act->curves); - - LISTBASE_FOREACH (bActionGroup *, agrp, &act->groups) { - BLO_read_data_address(reader, &agrp->channels.first); - BLO_read_data_address(reader, &agrp->channels.last); - } -} - -/* ------- */ - static void lib_link_keyingsets(BlendLibReader *reader, ID *id, ListBase *list) { /* here, we're only interested in the ID pointer stored in some of the paths */ @@ -8066,9 +8023,6 @@ static bool direct_link_id(FileData *fd, Main *main, const int tag, ID *id, ID * case ID_AR: direct_link_armature(&reader, (bArmature *)id); break; - case ID_AC: - direct_link_action(&reader, (bAction *)id); - break; case ID_NT: direct_link_nodetree(&reader, (bNodeTree *)id); break; @@ -8116,6 +8070,7 @@ static bool direct_link_id(FileData *fd, Main *main, const int tag, ID *id, ID * break; case ID_ME: case ID_LT: + case ID_AC: /* Do nothing. Handled by IDTypeInfo callback. */ break; } @@ -8827,9 +8782,6 @@ static void lib_link_all(FileData *fd, Main *bmain) case ID_KE: lib_link_key(&reader, (Key *)id); break; - case ID_AC: - lib_link_action(&reader, (bAction *)id); - break; case ID_SIM: lib_link_simulation(&reader, (Simulation *)id); break; @@ -8842,6 +8794,7 @@ static void lib_link_all(FileData *fd, Main *bmain) break; case ID_ME: case ID_LT: + case ID_AC: /* Do nothing. Handled by IDTypeInfo callback. */ break; } @@ -9463,25 +9416,6 @@ static void expand_id(BlendExpander *expander, ID *id) expand_id_embedded_id(expander, id); } -static void expand_action(BlendExpander *expander, bAction *act) -{ - // XXX deprecated - old animation system -------------- - LISTBASE_FOREACH (bActionChannel *, chan, &act->chanbase) { - BLO_expand(expander, chan->ipo); - expand_constraint_channels(expander, &chan->constraintChannels); - } - // --------------------------------------------------- - - /* F-Curves in Action */ - BKE_fcurve_blend_read_expand(expander, &act->curves); - - LISTBASE_FOREACH (TimeMarker *, marker, &act->markers) { - if (marker->camera) { - BLO_expand(expander, marker->camera); - } - } -} - static void expand_keyingsets(BlendExpander *expander, ListBase *list) { /* expand the ID-pointers in KeyingSets's paths */ @@ -10159,9 +10093,6 @@ void BLO_expand_main(void *fdhandle, Main *mainvar) case ID_AR: expand_armature(&expander, (bArmature *)id); break; - case ID_AC: - expand_action(&expander, (bAction *)id); // XXX deprecated - old animation system - break; case ID_GR: expand_collection(&expander, (Collection *)id); break; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index fbd73e20648..429045222f0 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -660,24 +660,6 @@ static void writelist_id(WriteData *wd, int filecode, const char *structname, co * These functions are used by blender's .blend system for file saving/loading. * \{ */ -static void write_action(BlendWriter *writer, bAction *act, const void *id_address) -{ - if (act->id.us > 0 || BLO_write_is_undo(writer)) { - BLO_write_id_struct(writer, bAction, id_address, &act->id); - BKE_id_blend_write(writer, &act->id); - - BKE_fcurve_blend_write(writer, &act->curves); - - LISTBASE_FOREACH (bActionGroup *, grp, &act->groups) { - BLO_write_struct(writer, bActionGroup, grp); - } - - LISTBASE_FOREACH (TimeMarker *, marker, &act->markers) { - BLO_write_struct(writer, TimeMarker, marker); - } - } -} - static void write_keyingsets(BlendWriter *writer, ListBase *list) { LISTBASE_FOREACH (KeyingSet *, ks, list) { @@ -3691,9 +3673,6 @@ static bool write_file_handle(Main *mainvar, case ID_AR: write_armature(&writer, (bArmature *)id_buffer, id); break; - case ID_AC: - write_action(&writer, (bAction *)id_buffer, id); - break; case ID_OB: write_object(&writer, (Object *)id_buffer, id); break; @@ -3741,6 +3720,7 @@ static bool write_file_handle(Main *mainvar, break; case ID_ME: case ID_LT: + case ID_AC: /* Do nothing, handled in IDTypeInfo callback. */ break; case ID_LI: |