|
Blender V4.3
|
Go to the source code of this file.
| char constraintModeToChar | ( | const TransInfo * | t | ) |
Definition at line 1228 of file transform_constraints.cc.
References TransInfo::con, CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, and TransCon::mode.
Referenced by saveTransform().
Definition at line 106 of file transform_constraints.cc.
References TransInfo::con, CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, TransInfo::flag, getConstraintSpaceDimension(), TransCon::mode, and T_NULL_ONE.
Referenced by applyBoneSize(), applyResize(), and applySkinResize().
| void drawConstraint | ( | TransInfo * | t | ) |
Definition at line 812 of file transform_constraints.cc.
References add_v3_v3(), TransInfo::center_global, TransInfo::con, CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, CON_SELECT, convertViewVec(), TransCon::drawExtra, DRAWLIGHT, drawLine(), ELEM, TransInfo::flag, 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(), MouseInput::imval, TransCon::mode, TransInfo::mouse, TransInfo::mval, SPACE_IMAGE, SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, TransInfo::spacemtx, TransInfo::spacetype, and T_NO_CONSTRAINT.
Referenced by drawTransformView().
| void drawPropCircle | ( | TransInfo * | t | ) |
Called from drawview.c, as an extra per-window draw option.
Definition at line 883 of file transform_constraints.cc.
References TransInfo::aspect, TransInfo::center_global, copy_m4_m4(), TransInfo::flag, 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(), pos, TransInfo::prop_size, TransInfo::region, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, SPACE_IMAGE, SPACE_VIEW3D, TransInfo::spacetype, T_PROP_EDIT, TH_GRID, unit_m4(), and RegionView3D::viewmat.
Referenced by drawTransformView().
| void drawPropRange | ( | TransInfo * | t | ) |
Draws two lines to indicate a proportional editing range that is only defined in one axis.
Definition at line 946 of file transform_constraints.cc.
References TransInfo::center_global, View2D::cur, TransInfo::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), imm_draw_box_wire_3d(), immBindBuiltinProgram(), immUnbindProgram(), immUniform1f(), immUniform2fv(), immUniformThemeColorShadeAlpha(), immVertexFormat(), pos, TransInfo::prop_size, TransInfo::region, T_PROP_EDIT, TH_GRID, ARegion::v2d, rctf::ymax, and rctf::ymin.
Referenced by drawTransformView().
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 1267 of file transform_constraints.cc.
References TransInfo::con, CON_AXIS0, CON_AXIS1, CON_AXIS2, and TransCon::mode.
Referenced by constraintNumInput(), startConstraint(), and transform_constraint_get_nearest().
| void initSelectConstraint | ( | TransInfo * | t | ) |
Definition at line 1081 of file transform_constraints.cc.
References CON_APPLY, CON_SELECT, O_DEFAULT, O_SCENE, TransInfo::orient_curr, setUserConstraint(), and transform_orientations_current_set().
Referenced by enable_autolock(), and transformEvent().
| bool isLockConstraint | ( | const TransInfo * | t | ) |
Definition at line 1248 of file transform_constraints.cc.
References TransInfo::con, CON_AXIS0, CON_AXIS1, CON_AXIS2, and TransCon::mode.
Referenced by applyPushPull().
| void postSelectConstraint | ( | TransInfo * | t | ) |
Definition at line 1098 of file transform_constraints.cc.
References TransInfo::con, CON_AXIS0, CON_AXIS1, CON_AXIS2, and TransCon::mode.
Referenced by transformEvent().
| void selectConstraint | ( | TransInfo * | t | ) |
Definition at line 1090 of file transform_constraints.cc.
References TransInfo::con, CON_SELECT, TransCon::mode, setNearestAxis(), and startConstraint().
Referenced by transformApply().
Applies individual td->axismtx constraints.
Definition at line 686 of file transform_constraints.cc.
References applyObjectConstraintRot(), applyObjectConstraintSize(), applyObjectConstraintVec(), TransCon::applyRot, TransCon::applySize, TransCon::applyVec, BLI_strncpy(), TransInfo::con, TransCon::drawExtra, drawObjectConstraint(), TransCon::mode, TransCon::pmtx, projection_matrix_calc(), TransInfo::redraw, startConstraint(), TransCon::text, and TREDRAW_HARD.
Referenced by setLocalConstraint(), and setUserConstraint().
Definition at line 671 of file transform_constraints.cc.
References applyAxisConstraintRot(), applyAxisConstraintSize(), applyAxisConstraintVec(), TransCon::applyRot, TransCon::applySize, TransCon::applyVec, BLI_strncpy(), TransInfo::con, TransCon::drawExtra, TransCon::mode, TransCon::pmtx, projection_matrix_calc(), TransInfo::redraw, startConstraint(), TransCon::text, and TREDRAW_HARD.
Referenced by setLocalConstraint(), and setUserConstraint().
Definition at line 701 of file transform_constraints.cc.
References TransInfo::data_len_all, TransInfo::flag, setAxisMatrixConstraint(), setConstraint(), and T_EDIT.
Referenced by setUserConstraint(), and transformEvent().
| void setNearestAxis | ( | TransInfo * | t | ) |
Definition at line 1202 of file transform_constraints.cc.
References TransInfo::con, TransCon::mode, TransCon::pmtx, projection_matrix_calc(), setNearestAxis2d(), setNearestAxis3d(), SPACE_VIEW3D, TransInfo::spacetype, and transform_gizmo_3d_model_from_constraint_and_mode_set().
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 713 of file transform_constraints.cc.
References ATTR_FALLTHROUGH, checkUseAxisMatrix(), TransInfo::con, CON_USER, TransCon::mode, setAxisMatrixConstraint(), setConstraint(), setLocalConstraint(), SNPRINTF, 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().
| void startConstraint | ( | TransInfo * | t | ) |
Definition at line 1057 of file transform_constraints.cc.
References TransInfo::con, CON_APPLY, getConstraintSpaceDimension(), NumInput::idx_max, TransInfo::idx_max, min_ii(), TransCon::mode, TransInfo::num, and TransCon::text.
Referenced by InplaceSolverIslandCallback::processIsland(), MultiBodyInplaceSolverIslandCallback::processIsland(), selectConstraint(), setAxisMatrixConstraint(), and setConstraint().
| void stopConstraint | ( | TransInfo * | t | ) |
Definition at line 1064 of file transform_constraints.cc.
References TransInfo::con, CON_APPLY, CON_SELECT, NumInput::idx_max, TransInfo::idx_max, TransCon::mode, TransInfo::num, O_DEFAULT, TransInfo::orient_curr, TransCon::text, and transform_orientations_current_set().
Referenced by transform_event_modal_constraint(), and transformEvent().
| void transform_constraint_get_nearest | ( | const TransInfo * | t, |
| const blender::float3 & | vec, | ||
| float | r_vec[3] ) |
| 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 303 of file transform_constraints.cc.
References CONSTRAIN_EPSILON, dot_v3v3(), fabsf, isect_ray_ray_v3(), mul_v3_v3fl(), TransSnap::snap_source, TransSnap::snap_target, TransSnap::snapNormal, and TransInfo::tsnap.
Referenced by edge_slide_snap_apply(), transform_constraint_get_nearest(), 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 318 of file transform_constraints.cc.
References CONSTRAIN_EPSILON, dot_v3v3(), fabsf, isect_ray_plane_v3_factor(), mul_v3_v3fl(), TransSnap::snap_source, TransSnap::snap_target, TransSnap::snapNormal, and TransInfo::tsnap.
Referenced by edge_slide_snap_apply(), transform_constraint_get_nearest(), and vert_slide_snap_apply().