52 float matrix_space[4][4])
57 matrix_space[3][0] = (region->
winx / 2) + snode->
xof;
58 matrix_space[3][1] = (region->
winy / 2) + snode->
yof;
63 const float image_dims[2],
64 float matrix_space[4][4])
69 matrix_space[3][0] = ((region->
winx / 2) + snode->
xof) - ((image_dims[0] / 2.0f) * snode->
zoom);
70 matrix_space[3][1] = ((region->
winy / 2) + snode->
yof) - ((image_dims[1] / 2.0f) * snode->
zoom);
83 float(*matrix)[4] = value_p;
86 matrix[0][0] = snode->
zoom;
87 matrix[1][1] = snode->
zoom;
88 matrix[3][0] = snode->
xof;
89 matrix[3][1] = snode->
yof;
96 const float(*matrix)[4] = value_p;
99 snode->
zoom = matrix[0][0];
100 snode->
zoom = matrix[1][1];
101 snode->
xof = matrix[3][0];
102 snode->
yof = matrix[3][1];
143 const float origin[3] = {region->
winx / 2, region->
winy / 2};
150 const float dims[2] = {
151 (ibuf->
x > 0) ? ibuf->
x : 64.0f,
152 (ibuf->
y > 0) ? ibuf->
y : 64.0f,
173 .range_get_fn =
NULL,
186 gzgt->
name =
"Backdrop Transform Widget";
187 gzgt->
idname =
"NODE_GGT_backdrop_transform";
235 rect->
xmin = nxy->
x1 / dims[0];
236 rect->
xmax = nxy->
x2 / dims[0];
237 rect->
ymin = nxy->
y1 / dims[1];
238 rect->
ymax = nxy->
y2 / dims[1];
254 nxy->
x1 = rect->
xmin * dims[0];
255 nxy->
x2 = rect->
xmax * dims[0];
256 nxy->
y1 = rect->
ymin * dims[1];
257 nxy->
y2 = rect->
ymax * dims[1];
266 float(*matrix)[4] = value_p;
272 bool is_relative = (bool)
node->custom2;
285 const float(*matrix)[4] = value_p;
291 bool is_relative = (bool)
node->custom2;
294 const bool nx = rct.xmin > rct.xmax;
295 const bool ny = rct.ymin > rct.ymax;
308 SWAP(
float, rct.xmin, rct.xmax);
311 SWAP(
float, rct.ymin, rct.ymax);
330 if ((
node->custom1 & (1 << 0)) == 0) {
374 crop_group->
state.
dims[0] = (ibuf->
x > 0) ? ibuf->
x : 64.0f;
375 crop_group->
state.
dims[1] = (ibuf->
y > 0) ? ibuf->
y : 64.0f;
394 .range_get_fn =
NULL,
407 gzgt->
name =
"Backdrop Crop Widget";
408 gzgt->
idname =
"NODE_GGT_backdrop_crop";
490 sbeam_group->
state.
dims[0] = (ibuf->
x > 0) ? ibuf->
x : 64.0f;
491 sbeam_group->
state.
dims[1] = (ibuf->
y > 0) ? ibuf->
y : 64.0f;
512 gzgt->
name =
"Sun Beams Widget";
513 gzgt->
idname =
"NODE_GGT_sbeam";
563 for (
int i = 0; i < 4; i++) {
582 float matrix_space[4][4];
584 snode, region, cpin_group->
state.
dims, matrix_space);
586 for (
int i = 0; i < 4; i++) {
602 cpin_group->
state.
dims[0] = (ibuf->
x > 0) ? ibuf->
x : 64.0f;
603 cpin_group->
state.
dims[1] = (ibuf->
y > 0) ? ibuf->
y : 64.0f;
623 for (
int i = 0; i < 4; i++) {
634 gzgt->
name =
"Corner Pin Widget";
635 gzgt->
idname =
"NODE_GGT_backdrop_corner_pin";
typedef float(TangentPoint)[2]
struct SpaceNode * CTX_wm_space_node(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
struct Image * BKE_image_ensure_viewer(struct Main *bmain, int type, const char *name)
struct bNode * nodeGetActive(struct bNodeTree *ntree)
#define CMP_NODE_SUNBEAMS
void unit_m4(float m[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
MINLINE void mul_v3_fl(float r[3], float f)
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
bool BLI_rctf_isect(const struct rctf *src1, const struct rctf *src2, struct rctf *dest)
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
void BLI_rctf_recenter(struct rctf *rect, float x, float y)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
void BLI_rctf_resize(struct rctf *rect, float x, float y)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
@ ED_GIZMO_MOVE_STYLE_CROSS_2D
@ ED_GIZMO_CAGE2D_XFORM_FLAG_TRANSLATE
@ ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE
@ ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE_UNIFORM
_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 GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble ny
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel CMP_NODE_SPLITVIEWER
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White CMP_NODE_VIEWER
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View CMP_NODE_CORNERPIN
StructRNA RNA_CompositorNodeSunBeams
StructRNA RNA_SpaceNodeEditor
StructRNA RNA_CompositorNodeCrop
@ WM_GIZMOGROUPTYPE_PERSISTENT
void *(* MEM_mallocN)(size_t len, const char *str)
static void WIDGETGROUP_node_corner_pin_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
static void WIDGETGROUP_node_transform_refresh(const bContext *C, wmGizmoGroup *gzgroup)
void NODE_GGT_backdrop_corner_pin(wmGizmoGroupType *gzgt)
static void WIDGETGROUP_node_crop_refresh(const bContext *C, wmGizmoGroup *gzgroup)
static void WIDGETGROUP_node_transform_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
static void WIDGETGROUP_node_sbeam_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
static void WIDGETGROUP_node_crop_draw_prepare(const bContext *C, wmGizmoGroup *gzgroup)
static void node_gizmo_calc_matrix_space_with_image_dims(const SpaceNode *snode, const ARegion *region, const float image_dims[2], float matrix_space[4][4])
static bool WIDGETGROUP_node_sbeam_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
static void WIDGETGROUP_node_corner_pin_refresh(const bContext *C, wmGizmoGroup *gzgroup)
static void two_xy_from_rect(NodeTwoXYs *nxy, const rctf *rect, const float dims[2], bool is_relative)
static void gizmo_node_backdrop_prop_matrix_set(const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop, const void *value_p)
void NODE_GGT_backdrop_sun_beams(wmGizmoGroupType *gzgt)
static void gizmo_node_crop_update(struct NodeCropWidgetGroup *crop_group)
void NODE_GGT_backdrop_transform(wmGizmoGroupType *gzgt)
static void WIDGETGROUP_node_sbeam_draw_prepare(const bContext *C, wmGizmoGroup *gzgroup)
static void node_gizmo_calc_matrix_space(const SpaceNode *snode, const ARegion *region, float matrix_space[4][4])
static void WIDGETGROUP_node_crop_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
static void gizmo_node_backdrop_prop_matrix_get(const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop, void *value_p)
static void WIDGETGROUP_node_corner_pin_draw_prepare(const bContext *C, wmGizmoGroup *gzgroup)
static bool WIDGETGROUP_node_crop_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
static void gizmo_node_crop_prop_matrix_get(const wmGizmo *gz, wmGizmoProperty *gz_prop, void *value_p)
void NODE_GGT_backdrop_crop(wmGizmoGroupType *gzgt)
static void two_xy_to_rect(const NodeTwoXYs *nxy, rctf *rect, const float dims[2], bool is_relative)
static void WIDGETGROUP_node_sbeam_refresh(const bContext *C, wmGizmoGroup *gzgroup)
static bool WIDGETGROUP_node_corner_pin_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
static void gizmo_node_crop_prop_matrix_set(const wmGizmo *gz, wmGizmoProperty *gz_prop, const void *value_p)
static bool WIDGETGROUP_node_transform_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
struct bNodeTree * edittree
wmGizmoGroupFnSetupKeymap setup_keymap
wmGizmoGroupFnRefresh refresh
eWM_GizmoFlagGroupTypeFlag flag
wmGizmoGroupFnDrawPrepare draw_prepare
struct wmGizmoProperty::@1149 custom_func
const struct wmGizmoPropertyType * type
struct wmGizmoGroup * parent_gzgroup
wmGizmo * WM_gizmo_new_ptr(const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
void WM_gizmo_set_matrix_location(wmGizmo *gz, const float origin[3])
void WM_gizmo_set_flag(wmGizmo *gz, const int flag, const bool enable)
wmGizmo * WM_gizmo_new(const char *idname, wmGizmoGroup *gzgroup, PointerRNA *properties)
wmKeyMap * WM_gizmogroup_setup_keymap_generic_maybe_drag(const wmGizmoGroupType *UNUSED(gzgt), wmKeyConfig *kc)
void WM_gizmo_target_property_def_rna(wmGizmo *gz, const char *idname, PointerRNA *ptr, const char *propname, int index)
void WM_gizmo_target_property_def_func(wmGizmo *gz, const char *idname, const wmGizmoPropertyFnParams *params)
const wmGizmoType * WM_gizmotype_find(const char *idname, bool quiet)