166 if (mulx / divx < muly / divy) {
176 r_vec[0] = mulx * dx / divx;
177 r_vec[1] = muly * dy / divy;
189 const float xy_delta[2] = {
float(dx),
float(dy)};
226 printf(
"%s: called in an invalid context\n", __func__);
237 adr[0] =
int(2140000000.0f);
238 adr[1] =
int(2140000000.0f);
729 return t->
vod !=
nullptr;
757 "PROPORTIONAL_SIZE_DOWN",
759 "Decrease Proportional Influence",
763 "AUTOIK_CHAIN_LEN_DOWN",
765 "Decrease Max AutoIK Chain Length",
769 "INSERTOFS_TOGGLE_DIR",
771 "Toggle Direction for Node Auto-Offset",
785 {0,
nullptr, 0,
nullptr,
nullptr},
882 int constraint_curr = -1;
888 constraint_curr = -2;
895 const char *msg_2d =
"", *msg_3d =
"";
898 switch (modal_type) {
900 msg_2d =
IFACE_(
"along X");
901 msg_3d =
IFACE_(
"along %s X");
905 msg_2d =
IFACE_(
"along Y");
906 msg_3d =
IFACE_(
"along %s Y");
910 msg_2d =
IFACE_(
"along Z");
911 msg_3d =
IFACE_(
"along %s Z");
915 msg_3d =
IFACE_(
"locking %s X");
919 msg_3d =
IFACE_(
"locking %s Y");
923 msg_3d =
IFACE_(
"locking %s Z");
941 short orient_index = 1;
948 if (orient_index != 0) {
951 constraint_curr = -1;
955 if (constraint_curr == constraint_new) {
963 short orient_index = 1;
970 if (orient_index == 0) {
986 bool handled =
false;
1022 switch (event->
val) {
1172 float fac = 1.0f + 0.005f * (
event->xy[1] -
event->prev_xy[1]);
1306 if (is_navigating) {
1335 switch (event->
type) {
1396 switch (event->
type) {
1401 t->
flag &= ~T_ALT_TRANSFORM;
1440 if (!is_navigating && (handled || t->
redraw)) {
1501 if (region == t->
region) {
1553 const char *printable =
IFACE_(
"Auto Keying On");
1554 float printable_size[2];
1561 Scene *scene =
nullptr;
1581 offset =
U.gizmo_size_navigate_v3d;
1584 offset =
U.rvisize * std::min((
U.pixelsize /
U.scale_factor), 1.0f) * 2.5f;
1592 offset *=
U.scale_factor;
1594 xco = (rect->
xmax -
U.widget_unit) -
int(printable_size[0]) - offset;
1595 yco = (rect->
ymax -
U.widget_unit);
1601 float text_color[4], shadow_color[4];
1616 xco -=
U.widget_unit;
1617 yco -=
int(printable_size[1]) / 2;
1632 if (region == t->
region) {
1644 if (region == t->
region) {
1660 bool use_prop_edit =
false;
1661 int prop_edit_flag = 0;
1670 use_prop_edit =
true;
1702 if (use_prop_edit) {
1778 short *snap_flag_ptr;
1800 if (orient_axis != -1) {
1816 short orient_type_set, orient_type_curr;
1823 orient_type_set = orient_type_curr;
1836 bool constraint_axis[3] = {
false,
false,
false};
1839 constraint_axis[0] =
true;
1842 constraint_axis[1] =
true;
1845 constraint_axis[2] =
true;
1855 const char *prop_id =
nullptr;
1856 bool prop_state =
true;
1858 prop_id =
"use_even_offset";
1966 bool has_selected_any =
false;
1969 has_selected_any =
true;
1974 if (!has_selected_any) {
2051 bool use_accurate =
false;
2056 use_accurate =
true;
2099 bool do_skip =
false;
2115 else if (!do_skip) {
2117 if (preserve_clnor) {
2224 memcpy(value, t->
values_final,
sizeof(
float) * value_num);
Functions to insert, delete or modify keyframes.
WorkSpace * CTX_wm_workspace(const bContext *C)
Mask * CTX_data_edit_mask(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
ToolSettings * CTX_data_tool_settings(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
void BKE_editmesh_lnorspace_update(BMEditMesh *em)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
Object * BKE_view_layer_edit_object_get(const ViewLayer *view_layer)
void BKE_mask_coord_to_image(struct Image *image, struct ImageUser *iuser, float r_co[2], const float co[2])
void BKE_mask_coord_to_movieclip(struct MovieClip *clip, struct MovieClipUser *user, float r_co[2], const float co[2])
void BKE_workspace_status_clear(WorkSpace *workspace)
void BLF_shadow(int fontid, FontShadowType type, const float rgba[4]=nullptr)
void BLF_width_and_height(int fontid, const char *str, size_t str_len, float *r_width, float *r_height) ATTR_NONNULL()
void BLF_color4fv(int fontid, const float rgba[4])
#define BLF_DRAW_STR_DUMMY_MAX
void BLF_draw_default(float x, float y, float z, const char *str, size_t str_len) ATTR_NONNULL()
#define LISTBASE_FOREACH(type, var, list)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
void unit_m3(float m[3][3])
void unit_m4(float m[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
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 copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
MINLINE float normalize_v3(float n[3])
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
#define SET_FLAG_FROM_TEST(value, test, flag)
void DEG_id_tag_update(ID *id, unsigned int flags)
@ UVCALC_TRANSFORM_CORRECT_SLIDE
@ UVCALC_TRANSFORM_CORRECT
@ SCE_SNAP_TARGET_NOT_ACTIVE
@ SCE_SNAP_TARGET_NOT_NONEDITED
@ SCE_SNAP_TARGET_ONLY_SELECTABLE
@ SCE_SNAP_TARGET_NOT_EDITED
@ SCE_SNAP_INDIVIDUAL_PROJECT
@ SNODE_INSERTOFS_DIR_RIGHT
@ SNODE_INSERTOFS_DIR_LEFT
@ USER_MINI_AXIS_TYPE_GIZMO
@ USER_MINI_AXIS_TYPE_MINIMAL
@ USER_MINI_AXIS_TYPE_NONE
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_LOCAL_ORIGINS
@ V3D_GIZMO_HIDE_NAVIGATE
@ V3D_ORIENT_CUSTOM_MATRIX
MovieClip * ED_space_clip_get_clip(const SpaceClip *sc)
bool ED_space_clip_check_show_trackedit(const SpaceClip *sc)
bool ED_space_clip_check_show_maskedit(const SpaceClip *sc)
void ED_space_clip_get_aspect(const SpaceClip *sc, float *r_aspx, float *r_aspy)
void ED_clip_point_stable_pos__reverse(const SpaceClip *sc, const 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?...
void ED_space_clip_get_aspect_dimension_aware(const SpaceClip *sc, float *r_aspx, float *r_aspy)
void ED_space_image_get_size(SpaceImage *sima, int *r_width, int *r_height)
void ED_space_image_get_uv_aspect(SpaceImage *sima, float *r_aspx, float *r_aspy)
void ED_space_image_get_aspect(SpaceImage *sima, float *r_aspx, float *r_aspy)
void ED_image_point_pos__reverse(SpaceImage *sima, const ARegion *region, const float co[2], float r_co[2])
void ED_area_tag_redraw(ScrArea *area)
void ED_area_status_text(ScrArea *area, const char *str)
const rcti * ED_region_visible_rect(ARegion *region)
void * ED_region_draw_cb_activate(ARegionType *art, void(*draw)(const bContext *, ARegion *, void *), void *customdata, int type)
#define REGION_DRAW_POST_VIEW
#define REGION_DRAW_POST_PIXEL
bool ED_uvedit_live_unwrap_timer_check(const wmTimer *timer)
void ED_view3d_win_to_delta(const ARegion *region, const float xy_delta[2], float zfac, float r_out[3])
void ED_view3d_text_colors_get(const Scene *scene, const View3D *v3d, float r_text_color[4], float r_shadow_color[4])
eV3DProjStatus ED_view3d_project_int_global(const ARegion *region, const float co[3], int r_co[2], eV3DProjTest flag)
eV3DProjStatus ED_view3d_project_float_global(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
void GPU_blend(eGPUBlend blend)
void GPU_line_width(float width)
void UI_icon_draw(float x, float y, int icon_id)
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_view2d_view_to_region(const View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
#define ND_SPACE_NODE_VIEW
void BM_lnorspace_invalidate(BMesh *bm, const bool do_invalidate_all)
void BM_lnorspace_rebuild(BMesh *bm, bool preserve_clnor)
ATTR_WARN_UNUSED_RESULT const BMVert * v
CCL_NAMESPACE_BEGIN struct Options options
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
bGPdata * ED_gpencil_data_get_active(const bContext *C)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
bool is_autokey_on(const Scene *scene)
bool autokeyframe_cfra_can_key(const Scene *scene, ID *id)
VecBase< float, 2 > float2
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_array_check(PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
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)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
void RNA_property_unset(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
struct ARegionType * type
struct MovieClipUser user
struct TransInfo::@565 orient[3]
TransModeInfo * mode_info
void * draw_handle_cursor
bool is_launch_event_drag
TransConvertTypeInfo * data_type
void(* transform_matrix_fn)(TransInfo *, float[4][4])
void(* draw_fn)(TransInfo *)
void(* transform_fn)(TransInfo *)
enum eRedrawFlag(* handle_event_fn)(TransInfo *, const wmEvent *)
TransSnapPoint * selectedPoint
eSnapSourceOP source_operation
eSnapTargetOP target_operation
bool(* poll_modal_item)(const struct wmOperator *op, int value)
struct wmOperatorType * type
void WM_paint_cursor_tag_redraw(wmWindow *win, ARegion *)
int WM_userdef_event_type_from_keymap_type(int kmitype)
void WM_window_status_area_tag_redraw(wmWindow *win)
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
#define ISMOUSE_MOTION(event_type)
wmKeyMap * WM_modalkeymap_ensure(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)
wmKeyMap * WM_keymap_active(const wmWindowManager *wm, wmKeyMap *keymap)
void WM_msg_publish_rna_params(wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params)
wmPaintCursor * WM_paint_cursor_activate(short space_type, short region_type, bool(*poll)(bContext *C), wmPaintCursorDraw draw, void *customdata)