Blender
V3.3
|
#include <stdlib.h>
#include "BLI_math.h"
#include "BLI_task.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_unit.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "transform.h"
#include "transform_constraints.h"
#include "transform_convert.h"
#include "transform_mode.h"
#include "transform_snap.h"
Go to the source code of this file.
Classes | |
struct | ElemResizeData |
Functions | |
Transform (Resize) Element | |
static void | element_resize_fn (void *__restrict iter_data_v, const int iter, const TaskParallelTLS *__restrict UNUSED(tls)) |
Transform (Resize) | |
static float | ResizeBetween (TransInfo *t, const float p1[3], const float p2[3]) |
static void | ApplySnapResize (TransInfo *t, float vec[3]) |
static void | constrain_scale_to_boundary (const float numerator, const float denominator, float *scale) |
static bool | clip_uv_transform_resize (TransInfo *t, float vec[2]) |
static void | applyResize (TransInfo *t, const int UNUSED(mval[2])) |
void | initResize (TransInfo *t, float mouse_dir_constraint[3]) |
Definition at line 185 of file transform_mode_resize.c.
References add_v3_v3(), applyNumInput(), applySnappingAsGroup(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), clip_uv_transform_resize(), clipUVData(), CON_APPLY, CON_AXIS0, constraintNumInput(), copy_m3_m3(), copy_v3_fl(), copy_v3_v3(), data, TransDataContainer::data, TransDataContainer::data_len, ED_area_status_text(), element_resize_fn(), ElementResize(), FOREACH_TRANS_DATA_CONTAINER, headerResize(), ElemResizeData::mat, NULL, recalcData(), size_to_mat3(), str, t, T_CLIP_UV, T_INPUT_IS_VALUES_FINAL, T_PROP_EDIT, ElemResizeData::tc, TD_SKIP, TRANSDATA_THREAD_LIMIT, transform_snap_increment(), and UI_MAX_DRAW_STR.
Referenced by initResize().
Definition at line 77 of file transform_mode_resize.c.
References copy_v3_fl(), getSnapPoint(), point, ResizeBetween(), t, and TRANSFORM_DIST_INVALID.
Referenced by initResize().
Definition at line 127 of file transform_mode_resize.c.
References BKE_image_find_nearest_tile_with_offset(), CON_AXIS0, CON_AXIS1, constrain_scale_to_boundary(), data, TransDataContainer::data, TransDataContainer::data_len, FOREACH_TRANS_DATA_CONTAINER, IMA_SRC_TILED, image(), SpaceImage::image, max, min, t, ElemResizeData::tc, and transdata_check_local_center().
Referenced by applyResize().
|
static |
Find the correction for the scaling factor when "Constrain to Bounds" is active.
numerator | How far the UV boundary (unit square) is from the origin of the scale. |
denominator | How far the AABB is from the origin of the scale. |
scale | Scale parameter to update. |
Definition at line 94 of file transform_mode_resize.c.
References CCL_NAMESPACE_BEGIN::isfinite().
Referenced by clip_uv_transform_resize().
|
static |
Definition at line 37 of file transform_mode_resize.c.
References data, ElementResize(), and TD_SKIP.
Referenced by applyResize().
Definition at line 286 of file transform_mode_resize.c.
References applyResize(), ApplySnapResize(), B_UNIT_NONE, copy_m3_m4(), copy_v3_fl(), initMouseInputMode(), INPUT_CUSTOM_RATIO, INPUT_SPRING_FLIP, is_zero_v2(), is_zero_v3(), mul_v3_m3v3(), normalize_v2(), NUM_AFFECT_ALL, NUM_NO_ZERO, NUM_NULL_ONE, project_v2_v2v2(), ResizeBetween(), setCustomPoints(), t, T_EDIT, T_NULL_ONE, TFM_RESIZE, transform_mode_default_modal_orientation_set(), and V3D_ORIENT_GLOBAL.
Referenced by initShrinkFatten(), and transform_mode_init().
Definition at line 55 of file transform_mode_resize.c.
References CON_APPLY, len_v3(), mul_m3_v3(), NULL, project_v3_v3v3(), sub_v3_v3v3(), t, and TRANSFORM_DIST_INVALID.
Referenced by ApplySnapResize(), and initResize().