|
Blender V4.3
|
transform modes used by different operators. More...
Go to the source code of this file.
Classes | |
| struct | TransModeInfo |
| struct | TransDataGenericSlideVert |
transform modes used by different operators.
Definition in file transform_mode.hh.
| void constraintSizeLim | ( | const TransInfo * | t, |
| const TransDataContainer * | tc, | ||
| TransData * | td ) |
Definition at line 429 of file transform_mode.cc.
References BKE_constraint_typeinfo_from_type(), TransData::con, TransInfo::con, CON_APPLY, CONSTRAINT_DISABLE, CONSTRAINT_OFF, CONSTRAINT_SPACE_LOCAL, CONSTRAINT_SPACE_POSE, CONSTRAINT_SPACE_WORLD, CONSTRAINT_TYPE_SIZELIMIT, bConstraint::data, bConstraint::enforce, bConstraintTypeInfo::evaluate_constraint, TransData::ext, fabsf, bConstraint::flag, TransDataContainer::imat3, LIMIT_TRANSFORM, TransDataContainer::mat3, mat4_to_size(), bConstraintOb::matrix, TransCon::mode, TransData::mtx, mul_m4_m3m4(), mul_v3_v3(), bConstraint::next, bConstraint::ownspace, signf(), TransDataExtension::size, size_to_mat4(), TransData::smtx, TD_SINGLESIZE, and bConstraint::type.
Referenced by ElementMirror(), and ElementResize().
| void constraintTransLim | ( | const TransInfo * | t, |
| const TransDataContainer * | tc, | ||
| TransData * | td ) |
Definition at line 238 of file transform_mode.cc.
References add_v3_v3(), BKE_constraint_custom_object_space_init(), BKE_constraint_targets_for_solving_get(), BKE_constraint_typeinfo_from_type(), BLI_freelistN(), RenderData::cfra, TransData::con, CONSTRAINT_DISABLE, CONSTRAINT_OFF, CONSTRAINT_SPACE_LOCAL, CONSTRAINT_SPACE_WORLD, CONSTRAINT_TYPE_DISTLIMIT, CONSTRAINT_TYPE_LOCLIMIT, copy_v3_v3(), bConstraint::data, TransInfo::depsgraph, bConstraint::enforce, bConstraintTypeInfo::evaluate_constraint, bConstraint::flag, float, LIMIT_TRANSFORM, LIMITDIST_TRANSFORM, TransDataContainer::mat, bConstraintOb::matrix, TransData::mtx, mul_m3_v3(), bConstraint::next, bConstraint::ownspace, Scene::r, TransInfo::scene, TransData::smtx, sub_v3_v3(), bConstraint::type, unit_m4(), and TransDataContainer::use_local_mat.
Referenced by ElementMirror(), ElementResize(), ElementRotation_ex(), transdata_elem_translate(), and transform_snap_project_individual_apply().
| void ElementResize | ( | const TransInfo * | t, |
| const TransDataContainer * | tc, | ||
| TransData * | td, | ||
| const float | mat[3][3] ) |
Definition at line 934 of file transform_mode.cc.
References add_v3_v3(), add_v3_v3v3(), applyNumInput(), TransCon::applySize, TransInfo::around, TransData::axismtx, TransDataContainer::center_local, TransInfo::con, CON_APPLY, constraintSizeLim(), constraintTransLim(), copy_m3_m3(), copy_v3_v3(), copy_v4_v4(), CTX_GPENCIL_STROKES, CTX_MOVIECLIP, CTX_OBJECT, CTX_POSE_BONE, TransInfo::data_type, ELEM, TransData::ext, fabs(), TransData::factor, TransInfo::flag, interpf(), TransDataExtension::isize, mat3_to_size(), max_ff(), TransCon::mode, TransData::mtx, mul_m3_m3m3(), mul_m3_v3(), mul_mat3_m4_v3(), mul_v3_fl(), bGPDstroke_Runtime::multi_frame_falloff, TransInfo::num, OB_GPENCIL_LEGACY, OB_GREASE_PENCIL, TransInfo::obedit_type, TransInfo::options, TransDataContainer::poseobj, protectedSizeBits(), protectedTransBits(), TransData::protectflag, bGPDstroke::runtime, TransDataExtension::size, TransData::smtx, sub_v3_v3(), sub_v3_v3v3(), T_EDIT, T_POINTS, T_V3D_ALIGN, TD_INDIVIDUAL_SCALE, TD_SINGLESIZE, TransConvertType_Object, TransConvertType_ObjectTexSpace, TransConvertType_Pose, TransConvertType_Sculpt, transdata_check_local_center(), transform_snap_increment(), TransMat3ToSize(), and TransInfo::values_final.
Referenced by applyResize(), and element_resize_fn().
| void ElementRotation | ( | const TransInfo * | t, |
| const TransDataContainer * | tc, | ||
| TransData * | td, | ||
| const float | mat[3][3], | ||
| short | around ) |
Definition at line 814 of file transform_mode.cc.
References TransDataContainer::center_local, ElementRotation_ex(), and transdata_check_local_center().
Referenced by applyAlign(), transdata_elem_bend(), transdata_elem_rotate(), and transdata_elem_trackball().
| void ElementRotation_ex | ( | const TransInfo * | t, |
| const TransDataContainer * | tc, | ||
| TransData * | td, | ||
| const float | mat[3][3], | ||
| const float * | center ) |
Applies values of rotation to td->loc and td->ext->quat based on a rotation matrix (mat) and a pivot (center).
Protected axis and other transform settings are taken into account.
HACK WARNING
This is some VERY ugly special case to deal with pose mode.
The problem is that mtx and smtx include each bone orientation.
That is needed to rotate each bone properly, HOWEVER, to calculate the translation component, we only need the actual armature object's matrix (and inverse). That is not all though. Once the proper translation has been computed, it has to be converted back into the bone's space.
Definition at line 559 of file transform_mode.cc.
References add_eul_euleul(), add_v3_v3(), add_v3_v3v3(), axis_angle_to_quat(), constraintRotLim(), constraintTransLim(), copy_v3_v3(), CTX_GPENCIL_STROKES, CTX_POSE_BONE, TransDataExtension::dquat, TransDataExtension::drot, eulO_to_mat3(), TransData::ext, TransInfo::flag, TransDataContainer::imat3, interp_m3_m3m3(), invert_qt_qt_normalized(), TransDataExtension::iquat, TransDataExtension::irot, TransDataExtension::irotAngle, TransDataExtension::irotAxis, is_zero_v3(), is_zero_v4(), TransDataExtension::l_smtx, TransDataContainer::mat3, mat3_to_compatible_eulO(), mat3_to_quat(), TransData::mtx, mul_m3_m3m3(), mul_m3_series, mul_m3_v3(), mul_qt_qtqt(), bGPDstroke_Runtime::multi_frame_falloff, OB_GPENCIL_LEGACY, OB_GREASE_PENCIL, TransInfo::obedit_type, TransInfo::options, protectedAxisAngleBits(), protectedQuaternionBits(), protectedRotateBits(), protectedTransBits(), TransData::protectflag, TransDataExtension::quat, quat_to_axis_angle(), quat_to_mat3(), TransDataExtension::r_mtx, TransDataExtension::r_smtx, TransDataExtension::rot, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, TransDataExtension::rotAngle, TransDataExtension::rotAxis, TransDataExtension::rotOrder, bGPDstroke::runtime, TransData::smtx, sub_eul_euleul(), sub_v3_v3(), sub_v3_v3v3(), T_POINTS, T_V3D_ALIGN, TD_NO_LOC, TD_PBONE_LOCAL_MTX_C, TD_PBONE_LOCAL_MTX_P, TD_USEQUAT, and unit_m3().
Referenced by ElementMirror(), ElementRotation(), and transdata_elem_translate().
Definition at line 839 of file transform_mode.cc.
References BLI_snprintf(), BLI_snprintf_rlen(), TransInfo::con, CON_APPLY, TransInfo::flag, hasNumInput(), NumInput::idx_max, IFACE_, TransCon::mode, TransInfo::num, NUM_STR_REP_LEN, outputNumInput(), TransInfo::prop_size, TransInfo::proptext, TransInfo::scene, str, T_2D_EDIT, T_PROP_EDIT_ALL, TransCon::text, and Scene::unit.
Referenced by applyResize(), and applySkinResize().
Used by Transform Rotation and Transform Normal Rotation.
Definition at line 532 of file transform_mode.cc.
References BLI_snprintf_rlen(), TransInfo::con, TransInfo::flag, hasNumInput(), IFACE_, TransInfo::num, NUM_STR_REP_LEN, outputNumInput(), TransInfo::prop_size, TransInfo::proptext, RAD2DEGF, TransInfo::scene, str, T_PROP_EDIT_ALL, TransCon::text, and Scene::unit.
Referenced by applyNormalRotation(), and applyRotation().
| void protectedSizeBits | ( | short | protectflag, |
| float | size[3] ) |
Definition at line 219 of file transform_mode.cc.
References OB_LOCK_SCALEX, OB_LOCK_SCALEY, and OB_LOCK_SCALEZ.
Referenced by ElementMirror(), and ElementResize().
| void protectedTransBits | ( | short | protectflag, |
| float | vec[3] ) |
Definition at line 82 of file transform_mode.cc.
References OB_LOCK_LOCX, OB_LOCK_LOCY, and OB_LOCK_LOCZ.
Referenced by ElementMirror(), ElementResize(), ElementRotation_ex(), and transdata_elem_translate().
| bool transdata_check_local_center | ( | const TransInfo * | t, |
| short | around ) |
Definition at line 55 of file transform_mode.cc.
References CTX_MASK, CTX_MOVIECLIP, CTX_OBJECT, CTX_PAINT_CURVE, CTX_POSE_BONE, CTX_SEQUENCER_IMAGE, ELEM, OB_ARMATURE, OB_CURVES_LEGACY, OB_GPENCIL_LEGACY, OB_MBALL, OB_MESH, TransInfo::obedit_type, TransInfo::options, SPACE_GRAPH, TransInfo::spacetype, and V3D_AROUND_LOCAL_ORIGINS.
Referenced by apply_shear_value(), applyToSphere(), clip_uv_transform_resize(), ElementMirror(), ElementResize(), ElementRotation(), and to_sphere_radius_update().
When in modal and not set, initializes a default orientation for the mode.
Definition at line 1215 of file transform_mode.cc.
References BLI_assert, ED_transform_calc_orientation_from_type_ex(), ELEM, TransInfo::flag, TransInfo::is_orient_default_overwrite, TransInfo::matrix, O_DEFAULT, TransInfo::orient, TransInfo::orient_curr, TransInfo::region, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, TransInfo::scene, SPACE_VIEW3D, TransInfo::spacetype, T_MODAL, transform_orientations_current_set(), TransInfo::type, V3D_AROUND_CENTER_BOUNDS, V3D_ORIENT_GLOBAL, V3D_ORIENT_VIEW, TransInfo::view, and TransInfo::view_layer.
Referenced by initNormalRotation(), initResize(), initRotation(), initShear(), and initTranslation().
| bool transform_mode_edge_seq_slide_use_restore_handle_selection | ( | const TransInfo * | t | ) |
Definition at line 138 of file transform_mode_edge_seq_slide.cc.
References TransInfo::custom, TransCustomData::data, TransCustomDataContainer::mode, SeqSlideParams::use_restore_handle_selection, and USER_SEQ_ED_SIMPLE_TWEAKING.
Referenced by initMouseInputMode(), and special_aftertrans_update__sequencer().
| void transform_mode_edge_slide_reproject_input | ( | TransInfo * | t | ) |
Definition at line 952 of file transform_mode_edge_slide.cc.
References EdgeSlideData::curr_sv_index, edge_slide_data_init_mval(), edgeSlideFirstGet(), FOREACH_TRANS_DATA_CONTAINER, TransInfo::mouse, EdgeSlideData::mval_end, EdgeSlideData::mval_start, EdgeSlideData::project(), setCustomPoints(), EdgeSlideData::sv, and EdgeSlideData::update_proj_mat().
Referenced by transform_input_update().
| void transform_mode_init | ( | TransInfo * | t, |
| wmOperator * | op, | ||
| int | mode ) |
Definition at line 1188 of file transform_mode.cc.
References TransInfo::context, TransInfo::data_type, TransInfo::flag, TransModeInfo::flags, TransModeInfo::init_fn, TransInfo::mode, TransInfo::mode_info, mode_info_get(), sequencer_retiming_mode_is_active(), SPACE_SEQ, TransInfo::spacetype, TransConvertType_Mesh, transform_convert_mesh_customdatacorrect_init(), transform_gizmo_3d_model_from_constraint_and_mode_set(), and TransMode_translate.
Referenced by initTransform(), transform_mode_snap_source_init(), and transformEvent().
| bool transform_mode_is_changeable | ( | int | mode | ) |
Informs if the mode can be switched during modal.
Definition at line 66 of file transform_mode.cc.
References ELEM, TFM_EDGE_SLIDE, TFM_NORMAL_ROTATION, TFM_RESIZE, TFM_ROTATION, TFM_TRACKBALL, TFM_TRANSLATION, and TFM_VERT_SLIDE.
Referenced by transform_modal_item_poll(), and transformEvent().
Definition at line 38 of file transform_mode.cc.
References ARM_ENVELOPE, BLI_assert, CTX_data_active_object(), Object::data, bArmature::drawtype, OB_ARMATURE, TFM_BONE_ENVELOPE_DIST, TFM_BONESIZE, TFM_RESIZE, and Object::type.
Referenced by initTransform().
| void transform_mode_snap_source_init | ( | TransInfo * | t, |
| wmOperator * | op ) |
Definition at line 161 of file transform_mode_snapsource.cc.
References MouseInput::apply, SnapSouceCustomData::apply, applyMouseInput(), TransInfo::context, CTX_wm_window(), TransInfo::custom, wmGizmo::custom_modal, SnapSouceCustomData::customdata_mode_prev, TransCustomData::data, TransInfo::data_type, ED_transform_snap_object_context_set_editmesh_callbacks(), ELEM, wmWindow::eventstate, TransInfo::flag, TransSnap::flag, ARegion::gizmo_map, MouseInput::imval, MEM_callocN, MOD_SNAP, MOD_SNAP_FORCED, wmGizmoType::modal, TransCustomDataContainer::mode, TransInfo::mode, TransSnap::mode, TransInfo::mode_info, SnapSouceCustomData::mode_info_prev, TransInfo::modifiers, TransInfo::mouse, SnapSouceCustomData::mouse_prev, TransSnap::object_context, MouseInput::post, SnapSouceCustomData::post, TransInfo::region, restoreTransObjects(), SCE_SNAP_INDIVIDUAL_NEAREST, SCE_SNAP_INDIVIDUAL_PROJECT, SCE_SNAP_TARGET_ALL, SCE_SNAP_TO_EDGE_PERPENDICULAR, SCE_SNAP_TO_GEOM, SCE_SNAP_TO_INCREMENT, SnapSouceCustomData::snap_mode_confirm, TransSnap::snap_target_fn, SPACE_VIEW3D, TransInfo::spacetype, TransSnap::status, T_DRAW_SNAP_SOURCE, TransSnap::target_operation, SnapSouceCustomData::target_operation_prev, TFM_DUMMY, TFM_INIT, TFM_TRANSLATION, TransConvertType_Mesh, transform_mode_init(), transform_snap_flag_from_modifiers_set(), transformModeUseSnap(), TransMode_snapsource, TransInfo::tsnap, wmGizmo::type, MouseInput::use_virtual_mval, SnapSouceCustomData::use_virtual_mval, TransInfo::values_final, WM_gizmo_modal_set_while_modal(), and WM_gizmomap_get_modal().
Referenced by transformEvent().
| void transform_mode_vert_slide_reproject_input | ( | TransInfo * | t | ) |
Definition at line 629 of file transform_mode_vert_slide.cc.
References FOREACH_TRANS_DATA_CONTAINER, VertSlideData::update_proj_mat(), and vert_slide_update_input().
Referenced by transform_input_update().
|
extern |
Definition at line 75 of file transform_mode_align.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 129 of file transform_mode_baketime.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 175 of file transform_mode_bbone_resize.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 377 of file transform_mode_bend.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 204 of file transform_mode_customdata.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 97 of file transform_mode_boneenvelope.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 94 of file transform_mode_boneroll.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 117 of file transform_mode_curveshrinkfatten.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 182 of file transform_mode_customdata.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 973 of file transform_mode_edge_slide.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 118 of file transform_mode_gpopacity.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 114 of file transform_mode_gpshrinkfatten.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 128 of file transform_mode_maskshrinkfatten.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 224 of file transform_mode_mirror.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 188 of file transform_mode_push_pull.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 374 of file transform_mode_resize.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 431 of file transform_mode_rotate.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 143 of file transform_mode_edge_rotate_normal.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 152 of file transform_mode_edge_seq_slide.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 352 of file transform_mode_shear.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 192 of file transform_mode_shrink_fatten.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 169 of file transform_mode_skin_resize.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 259 of file transform_mode_snapsource.cc.
Referenced by transform_mode_snap_source_init().
|
extern |
Definition at line 102 of file transform_mode_tilt.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 156 of file transform_mode_timescale.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 231 of file transform_mode_timeslide.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 150 of file transform_mode_timetranslate.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 266 of file transform_mode_tosphere.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 210 of file transform_mode_trackball.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 674 of file transform_mode_translate.cc.
Referenced by mode_info_get(), snap_target_view3d_fn(), and transform_mode_init().
|
extern |
Definition at line 193 of file transform_mode_customdata.cc.
Referenced by mode_info_get().
|
extern |
Definition at line 643 of file transform_mode_vert_slide.cc.
Referenced by mode_info_get().