60 t->
flag &= ~T_ALL_RESTRICTIONS;
225 if (area ==
nullptr) {
229 else if (((region ==
nullptr) || (region->regiondata ==
nullptr)) &&
243 const char *prop_id =
nullptr;
245 prop_id =
"use_even_offset";
345 bool t_values_set_is_array =
false;
350 float values[4] = {0};
353 t_values_set_is_array =
true;
370 bool constraint_axis[3] = {
false,
false,
false};
374 constraint_axis[0] = constraint_axis[1] = constraint_axis[2] =
true;
380 if (constraint_axis[0] || constraint_axis[1] || constraint_axis[2]) {
383 if (constraint_axis[0]) {
386 if (constraint_axis[1]) {
389 if (constraint_axis[2]) {
396 short orient_types[3];
398 float custom_matrix[3][3];
401 int orient_type_default = -1;
402 int orient_type_set = -1;
403 int orient_type_matrix_set = -1;
407 orient_type_scene = orient_slot->
type;
410 orient_type_scene += index_custom;
449 else if (orient_type_set == -1) {
454 orient_type_default = orient_type_scene;
456 if (orient_type_set != -1) {
459 orient_type_default = orient_type_set;
463 else if (orient_type_matrix_set != -1) {
464 orient_type_set = orient_type_matrix_set;
467 orient_type_default = orient_type_set;
472 if (orient_type_set == -1) {
486 orient_type_apply =
O_SET;
491 if (orient_type_matrix_set == orient_type_set) {
496 orient_types[
O_DEFAULT] = short(orient_type_default);
497 orient_types[
O_SCENE] = short(orient_type_scene);
498 orient_types[
O_SET] = short(orient_type_set);
500 for (
int i = 0; i < 3; i++) {
503 for (j = 0; j < i; j++) {
504 if (orient_types[j] == orient_types[i]) {
511 C, t, orient_types[i], custom_matrix, t->
orient[i].
matrix);
516 for (
int i = 0; i < 3; i++) {
577 bool use_prop_edit =
false;
579 use_prop_edit = ts->proportional_fcurve;
582 use_prop_edit = ts->proportional_action;
585 use_prop_edit = ts->proportional_mask;
588 use_prop_edit = ts->proportional_objects;
591 use_prop_edit = (ts->proportional_edit &
PROP_EDIT_USE) != 0;
618 printf(
"Proportional size (%f) under 0.00001, resetting to 1!\n", t->
prop_size);
663 t->
flag &= ~T_MIRROR;
690 kmi_passthrough = kmi;
709 custom_data->
free_cb(t, tc, custom_data);
712 else if ((custom_data->
data !=
nullptr) && custom_data->
use_free) {
714 custom_data->
data =
nullptr;
717 custom_data->
free_cb =
nullptr;
769 for (
int a = 0; a < tc->data_len; a++, td++) {
804 if (t->
rng !=
nullptr) {
842 if (td_basic->val && td_basic->val != td_basic->loc) {
843 *td_basic->val = td_basic->ival;
884 for (td = tc->data; td < tc->data + tc->data_len; td++) {
888 for (tdm = tc->data_mirror; tdm < tc->data_mirror + tc->data_mirror_len; tdm++) {
892 for (td2d = tc->data_2d; tc->data_2d && td2d < tc->data_2d + tc->data_len; td2d++) {
894 td2d->
h1[0] = td2d->
ih1[0];
895 td2d->
h1[1] = td2d->
ih1[1];
898 td2d->
h2[0] = td2d->
ih2[0];
899 td2d->
h2[1] = td2d->
ih2[1];
920 if (tc->use_local_mat) {
921 mul_v3_m4v3(tc->center_local, tc->imat, center_global);
948 float cursor_local_buf[2];
949 const float *cursor =
nullptr;
958 cursor = cursor_local_buf;
962 cursor = space_clip->
cursor;
981 r_center[0] = co[0] * t->
aspect[0];
982 r_center[1] = co[1] * t->
aspect[1];
991 r_center[0] = cursor[0] * t->
aspect[0];
992 r_center[1] = cursor[1] * t->
aspect[1];
1008 r_center[0] =
float(scene->r.cfra);
1033 float partial[3] = {0.0f, 0.0f, 0.0f};
1038 for (
int i = 0; i < tc->data_len; i++) {
1044 for (
int i = 0; i < tc->data_mirror_len; i++) {
1052 mul_v3_fl(partial, 1.0f /
float(total));
1059 float max[3],
min[3];
1060 bool changed =
false;
1064 for (
int i = 0; i < tc->data_len; i++) {
1070 for (
int i = 0; i < tc->data_mirror_len; i++) {
1099 mul_m4_v3(ob->object_to_world().ptr(), r_center);
1186 t->
zfac = 1.0f / zoomx;
1229 float zoom_prev = t->
zfac;
1274 const char *pet_id =
nullptr;
1277 for (i = 0; i < tc->data_len; i++, td++) {
1305 td->
factor = dist * dist;
1308 td->
factor = 3.0f * dist * dist - 2.0f * dist * dist * dist;
1323 if (t->
rng ==
nullptr) {
1331 td->
factor = dist * (2.0f - dist);
1343 pet_id =
N_(
"(Sharp)");
1346 pet_id =
N_(
"(Smooth)");
1349 pet_id =
N_(
"(Root)");
1352 pet_id =
N_(
"(Linear)");
1355 pet_id =
N_(
"(Constant)");
1358 pet_id =
N_(
"(Sphere)");
1361 pet_id =
N_(
"(Random)");
1364 pet_id =
N_(
"(InvSquare)");
1377 for (i = 0; i < tc->data_len; i++, td++) {
1392 float dmat_inv[3][3];
1440 float axis[3],
angle;
void BKE_brush_tag_unsaved_changes(Brush *brush)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
ToolSettings * CTX_data_tool_settings(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
wmMsgBus * CTX_wm_message_bus(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Base * BKE_view_layer_active_base_get(ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
void BKE_mask_coord_from_image(struct Image *image, struct ImageUser *iuser, float r_co[2], const float co[2])
void BKE_mask_coord_from_movieclip(struct MovieClip *clip, struct MovieClipUser *user, float r_co[2], const float co[2])
Object * BKE_modifiers_is_deformed_by_armature(Object *ob)
Paint * BKE_paint_get_active(Scene *sce, ViewLayer *view_layer)
Paint * BKE_paint_get_active_from_context(const bContext *C)
Brush * BKE_paint_brush(Paint *paint)
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void unit_m3(float m[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
bool invert_m3_m3(float inverse[3][3], const float mat[3][3])
void normalize_m3(float R[3][3]) ATTR_NONNULL()
void mul_m4_v3(const float M[4][4], float r[3])
void invert_m3_m3_safe_ortho(float inverse[3][3], const float mat[3][3])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void quat_to_mat3(float m[3][3], const float q[4])
void mat3_to_quat(float q[4], const float mat[3][3])
float normalize_qt_qt(float r[4], const float q[4])
void mat3_to_compatible_eulO(float eul[3], const float oldrot[3], short order, const float mat[3][3])
void eulO_to_mat3(float M[3][3], const float e[3], short order)
void mat3_to_axis_angle(float axis[3], float *angle, const float mat[3][3])
void copy_qt_qt(float q[4], const float a[4])
void axis_angle_to_mat3(float R[3][3], const float axis[3], float angle)
MINLINE void copy_v4_v4(float r[4], const float a[4])
void minmax_v3v3_v3(float min[3], float max[3], const float vec[3])
MINLINE void mul_v3_v3(float r[3], const float a[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE bool is_zero_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE float normalize_v3(float n[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
struct RNG * BLI_rng_new(unsigned int seed)
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
#define STRNCPY_UTF8(dst, src)
Platform independent time functions.
long int BLI_time_now_seconds_i(void)
#define INIT_MINMAX(min, max)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define OB_MODE_ALL_PAINT
#define OB_MODE_ALL_WEIGHT_PAINT
@ OB_MODE_EDIT_GPENCIL_LEGACY
#define BASE_SELECTED(v3d, base)
@ UVCALC_TRANSFORM_CORRECT_SLIDE
#define BASE_VISIBLE(v3d, base)
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_CENTER_MEDIAN
@ V3D_AROUND_LOCAL_ORIGINS
@ V3D_ORIENT_CUSTOM_MATRIX
bool ED_space_clip_check_show_trackedit(const SpaceClip *sc)
bool ED_space_clip_check_show_maskedit(const SpaceClip *sc)
bool ED_space_image_show_uvedit(const SpaceImage *sima, Object *obedit)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
bool ED_region_draw_cb_exit(ARegionType *art, void *handle)
void ED_uvedit_live_unwrap_end(bool cancel)
void ED_view3d_navigation_free(bContext *C, ViewOpsData *vod)
float ED_view3d_calc_zfac(const RegionView3D *rv3d, const float co[3])
ViewOpsData * ED_view3d_navigation_init(bContext *C, const wmKeyMapItem *kmi_merge)
eV3DProjStatus ED_view3d_project_float_global(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
float UI_view2d_view_to_region_y(const View2D *v2d, float y)
float UI_view2d_view_to_region_x(const View2D *v2d, float x)
draw_view in_light_buf[] float
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
bool calc_active_center_for_editmode(Object *obedit, bool select_only, float r_center[3])
bool calc_active_center_for_posemode(Object *ob, bool select_only, float r_center[3])
VecBase< float, 2 > float2
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_array_check(PropertyRNA *prop)
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int SEQ_tool_settings_pivot_point_get(Scene *scene)
struct ARegionType * type
struct PaintCurve * paint_curve
struct ToolSettings * toolsettings
TransformOrientationSlot orientation_slots[4]
struct MovieClipUser user
TransCustomData first_elem
void(* free_cb)(TransInfo *, TransDataContainer *tc, TransCustomData *custom_data)
TransDataCurveHandleFlags * hdata
float snap_spatial_precision
struct TransInfo::@565 orient[3]
TransModeInfo * mode_info
void * draw_handle_cursor
float values_modal_offset[4]
TransCustomDataContainer custom
TransDataContainer * data_container
bool is_orient_default_overwrite
struct wmTimer * animtimer
struct ReportList * reports
struct wmOperatorType * type
void WM_cursor_modal_restore(wmWindow *win)
void WM_event_drag_start_mval_fl(const wmEvent *event, const ARegion *region, float r_mval[2])
#define ISMOUSE_BUTTON(event_type)
wmKeyMap * WM_keymap_active(const wmWindowManager *wm, wmKeyMap *keymap)
bool WM_paint_cursor_end(wmPaintCursor *handle)