238 if (area ==
nullptr) {
242 else if (((region ==
nullptr) || (region->
regiondata ==
nullptr)) &&
256 const char *prop_id =
nullptr;
258 prop_id =
"use_even_offset";
358 bool t_values_set_is_array =
false;
363 float values[4] = {0};
366 t_values_set_is_array =
true;
383 bool constraint_axis[3] = {
false,
false,
false};
387 constraint_axis[0] = constraint_axis[1] = constraint_axis[2] =
true;
393 if (constraint_axis[0] || constraint_axis[1] || constraint_axis[2]) {
396 if (constraint_axis[0]) {
399 if (constraint_axis[1]) {
402 if (constraint_axis[2]) {
411 float custom_matrix[3][3];
414 int orient_type_default = -1;
415 int orient_type_set = -1;
416 int orient_type_matrix_set = -1;
420 orient_type_scene = orient_slot->
type;
423 orient_type_scene += index_custom;
462 else if (orient_type_set == -1) {
467 orient_type_default = orient_type_scene;
469 if (orient_type_set != -1) {
472 orient_type_default = orient_type_set;
476 else if (orient_type_matrix_set != -1) {
477 orient_type_set = orient_type_matrix_set;
480 orient_type_default = orient_type_set;
485 if (orient_type_set == -1) {
498 orient_type_apply =
O_SET;
502 if (orient_type_matrix_set == orient_type_set) {
511 for (
int i = 0;
i < 3;
i++) {
514 for (j = 0; j <
i; j++) {
515 if (orient_types[j] == orient_types[
i]) {
527 for (
int i = 0;
i < 3;
i++) {
588 bool use_prop_edit =
false;
631 printf(
"Proportional size (%f) under 0.00001, resetting to 1!\n", t->
prop_size);
676 t->
flag &= ~T_MIRROR;
703 kmi_passthrough = kmi;
732 custom_data->
free_cb(t, tc, custom_data);
735 else if ((custom_data->
data !=
nullptr) && custom_data->
use_free) {
737 custom_data->
data =
nullptr;
740 custom_data->
free_cb =
nullptr;
790 for (
int a = 0; a < tc->data_len; a++, td++) {
826 if (t->
rng !=
nullptr) {
846 if (td_basic->
val && td_basic->
val != td_basic->
loc) {
847 *td_basic->
val = td_basic->
ival;
869 for (td = tc->data; td < tc->
data + tc->data_len; td++) {
873 for (tdm = tc->data_mirror; tdm < tc->data_mirror + tc->data_mirror_len; tdm++) {
878 for (
int i = 0;
i < tc->data_len;
i++) {
903 for (td2d = tc->data_2d; tc->data_2d && td2d < tc->data_2d + tc->data_len; td2d++) {
905 td2d->
h1[0] = td2d->
ih1[0];
906 td2d->
h1[1] = td2d->
ih1[1];
909 td2d->
h2[0] = td2d->
ih2[0];
910 td2d->
h2[1] = td2d->
ih2[1];
931 if (tc->use_local_mat) {
932 mul_v3_m4v3(tc->center_local, tc->imat, center_global);
958 float cursor_local_buf[2];
959 const float *cursor =
nullptr;
969 cursor = cursor_local_buf;
973 cursor = space_clip->
cursor;
992 r_center[0] = co[0] * t->
aspect[0];
993 r_center[1] = co[1] * t->
aspect[1];
1002 r_center[0] = cursor[0] * t->
aspect[0];
1003 r_center[1] = cursor[1] * t->
aspect[1];
1044 float partial[3] = {0.0f, 0.0f, 0.0f};
1049 for (
int i = 0;
i < tc->data_len;
i++) {
1055 for (
int i = 0;
i < tc->data_mirror_len;
i++) {
1063 mul_v3_fl(partial, 1.0f /
float(total));
1071 bool changed =
false;
1075 for (
int i = 0;
i < tc->data_len;
i++) {
1081 for (
int i = 0;
i < tc->data_mirror_len;
i++) {
1110 mul_m4_v3(ob->object_to_world().ptr(), r_center);
1197 t->
zfac = 1.0f / zoomx;
1240 float zoom_prev = t->
zfac;
1285 const char *pet_id =
nullptr;
1288 for (
i = 0;
i < tc->data_len;
i++, td++) {
1310 dist = std::max(dist, 0.0f);
1314 td->
factor = dist * dist;
1319 td->
factor = std::min(1.0f, 3.0f * dist * dist - 2.0f * dist * dist * dist);
1334 if (t->
rng ==
nullptr) {
1342 td->
factor = dist * (2.0f - dist);
1356 pet_id =
N_(
"(Sharp)");
1359 pet_id =
N_(
"(Smooth)");
1362 pet_id =
N_(
"(Root)");
1365 pet_id =
N_(
"(Linear)");
1368 pet_id =
N_(
"(Constant)");
1371 pet_id =
N_(
"(Sphere)");
1374 pet_id =
N_(
"(Random)");
1377 pet_id =
N_(
"(InvSquare)");
1390 for (
i = 0;
i < tc->data_len;
i++, td++) {
1408 float dmat_inv[3][3];
1456 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)
SpaceSeq * CTX_wm_space_seq(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)
Scene * CTX_data_sequencer_scene(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)
ViewLayer * BKE_view_layer_default_render(const Scene *scene)
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(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 copy_v2_v2(float r[2], const float a[2])
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)
BMesh const char void * data
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
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])
int tool_settings_pivot_point_get(Scene *scene)
float2 image_preview_unit_to_px(const Scene *scene, const float2 co_src)
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)
ARegionRuntimeHandle * runtime
struct PaintCurve * paint_curve
struct ToolSettings * toolsettings
TransformOrientationSlot orientation_slots[4]
struct MovieClipUser user
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)