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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-08-04 11:36:41 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-08-04 11:36:41 +0300
commit8ec606af045ca6d3cabb93f137a3b33c82409db2 (patch)
tree287a75d75594572c48b6a8e4a47bd67a8186d3bd /source/blender/editors/space_clip
parentd865f2dbf666f7b9aba60a41ef2ad6887e3a0b67 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r--source/blender/editors/space_clip/clip_editor.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 54bd4f35ecb..580b6f65da9 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)