Blender  V3.3
ED_clip.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2009 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 struct ARegion;
15 struct ImBuf;
16 struct Main;
17 struct Mask;
18 struct MovieClip;
19 struct SpaceClip;
20 struct bContext;
21 struct bScreen;
22 
23 /* ** clip_editor.c ** */
24 
25 /* Returns true when the following conditions are met:
26  * - Current space is Space Clip.
27  * - There is a movie clip opened in it. */
28 bool ED_space_clip_poll(struct bContext *C);
29 
30 /* Returns true when the following conditions are met:
31  * - Current space is Space Clip.
32  * - It is set to Clip view.
33  *
34  * It is not required to have movie clip opened for editing. */
36 
37 /* Returns true when the following conditions are met:
38  * - Current space is Space Clip.
39  * - It is set to Tracking mode.
40  *
41  * It is not required to have movie clip opened for editing. */
43 
44 /* Returns true when the following conditions are met:
45  * - Current space is Space Clip.
46  * - It is set to Mask mode.
47  *
48  * It is not required to have mask opened for editing. */
50 
51 /* Returns true when the following conditions are met:
52  * - Current space is Space Clip.
53  * - It is set to Mask mode.
54  * - Mask has visible and editable splines.
55  *
56  * It is not required to have mask opened for editing. */
58 
59 /* Returns true when the following conditions are met:
60  * - Current space is Space Clip.
61  * - It is set to Mask mode.
62  * - The space has mask opened. */
64 
65 /* Returns true when the following conditions are met:
66  * - Current space is Space Clip.
67  * - It is set to Mask mode.
68  * - The space has mask opened.
69  * - Mask has visible and editable splines. */
71 
72 void ED_space_clip_get_size(struct SpaceClip *sc, int *width, int *height);
73 void ED_space_clip_get_size_fl(struct SpaceClip *sc, float size[2]);
74 void ED_space_clip_get_zoom(struct SpaceClip *sc,
75  struct ARegion *region,
76  float *zoomx,
77  float *zoomy);
78 void ED_space_clip_get_aspect(struct SpaceClip *sc, float *aspx, float *aspy);
79 void ED_space_clip_get_aspect_dimension_aware(struct SpaceClip *sc, float *aspx, float *aspy);
80 
85 
86 struct ImBuf *ED_space_clip_get_buffer(struct SpaceClip *sc);
88  float loc[2],
89  float *scale,
90  float *angle);
91 
93  struct ARegion *region,
94  int mval[2],
95  float fpos[2]);
100  struct ARegion *region,
101  const int mval[2],
102  float r_col[3]);
103 
104 void ED_clip_update_frame(const struct Main *mainp, int cfra);
105 bool ED_clip_view_selection(const struct bContext *C, struct ARegion *region, bool fit);
106 
107 void ED_clip_select_all(struct SpaceClip *sc, int action, bool *r_has_selection);
108 bool ED_clip_can_select(struct bContext *C);
109 
110 void ED_clip_point_undistorted_pos(struct SpaceClip *sc, const float co[2], float r_co[2]);
112  struct SpaceClip *sc, struct ARegion *region, float x, float y, float *xr, float *yr);
118  struct ARegion *region,
119  const float co[2],
120  float r_co[2]);
124 void ED_clip_mouse_pos(struct SpaceClip *sc,
125  struct ARegion *region,
126  const int mval[2],
127  float co[2]);
128 
131 
132 struct MovieClip *ED_space_clip_get_clip(struct SpaceClip *sc);
133 void ED_space_clip_set_clip(struct bContext *C,
134  struct bScreen *screen,
135  struct SpaceClip *sc,
136  struct MovieClip *clip);
137 
138 struct Mask *ED_space_clip_get_mask(struct SpaceClip *sc);
139 void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask);
140 
141 /* Locked state is used to preserve current clip editor viewport upon changes. Example usage:
142  *
143  * ...
144  *
145  * ClipViewLockState lock_state;
146  * ED_clip_view_lock_state_store(C, &lock_state);
147  *
148  * <change selection>
149  *
150  * ED_clip_view_lock_state_restore_no_jump(C, &lock_state);
151  *
152  * These function are to be used from space clip editor context only. Otherwise debug builds will
153  * assert, release builds will crash. */
154 
155 typedef struct ClipViewLockState {
158  float zoom;
160 
163  const ClipViewLockState *state);
164 
165 /* ** clip_ops.c ** */
166 void ED_operatormacros_clip(void);
167 
168 #ifdef __cplusplus
169 }
170 #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:517
bool ED_space_clip_poll(struct bContext *C)
Definition: clip_editor.c:61
bool ED_clip_view_selection(const struct bContext *C, struct ARegion *region, bool fit)
bool ED_space_clip_color_sample(struct SpaceClip *sc, struct ARegion *region, const int mval[2], float r_col[3])
Definition: clip_editor.c:295
void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask)
Definition: clip_editor.c:636
bool ED_space_clip_get_position(struct SpaceClip *sc, struct ARegion *region, int mval[2], float fpos[2])
Definition: clip_editor.c:278
int ED_space_clip_get_clip_frame_number(struct SpaceClip *sc)
Definition: clip_editor.c:231
void ED_clip_point_undistorted_pos(struct SpaceClip *sc, const float co[2], float r_co[2])
Definition: clip_editor.c:462
struct Mask * ED_space_clip_get_mask(struct SpaceClip *sc)
Definition: clip_editor.c:631
void ED_space_clip_set_clip(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip)
Definition: clip_editor.c:575
bool ED_space_clip_maskedit_poll(struct bContext *C)
Definition: clip_editor.c:94
void ED_space_clip_get_aspect(struct SpaceClip *sc, float *aspx, float *aspy)
Definition: clip_editor.c:176
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:239
void ED_space_clip_get_zoom(struct SpaceClip *sc, struct ARegion *region, float *zoomx, float *zoomy)
Definition: clip_editor.c:164
void ED_space_clip_get_size(struct SpaceClip *sc, int *width, int *height)
Definition: clip_editor.c:146
void ED_operatormacros_clip(void)
Definition: clip_ops.c:1869
bool ED_space_clip_view_clip_poll(struct bContext *C)
Definition: clip_editor.c:72
void ED_clip_mouse_pos(struct SpaceClip *sc, struct ARegion *region, const int mval[2], float co[2])
Definition: clip_editor.c:541
bool ED_clip_can_select(struct bContext *C)
bool ED_space_clip_maskedit_mask_poll(struct bContext *C)
Definition: clip_editor.c:115
bool ED_space_clip_check_show_trackedit(struct SpaceClip *sc)
Definition: clip_editor.c:546
struct ImBuf * ED_space_clip_get_stable_buffer(struct SpaceClip *sc, float loc[2], float *scale, float *angle)
Definition: clip_editor.c:258
bool ED_space_clip_tracking_poll(struct bContext *C)
Definition: clip_editor.c:83
bool ED_space_clip_maskedit_visible_splines_poll(struct bContext *C)
Definition: clip_editor.c:105
void ED_space_clip_get_aspect_dimension_aware(struct SpaceClip *sc, float *aspx, float *aspy)
Definition: clip_editor.c:197
void ED_clip_point_stable_pos(struct SpaceClip *sc, struct ARegion *region, float x, float y, float *xr, float *yr)
Definition: clip_editor.c:483
bool ED_space_clip_check_show_maskedit(struct SpaceClip *sc)
Definition: clip_editor.c:555
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:374
void ED_space_clip_get_size_fl(struct SpaceClip *sc, float size[2])
Definition: clip_editor.c:156
struct MovieClip * ED_space_clip_get_clip(struct SpaceClip *sc)
Definition: clip_editor.c:570
bool ED_space_clip_maskedit_mask_visible_splines_poll(struct bContext *C)
Definition: clip_editor.c:130
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 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
_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
#define C
Definition: RandGen.cpp:25
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
const int state
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513
float lock_offset_x
Definition: ED_clip.h:157
float lock_offset_y
Definition: ED_clip.h:157
Definition: BKE_main.h:121