Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | TransformBounds |
struct | TransformCalcParams |
Macros | |
#define | P_MIRROR (1 << 0) |
#define | P_MIRROR_DUMMY (P_MIRROR | (1 << 9)) |
#define | P_PROPORTIONAL (1 << 1) |
#define | P_ORIENT_AXIS (1 << 2) |
#define | P_ORIENT_AXIS_ORTHO (1 << 16) |
#define | P_ORIENT_MATRIX (1 << 17) |
#define | P_SNAP (1 << 3) |
#define | P_GEO_SNAP (P_SNAP | (1 << 4)) |
#define | P_ALIGN_SNAP (P_GEO_SNAP | (1 << 5)) |
#define | P_CONSTRAINT (1 << 6) |
#define | P_OPTIONS (1 << 7) |
#define | P_CORRECT_UV (1 << 8) |
#define | P_NO_DEFAULTS (1 << 10) |
#define | P_NO_TEXSPACE (1 << 11) |
#define | P_CENTER (1 << 12) |
#define | P_GPENCIL_EDIT (1 << 13) |
#define | P_CURSOR_EDIT (1 << 14) |
#define | P_CLNOR_INVALIDATE (1 << 15) |
#define | P_VIEW2D_EDGE_PAN (1 << 16) |
#define | P_POST_TRANSFORM (1 << 19) |
#define | SNAP_INCREMENTAL_ANGLE DEG2RAD(5.0) |
Enumerations | |
enum | eTfmMode { TFM_INIT = -1 , TFM_DUMMY , TFM_TRANSLATION , TFM_ROTATION , TFM_RESIZE , TFM_SKIN_RESIZE , TFM_TOSPHERE , TFM_SHEAR , TFM_BEND , TFM_SHRINKFATTEN , TFM_TILT , TFM_TRACKBALL , TFM_PUSHPULL , TFM_EDGE_CREASE , TFM_VERT_CREASE , TFM_MIRROR , TFM_BONESIZE , TFM_BONE_ENVELOPE , TFM_CURVE_SHRINKFATTEN , TFM_MASK_SHRINKFATTEN , TFM_GPENCIL_SHRINKFATTEN , TFM_BONE_ROLL , TFM_TIME_TRANSLATE , TFM_TIME_SLIDE , TFM_TIME_SCALE , TFM_TIME_EXTEND , TFM_TIME_DUPLICATE , TFM_BAKE_TIME , TFM_DEPRECATED , TFM_BWEIGHT , TFM_ALIGN , TFM_EDGE_SLIDE , TFM_VERT_SLIDE , TFM_SEQ_SLIDE , TFM_BONE_ENVELOPE_DIST , TFM_NORMAL_ROTATION , TFM_GPENCIL_OPACITY } |
#define P_ALIGN_SNAP (P_GEO_SNAP | (1 << 5)) |
Definition at line 116 of file ED_transform.h.
#define P_CENTER (1 << 12) |
Definition at line 122 of file ED_transform.h.
#define P_CLNOR_INVALIDATE (1 << 15) |
Definition at line 125 of file ED_transform.h.
#define P_CONSTRAINT (1 << 6) |
Definition at line 117 of file ED_transform.h.
#define P_CORRECT_UV (1 << 8) |
Definition at line 119 of file ED_transform.h.
#define P_CURSOR_EDIT (1 << 14) |
Definition at line 124 of file ED_transform.h.
Definition at line 115 of file ED_transform.h.
#define P_GPENCIL_EDIT (1 << 13) |
Definition at line 123 of file ED_transform.h.
#define P_MIRROR (1 << 0) |
Definition at line 108 of file ED_transform.h.
Definition at line 109 of file ED_transform.h.
#define P_NO_DEFAULTS (1 << 10) |
Definition at line 120 of file ED_transform.h.
#define P_NO_TEXSPACE (1 << 11) |
Definition at line 121 of file ED_transform.h.
#define P_OPTIONS (1 << 7) |
Definition at line 118 of file ED_transform.h.
#define P_ORIENT_AXIS (1 << 2) |
Definition at line 111 of file ED_transform.h.
#define P_ORIENT_AXIS_ORTHO (1 << 16) |
Definition at line 112 of file ED_transform.h.
#define P_ORIENT_MATRIX (1 << 17) |
Definition at line 113 of file ED_transform.h.
#define P_POST_TRANSFORM (1 << 19) |
Definition at line 128 of file ED_transform.h.
#define P_PROPORTIONAL (1 << 1) |
Definition at line 110 of file ED_transform.h.
#define P_SNAP (1 << 3) |
Definition at line 114 of file ED_transform.h.
#define P_VIEW2D_EDGE_PAN (1 << 16) |
Definition at line 126 of file ED_transform.h.
Definition at line 172 of file ED_transform.h.
enum eTfmMode |
Definition at line 27 of file ED_transform.h.
Definition at line 49 of file transform_orientations.c.
References ARRAY_SIZE, BLI_freelistN(), C, CTX_data_scene(), TransformOrientationSlot::index_custom, Scene::orientation_slots, scene, Scene::transform_spaces, TransformOrientationSlot::type, V3D_ORIENT_CUSTOM, and V3D_ORIENT_GLOBAL.
int BIF_countTransformOrientation | ( | const struct bContext * | C | ) |
Referenced by initTransInfo().
bool BIF_createTransformOrientation | ( | struct bContext * | C, |
struct ReportList * | reports, | ||
const char * | name, | ||
bool | use_view, | ||
bool | activate, | ||
bool | overwrite | ||
) |
Definition at line 331 of file transform_orientations.c.
References activate(), BIF_selectTransformOrientation(), C, createBoneSpace(), createCurveSpace(), createMeshSpace(), createObjectSpace(), createViewSpace(), CTX_data_active_object(), CTX_data_edit_object(), Object::mode, NULL, OB_ARMATURE, OB_CURVES_LEGACY, OB_MESH, OB_MODE_POSE, and Object::type.
Referenced by create_orientation_exec().
void BIF_removeTransformOrientation | ( | struct bContext * | C, |
struct TransformOrientation * | target | ||
) |
Definition at line 403 of file transform_orientations.c.
References BKE_scene_transform_orientation_remove(), C, and CTX_data_scene().
Referenced by BIF_removeTransformOrientationIndex().
Definition at line 408 of file transform_orientations.c.
References BIF_removeTransformOrientation(), BKE_scene_transform_orientation_find(), C, and CTX_data_scene().
Referenced by delete_orientation_exec().
void BIF_selectTransformOrientation | ( | struct bContext * | C, |
struct TransformOrientation * | target | ||
) |
Definition at line 414 of file transform_orientations.c.
References BKE_scene_transform_orientation_get_index(), BLI_assert, C, CTX_data_scene(), TransformOrientationSlot::index_custom, Scene::orientation_slots, SCE_ORIENT_DEFAULT, scene, TransformOrientationSlot::type, and V3D_ORIENT_CUSTOM.
Referenced by BIF_createTransformOrientation().
bool calculateTransformCenter | ( | struct bContext * | C, |
int | centerMode, | ||
float | cent3d[3], | ||
float | cent2d[2] | ||
) |
Definition at line 1341 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().
Definition at line 387 of file transform_snap_sequencer.c.
References C, drawSnapping(), MOD_SNAP, POINT_INIT, SPACE_SEQ, t, TARGET_INIT, and TFM_SEQ_SLIDE.
Referenced by draw_seq_in_view().
void ED_getTransformOrientationMatrix | ( | struct ViewLayer * | view_layer, |
const struct View3D * | v3d, | ||
struct Object * | ob, | ||
struct Object * | obedit, | ||
short | around, | ||
float | r_orientation_mat[3][3] | ||
) |
Referenced by view_axis_exec().
void ED_keymap_transform | ( | struct wmKeyConfig * | keyconf | ) |
Definition at line 1413 of file transform_ops.c.
References TransformModeItem::idname, transform_modal_keymap(), transform_modes, and WM_modalkeymap_assign().
Referenced by ED_spacetypes_keymap().
int ED_transform_calc_gizmo_stats | ( | const struct bContext * | C, |
const struct TransformCalcParams * | params, | ||
struct TransformBounds * | tbounds | ||
) |
Centroid, bound-box, of selection.
Returns total items selected.
Referenced by gizmo_mesh_extrude_refresh(), and WIDGETGROUP_tool_generic_refresh().
Referenced by ED_view3d_cursor3d_position_rotation(), and gizmo_mesh_spin_init_refresh().
short ED_transform_calc_orientation_from_type_ex | ( | const struct Scene * | scene, |
struct ViewLayer * | view_layer, | ||
const struct View3D * | v3d, | ||
const struct RegionView3D * | rv3d, | ||
struct Object * | ob, | ||
struct Object * | obedit, | ||
short | orientation_index, | ||
int | pivot_point, | ||
float | r_mat[3][3] | ||
) |
r_mat
to be orthogonal should use orthogonalize_m3.A non orthogonal matrix may be returned when:
Referenced by ED_transform_calc_gizmo_stats(), edbm_select_axis_exec(), knife_constrain_axis(), transform_mode_default_modal_orientation_set(), v3d_cursor_snap_update(), and view3d_ruler_item_mousemove().
bool ED_transform_snap_sequencer_to_closest_strip_calc | ( | struct Scene * | scene, |
struct ARegion * | region, | ||
int | frame_1, | ||
int | frame_2, | ||
int * | r_snap_distance, | ||
float * | r_snap_frame | ||
) |
Iterates over all the strips and finds the closest snapping candidate of either frame_1 or frame_2. The closest snapping candidate will be the closest start or end frame of an existing strip.
Definition at line 368 of file transform_snap_sequencer.c.
References scene, SEQ_tool_settings_snap_mode_get(), t, TransConvertType_Sequencer, transform_snap_sequencer_to_closest_strip_ex(), and validSnap().
Referenced by update_overlay_strip_position_data().
void ED_widgetgroup_gizmo2d_resize_callbacks_set | ( | struct wmGizmoGroupType * | gzgt | ) |
Definition at line 918 of file transform_gizmo_2d.c.
References wmGizmoGroupType::draw_prepare, gizmo2d_generic_poll(), gizmo2d_resize_draw_prepare(), gizmo2d_resize_invoke_prepare(), gizmo2d_resize_message_subscribe(), gizmo2d_resize_refresh(), gizmo2d_resize_setup(), wmGizmoGroupType::invoke_prepare, wmGizmoGroupType::message_subscribe, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, and WM_gizmogroup_setup_keymap_generic_maybe_drag().
Referenced by IMAGE_GGT_gizmo2d_resize(), and SEQUENCER_GGT_gizmo2d_resize().
void ED_widgetgroup_gizmo2d_rotate_callbacks_set | ( | struct wmGizmoGroupType * | gzgt | ) |
Definition at line 1029 of file transform_gizmo_2d.c.
References wmGizmoGroupType::draw_prepare, gizmo2d_generic_poll(), gizmo2d_rotate_draw_prepare(), gizmo2d_rotate_message_subscribe(), gizmo2d_rotate_refresh(), gizmo2d_rotate_setup(), wmGizmoGroupType::message_subscribe, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, and WM_gizmogroup_setup_keymap_generic_maybe_drag().
Referenced by IMAGE_GGT_gizmo2d_rotate(), and SEQUENCER_GGT_gizmo2d_rotate().
void ED_widgetgroup_gizmo2d_xform_callbacks_set | ( | struct wmGizmoGroupType * | gzgt | ) |
Definition at line 731 of file transform_gizmo_2d.c.
References wmGizmoGroupType::draw_prepare, gizmo2d_generic_poll(), gizmo2d_xform_draw_prepare(), gizmo2d_xform_invoke_prepare(), gizmo2d_xform_refresh(), gizmo2d_xform_setup(), wmGizmoGroupType::invoke_prepare, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, and WM_gizmogroup_setup_keymap_generic_maybe_drag().
Referenced by ED_widgetgroup_gizmo2d_xform_no_cage_callbacks_set(), IMAGE_GGT_gizmo2d(), and SEQUENCER_GGT_gizmo2d().
void ED_widgetgroup_gizmo2d_xform_no_cage_callbacks_set | ( | struct wmGizmoGroupType * | gzgt | ) |
Definition at line 758 of file transform_gizmo_2d.c.
References ED_widgetgroup_gizmo2d_xform_callbacks_set(), gizmo2d_xform_no_cage_message_subscribe(), gizmo2d_xform_setup_no_cage(), wmGizmoGroupType::message_subscribe, and wmGizmoGroupType::setup.
Referenced by IMAGE_GGT_gizmo2d_translate(), and SEQUENCER_GGT_gizmo2d_translate().
Definition at line 1396 of file transform_ops.c.
References TransformModeItem::idname, TransformModeItem::opfunc, transform_modes, TRANSFORM_OT_create_orientation(), TRANSFORM_OT_delete_orientation(), TRANSFORM_OT_from_gizmo(), TRANSFORM_OT_select_orientation(), TRANSFORM_OT_transform(), and WM_operatortype_append().
Referenced by view3d_operatortypes().
void Transform_Properties | ( | struct wmOperatorType * | ot, |
int | flags | ||
) |
Definition at line 588 of file transform_ops.c.
References BLT_I18NCONTEXT_ID_CURVE_LEGACY, NULL, ot, P_ALIGN_SNAP, P_CENTER, P_CONSTRAINT, P_CORRECT_UV, P_CURSOR_EDIT, P_GEO_SNAP, P_GPENCIL_EDIT, P_MIRROR, P_MIRROR_DUMMY, P_NO_DEFAULTS, P_NO_TEXSPACE, P_OPTIONS, P_ORIENT_AXIS, P_ORIENT_AXIS_ORTHO, P_ORIENT_MATRIX, P_POST_TRANSFORM, P_PROPORTIONAL, P_SNAP, P_VIEW2D_EDGE_PAN, PROP_ENUM, PROP_ENUM_FLAG, PROP_FLOAT, PROP_HIDDEN, PROP_NONE, PROP_SKIP_SAVE, PROP_XYZ, RNA_def_boolean(), RNA_def_boolean_vector(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_float(), RNA_def_float_matrix(), RNA_def_float_vector(), RNA_def_property(), RNA_def_property_array(), RNA_def_property_enum_default(), RNA_def_property_enum_items(), RNA_def_property_flag(), RNA_def_property_translation_context(), RNA_def_property_ui_text(), rna_enum_axis_xyz_items, rna_enum_proportional_falloff_items, rna_enum_snap_element_items, rna_enum_snap_source_items, rna_TransformOrientation_itemf(), SCE_SNAP_MODE_INCREMENT, wmOperatorType::srna, T_PROP_SIZE_MAX, and T_PROP_SIZE_MIN.
Referenced by MESH_OT_extrude_context(), MESH_OT_extrude_edges_indiv(), MESH_OT_extrude_faces_indiv(), MESH_OT_extrude_region(), MESH_OT_extrude_verts_indiv(), MESH_OT_polybuild_delete_at_cursor(), MESH_OT_polybuild_face_at_cursor(), MESH_OT_polybuild_split_at_cursor(), MESH_OT_polybuild_transform_at_cursor(), MESH_OT_rip(), MESH_OT_rip_edge(), TRANSFORM_OT_bbone_resize(), TRANSFORM_OT_bend(), TRANSFORM_OT_edge_bevelweight(), TRANSFORM_OT_edge_crease(), TRANSFORM_OT_edge_slide(), TRANSFORM_OT_mirror(), TRANSFORM_OT_push_pull(), TRANSFORM_OT_resize(), TRANSFORM_OT_rotate(), TRANSFORM_OT_rotate_normal(), TRANSFORM_OT_seq_slide(), TRANSFORM_OT_shear(), TRANSFORM_OT_shrink_fatten(), TRANSFORM_OT_skin_resize(), TRANSFORM_OT_tilt(), TRANSFORM_OT_tosphere(), TRANSFORM_OT_trackball(), TRANSFORM_OT_transform(), TRANSFORM_OT_translate(), TRANSFORM_OT_vert_crease(), TRANSFORM_OT_vert_slide(), and UV_OT_rip().
void VIEW3D_GGT_xform_cage | ( | struct wmGizmoGroupType * | gzgt | ) |
Definition at line 2302 of file transform_gizmo_3d.c.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::message_subscribe, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, SPACE_VIEW3D, wmGizmoMapType_Params::spaceid, WIDGETGROUP_xform_cage_draw_prepare(), WIDGETGROUP_xform_cage_message_subscribe(), WIDGETGROUP_xform_cage_poll(), WIDGETGROUP_xform_cage_refresh(), WIDGETGROUP_xform_cage_setup(), WM_gizmogroup_setup_keymap_generic_maybe_drag(), WM_GIZMOGROUPTYPE_3D, WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK, WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE, and WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP.
Referenced by gizmo_xform_message_subscribe(), view3d_widgets(), and WIDGETGROUP_xform_cage_message_subscribe().
void VIEW3D_GGT_xform_extrude | ( | struct wmGizmoGroupType * | gzgt | ) |
Definition at line 498 of file transform_gizmo_extrude_3d.c.
References wmGizmoGroupType::draw_prepare, ED_gizmo_poll_or_unlink_delayed_from_tool(), EXTRUDE_AXIS_NORMAL, EXTRUDE_AXIS_XYZ, wmGizmoGroupType::flag, gizmo_mesh_extrude_draw_prepare(), gizmo_mesh_extrude_invoke_prepare(), gizmo_mesh_extrude_message_subscribe(), gizmo_mesh_extrude_refresh(), gizmo_mesh_extrude_setup(), wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::invoke_prepare, wmGizmoGroupType::message_subscribe, wmGizmoGroupType::name, NULL, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, RNA_def_enum(), wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, SPACE_VIEW3D, wmGizmoMapType_Params::spaceid, wmGizmoGroupType::srna, WM_gizmogroup_setup_keymap_generic_maybe_drag(), WM_GIZMOGROUPTYPE_3D, WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK, and WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP.
Referenced by view3d_widgets().
void VIEW3D_GGT_xform_gizmo | ( | struct wmGizmoGroupType * | gzgt | ) |
Definition at line 2070 of file transform_gizmo_3d.c.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::invoke_prepare, wmGizmoGroupType::message_subscribe, wmGizmoGroupType::name, NULL, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, RNA_def_enum(), wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, SPACE_VIEW3D, wmGizmoMapType_Params::spaceid, wmGizmoGroupType::srna, V3D_GIZMO_SHOW_OBJECT_ROTATE, V3D_GIZMO_SHOW_OBJECT_SCALE, V3D_GIZMO_SHOW_OBJECT_TRANSLATE, WIDGETGROUP_gizmo_draw_prepare(), WIDGETGROUP_gizmo_invoke_prepare(), WIDGETGROUP_gizmo_message_subscribe(), WIDGETGROUP_gizmo_poll_tool(), WIDGETGROUP_gizmo_refresh(), WIDGETGROUP_gizmo_setup(), WM_gizmogroup_setup_keymap_generic_maybe_drag(), WM_GIZMOGROUPTYPE_3D, WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK, and WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP.
Referenced by gizmo_xform_message_subscribe(), view3d_widgets(), and WIDGETGROUP_gizmo_message_subscribe().
void VIEW3D_GGT_xform_gizmo_context | ( | struct wmGizmoGroupType * | gzgt | ) |
Only poll, flag & gzmap_params differ.
Definition at line 2104 of file transform_gizmo_3d.c.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoGroupType::invoke_prepare, wmGizmoGroupType::message_subscribe, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, WIDGETGROUP_gizmo_draw_prepare(), WIDGETGROUP_gizmo_invoke_prepare(), WIDGETGROUP_gizmo_message_subscribe(), WIDGETGROUP_gizmo_poll_context(), WIDGETGROUP_gizmo_refresh(), WIDGETGROUP_gizmo_setup(), WM_gizmogroup_setup_keymap_generic_maybe_drag(), WM_GIZMOGROUPTYPE_3D, WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK, WM_GIZMOGROUPTYPE_PERSISTENT, and WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP.
Referenced by view3d_widgets().
void VIEW3D_GGT_xform_shear | ( | struct wmGizmoGroupType * | gzgt | ) |
Definition at line 2538 of file transform_gizmo_3d.c.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::message_subscribe, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, SPACE_VIEW3D, wmGizmoMapType_Params::spaceid, WIDGETGROUP_xform_shear_draw_prepare(), WIDGETGROUP_xform_shear_message_subscribe(), WIDGETGROUP_xform_shear_poll(), WIDGETGROUP_xform_shear_refresh(), WIDGETGROUP_xform_shear_setup(), WM_gizmogroup_setup_keymap_generic_maybe_drag(), WM_GIZMOGROUPTYPE_3D, WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK, WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE, and WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP.
Referenced by gizmo_xform_message_subscribe(), view3d_widgets(), and WIDGETGROUP_xform_shear_message_subscribe().