diff options
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 41 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 29 |
2 files changed, 3 insertions, 67 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ff29ebd9e95..85b7c1e5623 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2877,31 +2877,6 @@ static void direct_link_camera(BlendDataReader *reader, Camera *ca) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Read ID: Light - * \{ */ - -static void lib_link_light(BlendLibReader *reader, Light *la) -{ - BLO_read_id_address(reader, la->id.lib, &la->ipo); // XXX deprecated - old animation system -} - -static void direct_link_light(BlendDataReader *reader, Light *la) -{ - BLO_read_data_address(reader, &la->adt); - BKE_animdata_blend_read_data(reader, la->adt); - - BLO_read_data_address(reader, &la->curfalloff); - if (la->curfalloff) { - BKE_curvemapping_blend_read(reader, la->curfalloff); - } - - BLO_read_data_address(reader, &la->preview); - BKE_previewimg_blend_read(reader, la->preview); -} - -/** \} */ - -/* -------------------------------------------------------------------- */ /** \name Read ID: Shape Keys * \{ */ @@ -7110,9 +7085,6 @@ static bool direct_link_id(FileData *fd, Main *main, const int tag, ID *id, ID * case ID_TE: direct_link_texture(&reader, (Tex *)id); break; - case ID_LA: - direct_link_light(&reader, (Light *)id); - break; case ID_IP: direct_link_ipo(&reader, (Ipo *)id); break; @@ -7182,6 +7154,7 @@ static bool direct_link_id(FileData *fd, Main *main, const int tag, ID *id, ID * case ID_PC: case ID_BR: case ID_IM: + case ID_LA: /* Do nothing. Handled by IDTypeInfo callback. */ break; } @@ -7829,9 +7802,6 @@ static void lib_link_all(FileData *fd, Main *bmain) case ID_CA: lib_link_camera(&reader, (Camera *)id); break; - case ID_LA: - lib_link_light(&reader, (Light *)id); - break; case ID_MB: lib_link_mball(&reader, (MetaBall *)id); break; @@ -7887,6 +7857,7 @@ static void lib_link_all(FileData *fd, Main *bmain) case ID_PC: case ID_BR: case ID_IM: + case ID_LA: /* Do nothing. Handled by IDTypeInfo callback. */ break; } @@ -8594,11 +8565,6 @@ static void expand_material(BlendExpander *expander, Material *ma) } } -static void expand_light(BlendExpander *expander, Light *la) -{ - BLO_expand(expander, la->ipo); // XXX deprecated - old animation system -} - static void expand_world(BlendExpander *expander, World *wrld) { BLO_expand(expander, wrld->ipo); // XXX deprecated - old animation system @@ -9049,9 +9015,6 @@ void BLO_expand_main(void *fdhandle, Main *mainvar) case ID_WO: expand_world(&expander, (World *)id); break; - case ID_LA: - expand_light(&expander, (Light *)id); - break; case ID_KE: expand_key(&expander, (Key *)id); break; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 6cab51dd03d..24ca503b895 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1585,31 +1585,6 @@ static void write_world(BlendWriter *writer, World *wrld, const void *id_address } } -static void write_light(BlendWriter *writer, Light *la, const void *id_address) -{ - if (la->id.us > 0 || BLO_write_is_undo(writer)) { - /* write LibData */ - BLO_write_id_struct(writer, Light, id_address, &la->id); - BKE_id_blend_write(writer, &la->id); - - if (la->adt) { - BKE_animdata_blend_write(writer, la->adt); - } - - if (la->curfalloff) { - BKE_curvemapping_blend_write(writer, la->curfalloff); - } - - /* Node-tree is integral part of lights, no libdata. */ - if (la->nodetree) { - BLO_write_struct(writer, bNodeTree, la->nodetree); - ntreeBlendWrite(writer, la->nodetree); - } - - BKE_previewimg_blend_write(writer, la->preview); - } -} - static void write_collection_nolib(BlendWriter *writer, Collection *collection) { /* Shared function for collection data-blocks and scene master collection. */ @@ -2892,9 +2867,6 @@ static bool write_file_handle(Main *mainvar, case ID_CA: write_camera(&writer, (Camera *)id_buffer, id); break; - case ID_LA: - write_light(&writer, (Light *)id_buffer, id); - break; case ID_KE: write_key(&writer, (Key *)id_buffer, id); break; @@ -2958,6 +2930,7 @@ static bool write_file_handle(Main *mainvar, case ID_PAL: case ID_BR: case ID_IM: + case ID_LA: /* Do nothing, handled in IDTypeInfo callback. */ break; case ID_LI: |