[Bf-blender-cvs] [2a9248a] soc-2016-multiview: add secondary_clip I/O to writefile and readfile
Tianwei Shen
noreply at git.blender.org
Thu Aug 11 04:39:22 CEST 2016
Commit: 2a9248aec8850202eca8f235b12c930d283ac9be
Author: Tianwei Shen
Date: Thu Aug 11 01:06:38 2016 +0800
Branches: soc-2016-multiview
https://developer.blender.org/rB2a9248aec8850202eca8f235b12c930d283ac9be
add secondary_clip I/O to writefile and readfile
The ->secondary_clip save/load code basically follows the save pattern
of ->clip. It works but may be incomplete, need to be checked.
===================================================================
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/versioning_270.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index f1fc5d4..d8824f1 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6434,6 +6434,7 @@ static void lib_link_screen(FileData *fd, Main *main)
SpaceClip *sclip = (SpaceClip *)sl;
sclip->clip = newlibadr_real_us(fd, sc->id.lib, sclip->clip);
+ sclip->secondary_clip = newlibadr_real_us(fd, sc->id.lib, sclip->secondary_clip);
sclip->mask_info.mask = newlibadr_real_us(fd, sc->id.lib, sclip->mask_info.mask);
}
else if (sl->spacetype == SPACE_LOGIC) {
@@ -6814,6 +6815,7 @@ void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *cursc
SpaceClip *sclip = (SpaceClip *)sl;
sclip->clip = restore_pointer_by_name(id_map, (ID *)sclip->clip, USER_REAL);
+ sclip->secondary_clip = restore_pointer_by_name(id_map, (ID *)sclip->secondary_clip, USER_REAL);
sclip->mask_info.mask = restore_pointer_by_name(id_map, (ID *)sclip->mask_info.mask, USER_REAL);
sclip->scopes.ok = 0;
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index af95649..c0aa84f 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -215,7 +215,9 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
if (space_link->spacetype == SPACE_CLIP) {
SpaceClip *space_clip = (SpaceClip *) space_link;
if (space_clip->mode != SC_MODE_MASKEDIT) {
- space_clip->mode = SC_MODE_TRACKING;
+ if (space_clip->mode != SC_MODE_TRACKING) {
+ space_clip->mode = SC_MODE_CORRESPONDENCE;
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list