Blender  V2.93
ED_clip.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2009 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 struct ARegion;
31 struct ImBuf;
32 struct Main;
33 struct Mask;
34 struct MovieClip;
35 struct SpaceClip;
36 struct bContext;
37 struct bScreen;
38 
39 /* ** clip_editor.c ** */
40 
41 /* common poll functions */
42 bool ED_space_clip_poll(struct bContext *C);
43 
45 
49 
50 void ED_space_clip_get_size(struct SpaceClip *sc, int *width, int *height);
51 void ED_space_clip_get_size_fl(struct SpaceClip *sc, float size[2]);
52 void ED_space_clip_get_zoom(struct SpaceClip *sc,
53  struct ARegion *region,
54  float *zoomx,
55  float *zoomy);
56 void ED_space_clip_get_aspect(struct SpaceClip *sc, float *aspx, float *aspy);
57 void ED_space_clip_get_aspect_dimension_aware(struct SpaceClip *sc, float *aspx, float *aspy);
58 
60 
61 struct ImBuf *ED_space_clip_get_buffer(struct SpaceClip *sc);
63  float loc[2],
64  float *scale,
65  float *angle);
66 
68  struct ARegion *ar,
69  int mval[2],
70  float fpos[2]);
72  struct ARegion *region,
73  int mval[2],
74  float r_col[3]);
75 
76 void ED_clip_update_frame(const struct Main *mainp, int cfra);
77 bool ED_clip_view_selection(const struct bContext *C, struct ARegion *region, bool fit);
78 
79 void ED_clip_select_all(struct SpaceClip *sc, int action, bool *r_has_selection);
80 bool ED_clip_can_select(struct bContext *C);
81 
82 void ED_clip_point_undistorted_pos(struct SpaceClip *sc, const float co[2], float r_co[2]);
84  struct SpaceClip *sc, struct ARegion *region, float x, float y, float *xr, float *yr);
86  struct ARegion *region,
87  const float co[2],
88  float r_co[2]);
89 void ED_clip_mouse_pos(struct SpaceClip *sc,
90  struct ARegion *region,
91  const int mval[2],
92  float co[2]);
93 
96 
97 struct MovieClip *ED_space_clip_get_clip(struct SpaceClip *sc);
98 void ED_space_clip_set_clip(struct bContext *C,
99  struct bScreen *screen,
100  struct SpaceClip *sc,
101  struct MovieClip *clip);
102 
103 struct Mask *ED_space_clip_get_mask(struct SpaceClip *sc);
104 void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask);
105 
106 /* Locked state is used to preserve current clip editor viewport upon changes. Example usage:
107  *
108  * ...
109  *
110  * ClipViewLockState lock_state;
111  * ED_clip_view_lock_state_store(C, &lock_state);
112  *
113  * <change selection>
114  *
115  * ED_clip_view_lock_state_restore_no_jump(C, &lock_state);
116  *
117  * These function are to be used from space clip editor context only. Otherwise debug builds will
118  * assert, release builds will crash. */
119 
120 typedef struct ClipViewLockState {
123  float zoom;
125 
128  const ClipViewLockState *state);
129 
130 /* ** clip_ops.c ** */
131 void ED_operatormacros_clip(void);
132 
133 #ifdef __cplusplus
134 }
135 #endif
void ED_clip_point_stable_pos__reverse(struct SpaceClip *sc, struct ARegion *region, const float co[2], float r_co[2])
the reverse of ED_clip_point_stable_pos(), gets the marker region coords. better name here?...
Definition: clip_editor.c:518
bool ED_space_clip_poll(struct bContext *C)
Definition: clip_editor.c:76
bool ED_clip_view_selection(const struct bContext *C, struct ARegion *region, bool fit)
void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask)
Definition: clip_editor.c:638
int ED_space_clip_get_clip_frame_number(struct SpaceClip *sc)
Definition: clip_editor.c:227
void ED_clip_point_undistorted_pos(struct SpaceClip *sc, const float co[2], float r_co[2])
Definition: clip_editor.c:459
struct Mask * ED_space_clip_get_mask(struct SpaceClip *sc)
Definition: clip_editor.c:633
void ED_space_clip_set_clip(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip)
Definition: clip_editor.c:577
bool ED_space_clip_maskedit_poll(struct bContext *C)
Definition: clip_editor.c:109
void ED_space_clip_get_aspect(struct SpaceClip *sc, float *aspx, float *aspy)
Definition: clip_editor.c:171
void ED_clip_view_lock_state_restore_no_jump(const struct bContext *C, const ClipViewLockState *state)
struct ImBuf * ED_space_clip_get_buffer(struct SpaceClip *sc)
Definition: clip_editor.c:235
void ED_space_clip_get_zoom(struct SpaceClip *sc, struct ARegion *region, float *zoomx, float *zoomy)
Definition: clip_editor.c:159
void ED_space_clip_get_size(struct SpaceClip *sc, int *width, int *height)
Definition: clip_editor.c:141
void ED_operatormacros_clip(void)
Definition: clip_ops.c:1877
bool ED_space_clip_view_clip_poll(struct bContext *C)
Definition: clip_editor.c:87
bool ED_space_clip_color_sample(struct SpaceClip *sc, struct ARegion *region, int mval[2], float r_col[3])
Definition: clip_editor.c:292
void ED_clip_mouse_pos(struct SpaceClip *sc, struct ARegion *region, const int mval[2], float co[2])
Definition: clip_editor.c:543
bool ED_clip_can_select(struct bContext *C)
bool ED_space_clip_maskedit_mask_poll(struct bContext *C)
Definition: clip_editor.c:120
bool ED_space_clip_check_show_trackedit(struct SpaceClip *sc)
Definition: clip_editor.c:548
struct ImBuf * ED_space_clip_get_stable_buffer(struct SpaceClip *sc, float loc[2], float *scale, float *angle)
Definition: clip_editor.c:254
bool ED_space_clip_tracking_poll(struct bContext *C)
Definition: clip_editor.c:98
void ED_space_clip_get_aspect_dimension_aware(struct SpaceClip *sc, float *aspx, float *aspy)
Definition: clip_editor.c:192
void ED_clip_point_stable_pos(struct SpaceClip *sc, struct ARegion *region, float x, float y, float *xr, float *yr)
Definition: clip_editor.c:480
bool ED_space_clip_check_show_maskedit(struct SpaceClip *sc)
Definition: clip_editor.c:557
void ED_clip_update_frame(const struct Main *mainp, int cfra)
struct ClipViewLockState ClipViewLockState
void ED_clip_select_all(struct SpaceClip *sc, int action, bool *r_has_selection)
Definition: clip_editor.c:371
bool ED_space_clip_get_position(struct SpaceClip *sc, struct ARegion *ar, int mval[2], float fpos[2])
Definition: clip_editor.c:274
void ED_space_clip_get_size_fl(struct SpaceClip *sc, float size[2])
Definition: clip_editor.c:151
struct MovieClip * ED_space_clip_get_clip(struct SpaceClip *sc)
Definition: clip_editor.c:572
void ED_clip_view_lock_state_store(const struct bContext *C, ClipViewLockState *state)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define C
Definition: RandGen.cpp:39
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
Definition: btVector3.h:356
static ulong state[N]
float lock_offset_x
Definition: ED_clip.h:122
float lock_offset_y
Definition: ED_clip.h:122
Definition: BKE_main.h:116
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)