2011-11-07 12:55:18 +00:00
|
|
|
/*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2009 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup editors
|
2011-11-07 12:55:18 +00:00
|
|
|
*/
|
|
|
|
|
|
2020-08-07 09:50:34 +02:00
|
|
|
#pragma once
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2020-03-02 15:09:10 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
struct ARegion;
|
|
|
|
|
struct ImBuf;
|
|
|
|
|
struct Main;
|
2012-06-04 16:42:58 +00:00
|
|
|
struct Mask;
|
2011-11-07 12:55:18 +00:00
|
|
|
struct MovieClip;
|
2019-01-28 21:08:24 +11:00
|
|
|
struct SpaceClip;
|
|
|
|
|
struct bContext;
|
|
|
|
|
struct bScreen;
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-06-19 14:26:29 +00:00
|
|
|
/* ** clip_editor.c ** */
|
2012-06-20 10:28:51 +00:00
|
|
|
|
|
|
|
|
/* common poll functions */
|
2018-07-02 11:47:00 +02:00
|
|
|
bool ED_space_clip_poll(struct bContext *C);
|
2012-05-02 17:33:48 +00:00
|
|
|
|
2018-07-02 11:47:00 +02:00
|
|
|
bool ED_space_clip_view_clip_poll(struct bContext *C);
|
2012-05-02 17:33:48 +00:00
|
|
|
|
2018-07-02 11:47:00 +02:00
|
|
|
bool ED_space_clip_tracking_poll(struct bContext *C);
|
|
|
|
|
bool ED_space_clip_maskedit_poll(struct bContext *C);
|
|
|
|
|
bool ED_space_clip_maskedit_mask_poll(struct bContext *C);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-07-26 22:41:40 +00:00
|
|
|
void ED_space_clip_get_size(struct SpaceClip *sc, int *width, int *height);
|
|
|
|
|
void ED_space_clip_get_size_fl(struct SpaceClip *sc, float size[2]);
|
2020-03-06 16:56:42 +01:00
|
|
|
void ED_space_clip_get_zoom(struct SpaceClip *sc,
|
|
|
|
|
struct ARegion *region,
|
|
|
|
|
float *zoomx,
|
|
|
|
|
float *zoomy);
|
2012-06-20 10:28:51 +00:00
|
|
|
void ED_space_clip_get_aspect(struct SpaceClip *sc, float *aspx, float *aspy);
|
|
|
|
|
void ED_space_clip_get_aspect_dimension_aware(struct SpaceClip *sc, float *aspx, float *aspy);
|
2012-06-19 14:26:29 +00:00
|
|
|
|
|
|
|
|
int ED_space_clip_get_clip_frame_number(struct SpaceClip *sc);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
struct ImBuf *ED_space_clip_get_buffer(struct SpaceClip *sc);
|
2019-04-17 06:17:24 +02:00
|
|
|
struct ImBuf *ED_space_clip_get_stable_buffer(struct SpaceClip *sc,
|
|
|
|
|
float loc[2],
|
|
|
|
|
float *scale,
|
|
|
|
|
float *angle);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
bool ED_space_clip_color_sample(struct SpaceClip *sc,
|
2020-03-06 16:56:42 +01:00
|
|
|
struct ARegion *region,
|
2019-04-17 06:17:24 +02:00
|
|
|
int mval[2],
|
|
|
|
|
float r_col[3]);
|
2012-08-20 16:56:11 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
void ED_clip_update_frame(const struct Main *mainp, int cfra);
|
2020-03-06 16:56:42 +01:00
|
|
|
bool ED_clip_view_selection(const struct bContext *C, struct ARegion *region, bool fit);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2019-03-05 18:33:09 +11:00
|
|
|
void ED_clip_select_all(struct SpaceClip *sc, int action, bool *r_has_selection);
|
2019-06-04 14:47:29 +02:00
|
|
|
bool ED_clip_can_select(struct bContext *C);
|
2019-03-05 18:33:09 +11:00
|
|
|
|
2012-07-25 10:39:54 +00:00
|
|
|
void ED_clip_point_undistorted_pos(struct SpaceClip *sc, const float co[2], float r_co[2]);
|
2019-04-17 06:17:24 +02:00
|
|
|
void ED_clip_point_stable_pos(
|
2020-03-06 16:56:42 +01:00
|
|
|
struct SpaceClip *sc, struct ARegion *region, float x, float y, float *xr, float *yr);
|
2019-04-17 06:17:24 +02:00
|
|
|
void ED_clip_point_stable_pos__reverse(struct SpaceClip *sc,
|
2020-03-06 16:56:42 +01:00
|
|
|
struct ARegion *region,
|
2019-04-17 06:17:24 +02:00
|
|
|
const float co[2],
|
|
|
|
|
float r_co[2]);
|
2020-03-06 16:56:42 +01:00
|
|
|
void ED_clip_mouse_pos(struct SpaceClip *sc,
|
|
|
|
|
struct ARegion *region,
|
|
|
|
|
const int mval[2],
|
|
|
|
|
float co[2]);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2013-09-05 13:37:53 +00:00
|
|
|
bool ED_space_clip_check_show_trackedit(struct SpaceClip *sc);
|
|
|
|
|
bool ED_space_clip_check_show_maskedit(struct SpaceClip *sc);
|
2012-06-19 14:26:29 +00:00
|
|
|
|
2012-06-20 10:28:51 +00:00
|
|
|
struct MovieClip *ED_space_clip_get_clip(struct SpaceClip *sc);
|
2019-04-17 06:17:24 +02:00
|
|
|
void ED_space_clip_set_clip(struct bContext *C,
|
|
|
|
|
struct bScreen *screen,
|
|
|
|
|
struct SpaceClip *sc,
|
|
|
|
|
struct MovieClip *clip);
|
2012-06-19 14:26:29 +00:00
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
/* ** clip_ops.c ** */
|
2011-11-07 12:55:18 +00:00
|
|
|
void ED_operatormacros_clip(void);
|
|
|
|
|
|
2020-03-02 15:09:10 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|