Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-09-10 17:57:47 +0300
committerJacques Lucke <jacques@blender.org>2020-09-10 17:58:23 +0300
commit0649e6371629507c201310f7ece628a926d846d5 (patch)
treeae47a711bce7084f753031c5fb494b476106e826 /source/blender/blenloader/intern/writefile.c
parentae200cb2e4d399f7561c4bee86eae70599d0396f (diff)
Refactor: move Camera .blend I/O to IDTypeInfo callbacks
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index dd307da40fd..7861af88785 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1414,23 +1414,6 @@ static void write_key(BlendWriter *writer, Key *key, const void *id_address)
}
}
-static void write_camera(BlendWriter *writer, Camera *cam, const void *id_address)
-{
- if (cam->id.us > 0 || BLO_write_is_undo(writer)) {
- /* write LibData */
- BLO_write_id_struct(writer, Camera, id_address, &cam->id);
- BKE_id_blend_write(writer, &cam->id);
-
- if (cam->adt) {
- BKE_animdata_blend_write(writer, cam->adt);
- }
-
- LISTBASE_FOREACH (CameraBGImage *, bgpic, &cam->bg_images) {
- BLO_write_struct(writer, CameraBGImage, bgpic);
- }
- }
-}
-
static void write_texture(BlendWriter *writer, Tex *tex, const void *id_address)
{
if (tex->id.us > 0 || BLO_write_is_undo(writer)) {
@@ -2754,9 +2737,6 @@ static bool write_file_handle(Main *mainvar,
case ID_SCE:
write_scene(&writer, (Scene *)id_buffer, id);
break;
- case ID_CA:
- write_camera(&writer, (Camera *)id_buffer, id);
- break;
case ID_KE:
write_key(&writer, (Key *)id_buffer, id);
break;
@@ -2821,6 +2801,7 @@ static bool write_file_handle(Main *mainvar,
case ID_MA:
case ID_MB:
case ID_CU:
+ case ID_CA:
/* Do nothing, handled in IDTypeInfo callback. */
break;
case ID_LI: