75 if (area ==
nullptr) {
117 msg_sub_value_gz_tag_refresh.
owner = region;
127 &rna_SpaceImageEditor_pivot_point,
131 if (props[
i] ==
nullptr) {
179 const float alpha = 0.6f;
180 const float alpha_hi = 1.0f;
200 r_col_hi[3] *= alpha_hi;
233 float min_buf[2], max_buf[2];
234 if (r_min ==
nullptr) {
237 if (r_max ==
nullptr) {
242 bool has_select =
false;
245 switch (sima->
mode) {
251 scene, view_layer,
nullptr);
274 int selected_strips = strips.
size();
275 if (selected_strips > 0) {
278 scene, strips, selected_strips != 1);
282 if (selected_strips > 1) {
306 if (has_select ==
false) {
329 bool use_local_orient = strips.
size() == 1;
331 if (use_local_orient) {
351 if (strips.
size() == 1) {
353 for (
Strip *strip : strips) {
356 return transform->rotation * mirror[0] * mirror[1];
372 bool has_select = !strips.
is_empty();
375 for (
Strip *strip : strips) {
379 mul_v2_fl(r_pivot, 1.0f / strips.size());
389 bool has_select =
false;
394 switch (sima->
mode) {
397 sima, scene, view_layer, r_pivot, sima->
around, &has_select);
475 float color[4], color_hi[4];
480 float axis[3] = {0.0f};
484 float offset[3] = {0, 0, 0};
496 float color[4], color_hi[4];
517 bool constraint[3] = {
false};
518 constraint[
i] =
true;
536 const bool constraint_x[3] = {
true,
false,
false};
537 const bool constraint_y[3] = {
false,
true,
false};
594 if (has_select ==
false) {
635 const float min_gizmo_pixel_size = 0.001f;
636 const float min_scale_axis_x = min_gizmo_pixel_size / ggd->
cage->
matrix_space[0][0];
637 const float min_scale_axis_y = min_gizmo_pixel_size / ggd->
cage->
matrix_space[1][1];
647 float matrix_rotate[4][4];
672 const float *mid = ggd->
origin;
673 const float *
min = ggd->
min;
674 const float *
max = ggd->
max;
690 float n[3] = {mid[0],
max[1], 0.0f};
691 float w[3] = {
min[0], mid[1], 0.0f};
692 float e[3] = {
max[0], mid[1], 0.0f};
693 float s[3] = {mid[0],
min[1], 0.0f};
695 float nw[3] = {
min[0],
max[1], 0.0f};
696 float ne[3] = {
max[0],
max[1], 0.0f};
697 float sw[3] = {
min[0],
min[1], 0.0f};
698 float se[3] = {
max[0],
min[1], 0.0f};
700 float c[3] = {mid[0], mid[1], 0.0f};
702 float orient_matrix[3][3];
833 if (has_select ==
false) {
860 float axis[3] = {0.0f}, rotated_axis[3];
882 float color[4], color_hi[4];
896 float color[4], color_hi[4];
917 bool constraint[3] = {
false};
918 constraint[
i] =
true;
993 if (has_select ==
false) {
bScreen * CTX_wm_screen(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
#define BLI_assert_msg(a, msg)
MINLINE float max_ff(float a, float b)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m3(float m[3][3])
void rotate_m4(float mat[4][4], char axis, float angle)
void unit_m4(float m[4][4])
void axis_angle_to_mat3_single(float R[3][3], char axis, float angle)
MINLINE void copy_v4_v4(float r[4], const float a[4])
void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], float angle)
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE bool equals_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
void rotate_v2_v2fl(float r[2], const float p[2], float angle)
Object is a sort of wrapper for general info.
@ V3D_AROUND_CENTER_BOUNDS
@ ED_GIZMO_CAGE_DRAW_FLAG_CORNER_HANDLES
@ ED_GIZMO_CAGE_DRAW_FLAG_XFORM_CENTER_HANDLE
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MAX_Y
@ ED_GIZMO_CAGE2D_PART_ROTATE
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MAX_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_X
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MIN_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_X
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MIN_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_Y
@ ED_GIZMO_BUTTON_SHOW_BACKDROP
@ ED_GIZMO_CAGE_XFORM_FLAG_SCALE
@ ED_GIZMO_CAGE_XFORM_FLAG_TRANSLATE
@ ED_GIZMO_CAGE_XFORM_FLAG_ROTATE
@ ED_GIZMO_ARROW_STYLE_BOX
bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
bool ED_space_image_show_uvedit(const SpaceImage *sima, Object *obedit)
bool ED_space_image_show_mask(const SpaceImage *sima)
void ED_mask_center_from_pivot_ex(const bContext *C, ScrArea *area, float r_center[2], char mode, bool *r_has_select)
bool ED_mask_selected_minmax(const bContext *C, float min[2], float max[2], bool handles_as_control_point)
void ED_region_tag_redraw_editor_overlays(ARegion *region)
bool ED_uvedit_minmax_multi(const Scene *scene, blender::Span< Object * > objects_edit, float r_min[2], float r_max[2])
bool ED_uvedit_center_from_pivot_ex(const SpaceImage *sima, Scene *scene, ViewLayer *view_layer, float r_center[2], char mode, bool *r_has_select)
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
Read Guarded memory(de)allocation.
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_view2d_view_to_region_m4(const View2D *v2d, float matrix[4][4]) ATTR_NONNULL()
void UI_view2d_view_to_region_fl(const View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL()
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
@ WM_GIZMO_DRAW_OFFSET_SCALE
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
int64_t remove_if(Predicate &&predicate)
void * MEM_callocN(size_t len, const char *str)
ListBase * channels_displayed_get(const Editing *ed)
Bounds< float2 > image_transform_bounding_box_from_collection(Scene *scene, blender::Span< Strip * > strips, bool apply_rotation)
Editing * editing_get(const Scene *scene)
float2 image_transform_mirror_factor_get(const Strip *strip)
float2 image_transform_origin_offset_pixelspace_get(const Scene *scene, const Strip *strip)
VectorSet< Strip * > query_rendered_strips(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int displayed_channel)
ListBase * active_seqbase_get(const Editing *ed)
float2 image_preview_unit_to_px(const Scene *scene, const float2 co_src)
VecBase< float, 2 > float2
VecBase< float, 3 > float3
void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const bool *values)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
struct ToolSettings * toolsettings
StripTransform * transform
wmGizmoGroupFnSetupKeymap setup_keymap
wmGizmoGroupFnMsgBusSubscribe message_subscribe
wmGizmoGroupFnRefresh refresh
wmGizmoGroupFnInvokePrepare invoke_prepare
wmGizmoGroupFnDrawPrepare draw_prepare
wmGizmoMap * parent_gzmap
float matrix_offset[4][4]
void WM_gizmo_set_matrix_offset_location(wmGizmo *gz, const float offset[3])
wmGizmoOpElem * WM_gizmo_operator_get(wmGizmo *gz, int part_index)
void WM_gizmo_set_color_highlight(wmGizmo *gz, const float color_hi[4])
void WM_gizmo_set_line_width(wmGizmo *gz, const float line_width)
void WM_gizmo_set_fn_custom_modal(wmGizmo *gz, wmGizmoFnModal fn)
wmGizmo * WM_gizmo_new_ptr(const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
void WM_gizmo_set_scale(wmGizmo *gz, const float scale)
void WM_gizmo_set_matrix_location(wmGizmo *gz, const float origin[3])
void WM_gizmo_set_matrix_rotation_from_z_axis(wmGizmo *gz, const float z_axis[3])
PointerRNA * WM_gizmo_operator_set(wmGizmo *gz, int part_index, wmOperatorType *ot, IDProperty *properties)
void WM_gizmo_set_color(wmGizmo *gz, const float color[4])
wmKeyMap * WM_gizmogroup_setup_keymap_generic_maybe_drag(const wmGizmoGroupType *, wmKeyConfig *kc)
void WM_gizmo_do_msg_notify_tag_refresh(bContext *, wmMsgSubscribeKey *, wmMsgSubscribeValue *msg_val)
const wmGizmoType * WM_gizmotype_find(const StringRef idname, bool quiet)
void WM_msg_subscribe_rna(wmMsgBus *mbus, PointerRNA *ptr, const PropertyRNA *prop, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)