|
Blender
V2.93
|
Go to the source code of this file.
| char constraintModeToChar | ( | const TransInfo * | t | ) |
| 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().
Definition at line 119 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().
| void drawConstraint | ( | TransInfo * | t | ) |
Definition at line 742 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_VIEW3D, t, and T_NO_CONSTRAINT.
Referenced by drawTransformView().
Definition at line 814 of file transform_constraints.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), 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_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(), mask(), NULL, pos, SPACE_ACTION, SPACE_GRAPH, SPACE_IMAGE, SPACE_VIEW3D, t, T_PROP_EDIT, TH_GRID, unit_m4(), and RegionView3D::viewmat.
Referenced by drawTransformView().
| 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().
| void initSelectConstraint | ( | TransInfo * | t | ) |
Definition at line 971 of file transform_constraints.c.
References CON_APPLY, CON_SELECT, setUserConstraint(), t, and transform_orientations_current_set().
Referenced by transformEvent().
| 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().
| void postSelectConstraint | ( | TransInfo * | t | ) |
Definition at line 988 of file transform_constraints.c.
References CON_AXIS0, CON_AXIS1, CON_AXIS2, CON_SELECT, setNearestAxis(), startConstraint(), t, and TREDRAW_HARD.
Referenced by transformEvent().
| void selectConstraint | ( | TransInfo * | t | ) |
Definition at line 980 of file transform_constraints.c.
References CON_SELECT, setNearestAxis(), startConstraint(), and t.
Referenced by transformApply().
| void setAxisMatrixConstraint | ( | TransInfo * | t, |
| int | mode, | ||
| const char | text[] | ||
| ) |
Definition at line 667 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().
| void setConstraint | ( | TransInfo * | t, |
| int | mode, | ||
| const char | text[] | ||
| ) |
Definition at line 651 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().
| 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().
| void setNearestAxis | ( | TransInfo * | t | ) |
Definition at line 1095 of file transform_constraints.c.
References CON_AXIS0, CON_AXIS1, CON_AXIS2, projection_matrix_calc(), setNearestAxis2d(), setNearestAxis3d(), SPACE_VIEW3D, and t.
Referenced by postSelectConstraint(), and selectConstraint().
| void setUserConstraint | ( | TransInfo * | t, |
| int | mode, | ||
| const char | ftext[] | ||
| ) |
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 700 of file transform_constraints.c.
References ATTR_FALLTHROUGH, BLI_snprintf(), checkUseAxisMatrix(), CON_USER, setAxisMatrixConstraint(), setConstraint(), setLocalConstraint(), t, 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().
| void startConstraint | ( | TransInfo * | t | ) |
Definition at line 947 of file transform_constraints.c.
References CON_APPLY, getConstraintSpaceDimension(), min_ii(), and t.
Referenced by postSelectConstraint(), InplaceSolverIslandCallback::processIsland(), MultiBodyInplaceSolverIslandCallback::processIsland(), selectConstraint(), setAxisMatrixConstraint(), and setConstraint().
| void stopConstraint | ( | TransInfo * | t | ) |
Definition at line 954 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 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().
| 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().