[Bf-blender-cvs] [a9758d7] soc-2016-multiview: move correspondence link code to correspondence mode
Tianwei Shen
noreply at git.blender.org
Mon Jul 18 17:59:03 CEST 2016
Commit: a9758d75f2dc946702846957a9cb35f9241928f4
Author: Tianwei Shen
Date: Mon Jul 18 23:58:49 2016 +0800
Branches: soc-2016-multiview
https://developer.blender.org/rBa9758d75f2dc946702846957a9cb35f9241928f4
move correspondence link code to correspondence mode
===================================================================
M release/scripts/startup/bl_ui/space_clip.py
M source/blender/editors/space_clip/tracking_ops_correspondence.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 6a081bf..662821c 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -279,6 +279,16 @@ class CLIP_PT_tracking_panel:
return clip and sc.mode == 'TRACKING' and sc.view == 'CLIP'
+class CLIP_PT_correspondence_panel:
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+ clip = sc.clip
+
+ return clip and sc.mode == 'CORRESPONDENCE' and sc.view == 'CLIP'
+
+
class CLIP_PT_reconstruction_panel:
@classmethod
@@ -454,7 +464,7 @@ class CLIP_PT_tools_tracking(CLIP_PT_tracking_panel, Panel):
row.operator("clip.join_tracks", text="Join Tracks")
-class CLIP_PT_tools_correspondence(CLIP_PT_tracking_panel, Panel):
+class CLIP_PT_tools_correspondence(CLIP_PT_correspondence_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Correspondence"
diff --git a/source/blender/editors/space_clip/tracking_ops_correspondence.c b/source/blender/editors/space_clip/tracking_ops_correspondence.c
index 608d637..d130ac4 100644
--- a/source/blender/editors/space_clip/tracking_ops_correspondence.c
+++ b/source/blender/editors/space_clip/tracking_ops_correspondence.c
@@ -134,7 +134,7 @@ void CLIP_OT_add_correspondence(wmOperatorType *ot)
/* api callbacks */
ot->exec = add_correspondence_exec;
- ot->poll = ED_space_clip_tracking_poll;
+ ot->poll = ED_space_clip_correspondence_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -183,7 +183,7 @@ void CLIP_OT_delete_correspondence(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_operator_confirm;
ot->exec = delete_correspondence_exec;
- ot->poll = ED_space_clip_tracking_poll;
+ ot->poll = ED_space_clip_correspondence_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -466,7 +466,7 @@ void CLIP_OT_solve_multiview(wmOperatorType *ot)
ot->exec = solve_multiview_exec;
ot->invoke = solve_multiview_invoke;
ot->modal = solve_multiview_modal;
- ot->poll = ED_space_clip_tracking_poll;
+ ot->poll = ED_space_clip_correspondence_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
More information about the Bf-blender-cvs
mailing list