Blender  V3.3
Classes
transform_mode_resize.c File Reference
#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])
 

Function Documentation

◆ applyResize()

static void applyResize ( TransInfo t,
const int   UNUSEDmval[2] 
)
static

◆ ApplySnapResize()

static void ApplySnapResize ( TransInfo t,
float  vec[3] 
)
static

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().

◆ clip_uv_transform_resize()

static bool clip_uv_transform_resize ( TransInfo t,
float  vec[2] 
)
static

◆ constrain_scale_to_boundary()

static void constrain_scale_to_boundary ( const float  numerator,
const float  denominator,
float scale 
)
static

Find the correction for the scaling factor when "Constrain to Bounds" is active.

Parameters
numeratorHow far the UV boundary (unit square) is from the origin of the scale.
denominatorHow far the AABB is from the origin of the scale.
scaleScale parameter to update.

Definition at line 94 of file transform_mode_resize.c.

References CCL_NAMESPACE_BEGIN::isfinite().

Referenced by clip_uv_transform_resize().

◆ element_resize_fn()

static void element_resize_fn ( void *__restrict  iter_data_v,
const int  iter,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

Definition at line 37 of file transform_mode_resize.c.

References data, ElementResize(), and TD_SKIP.

Referenced by applyResize().

◆ initResize()

void initResize ( TransInfo t,
float  mouse_dir_constraint[3] 
)

◆ ResizeBetween()

static float ResizeBetween ( TransInfo t,
const float  p1[3],
const float  p2[3] 
)
static