[Bf-blender-cvs] [b7d09c4] soc-2016-multiview: WIP: design RegionSpaceClip (split SpaceClip)

Tianwei Shen noreply at git.blender.org
Fri Jul 29 16:56:57 CEST 2016


Commit: b7d09c42eaa129b9a6dce6829105805ca639ac17
Author: Tianwei Shen
Date:   Thu Jul 28 22:40:16 2016 +0800
Branches: soc-2016-multiview
https://developer.blender.org/rBb7d09c42eaa129b9a6dce6829105805ca639ac17

WIP: design RegionSpaceClip (split SpaceClip)

in the progress of seperating view-dependent data fields from SpaceClip
to RegionSpaceClip

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

M	source/blender/editors/include/ED_clip.h
M	source/blender/editors/space_clip/clip_editor.c
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesrna/intern/rna_space.c

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

diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h
index 631ec98..4929f46 100644
--- a/source/blender/editors/include/ED_clip.h
+++ b/source/blender/editors/include/ED_clip.h
@@ -82,6 +82,7 @@ struct MovieClip *ED_space_clip_get_clip(struct SpaceClip *sc);
 struct MovieClip *ED_space_clip_get_secondary_clip(struct SpaceClip *sc);
 void ED_space_clip_set_clip(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip);
 void ED_space_clip_set_secondary_clip(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *secondary_clip);
+void ED_clip_update_correspondence_mode();
 
 struct Mask *ED_space_clip_get_mask(struct SpaceClip *sc);
 void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask);
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index a757bbe..7ce487e 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -675,6 +675,11 @@ void ED_space_clip_set_secondary_clip(bContext *C, bScreen *screen, SpaceClip *s
 		WM_event_add_notifier(C, NC_MOVIECLIP | NA_SELECTED, sc->secondary_clip);
 }
 
+void ED_clip_update_correspondence_mode()
+{
+
+}
+
 /* ******** masking editing functions ******** */
 
 Mask *ED_space_clip_get_mask(SpaceClip *sc)
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 1ba0b18..f97b8a7 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -1285,6 +1285,15 @@ typedef struct SpaceClip {
 	MaskSpaceInfo mask_info;
 } SpaceClip;
 
+/* region-related settings for Clip Editor */
+typedef struct RegionSpaceClip {
+	float xof, yof;             /* user defined offset, image is centered */
+	float xlockof, ylockof;     /* user defined offset from locked position */
+	float zoom;                 /* user defined zoom level */
+	float stabmat[4][4], unistabmat[4][4];  /* current stabilization matrix and the same matrix in unified space,
+	                                         * defined when drawing and used for mouse position calculation */
+} RegionSpaceClip;
+
 /* SpaceClip->flag */
 typedef enum eSpaceClip_Flag {
 	SC_SHOW_MARKER_PATTERN      = (1 << 0),
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 859def6..da4290a 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1563,6 +1563,9 @@ static void rna_SpaceClipEditor_clip_mode_update(Main *UNUSED(bmain), Scene *UNU
 	SpaceClip *sc = (SpaceClip *)(ptr->data);
 
 	sc->scopes.ok = 0;
+
+	/* update split view if in correspondence mode */
+	ED_clip_update_correspondence_mode();
 }
 
 static void rna_SpaceClipEditor_lock_selection_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)




More information about the Bf-blender-cvs mailing list