74 if (area ==
nullptr) {
80 switch (area->spacetype) {
116 msg_sub_value_gz_tag_refresh.
owner = region;
117 msg_sub_value_gz_tag_refresh.user_data = gzgroup->
parent_gzmap;
120 switch (area->spacetype) {
126 &rna_SpaceImageEditor_pivot_point,
130 if (props[i] ==
nullptr) {
178 const float alpha = 0.6f;
179 const float alpha_hi = 1.0f;
199 r_col_hi[3] *= alpha_hi;
228 float min_buf[2], max_buf[2];
229 if (r_min ==
nullptr) {
232 if (r_max ==
nullptr) {
237 bool has_select =
false;
242 scene, view_layer,
nullptr);
253 scene, channels, seqbase, scene->r.cfra, 0);
255 int selected_strips = strips.
size();
256 if (selected_strips > 0) {
259 scene, strips, selected_strips != 1, r_min, r_max);
261 if (selected_strips > 1) {
270 const int pivot_point = scene->toolsettings->sequencer_tool_settings->pivot_point;
284 if (has_select ==
false) {
305 scene, channels, seqbase, scene->r.cfra, 0);
308 bool use_local_orient = strips.
size() == 1;
310 if (use_local_orient) {
328 scene, channels, seqbase, scene->r.cfra, 0);
331 if (strips.
size() == 1) {
337 return transform->rotation * mirror[0] * mirror[1];
352 scene, channels, seqbase, scene->r.cfra, 0);
354 bool has_select = !strips.
is_empty();
372 bool has_select =
false;
381 const int pivot_point = scene->toolsettings->sequencer_tool_settings->pivot_point;
390 scene, channels, seqbase, scene->r.cfra, 0);
448 float color[4], color_hi[4];
453 float axis[3] = {0.0f};
457 float offset[3] = {0, 0, 0};
469 float color[4], color_hi[4];
490 bool constraint[3] = {
false};
491 constraint[i] =
true;
509 const bool constraint_x[3] = {
true,
false,
false};
510 const bool constraint_y[3] = {
false,
true,
false};
567 if (has_select ==
false) {
586 ggd->
cage->
flag &= ~WM_GIZMO_HIDDEN;
608 const float min_gizmo_pixel_size = 0.001f;
609 const float min_scale_axis_x = min_gizmo_pixel_size / ggd->
cage->
matrix_space[0][0];
610 const float min_scale_axis_y = min_gizmo_pixel_size / ggd->
cage->
matrix_space[1][1];
620 float matrix_rotate[4][4];
645 const float *mid = ggd->
origin;
646 const float *
min = ggd->
min;
647 const float *max = ggd->
max;
663 float n[3] = {mid[0], max[1], 0.0f};
664 float w[3] = {
min[0], mid[1], 0.0f};
665 float e[3] = {max[0], mid[1], 0.0f};
666 float s[3] = {mid[0],
min[1], 0.0f};
668 float nw[3] = {
min[0], max[1], 0.0f};
669 float ne[3] = {max[0], max[1], 0.0f};
670 float sw[3] = {
min[0],
min[1], 0.0f};
671 float se[3] = {max[0],
min[1], 0.0f};
673 float c[3] = {mid[0], mid[1], 0.0f};
675 float orient_matrix[3][3];
807 if (has_select ==
false) {
834 float axis[3] = {0.0f}, rotated_axis[3];
856 float color[4], color_hi[4];
870 float color[4], color_hi[4];
891 bool constraint[3] = {
false};
892 constraint[i] =
true;
968 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 unit_m4(float m[4][4])
void rotate_m4(float mat[4][4], char axis, float angle)
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_ARROW_STYLE_BOX
@ 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
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)
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(SpaceImage *sima, Scene *scene, ViewLayer *view_layer, float r_center[2], char mode, bool *r_has_select)
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.
ListBase * SEQ_channels_displayed_get(Editing *ed)
int64_t remove_if(Predicate &&predicate)
VectorSet< Sequence * > SEQ_query_rendered_strips(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int displayed_channel)
void *(* MEM_callocN)(size_t len, const char *str)
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(ID *id, StructRNA *type, void *data)
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
ListBase * SEQ_active_seqbase_get(const Editing *ed)
Editing * SEQ_editing_get(const Scene *scene)
wmGizmo * translate_xy[3]
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 char *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)