75 if (area ==
nullptr) {
117 msg_sub_value_gz_tag_refresh.
owner = region;
127 &rna_SpaceImageEditor_pivot_point,
131 if (props[i] ==
nullptr) {
177 const float alpha = 0.6f;
178 const float alpha_hi = 1.0f;
198 r_col_hi[3] *= alpha_hi;
231 float min_buf[2], max_buf[2];
232 if (r_min ==
nullptr) {
235 if (r_max ==
nullptr) {
240 bool has_select =
false;
243 switch (sima->
mode) {
250 *bmain, scene, view_layer,
nullptr);
273 int selected_strips = strips.
size();
274 if (selected_strips > 0) {
280 if (selected_strips > 1) {
304 if (has_select ==
false) {
327 bool use_local_orient = strips.
size() == 1;
329 if (use_local_orient) {
349 if (strips.
size() == 1) {
351 for (
Strip *strip : strips) {
354 return transform->rotation * mirror[0] * mirror[1];
370 bool has_select = !strips.
is_empty();
373 for (
Strip *strip : strips) {
377 mul_v2_fl(r_pivot, 1.0f / strips.size());
384 bool handles_as_knot_selected_only,
388 bool has_select =
false;
395 switch (sima->
mode) {
398 *bmain, sima, scene, view_layer, r_pivot, sima->
around, &has_select);
402 C, area, sima->
around, handles_as_knot_selected_only, r_pivot, &has_select);
489 float color[4], color_hi[4];
494 float axis[3] = {0.0f};
498 float offset[3] = {0, 0, 0};
510 float color[4], color_hi[4];
531 bool constraint[3] = {
false};
532 constraint[i] =
true;
550 const bool constraint_x[3] = {
true,
false,
false};
551 const bool constraint_y[3] = {
false,
true,
false};
608 if (has_select ==
false) {
649 const float min_gizmo_pixel_size = 0.001f;
650 const float min_scale_axis_x = min_gizmo_pixel_size / ggd->
cage->
matrix_space[0][0];
651 const float min_scale_axis_y = min_gizmo_pixel_size / ggd->
cage->
matrix_space[1][1];
661 float matrix_rotate[4][4];
686 const float *mid = ggd->
origin;
687 const float *
min = ggd->
min;
688 const float *
max = ggd->
max;
705 float n[3] = {mid[0],
max[1], 0.0f};
706 float w[3] = {
min[0], mid[1], 0.0f};
707 float e[3] = {
max[0], mid[1], 0.0f};
708 float s[3] = {mid[0],
min[1], 0.0f};
710 float nw[3] = {
min[0],
max[1], 0.0f};
711 float ne[3] = {
max[0],
max[1], 0.0f};
712 float sw[3] = {
min[0],
min[1], 0.0f};
713 float se[3] = {
max[0],
min[1], 0.0f};
715 float c[3] = {mid[0], mid[1], 0.0f};
717 float orient_matrix[3][3];
848 if (has_select ==
false) {
875 float axis[3] = {0.0f}, rotated_axis[3];
897 float color[4], color_hi[4];
911 float color[4], color_hi[4];
932 bool constraint[3] = {
false};
933 constraint[i] =
true;
1008 if (has_select ==
false) {
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
#define BLI_assert_msg(a, msg)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
int64_t remove_if(Predicate &&predicate)
const T & data(const Action &owning_action) const
float2 image_preview_unit_to_px(const Scene *scene, const float2 co_src)
float2 image_transform_mirror_factor_get(const Strip *strip)
ListBaseT< Strip > * active_seqbase_get(const Editing *ed)
Editing * editing_get(const Scene *scene)
Bounds< float2 > image_transform_bounding_box_from_strips_get(Scene *scene, Span< Strip * > strips)
float2 image_transform_origin_preview_offset_get(const Scene *scene, const Strip *strip)
ListBaseT< SeqTimelineChannel > * channels_displayed_get(const Editing *ed)
VectorSet< Strip * > query_rendered_strips(const Scene *scene, ListBaseT< SeqTimelineChannel > *channels, ListBaseT< Strip > *seqbase, const int timeline_frame, const int displayed_channel)
void get_color_4fv(int colorid, float col[4])
void view2d_view_to_region_fl(const View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL()
void view2d_view_to_region_m4(const View2D *v2d, float matrix[4][4]) ATTR_NONNULL()
void WM_gizmo_set_matrix_rotation_from_z_axis(wmGizmo *gz, const float z_axis[3])
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
ScrArea * CTX_wm_area(const bContext *C)
Scene * CTX_data_sequencer_scene(const bContext *C)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void WM_gizmo_do_msg_notify_tag_refresh(bContext *, wmMsgSubscribeKey *, wmMsgSubscribeValue *msg_val)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void mul_v2_fl(float r[2], float f)
void WM_gizmo_set_color(wmGizmo *gz, const float color[4])
MINLINE void copy_v2_v2(float r[2], const float a[2])
const wmGizmoType * WM_gizmotype_find(const StringRef idname, bool quiet)
@ V3D_AROUND_CENTER_BOUNDS
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void WM_gizmo_set_color_highlight(wmGizmo *gz, const float color_hi[4])
bool ED_uvedit_minmax_multi(const Scene *scene, Span< Object * > objects_edit, float r_min[2], float r_max[2])
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
void WM_gizmo_set_matrix_offset_location(wmGizmo *gz, const float offset[3])
@ ED_GIZMO_CAGE_XFORM_FLAG_SCALE
@ ED_GIZMO_CAGE_XFORM_FLAG_TRANSLATE
@ ED_GIZMO_CAGE_XFORM_FLAG_ROTATE
void ED_region_tag_redraw_editor_overlays(ARegion *region)
void WM_gizmo_set_line_width(wmGizmo *gz, const float line_width)
ViewLayer * CTX_data_view_layer(const bContext *C)
void WM_gizmo_set_scale(wmGizmo *gz, const float scale)
VecBase< float, 2 > float2
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
MINLINE void add_v2_v2(float r[2], const float a[2])
void rotate_v2_v2fl(float r[2], const float p[2], float angle)
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
void WM_gizmo_set_fn_custom_modal(wmGizmo *gz, wmGizmoFnModal fn)
Object * CTX_data_edit_object(const bContext *C)
bool ED_uvedit_center_from_pivot_ex(const Main &bmain, const SpaceImage *sima, Scene *scene, ViewLayer *view_layer, float r_center[2], char mode, bool *r_has_select)
PointerRNA * WM_gizmo_operator_set(wmGizmo *gz, int part_index, wmOperatorType *ot, IDProperty *properties)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
void unit_m4(float m[4][4])
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void ED_mask_center_from_pivot_ex(const bContext *C, ScrArea *area, char mode, bool handles_as_knot_selected_only, float r_center[2], bool *r_has_select)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
MINLINE bool equals_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
@ ED_GIZMO_ARROW_STYLE_BOX
void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const bool *values)
void WM_msg_subscribe_rna(wmMsgBus *mbus, PointerRNA *ptr, const PropertyRNA *prop, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
@ WM_GIZMO_DRAW_OFFSET_SCALE
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void rotate_m4(float mat[4][4], char axis, float angle)
Main * CTX_data_main(const bContext *C)
void unit_m3(float m[3][3])
MINLINE float max_ff(float a, float b)
void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
Scene * CTX_data_scene(const bContext *C)
bScreen * CTX_wm_screen(const bContext *C)
wmKeyMap * WM_gizmogroup_setup_keymap_generic_maybe_drag(const wmGizmoGroupType *, wmKeyConfig *kc)
MINLINE void copy_v4_v4(float r[4], const float a[4])
@ ED_GIZMO_CAGE_DRAW_FLAG_XFORM_CENTER_HANDLE
@ ED_GIZMO_CAGE_DRAW_FLAG_CORNER_HANDLES
bool ED_mask_selected_minmax(const bContext *C, float min[2], float max[2], bool handles_as_knot, bool handles_as_knot_selected_only)
VecBase< float, 3 > float3
Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
wmGizmoOpElem * WM_gizmo_operator_get(wmGizmo *gz, int part_index)
bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
void WM_gizmo_set_matrix_location(wmGizmo *gz, const float origin[3])
@ ED_GIZMO_BUTTON_SHOW_BACKDROP
wmGizmo * WM_gizmo_new_ptr(const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
MINLINE void zero_v2(float r[2])
ARegion * CTX_wm_region(const bContext *C)
bool ED_space_image_show_uvedit(const SpaceImage *sima, Object *obedit)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
void axis_angle_to_mat3_single(float R[3][3], char axis, float angle)
void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], float angle)
bool ED_space_image_show_mask(const SpaceImage *sima)
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_X
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_X
@ ED_GIZMO_CAGE2D_PART_ROTATE
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MAX_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MIN_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MAX_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MIN_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_Y
struct ToolSettings * toolsettings
ListBaseT< SpaceLink > spacedata
eSpaceSeq_Gizmo_Flag gizmo_flag
eSpaceSeq_RegionType mainb
wmGizmoGroupFnMsgBusSubscribe message_subscribe
wmGizmoGroupFnRefresh refresh
wmGizmoGroupFnInvokePrepare invoke_prepare
wmGizmoGroupFnSetupKeymap setup_keymap
wmGizmoGroupFnDrawPrepare draw_prepare
wmGizmoMap * parent_gzmap
float matrix_offset[4][4]