Blender
V3.3
|
Go to the source code of this file.
char constraintModeToChar | ( | const TransInfo * | t | ) |
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().
Definition at line 104 of file transform_constraints.c.
References CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, getConstraintSpaceDimension(), t, and T_NULL_ONE.
Referenced by applyBoneSize(), applyResize(), and applySkinResize().
Definition at line 739 of file transform_constraints.c.
References add_v3_v3(), CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, CON_SELECT, convertViewVec(), TransCon::drawExtra, DRAWLIGHT, drawLine(), ELEM, GPU_COMP_F32, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_depth_test_get(), GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformColor4f(), immVertex3fv(), immVertexFormat(), TransCon::mode, SPACE_IMAGE, SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, t, and T_NO_CONSTRAINT.
Referenced by drawTransformView().
Called from drawview.c, as an extra per-window draw option.
Definition at line 810 of file transform_constraints.c.
References C, copy_m4_m4(), CTX_wm_region_view3d(), ELEM, GPU_blend(), GPU_BLEND_ALPHA, GPU_COMP_F32, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_depth_test_get(), GPU_FETCH_FLOAT, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), imm_drawcircball(), immBindBuiltinProgram(), immUnbindProgram(), immUniform1f(), immUniform2fv(), immUniformThemeColorShadeAlpha(), immVertexFormat(), invert_m4_m4(), NULL, pos, SPACE_ACTION, SPACE_GRAPH, SPACE_IMAGE, SPACE_VIEW3D, t, T_PROP_EDIT, TH_GRID, UI_view2d_scale_get(), unit_m4(), and RegionView3D::viewmat.
Referenced by drawTransformView().
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().
Definition at line 977 of file transform_constraints.c.
References CON_APPLY, CON_SELECT, setUserConstraint(), t, and transform_orientations_current_set().
Referenced by transformEvent().
Definition at line 1137 of file transform_constraints.c.
References CON_AXIS0, CON_AXIS1, CON_AXIS2, and t.
Referenced by applyPushPull().
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().
Definition at line 986 of file transform_constraints.c.
References CON_SELECT, setNearestAxis(), startConstraint(), and t.
Referenced by transformApply().
Applies individual td->axismtx
constraints.
Definition at line 675 of file transform_constraints.c.
References applyObjectConstraintRot(), applyObjectConstraintSize(), applyObjectConstraintVec(), BLI_strncpy(), drawObjectConstraint(), projection_matrix_calc(), startConstraint(), t, and TREDRAW_HARD.
Referenced by setLocalConstraint(), and setUserConstraint().
Definition at line 660 of file transform_constraints.c.
References applyAxisConstraintRot(), applyAxisConstraintSize(), applyAxisConstraintVec(), BLI_strncpy(), NULL, projection_matrix_calc(), startConstraint(), t, and TREDRAW_HARD.
Referenced by setLocalConstraint(), and setUserConstraint().
Definition at line 690 of file transform_constraints.c.
References setAxisMatrixConstraint(), setConstraint(), t, and T_EDIT.
Referenced by setUserConstraint(), and transformEvent().
Definition at line 1091 of file transform_constraints.c.
References CON_AXIS0, CON_AXIS1, CON_AXIS2, projection_matrix_calc(), setNearestAxis2d(), setNearestAxis3d(), SPACE_VIEW3D, and t.
Referenced by selectConstraint().
Set the constraint according to the user defined orientation
ftext
is a format string passed to BLI_snprintf. It will add the name of the orientation where s is (logically).
Definition at line 702 of file transform_constraints.c.
References ATTR_FALLTHROUGH, BLI_snprintf(), checkUseAxisMatrix(), CON_USER, setAxisMatrixConstraint(), setConstraint(), setLocalConstraint(), t, transform_orientation_or_default(), transform_orientations_spacename_get(), V3D_ORIENT_CURSOR, V3D_ORIENT_CUSTOM, V3D_ORIENT_CUSTOM_MATRIX, V3D_ORIENT_GIMBAL, V3D_ORIENT_GLOBAL, V3D_ORIENT_LOCAL, V3D_ORIENT_NORMAL, and V3D_ORIENT_VIEW.
Referenced by initSelectConstraint(), initTransform(), and transform_event_modal_constraint().
Definition at line 953 of file transform_constraints.c.
References CON_APPLY, getConstraintSpaceDimension(), min_ii(), and t.
Referenced by InplaceSolverIslandCallback::processIsland(), MultiBodyInplaceSolverIslandCallback::processIsland(), selectConstraint(), setAxisMatrixConstraint(), and setConstraint().
Definition at line 960 of file transform_constraints.c.
References CON_APPLY, CON_SELECT, t, and transform_orientations_current_set().
Referenced by transform_event_modal_constraint(), and transformEvent().
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().
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().