[Bf-blender-cvs] [8ec606a] soc-2016-multiview: Multiview reconstruction: Hack/workaround for the view split

Sergey Sharybin noreply at git.blender.org
Thu Aug 4 10:38:15 CEST 2016


Commit: 8ec606af045ca6d3cabb93f137a3b33c82409db2
Author: Sergey Sharybin
Date:   Thu Aug 4 10:36:41 2016 +0200
Branches: soc-2016-multiview
https://developer.blender.org/rB8ec606af045ca6d3cabb93f137a3b33c82409db2

Multiview reconstruction: Hack/workaround for the view split

Please follow the comment to see what's going on here.

Ideally i think we need to modify region_rect_recursive() so it does
proper business. Seems that will be safe since i couldn't find any
other usages of VSPLIT and HSPLIT, but want to have interface team
involved here since i might be missing something here.

===================================================================

M	source/blender/editors/space_clip/clip_editor.c

===================================================================

diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 54bd4f3..580b6f6 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -683,6 +683,23 @@ static void region_splitview_init(ScrArea *sa, ARegion *ar, SpaceClip *sc)
 {
 	RegionSpaceClip *rsc = ar->regiondata;
 
+	/* XXX: Hack to make proper alignment decisions made in
+	 *      region_rect_recursive().
+	 *
+	 * This is quite bad and should ideally be addressed by the layout
+	 * management which currently check whether it is enough space to fit both
+	 * regions based on their current size.
+	 *
+	 * What we want instead happening in the layout engine is that the regions
+	 * will pr properly scaled so they all fit and use the whole available
+	 * space. Just similar to what's happening with quad split.
+	 *
+	 * However, it is a can of worms on it's own, so for now we just scale the
+	 * regions in a way that they pass fitting tests in region_rect_recursive().
+	 *
+	 * TODO(sergey): Need to check this with the interface department!
+	 */
+	ar->sizey /= 2;
 }
 
 void ED_clip_update_correspondence_mode(bContext *C, SpaceClip *sc)




More information about the Bf-blender-cvs mailing list