Blender  V3.3
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 (const TransInfo *t)
 
int getConstraintSpaceDimension (const TransInfo *t)
 

Function Documentation

◆ constraintModeToChar()

char constraintModeToChar ( const TransInfo t)

◆ constraintModeToIndex()

int constraintModeToIndex ( const TransInfo t)

Definition at line 1117 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 ( const 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 1156 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 ( const TransInfo t)

Definition at line 1137 of file transform_constraints.c.

References CON_AXIS0, CON_AXIS1, CON_AXIS2, and t.

Referenced by applyPushPull().

◆ postSelectConstraint()

void postSelectConstraint ( TransInfo t)

Definition at line 994 of file transform_constraints.c.

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

Referenced by transformEvent().

◆ selectConstraint()

void selectConstraint ( TransInfo t)

Definition at line 986 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 690 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  text[] 
)

◆ 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 298 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 312 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().