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:
authorTianwei Shen <shentianweipku@gmail.com>2016-08-04 10:36:58 +0300
committerTianwei Shen <shentianweipku@gmail.com>2016-08-04 10:36:58 +0300
commitd865f2dbf666f7b9aba60a41ef2ad6887e3a0b67 (patch)
tree2c8c96d335b22be8568dacb86094b1df691ad70a /source/blender/editors/space_clip
parenta9bdb1690546aecb54d0161ae01019b8d07e52fd (diff)
WIP: drawing secondary clip
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r--source/blender/editors/space_clip/clip_editor.c57
1 files changed, 10 insertions, 47 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index e6011873685..54bd4f35ecb 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -678,6 +678,13 @@ void ED_space_clip_set_secondary_clip(bContext *C, bScreen *screen, SpaceClip *s
}
/* ******** split view when changing to correspondence mode ******** */
+
+static void region_splitview_init(ScrArea *sa, ARegion *ar, SpaceClip *sc)
+{
+ RegionSpaceClip *rsc = ar->regiondata;
+
+}
+
void ED_clip_update_correspondence_mode(bContext *C, SpaceClip *sc)
{
/* search forward and backward to find the drawing region */
@@ -714,36 +721,6 @@ void ED_clip_update_correspondence_mode(bContext *C, SpaceClip *sc)
/* keep current region */
ar->alignment = 0;
- 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) {
@@ -768,24 +745,10 @@ void ED_clip_update_correspondence_mode(bContext *C, SpaceClip *sc)
ARegion *newar = BKE_area_region_copy(sa->type, ar);
BLI_addtail(&sa->regionbase, newar);
- /* lock views and set them */
+ /* update split view */
if (sa->spacetype == SPACE_CLIP) {
- SpaceClip *sc = sa->spacedata.first;
- int index_qsplit = 0;
-
- /* run ED_view3d_lock() so the correct 'rv3d->viewquat' is set,
- * otherwise when restoring rv3d->localvd the 'viewquat' won't
- * match the 'view', set on entering localview See: [#26315],
- *
- * We could avoid manipulating rv3d->localvd here if exiting
- * localview with a 4-split would assign these view locks */
- RegionSpaceClip *rsc = ar->regiondata;
- //const char viewlock = (rv3d->viewlock_quad & RV3D_VIEWLOCK_INIT) ?
- // (rv3d->viewlock_quad & ~RV3D_VIEWLOCK_INIT) : RV3D_LOCKED;
-
- //region_quadview_init_rv3d(sa, ar, viewlock, ED_view3d_lock_view_from_index(index_qsplit++), RV3D_ORTHO);
- //region_quadview_init_rv3d(sa, (ar = ar->next), viewlock, ED_view3d_lock_view_from_index(index_qsplit++), RV3D_ORTHO);
- //region_quadview_init_rv3d(sa, (ar = ar->next), viewlock, ED_view3d_lock_view_from_index(index_qsplit++), RV3D_ORTHO);
+ region_splitview_init(sa, ar, sc);
+ region_splitview_init(sa, (ar = ar->next), sc);
}
ED_area_tag_redraw(sa);
WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);