Blender  V3.3
transform_mode_mirror.c File Reference
#include <stdlib.h>
#include "BLI_math.h"
#include "BLI_math_bits.h"
#include "BLI_string.h"
#include "BKE_armature.h"
#include "BKE_context.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "BLT_translation.h"
#include "transform.h"
#include "transform_convert.h"
#include "transform_mode.h"

Go to the source code of this file.

Functions

Transform (Mirror)
static void ElementMirror (TransInfo *t, TransDataContainer *tc, TransData *td, int axis, bool flip)
 
static void applyMirror (TransInfo *t, const int UNUSED(mval[2]))
 
void initMirror (TransInfo *t)
 

Function Documentation

◆ applyMirror()

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

◆ ElementMirror()

static void ElementMirror ( TransInfo t,
TransDataContainer tc,
TransData td,
int  axis,
bool  flip 
)
static

Mirrors an object by negating the scale of the object on the mirror axis, reflecting the location and adjusting the rotation.

Parameters
axisEither the axis to mirror on (0 = x, 1 = y, 2 = z) in transform space or -1 for no axis mirror.
flipIf true, a mirror on all axis will be performed additionally (point reflection).

Definition at line 41 of file transform_mode_mirror.c.

References add_v3_v3(), add_v3_v3v3(), TransData::axismtx, center, TransDataContainer::center_local, constraintSizeLim(), constraintTransLim(), copy_v3_v3(), CTX_MOVIECLIP, CTX_OBJECT, CTX_POSE_BONE, ElementRotation_ex(), TransData::ext, invert_m3_m3(), TransDataExtension::irotAngle, TransDataExtension::isize, TransData::mtx, mul_m3_m3m3(), mul_m3_v3(), mul_v3_v3v3(), negate_v3(), protectedSizeBits(), protectedTransBits(), TransData::protectflag, reflect_v3_v3v3(), TransDataExtension::rotAngle, TransDataExtension::size, TransData::smtx, sub_v3_v3(), sub_v3_v3v3(), t, T_EDIT, T_POINTS, T_V3D_ALIGN, TD_INDIVIDUAL_SCALE, TD_NO_LOC, transdata_check_local_center(), and unit_m3().

Referenced by applyMirror().

◆ initMirror()

void initMirror ( TransInfo t)

Definition at line 218 of file transform_mode_mirror.c.

References applyMirror(), initMouseInputMode(), INPUT_NONE, t, and T_NULL_ONE.

Referenced by transform_mode_init().