|
Blender
V2.93
|
#include <stdlib.h>#include "MEM_guardedalloc.h"#include "DNA_gpencil_types.h"#include "DNA_mask_types.h"#include "DNA_mesh_types.h"#include "BLI_math.h"#include "BLI_rect.h"#include "BKE_context.h"#include "BKE_editmesh.h"#include "BKE_mask.h"#include "BKE_scene.h"#include "GPU_state.h"#include "ED_clip.h"#include "ED_gpencil.h"#include "ED_image.h"#include "ED_keyframing.h"#include "ED_node.h"#include "ED_screen.h"#include "ED_space_api.h"#include "WM_api.h"#include "WM_message.h"#include "WM_types.h"#include "UI_interface_icons.h"#include "UI_resources.h"#include "UI_view2d.h"#include "RNA_access.h"#include "BLF_api.h"#include "BLT_translation.h"#include "transform.h"#include "transform_constraints.h"#include "transform_convert.h"#include "transform_draw_cursors.h"#include "transform_mode.h"#include "transform_orientations.h"#include "transform_snap.h"Go to the source code of this file.
Definition at line 381 of file transform.c.
References CTX_MASK, CTX_MOVIECLIP, CTX_PAINT_CURVE, ED_space_image_get_size(), SpaceImage::flag, height, SI_COORDFLOATS, SPACE_CLIP, SPACE_IMAGE, t, TFM_TRANSLATION, and width.
Referenced by headerTranslation().
Definition at line 1259 of file transform.c.
References C, calculateCenter(), copy_v2_v2(), copy_v3_v3(), createTransData(), CTX_NO_PET, initTransInfo(), MEM_callocN, MEM_freeN, NULL, postTrans(), special_aftertrans_update(), t, TFM_DUMMY, TRANS_RUNNING, and V3D_AROUND_CENTER_BOUNDS.
Referenced by edbm_bevel_invoke(), edbm_inset_invoke(), and view3d_orbit_calc_center().
| bool checkUseAxisMatrix | ( | TransInfo * | t | ) |
Definition at line 1965 of file transform.c.
References ELEM, OB_ARMATURE, OB_CURVE, OB_MBALL, OB_MESH, t, T_EDIT, and V3D_AROUND_LOCAL_ORIGINS.
Referenced by setUserConstraint().
Definition at line 180 of file transform.c.
References convertViewVec2D(), convertViewVec2D_mask(), CTX_MASK, CTX_PAINT_CURVE, ED_view3d_win_to_delta(), ELEM, float(), RGN_TYPE_WINDOW, SPACE_CLIP, SPACE_GRAPH, SPACE_IMAGE, SPACE_NLA, SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, t, and zero_v3().
Referenced by drawConstraint(), and InputVector().
Definition at line 145 of file transform.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, and View2D::mask.
Referenced by convertViewVec().
Definition at line 155 of file transform.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, and View2D::mask.
Referenced by convertViewVec().
Definition at line 1355 of file transform.c.
References BLF_color3ubv(), BLF_default(), BLF_draw_default(), BLF_draw_default_ascii(), BLF_DRAW_STR_DUMMY_MAX, BLF_width_and_height(), ED_region_visible_rect(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, IFACE_, TH_TEXT_HI, UI_GetThemeColorShade3ubv(), UI_icon_draw(), rcti::xmax, and rcti::ymax.
Referenced by drawTransformPixel().
Definition at line 1915 of file transform.c.
References C, t, transformApply(), TREDRAW_HARD, and TREDRAW_SOFT.
Referenced by initTransform().
Definition at line 1393 of file transform.c.
References AUTOKEY_FLAG_NOWARNING, autokeyframe_cfra_can_key(), C, CTX_OBJECT, CTX_POSE_BONE, drawAutoKeyWarning(), Object::id, OBACT, scene, t, and transinfo_show_overlay().
Referenced by initTransform().
Definition at line 1329 of file transform.c.
References C, drawConstraint(), drawDial3d(), drawEdgeSlide(), drawPropCircle(), drawSnapping(), drawVertSlide(), GPU_line_width(), t, and transinfo_show_overlay().
Referenced by initTransform().
Definition at line 1607 of file transform.c.
References ED_node_grid_size(), ED_view3d_grid_view_scale(), NULL, SPACE_CLIP, SPACE_GRAPH, SPACE_IMAGE, SPACE_NODE, SPACE_VIEW3D, and t.
Referenced by initTransform().
| bool initTransform | ( | bContext * | C, |
| TransInfo * | t, | ||
| wmOperator * | op, | ||
| const wmEvent * | event, | ||
| int | mode | ||
| ) |
Definition at line 1641 of file transform.c.
References wmEvent::alt, applyMouseInput(), BKE_editmesh_lnorspace_update(), BMEditMesh::bm, BM_lnorspace_invalidate(), C, calculateCenter(), calculatePropRatio(), CON_APPLY, createTransData(), wmEvent::ctrl, CTX_CURSOR, CTX_GPENCIL_STROKES, CTX_TEXTURE_SPACE, CTX_wm_manager(), drawTransformApply(), drawTransformPixel(), drawTransformView(), ED_region_draw_cb_activate(), ELEM, EVT_LEFTALTKEY, EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, EVT_OSKEY, EVT_RIGHTALTKEY, EVT_RIGHTCTRLKEY, EVT_RIGHTSHIFTKEY, wmKeyMapItem::flag, FOREACH_TRANS_DATA_CONTAINER, initMouseInput(), initSnapping(), initSnapSpatial(), initTransInfo(), ISTWEAK, KM_PRESS, KMI_INACTIVE, LEFTMOUSE, ME_AUTOSMOOTH, MOD_SNAP_INVERT, wmOperatorType::modalkeymap, wmEvent::mval, wmKeyMapItem::next, NULL, OB_MESH, options, wmEvent::oskey, postTrans(), wmKeyMapItem::propvalue, wmOperator::ptr, REGION_DRAW_POST_PIXEL, REGION_DRAW_POST_VIEW, REGION_DRAW_PRE_VIEW, RGN_TYPE_ANY, RNA_property_boolean_get(), RNA_property_boolean_set(), RNA_property_enum_get(), RNA_property_is_set(), RNA_struct_find_property(), setUserConstraint(), wmEvent::shift, SPACE_ACTION, SPACE_CLIP, SPACE_GRAPH, SPACE_IMAGE, SPACE_NODE, SPACE_TYPE_ANY, SPACE_VIEW3D, t, T_CLNOR_REBUILD, T_EDIT, T_MODAL, T_PROP_EDIT, TD_SELECTED, TFM_MODAL_SNAP_INV_ON, TFM_RESIZE, TFM_ROTATION, TFM_TRANSLATION, BMesh::totvert, BMesh::totvertsel, TRANS_CANCEL, TRANS_STARTING, transform_draw_cursor_draw(), transform_draw_cursor_poll(), transform_mode_init(), transform_mode_really_used(), wmKeyMapItem::type, wmOperator::type, wmEvent::type, unit_m3(), wmKeyMapItem::val, WM_keymap_active(), WM_paint_cursor_activate(), and WM_userdef_event_type_from_keymap_type().
Referenced by transformops_data().
Definition at line 376 of file transform.c.
References projectFloatViewEx(), t, and V3D_PROJ_TEST_NOP.
Referenced by calculateCenter(), calculateCenter2D(), initTimeScale(), and setNearestAxis3d().
| void projectFloatViewEx | ( | TransInfo * | t, |
| const float | vec[3], | ||
| float | adr[2], | ||
| const eV3DProjTest | flag | ||
| ) |
Definition at line 348 of file transform.c.
References Freestyle::a, CTX_PAINT_CURVE, ED_view3d_project_float_global(), projectIntView(), RGN_TYPE_WINDOW, SPACE_VIEW3D, t, and V3D_PROJ_RET_OK.
Referenced by projectFloatView(), and transform_draw_cursor_draw().
Definition at line 343 of file transform.c.
References projectIntViewEx(), t, and V3D_PROJ_TEST_NOP.
Referenced by projectFloatViewEx().
| void projectIntViewEx | ( | TransInfo * | t, |
| const float | vec[3], | ||
| int | adr[2], | ||
| const eV3DProjTest | flag | ||
| ) |
Definition at line 230 of file transform.c.
References BKE_mask_coord_to_image(), BKE_mask_coord_to_movieclip(), BLI_assert, SpaceClip::clip, CTX_MASK, CTX_MOVIECLIP, CTX_PAINT_CURVE, ED_clip_point_stable_pos__reverse(), ED_image_point_pos__reverse(), ED_space_clip_get_clip(), ED_view3d_project_int_global(), ELEM, SpaceAction::flag, SpaceImage::image, SpaceImage::iuser, RGN_TYPE_WINDOW, SACTION_DRAWTIME, SPACE_ACTION, SPACE_CLIP, SPACE_GRAPH, SPACE_IMAGE, SPACE_NLA, SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, t, UI_view2d_view_to_region(), SpaceClip::user, v, and V3D_PROJ_RET_OK.
Referenced by projectIntView().
Definition at line 406 of file transform.c.
References CTX_MASK, CTX_MOVIECLIP, ED_space_image_get_size(), SpaceImage::flag, height, SI_COORDFLOATS, SPACE_CLIP, SPACE_IMAGE, t, TFM_TRANSLATION, and width.
Referenced by applyTranslation().
| void saveTransform | ( | bContext * | C, |
| TransInfo * | t, | ||
| wmOperator * | op | ||
| ) |
Definition at line 1426 of file transform.c.
References C, CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, constraintModeToIndex(), CTX_data_tool_settings(), CTX_MASK, CTX_NO_PET, ELEM, wmOperator::flag, MOD_SNAP, Object::mode, NULL, OB_MODE_OBJECT, OBACT, OP_IS_REPEAT, PROP_EDIT_CONNECTED, PROP_EDIT_PROJECTED, PROP_EDIT_USE, ToolSettings::prop_mode, ToolSettings::proportional_action, ToolSettings::proportional_edit, ToolSettings::proportional_fcurve, ToolSettings::proportional_mask, ToolSettings::proportional_objects, ToolSettings::proportional_size, wmOperator::ptr, RNA_boolean_set(), RNA_enum_set(), RNA_float_set(), RNA_float_set_array(), RNA_property_array_check(), RNA_property_boolean_set(), RNA_property_boolean_set_array(), RNA_property_enum_get(), RNA_property_enum_set(), RNA_property_float_get(), RNA_property_float_set(), RNA_property_float_set_array(), RNA_property_is_set(), RNA_property_unset(), RNA_struct_find_property(), SCE_SNAP, ToolSettings::snap_flag, SPACE_ACTION, SPACE_GRAPH, t, T_ALT_TRANSFORM, T_MODAL, T_NO_MIRROR, T_PROP_CONNECTED, T_PROP_EDIT, T_PROP_EDIT_ALL, T_PROP_PROJECTED, TFM_SHRINKFATTEN, transformModeUseSnap(), UVCALC_TRANSFORM_CORRECT_SLIDE, V3D_ORIENT_CUSTOM_MATRIX, and WM_msg_publish_rna_prop.
Referenced by transformops_exit().
Definition at line 113 of file transform.c.
References copy_v3_fl(), CTX_MASK, CTX_MOVIECLIP, CTX_PAINT_CURVE, ED_space_clip_get_aspect(), ED_space_clip_get_aspect_dimension_aware(), ED_space_image_get_aspect(), ED_space_image_get_uv_aspect(), SPACE_CLIP, SPACE_GRAPH, SPACE_IMAGE, and t.
Referenced by initTransInfo().
| void setTransformViewMatrices | ( | TransInfo * | t | ) |
Definition at line 89 of file transform.c.
References calculateCenter2D(), calculateCenterLocal(), copy_m4_m4(), CTX_PAINT_CURVE, RegionView3D::persinv, RegionView3D::persmat, RegionView3D::persp, RGN_TYPE_WINDOW, RV3D_ORTHO, SPACE_VIEW3D, t, unit_m4(), RegionView3D::viewinv, and RegionView3D::viewmat.
Referenced by initTransInfo().
| bool transdata_check_local_islands | ( | TransInfo * | t, |
| short | around | ||
| ) |
Definition at line 79 of file transform.c.
References CTX_CURSOR, CTX_TEXTURE_SPACE, ELEM, OB_GPENCIL, OB_MESH, t, and V3D_AROUND_LOCAL_ORIGINS.
Referenced by initTransInfo(), and set_prop_dist().
|
static |
Definition at line 728 of file transform.c.
References ARRAY_SIZE, BLI_assert, CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, ELEM, MOD_CONSTRAINT_SELECT_AXIS, MOD_CONSTRAINT_SELECT_PLANE, setUserConstraint(), stopConstraint(), t, T_2D_EDIT, T_NO_CONSTRAINT, TFM_MODAL_AXIS_X, TFM_MODAL_AXIS_Y, TFM_MODAL_AXIS_Z, TFM_MODAL_PLANE_X, TFM_MODAL_PLANE_Y, TFM_MODAL_PLANE_Z, TIP_, transform_orientations_current_set(), and TREDRAW_HARD.
Referenced by transformEvent().
|
static |
Definition at line 570 of file transform.c.
References CON_APPLY, wmOperator::customdata, ELEM, SCE_SNAP_MODE_GRID, SCE_SNAP_MODE_INCREMENT, SPACE_NODE, SPACE_VIEW3D, t, T_2D_EDIT, T_AUTOIK, T_NO_CONSTRAINT, T_PROP_EDIT, TFM_EDGE_SLIDE, TFM_MODAL_ADD_SNAP, TFM_MODAL_AUTOCONSTRAINTPLANE, TFM_MODAL_AUTOIK_LEN_DEC, TFM_MODAL_AUTOIK_LEN_INC, TFM_MODAL_AXIS_X, TFM_MODAL_AXIS_Y, TFM_MODAL_AXIS_Z, TFM_MODAL_CANCEL, TFM_MODAL_CONS_OFF, TFM_MODAL_EDGESLIDE_DOWN, TFM_MODAL_EDGESLIDE_UP, TFM_MODAL_INSERTOFS_TOGGLE_DIR, TFM_MODAL_PLANE_X, TFM_MODAL_PLANE_Y, TFM_MODAL_PLANE_Z, TFM_MODAL_PROPSIZE, TFM_MODAL_PROPSIZE_DOWN, TFM_MODAL_PROPSIZE_UP, TFM_MODAL_REMOVE_SNAP, TFM_MODAL_RESIZE, TFM_MODAL_ROTATE, TFM_MODAL_TRANSLATE, transform_mode_is_changeable(), and validSnap().
Referenced by transform_modal_keymap().
| wmKeyMap* transform_modal_keymap | ( | wmKeyConfig * | keyconf | ) |
Definition at line 657 of file transform.c.
References NULL, NUM_MODAL_INCREMENT_DOWN, NUM_MODAL_INCREMENT_UP, wmKeyMap::poll_modal_item, TFM_MODAL_ADD_SNAP, TFM_MODAL_AUTOCONSTRAINT, TFM_MODAL_AUTOCONSTRAINTPLANE, TFM_MODAL_AUTOIK_LEN_DEC, TFM_MODAL_AUTOIK_LEN_INC, TFM_MODAL_AXIS_X, TFM_MODAL_AXIS_Y, TFM_MODAL_AXIS_Z, TFM_MODAL_CANCEL, TFM_MODAL_CONFIRM, TFM_MODAL_CONS_OFF, TFM_MODAL_EDGESLIDE_DOWN, TFM_MODAL_EDGESLIDE_UP, TFM_MODAL_INSERTOFS_TOGGLE_DIR, TFM_MODAL_PLANE_X, TFM_MODAL_PLANE_Y, TFM_MODAL_PLANE_Z, TFM_MODAL_PRECISION, TFM_MODAL_PROPSIZE, TFM_MODAL_PROPSIZE_DOWN, TFM_MODAL_PROPSIZE_UP, TFM_MODAL_REMOVE_SNAP, TFM_MODAL_RESIZE, TFM_MODAL_ROTATE, TFM_MODAL_SNAP_INV_OFF, TFM_MODAL_SNAP_INV_ON, TFM_MODAL_SNAP_TOGGLE, TFM_MODAL_TRANSLATE, transform_modal_item_poll(), and WM_modalkeymap_ensure().
Referenced by ED_keymap_transform().
Definition at line 1891 of file transform.c.
References C, CTX_AUTOCONFIRM, NULL, selectConstraint(), t, TRANS_CONFIRM, TREDRAW_HARD, TREDRAW_NOTHING, TREDRAW_SOFT, and viewRedrawForce().
Referenced by drawTransformApply(), transform_exec(), transform_invoke(), and transform_modal().
Definition at line 1925 of file transform.c.
References BKE_editmesh_from_object(), BMEditMesh::bm, BM_lnorspace_rebuild(), C, ELEM, FOREACH_TRANS_DATA_CONTAINER, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, postTrans(), restoreTransObjects(), special_aftertrans_update(), t, T_CLNOR_REBUILD, TRANS_CANCEL, TRANS_RUNNING, TRANS_STARTING, viewRedrawForce(), and viewRedrawPost().
Referenced by transform_cancel(), transform_exec(), and transform_modal().
Definition at line 818 of file transform.c.
References addSnapPoint(), wmEvent::alt, applyMouseInput(), BLI_assert, calculatePropRatio(), CON_APPLY, CON_AXIS2, CON_SELECT, copy_v2_v2_int(), CTX_CAMERA, CTX_CURSOR, CTX_MASK, CTX_MOVIECLIP, CTX_NO_PET, CTX_TEXTURE_SPACE, CTX_wm_window(), ELEM, EVT_CKEY, EVT_LEFTALTKEY, EVT_MODAL_MAP, EVT_NKEY, EVT_OKEY, EVT_PADMINUS, EVT_PADPLUSKEY, EVT_RIGHTALTKEY, handleNumInput(), handleSnapping(), hasNumInput(), INBETWEEN_MOUSEMOVE, initSelectConstraint(), initSnapping(), SpaceNode::insert_ofs_dir, wmEvent::is_repeat, KM_PRESS, KM_RELEASE, max_ff(), min_ff(), MOD_CONSTRAINT_SELECT_AXIS, MOD_CONSTRAINT_SELECT_PLANE, MOD_PRECISION, MOD_SNAP, MOD_SNAP_INVERT, MOUSEMOVE, wmEvent::mval, NULL, OB_MESH, OPERATOR_PASS_THROUGH, postSelectConstraint(), wmEvent::prevtype, wmEvent::prevval, PROP_MODE_MAX, removeSnapPoint(), resetTransModal(), resetTransRestrictions(), restoreTransObjects(), RV3D_ORTHO, setLocalConstraint(), wmEvent::shift, SNODE_INSERTOFS_DIR_LEFT, SNODE_INSERTOFS_DIR_RIGHT, sort_trans_data_dist(), SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, stopConstraint(), t, T_ALT_TRANSFORM, T_AUTOIK, T_EDIT, T_NO_CONSTRAINT, T_PROP_CONNECTED, T_PROP_EDIT, T_PROP_SIZE_MAX, T_PROP_SIZE_MIN, T_RELEASE_CONFIRM, TFM_EDGE_SLIDE, TFM_MODAL_ADD_SNAP, TFM_MODAL_AUTOCONSTRAINT, TFM_MODAL_AUTOCONSTRAINTPLANE, TFM_MODAL_AUTOIK_LEN_DEC, TFM_MODAL_AUTOIK_LEN_INC, TFM_MODAL_AXIS_X, TFM_MODAL_AXIS_Y, TFM_MODAL_AXIS_Z, TFM_MODAL_CANCEL, TFM_MODAL_CONFIRM, TFM_MODAL_CONS_OFF, TFM_MODAL_EDGESLIDE_DOWN, TFM_MODAL_EDGESLIDE_UP, TFM_MODAL_INSERTOFS_TOGGLE_DIR, TFM_MODAL_PLANE_X, TFM_MODAL_PLANE_Y, TFM_MODAL_PLANE_Z, TFM_MODAL_PRECISION, TFM_MODAL_PROPSIZE, TFM_MODAL_PROPSIZE_DOWN, TFM_MODAL_PROPSIZE_UP, TFM_MODAL_REMOVE_SNAP, TFM_MODAL_RESIZE, TFM_MODAL_ROTATE, TFM_MODAL_SNAP_INV_OFF, TFM_MODAL_SNAP_INV_ON, TFM_MODAL_SNAP_TOGGLE, TFM_MODAL_TRANSLATE, TFM_NORMAL_ROTATION, TFM_RESIZE, TFM_ROTATION, TFM_TRACKBALL, TFM_TRANSLATION, TFM_VERT_SLIDE, TIP_, TRANS_CANCEL, TRANS_CONFIRM, TRANS_RUNNING, TRANS_STARTING, transform_autoik_update(), transform_event_modal_constraint(), transform_mode_init(), transform_mode_is_changeable(), TREDRAW_HARD, TREDRAW_SOFT, wmEvent::type, V3D_ORIENT_NORMAL, wmEvent::val, and WM_window_status_area_tag_redraw().
Referenced by transform_modal().
|
static |
Definition at line 1310 of file transform.c.
References blender::compositor::area(), C, CTX_wm_area(), View3D::flag2, SPACE_VIEW3D, t, and V3D_HIDE_OVERLAYS.
Referenced by drawTransformPixel(), and drawTransformView().
Definition at line 430 of file transform.c.
References C, CTX_CURSOR, CTX_data_edit_mask(), CTX_GPENCIL_STROKES, CTX_MASK, CTX_PAINT_CURVE, CTX_POSE_BONE, CTX_wm_window(), DEG_id_tag_update(), ED_area_tag_redraw(), ED_gpencil_data_get_active(), ED_space_clip_check_show_maskedit(), ED_space_clip_check_show_trackedit(), ED_space_clip_get_clip(), bGPdata::id, ID_RECALC_GEOMETRY, if(), IS_AUTOKEY_ON, SpaceImage::lock, mask(), NA_EDITED, NC_ANIMATION, NC_GEOM, NC_GPENCIL, NC_MASK, NC_MOVIECLIP, NC_OBJECT, NC_SCENE, NC_SPACE, ND_DATA, ND_KEYFRAME, ND_KEYS, ND_NLA, ND_POSE, ND_SEQUENCER, ND_SPACE_NODE_VIEW, ND_TRANSFORM, NULL, OBEDIT_FROM_VIEW_LAYER, SPACE_ACTION, SPACE_CLIP, SPACE_GRAPH, SPACE_IMAGE, SPACE_NLA, SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, t, WM_event_add_notifier(), and WM_paint_cursor_tag_redraw().
Referenced by transformApply(), and transformEnd().
Definition at line 523 of file transform.c.
References C, CTX_data_scene(), ED_area_status_text(), ELEM, IS_AUTOKEY_ON, NA_EDITED, NC_ANIMATION, NC_GEOM, NC_SCENE, ND_DATA, ND_KEYFRAME, ND_TRANSFORM_DONE, NULL, SPACE_ACTION, SPACE_GRAPH, SPACE_IMAGE, SPACE_NLA, SPACE_VIEW3D, t, TC_MESH_VERTS, TFM_EDGE_SLIDE, TFM_VERT_SLIDE, UVCALC_TRANSFORM_CORRECT, UVCALC_TRANSFORM_CORRECT_SLIDE, WM_event_add_notifier(), and WM_main_add_notifier().
Referenced by transformEnd().