diff options
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_toolbar.c | 92 | ||||
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 4 |
3 files changed, 0 insertions, 98 deletions
diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h index 8ecf596fac7..70dc1caf36f 100644 --- a/source/blender/editors/space_clip/clip_intern.h +++ b/source/blender/editors/space_clip/clip_intern.h @@ -110,8 +110,6 @@ void CLIP_OT_cursor_set(struct wmOperatorType *ot); /* clip_toolbar.c */ struct ARegion *ED_clip_has_properties_region(struct ScrArea *sa); -void CLIP_OT_tools(struct wmOperatorType *ot); -void CLIP_OT_properties(struct wmOperatorType *ot); /* clip_utils.c */ void clip_graph_tracking_values_iterate_track( diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c index acb05e7d542..d54a6da9a3c 100644 --- a/source/blender/editors/space_clip/clip_toolbar.c +++ b/source/blender/editors/space_clip/clip_toolbar.c @@ -78,95 +78,3 @@ ARegion *ED_clip_has_properties_region(ScrArea *sa) return arnew; } - -static bool properties_poll(bContext *C) -{ - return (CTX_wm_space_clip(C) != NULL); -} - -static int properties_exec(bContext *C, wmOperator *UNUSED(op)) -{ - ScrArea *sa = CTX_wm_area(C); - ARegion *ar = ED_clip_has_properties_region(sa); - - if (ar && ar->alignment != RGN_ALIGN_NONE) - ED_region_toggle_hidden(C, ar); - - return OPERATOR_FINISHED; -} - -void CLIP_OT_properties(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Toggle Sidebar"; - ot->description = "Toggle the properties region visibility"; - ot->idname = "CLIP_OT_properties"; - - /* api callbacks */ - ot->exec = properties_exec; - ot->poll = properties_poll; -} - -/************************** tools ******************************/ - -static ARegion *clip_has_tools_region(ScrArea *sa) -{ - ARegion *ar, *artool = NULL, *arhead; - - for (ar = sa->regionbase.first; ar; ar = ar->next) { - if (ar->regiontype == RGN_TYPE_TOOLS) - artool = ar; - } - - /* tool region hide/unhide also hides props */ - if (artool) { - return artool; - } - - if (artool == NULL) { - /* add subdiv level; after header */ - arhead = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); - - /* is error! */ - if (arhead == NULL) - return NULL; - - artool = MEM_callocN(sizeof(ARegion), "clip tools region"); - - BLI_insertlinkafter(&sa->regionbase, arhead, artool); - artool->regiontype = RGN_TYPE_TOOLS; - artool->alignment = RGN_ALIGN_LEFT; - - artool->flag = RGN_FLAG_HIDDEN; - } - - return artool; -} - -static bool tools_poll(bContext *C) -{ - return (CTX_wm_space_clip(C) != NULL); -} - -static int tools_exec(bContext *C, wmOperator *UNUSED(op)) -{ - ScrArea *sa = CTX_wm_area(C); - ARegion *ar = clip_has_tools_region(sa); - - if (ar && ar->alignment != RGN_ALIGN_NONE) - ED_region_toggle_hidden(C, ar); - - return OPERATOR_FINISHED; -} - -void CLIP_OT_tools(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Toggle Toolbar"; - ot->description = "Toggle clip tools panel"; - ot->idname = "CLIP_OT_tools"; - - /* api callbacks */ - ot->exec = tools_exec; - ot->poll = tools_poll; -} diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 7c62af80a0f..d12e6634987 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -434,10 +434,6 @@ static void clip_operatortypes(void) WM_operatortype_append(CLIP_OT_set_scene_frames); WM_operatortype_append(CLIP_OT_cursor_set); - /* ** clip_toolbar.c ** */ - WM_operatortype_append(CLIP_OT_tools); - WM_operatortype_append(CLIP_OT_properties); - /* ** tracking_ops.c ** */ /* navigation */ |