Blender  V2.93
Functions
transform_constraints.h File Reference

Go to the source code of this file.

Functions

void constraintNumInput (TransInfo *t, float vec[3])
 
void transform_constraint_snap_axis_to_edge (const TransInfo *t, const float axis[3], float r_out[3])
 
void transform_constraint_snap_axis_to_face (const TransInfo *t, const float axis[3], float r_out[3])
 
void setConstraint (TransInfo *t, int mode, const char text[])
 
void setAxisMatrixConstraint (TransInfo *t, int mode, const char text[])
 
void setLocalConstraint (TransInfo *t, int mode, const char text[])
 
void setUserConstraint (TransInfo *t, int mode, const char text[])
 
void drawConstraint (TransInfo *t)
 
void drawPropCircle (const struct bContext *C, TransInfo *t)
 
void startConstraint (TransInfo *t)
 
void stopConstraint (TransInfo *t)
 
void initSelectConstraint (TransInfo *t)
 
void selectConstraint (TransInfo *t)
 
void postSelectConstraint (TransInfo *t)
 
void setNearestAxis (TransInfo *t)
 
int constraintModeToIndex (const TransInfo *t)
 
char constraintModeToChar (const TransInfo *t)
 
bool isLockConstraint (TransInfo *t)
 
int getConstraintSpaceDimension (TransInfo *t)
 

Function Documentation

◆ constraintModeToChar()

char constraintModeToChar ( const TransInfo t)

◆ constraintModeToIndex()

int constraintModeToIndex ( const TransInfo t)

Definition at line 1121 of file transform_constraints.c.

References CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, and t.

Referenced by saveTransform().

◆ constraintNumInput()

void constraintNumInput ( TransInfo t,
float  vec[3] 
)

◆ drawConstraint()

void drawConstraint ( TransInfo t)

◆ drawPropCircle()

void drawPropCircle ( const struct bContext C,
TransInfo t 
)

◆ getConstraintSpaceDimension()

int getConstraintSpaceDimension ( TransInfo t)

Returns the dimension of the constraint space.

For that reason, the flags always needs to be set to properly evaluate here, even if they aren't actually used in the callback function. (Which could happen for weird constraints not yet designed. Along a path for example.)

Definition at line 1167 of file transform_constraints.c.

References CON_AXIS0, CON_AXIS1, CON_AXIS2, and t.

Referenced by applyAxisConstraintVec(), constraintNumInput(), and startConstraint().

◆ initSelectConstraint()

void initSelectConstraint ( TransInfo t)

◆ isLockConstraint()

bool isLockConstraint ( TransInfo t)

Definition at line 1141 of file transform_constraints.c.

References CON_AXIS0, CON_AXIS1, CON_AXIS2, and t.

Referenced by applyPushPull().

◆ postSelectConstraint()

void postSelectConstraint ( TransInfo t)

◆ selectConstraint()

void selectConstraint ( TransInfo t)

Definition at line 980 of file transform_constraints.c.

References CON_SELECT, setNearestAxis(), startConstraint(), and t.

Referenced by transformApply().

◆ setAxisMatrixConstraint()

void setAxisMatrixConstraint ( TransInfo t,
int  mode,
const char  text[] 
)

◆ setConstraint()

void setConstraint ( TransInfo t,
int  mode,
const char  text[] 
)

◆ setLocalConstraint()

void setLocalConstraint ( TransInfo t,
int  mode,
const char  text[] 
)

Definition at line 682 of file transform_constraints.c.

References setAxisMatrixConstraint(), setConstraint(), t, and T_EDIT.

Referenced by setUserConstraint(), and transformEvent().

◆ setNearestAxis()

void setNearestAxis ( TransInfo t)

◆ setUserConstraint()

void setUserConstraint ( TransInfo t,
int  mode,
const char  ftext[] 
)

◆ startConstraint()

void startConstraint ( TransInfo t)

◆ stopConstraint()

void stopConstraint ( TransInfo t)

◆ transform_constraint_snap_axis_to_edge()

void transform_constraint_snap_axis_to_edge ( const TransInfo t,
const float  axis[3],
float  r_out[3] 
)

Snap to the nearest point on the axis to the edge/line element.

Definition at line 320 of file transform_constraints.c.

References CONSTRAIN_EPSILON, dot_v3v3(), fabsf, blender::tests::is_aligned(), isect_ray_ray_v3(), mul_v3_v3fl(), NULL, and t.

Referenced by applyAxisConstraintVec(), edge_slide_snap_apply(), and vert_slide_snap_apply().

◆ transform_constraint_snap_axis_to_face()

void transform_constraint_snap_axis_to_face ( const TransInfo t,
const float  axis[3],
float  r_out[3] 
)

Snap to the intersection of the axis and the plane defined by the face.

Definition at line 337 of file transform_constraints.c.

References CONSTRAIN_EPSILON, dot_v3v3(), fabsf, blender::tests::is_aligned(), isect_ray_plane_v3(), mul_v3_v3fl(), plane_from_point_normal_v3(), and t.

Referenced by applyAxisConstraintVec(), edge_slide_snap_apply(), and vert_slide_snap_apply().