diff options
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 11 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_intern.h | 16 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 15 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_utils.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 1 |
6 files changed, 29 insertions, 18 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 4bccb3664da..68444cc0313 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -1981,7 +1981,6 @@ void clip_draw_cache_and_notes(const bContext *C, SpaceClip *sc, ARegion *region } } -/* draw grease pencil */ void clip_draw_grease_pencil(bContext *C, int onlyv2d) { SpaceClip *sc = CTX_wm_space_clip(C); diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 834ef847069..5a999b1fad7 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -223,7 +223,6 @@ void ED_space_clip_get_aspect_dimension_aware(SpaceClip *sc, float *aspx, float } } -/* return current frame number in clip space */ int ED_space_clip_get_clip_frame_number(SpaceClip *sc) { MovieClip *clip = ED_space_clip_get_clip(sc); @@ -272,7 +271,7 @@ ImBuf *ED_space_clip_get_stable_buffer(SpaceClip *sc, float loc[2], float *scale } bool ED_space_clip_get_position(struct SpaceClip *sc, - struct ARegion *ar, + struct ARegion *region, int mval[2], float fpos[2]) { @@ -282,13 +281,12 @@ bool ED_space_clip_get_position(struct SpaceClip *sc, } /* map the mouse coords to the backdrop image space */ - ED_clip_mouse_pos(sc, ar, mval, fpos); + ED_clip_mouse_pos(sc, region, mval, fpos); IMB_freeImBuf(ibuf); return true; } -/* Returns color in linear space, matching ED_space_image_color_sample(). */ bool ED_space_clip_color_sample(SpaceClip *sc, ARegion *region, int mval[2], float r_col[3]) { ImBuf *ibuf; @@ -511,10 +509,6 @@ void ED_clip_point_stable_pos( } } -/** - * \brief the reverse of #ED_clip_point_stable_pos(), gets the marker region coords. - * better name here? view_to_track / track_to_view or so? - */ void ED_clip_point_stable_pos__reverse(SpaceClip *sc, ARegion *region, const float co[2], @@ -539,7 +533,6 @@ void ED_clip_point_stable_pos__reverse(SpaceClip *sc, r_co[1] = (pos[1] * height * zoomy) + (float)sy; } -/* takes event->mval */ void ED_clip_mouse_pos(SpaceClip *sc, ARegion *region, const int mval[2], float co[2]) { ED_clip_point_stable_pos(sc, region, mval[0], mval[1], &co[0], &co[1]); diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h index 202dc00e365..20cc6e3da15 100644 --- a/source/blender/editors/space_clip/clip_intern.h +++ b/source/blender/editors/space_clip/clip_intern.h @@ -50,25 +50,34 @@ struct wmOperatorType; /* internal exports only */ /* clip_buttons.c */ + void ED_clip_buttons_register(struct ARegionType *art); /* clip_dopesheet_draw.c */ + void clip_draw_dopesheet_main(struct SpaceClip *sc, struct ARegion *region, struct Scene *scene); void clip_draw_dopesheet_channels(const struct bContext *C, struct ARegion *region); /* clip_dopesheet_ops.c */ + void CLIP_OT_dopesheet_select_channel(struct wmOperatorType *ot); void CLIP_OT_dopesheet_view_all(struct wmOperatorType *ot); /* clip_draw.c */ + void clip_draw_main(const struct bContext *C, struct SpaceClip *sc, struct ARegion *region); + +/* draw grease pencil */ + void clip_draw_grease_pencil(struct bContext *C, int onlyv2d); void clip_draw_cache_and_notes(const bContext *C, SpaceClip *sc, ARegion *region); /* clip_editor.c */ + void clip_start_prefetch_job(const struct bContext *C); /* clip_graph_draw.c */ + void clip_draw_graph(struct SpaceClip *sc, struct ARegion *region, struct Scene *scene); /* clip_graph_ops.c */ @@ -171,6 +180,9 @@ void clip_delete_plane_track(struct bContext *C, struct MovieClip *clip, struct MovieTrackingPlaneTrack *plane_track); +/** + * Calculate space clip offset to be centered at the given point. + */ void clip_view_offset_for_center_to_point( SpaceClip *sc, const float x, const float y, float *r_offset_x, float *r_offset_y); void clip_view_center_to_point(SpaceClip *sc, float x, float y); @@ -178,6 +190,10 @@ void clip_view_center_to_point(SpaceClip *sc, float x, float y); bool clip_view_calculate_view_selection( const struct bContext *C, bool fit, float *r_offset_x, float *r_offset_y, float *r_zoom); +/** + * Returns truth if lock-to-selection is enabled and possible. + * Locking to selection is not possible if there is no selection. + */ bool clip_view_has_locked_selection(const struct bContext *C); void clip_draw_sfra_efra(struct View2D *v2d, struct Scene *scene); diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index b1f8949871b..0aa7e35aed6 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -209,7 +209,7 @@ static int open_exec(bContext *C, wmOperator *op) RNA_string_get(op->ptr, "directory", dir_only); if (relative) { - BLI_path_rel(dir_only, bmain->name); + BLI_path_rel(dir_only, bmain->filepath); } prop = RNA_struct_find_property(op->ptr, "files"); @@ -285,7 +285,7 @@ static int open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event) if (clip) { BLI_strncpy(path, clip->filepath, sizeof(path)); - BLI_path_abs(path, CTX_data_main(C)->name); + BLI_path_abs(path, CTX_data_main(C)->filepath); BLI_path_parent_dir(path); } else { @@ -911,6 +911,7 @@ void CLIP_OT_view_zoom_ratio(wmOperatorType *ot) -FLT_MAX, FLT_MAX); } + /** \} */ /* -------------------------------------------------------------------- */ @@ -988,6 +989,7 @@ void CLIP_OT_view_all(wmOperatorType *ot) prop = RNA_def_boolean(ot->srna, "fit_view", 0, "Fit View", "Fit frame to the viewport"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } + /** \} */ /* -------------------------------------------------------------------- */ @@ -1052,6 +1054,7 @@ void CLIP_OT_view_selected(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_LOCK_BYPASS; } + /** \} */ /* -------------------------------------------------------------------- */ @@ -1172,6 +1175,7 @@ void CLIP_OT_change_frame(wmOperatorType *ot) /* rna */ RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME); } + /** \} */ /* -------------------------------------------------------------------- */ @@ -1584,6 +1588,7 @@ void CLIP_OT_rebuild_proxy(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER; } + /** \} */ /* -------------------------------------------------------------------- */ @@ -1623,10 +1628,10 @@ void CLIP_OT_mode_set(wmOperatorType *ot) RNA_def_enum(ot->srna, "mode", rna_enum_clip_editor_mode_items, SC_MODE_TRACKING, "Mode", ""); } -#ifdef WITH_INPUT_NDOF - /** \} */ +#ifdef WITH_INPUT_NDOF + /* -------------------------------------------------------------------- */ /** \name NDOF Operator * \{ */ @@ -1725,6 +1730,7 @@ void CLIP_OT_prefetch(wmOperatorType *ot) ot->invoke = clip_prefetch_invoke; ot->modal = clip_prefetch_modal; } + /** \} */ /* -------------------------------------------------------------------- */ @@ -1764,6 +1770,7 @@ void CLIP_OT_set_scene_frames(wmOperatorType *ot) ot->poll = ED_space_clip_view_clip_poll; ot->exec = clip_set_scene_frames_exec; } + /** \} */ /* -------------------------------------------------------------------- */ diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c index 23dd290e13f..5f5a24a9407 100644 --- a/source/blender/editors/space_clip/clip_utils.c +++ b/source/blender/editors/space_clip/clip_utils.c @@ -398,7 +398,6 @@ void clip_delete_plane_track(bContext *C, MovieClip *clip, MovieTrackingPlaneTra DEG_id_tag_update(&clip->id, 0); } -/* Calculate space clip offset to be centered at the given point. */ void clip_view_offset_for_center_to_point( SpaceClip *sc, const float x, const float y, float *r_offset_x, float *r_offset_y) { @@ -608,8 +607,6 @@ bool clip_view_calculate_view_selection( return true; } -/* Returns truth if lock-to-selection is enabled and possible. - * Locking to selection is not possible if there is no selection. */ bool clip_view_has_locked_selection(const bContext *C) { SpaceClip *space_clip = CTX_wm_space_clip(C); diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index e2fbb4a5a59..91083fa9682 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -1335,7 +1335,6 @@ static void clip_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, I } } -/* only called once, from space/spacetypes.c */ void ED_spacetype_clip(void) { SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype clip"); |