|
Blender
V2.93
|
#include "DNA_space_types.h"Go to the source code of this file.
Macros | |
| #define | SNAP_MIN_DISTANCE 30 |
| #define SNAP_MIN_DISTANCE 30 |
Definition at line 23 of file transform_snap.h.
| bool activeSnap | ( | const TransInfo * | t | ) |
Definition at line 130 of file transform_snap.c.
References MOD_SNAP, MOD_SNAP_INVERT, and t.
Referenced by applyAxisConstraintVec(), applyGridAbsolute(), applyProject(), applyRotation(), applySnapping(), applyTranslation(), applyTranslationValue(), drawDial3d(), drawSnapping(), transform_snap_grid(), and transform_snap_increment_ex().
| void addSnapPoint | ( | TransInfo * | t | ) |
Definition at line 737 of file transform_snap.c.
References BLI_addtail(), TransSnapPoint::co, copy_v3_v3(), MEM_callocN, MULTI_POINTS, POINT_INIT, SPACE_VIEW3D, and t.
Referenced by transformEvent().
| void applyGridAbsolute | ( | TransInfo * | t | ) |
Definition at line 393 of file transform_snap.c.
References activeSnap(), add_v3_v3(), BKE_object_eval_transform_all(), copy_v3_v3(), CTX_OBJECT, TransData::factor, FOREACH_TRANS_DATA_CONTAINER, if(), MOD_PRECISION, mul_m3_v3(), mul_m4_v3(), mul_v3_fl(), mul_v3_v3fl(), TransData::ob, Object::obmat, SCE_SNAP_MODE_GRID, SCE_SNAP_MODE_INCREMENT, TransData::smtx, sub_v3_v3v3(), t, T_PROP_EDIT, and TD_SKIP.
Referenced by flushTransNodes().
| void applyProject | ( | TransInfo * | t | ) |
Definition at line 300 of file transform_snap.c.
References activeSnap(), add_v3_v3(), TransData::axismtx, BKE_object_eval_transform_all(), constraintTransLim(), copy_v3_v3(), CTX_OBJECT, doForceIncrementSnap(), ED_transform_snap_object_project_view3d(), ED_view3d_project_float_global(), TransData::factor, FOREACH_TRANS_DATA_CONTAINER, mul_m3_v3(), mul_m4_v3(), NULL, TransData::ob, Object::obmat, rotation_between_vecs_to_mat3(), SCE_SNAP_MODE_FACE, TransData::smtx, sub_v3_v3v3(), t, T_NO_PROJECT, T_PROP_EDIT, TD_SKIP, transform_data_ext_rotate(), V3D_PROJ_RET_OK, and V3D_PROJ_TEST_NOP.
Referenced by recalcData_curve(), recalcData_edit_armature(), recalcData_lattice(), recalcData_mesh(), recalcData_obedit(), recalcData_objects(), recalcData_particles(), and recalcData_texspace().
Definition at line 443 of file transform_snap.c.
References activeSnap(), doForceIncrementSnap(), PIL_check_seconds_timer(), SCE_SNAP_MODE_FACE, SCE_SNAP_MODE_GRID, SCE_SNAP_MODE_INCREMENT, SNAP_FORCED, t, and validSnap().
Referenced by applyEdgeSlide(), applyNormalRotation(), applyResize(), applyRotation(), applySkinResize(), applyTranslation(), and applyVertSlide().
Definition at line 163 of file transform_snap.c.
References activeSnap(), BLI_listbase_is_empty(), C, TransSnapPoint::co, col, copy_m4_m4(), CTX_wm_region(), CTX_wm_region_view3d(), ED_gizmotypes_snap_3d_draw_util(), ED_node_draw_snap(), ED_view3d_pixel_size(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), imm_drawcircball(), immBindBuiltinProgram(), immUnbindProgram(), immUniformColor4ubv(), immVertexFormat(), LISTBASE_FOREACH, TransSnapPoint::next, normal, NULL, POINT_INIT, pos, SCE_SNAP_MODE_EDGE_PERPENDICULAR, size(), SPACE_IMAGE, SPACE_NODE, SPACE_VIEW3D, t, TARGET_INIT, TH_ACTIVE, TH_SELECT, TH_TRANSFORM, TH_VERTEX_SIZE, UI_GetThemeColor3ubv(), UI_GetThemeValuef(), usingSnappingNormal(), ARegion::v2d, validSnap(), validSnappingNormal(), and RegionView3D::viewinv.
Referenced by drawTransformView().
| void freeSnapping | ( | struct TransInfo * | t | ) |
Definition at line 704 of file transform_snap.c.
References ED_transform_snap_object_context_destroy(), NULL, and t.
Referenced by postTrans().
Definition at line 808 of file transform_snap.c.
References add_v3_v3(), TransSnapPoint::co, copy_v3_v3(), mul_v3_fl(), TransSnapPoint::next, POINT_INIT, and t.
Referenced by ApplySnapResize(), ApplySnapRotation(), ApplySnapTranslation(), edge_slide_snap_apply(), and vert_slide_snap_apply().
| eRedrawFlag handleSnapping | ( | TransInfo * | t, |
| const struct wmEvent * | event | ||
| ) |
| void initSnapping | ( | struct TransInfo * | t, |
| struct wmOperator * | op | ||
| ) |
Definition at line 647 of file transform_snap.c.
References ELEM, initSnappingMode(), MOD_SNAP, normalize_v3(), POINT_INIT, wmOperator::ptr, resetSnapping(), RNA_boolean_get(), RNA_enum_get(), RNA_float_get_array(), RNA_struct_find_property(), RNA_struct_property_is_set(), SCE_SNAP, SCE_SNAP_NO_SELF, SCE_SNAP_PROJECT, SCE_SNAP_ROTATE, ToolSettings::snap_flag, SNAP_FORCED, SPACE_IMAGE, SPACE_NODE, SPACE_VIEW3D, t, T_MODAL, and transformModeUseSnap().
Referenced by handleSnapping(), initTransform(), and transformEvent().
| bool peelObjectsTransform | ( | struct TransInfo * | t, |
| const float | mval[2], | ||
| const bool | use_peel_object, | ||
| float | r_loc[3], | ||
| float | r_no[3], | ||
| float * | r_thickness | ||
| ) |
Definition at line 1187 of file transform_snap.c.
References BLI_freelistN(), BLI_listbase_is_empty(), SnapObjectHitDepth::co, SnapObjectHitDepth::depth, ED_transform_snap_object_project_all_view3d_ex(), ListBase::first, mid_v3_v3v3(), SnapObjectHitDepth::next, NULL, SnapObjectHitDepth::ob_uuid, and t.
Referenced by CalcSnapGeometry().
| void removeSnapPoint | ( | TransInfo * | t | ) |
Definition at line 791 of file transform_snap.c.
References BLI_freelinkN(), BLI_listbase_is_empty(), MULTI_POINTS, NULL, t, and updateSelectedSnapPoint().
Referenced by transformEvent().
| void resetSnapping | ( | TransInfo * | t | ) |
| void snapFrameTransform | ( | struct TransInfo * | t, |
| const eAnimEdit_AutoSnap | autosnap, | ||
| const bool | is_frame_value, | ||
| const float | delta, | ||
| float * | r_val | ||
| ) |
Definition at line 1395 of file transform_snap.c.
References ED_markers_find_nearest_marker_time(), float(), floor(), FPS, SACTSNAP_FRAME, SACTSNAP_MARKER, SACTSNAP_OFF, SACTSNAP_SECOND, SACTSNAP_STEP, SACTSNAP_TSTEP, scene, and t.
Referenced by doAnimEdit_SnapFrame(), and headerTimeTranslate().
| bool snapNodesTransform | ( | struct TransInfo * | t, |
| const int | mval[2], | ||
| float | r_loc[2], | ||
| float * | r_dist_px, | ||
| char * | r_node_border | ||
| ) |
Definition at line 1373 of file transform_snap.c.
References snapNodes(), and t.
Referenced by CalcSnapGeometry().
| short snapObjectsTransform | ( | struct TransInfo * | t, |
| const float | mval[2], | ||
| float * | dist_px, | ||
| float | r_loc[3], | ||
| float | r_no[3] | ||
| ) |
Definition at line 1157 of file transform_snap.c.
References ED_transform_snap_object_project_view3d_ex(), NULL, SCE_SNAP_MODE_FACE, t, T_EDIT, and TARGET_INIT.
Referenced by CalcSnapGeometry().
| void snapSequenceBounds | ( | TransInfo * | t, |
| const int | mval[2] | ||
| ) |
Definition at line 1432 of file transform_snap.c.
References MOD_SNAP_INVERT, round_fl_to_int(), SEQ_SIDE_BOTH, SEQ_time_find_next_prev_edit(), t, transform_convert_sequencer_get_snap_bound(), and UI_view2d_region_to_view().
Referenced by applySeqSlide().
| float transform_snap_distance_len_squared_fn | ( | TransInfo * | t, |
| const float | p1[3], | ||
| const float | p2[3] | ||
| ) |
Definition at line 1475 of file transform_snap.c.
References activeSnap(), if(), MOD_PRECISION, SCE_SNAP_MODE_GRID, snap_grid_apply(), SPACE_VIEW3D, t, TFM_TRANSLATION, and validSnap().
Referenced by applyTranslation().
Definition at line 1584 of file transform_snap.c.
References t, and transform_snap_increment_ex().
Referenced by applyBakeTime(), applyBevelWeight(), applyBoneEnvelope(), applyBoneRoll(), applyBoneSize(), applyCrease(), applyCurveShrinkFatten(), applyEdgeSlide(), applyGPOpacity(), applyGPShrinkFatten(), applyMaskShrinkFatten(), applyNormalRotation(), applyPushPull(), applyResize(), applyRotation(), applyShear(), applyShrinkFatten(), applySkinResize(), applyTilt(), applyToSphere(), applyTrackball(), applyVertSlide(), Bend(), and ElementResize().
Definition at line 1553 of file transform_snap.c.
References activeSnap(), BLI_assert, doForceIncrementSnap(), MOD_PRECISION, mul_m3_v3(), SCE_SNAP_MODE_INCREMENT, snap_increment_apply(), SPACE_VIEW3D, t, and validSnap().
Referenced by applyTranslation(), and transform_snap_increment().
| bool transformModeUseSnap | ( | const TransInfo * | t | ) |
Definition at line 136 of file transform_snap.c.
References SCE_SNAP_TRANSFORM_MODE_ROTATE, SCE_SNAP_TRANSFORM_MODE_SCALE, SCE_SNAP_TRANSFORM_MODE_TRANSLATE, ToolSettings::snap_transform_mode_flag, t, TFM_EDGE_SLIDE, TFM_RESIZE, TFM_ROTATION, TFM_TRANSLATION, and TFM_VERT_SLIDE.
Referenced by doForceIncrementSnap(), drawDial3d(), initSnapping(), and saveTransform().
| eRedrawFlag updateSelectedSnapPoint | ( | TransInfo * | t | ) |
Definition at line 753 of file transform_snap.c.
References TransSnapPoint::co, ED_view3d_project_float_global(), len_squared_v2v2(), MULTI_POINTS, TransSnapPoint::next, NULL, t, TRANSFORM_SNAP_MAX_PX, TREDRAW_HARD, TREDRAW_NOTHING, V3D_PROJ_RET_OK, and V3D_PROJ_TEST_NOP.
Referenced by handleSnapping(), and removeSnapPoint().
| bool usingSnappingNormal | ( | const TransInfo * | t | ) |
Definition at line 496 of file transform_snap.c.
References t.
Referenced by applyTranslationValue(), createTransEditVerts(), and drawSnapping().
| bool validSnap | ( | const TransInfo * | t | ) |
Definition at line 124 of file transform_snap.c.
References MULTI_POINTS, POINT_INIT, t, and TARGET_INIT.
Referenced by applyAxisConstraintVec(), applyEdgeSlide(), applyRotation(), applySnapping(), applyTranslation(), applyVertSlide(), drawSnapping(), transform_modal_item_poll(), transform_snap_grid(), transform_snap_increment_ex(), and validSnappingNormal().
| bool validSnappingNormal | ( | const TransInfo * | t | ) |
Definition at line 501 of file transform_snap.c.
References is_zero_v3(), t, and validSnap().
Referenced by applyTranslationValue(), and drawSnapping().