[Bf-blender-cvs] [7767070] soc-2016-multiview: recover view when changing from correspondence mode
Tianwei Shen
noreply at git.blender.org
Thu Aug 4 09:37:35 CEST 2016
Commit: 77670703bd824874a15851d983dbb11dc13e955a
Author: Tianwei Shen
Date: Wed Aug 3 11:17:11 2016 +0800
Branches: soc-2016-multiview
https://developer.blender.org/rB77670703bd824874a15851d983dbb11dc13e955a
recover view when changing from correspondence mode
===================================================================
M source/blender/blenloader/intern/writefile.c
M source/blender/editors/space_clip/clip_editor.c
===================================================================
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 44c0546..88be98b 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2907,15 +2907,16 @@ static void write_region(WriteData *wd, ARegion *ar, int spacetype)
}
else
- printf("regiondata write missing!\n");
+ printf("spaceview3d regiondata write missing!\n");
break;
case SPACE_CLIP:
if (ar->regiontype == RGN_TYPE_WINDOW) {
RegionSpaceClip *rsc = ar->regiondata;
writestruct(wd, DATA, RegionSpaceClip, 1, rsc);
}
+ break;
default:
- printf("regiondata write missing!\n");
+ printf("default regiondata write missing!\n");
}
}
}
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index f46c75e..5f9cfea 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -714,47 +714,47 @@ void ED_clip_update_correspondence_mode(bContext *C, SpaceClip *sc)
/* keep current region */
ar->alignment = 0;
- //if (sa->spacetype == SPACE_VIEW3D) {
- // ARegion *ar_iter;
- // RegionView3D *rv3d = ar->regiondata;
-
- // /* if this is a locked view, use settings from 'User' view */
- // if (rv3d->viewlock) {
- // View3D *v3d_user;
- // ARegion *ar_user;
-
- // if (ED_view3d_context_user_region(C, &v3d_user, &ar_user)) {
- // if (ar != ar_user) {
- // SWAP(void *, ar->regiondata, ar_user->regiondata);
- // rv3d = ar->regiondata;
- // }
- // }
- // }
-
- // rv3d->viewlock_quad = RV3D_VIEWLOCK_INIT;
- // rv3d->viewlock = 0;
- // rv3d->rflag &= ~RV3D_CLIPPING;
-
- // /* accumulate locks, incase they're mixed */
- // for (ar_iter = sa->regionbase.first; ar_iter; ar_iter = ar_iter->next) {
- // if (ar_iter->regiontype == RGN_TYPE_WINDOW) {
- // RegionView3D *rv3d_iter = ar_iter->regiondata;
- // rv3d->viewlock_quad |= rv3d_iter->viewlock;
- // }
- // }
- //}
-
- //for (ar = sa->regionbase.first; ar; ar = arn) {
- // arn = ar->next;
- // if (ar->alignment == RGN_ALIGN_QSPLIT) {
- // ED_region_exit(C, ar);
- // BKE_area_region_free(sa->type, ar);
- // BLI_remlink(&sa->regionbase, ar);
- // MEM_freeN(ar);
- // }
- //}
- //ED_area_tag_redraw(sa);
- //WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
+ if (sa->spacetype == SPACE_CLIP) {
+ ARegion *ar_iter;
+ RegionSpaceClip *rsc = ar->regiondata;
+
+ ///* if this is a locked view, use settings from 'User' view */
+ //if (rv3d->viewlock) {
+ // View3D *v3d_user;
+ // ARegion *ar_user;
+
+ // if (ED_view3d_context_user_region(C, &v3d_user, &ar_user)) {
+ // if (ar != ar_user) {
+ // SWAP(void *, ar->regiondata, ar_user->regiondata);
+ // rv3d = ar->regiondata;
+ // }
+ // }
+ //}
+
+ //rv3d->viewlock_quad = RV3D_VIEWLOCK_INIT;
+ //rv3d->viewlock = 0;
+ //rv3d->rflag &= ~RV3D_CLIPPING;
+
+ ///* accumulate locks, incase they're mixed */
+ //for (ar_iter = sa->regionbase.first; ar_iter; ar_iter = ar_iter->next) {
+ // if (ar_iter->regiontype == RGN_TYPE_WINDOW) {
+ // RegionView3D *rv3d_iter = ar_iter->regiondata;
+ // rv3d->viewlock_quad |= rv3d_iter->viewlock;
+ // }
+ //}
+ }
+
+ for (ar = sa->regionbase.first; ar; ar = arn) {
+ arn = ar->next;
+ if (ar->alignment == RGN_ALIGN_VSPLIT) {
+ ED_region_exit(C, ar);
+ BKE_area_region_free(sa->type, ar);
+ BLI_remlink(&sa->regionbase, ar);
+ MEM_freeN(ar);
+ }
+ }
+ ED_area_tag_redraw(sa);
+ WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
}
else if (ar->next) {
return; // Only last region can be splitted
More information about the Bf-blender-cvs
mailing list