[Bf-blender-cvs] [a7697ab] soc-2016-multiview: Correctly convert old clip editor data to new one
Julian Eisel
noreply at git.blender.org
Sat Aug 13 01:22:16 CEST 2016
Commit: a7697ab0ed7ea2acd05ac240b6d4415132069691
Author: Julian Eisel
Date: Sat Aug 13 00:12:42 2016 +0200
Branches: soc-2016-multiview
https://developer.blender.org/rBa7697ab0ed7ea2acd05ac240b6d4415132069691
Correctly convert old clip editor data to new one
Instead of just using defaults.
===================================================================
M source/blender/blenloader/intern/versioning_270.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 225dbef..3be8620 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1327,12 +1327,17 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
for (bScreen *screen = main->screen.first; screen != NULL; screen = screen->id.next) {
for (ScrArea *sa = screen->areabase.first; sa != NULL; sa = sa->next) {
for (SpaceLink *sl = sa->spacedata.first; sl != NULL; sl = sl->next) {
- ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
if (sl->spacetype == SPACE_CLIP) {
+ ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
for (ARegion *ar = regionbase->first; ar != NULL; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_WINDOW) {
+ SpaceClip *sc = (SpaceClip *)sl;
RegionSpaceClip *rsc = MEM_callocN(sizeof(RegionSpaceClip), "region data for clip");
- rsc->zoom = 1.0f;
+ rsc->xof = sc->xof;
+ rsc->yof = sc->yof;
+ rsc->xlockof = sc->xlockof;
+ rsc->ylockof = sc->ylockof;
+ rsc->zoom = sc->zoom;
rsc->flag = RSC_MAIN_CLIP;
ar->regiondata = rsc;
}
More information about the Bf-blender-cvs
mailing list