53static const float VecOne[3] = {1, 1, 1};
58static const char OP_RESIZE[] =
"TRANSFORM_OT_resize";
60static const char OP_SHEAR[] =
"TRANSFORM_OT_shear";
61static const char OP_BEND[] =
"TRANSFORM_OT_bend";
64static const char OP_TILT[] =
"TRANSFORM_OT_tilt";
66static const char OP_MIRROR[] =
"TRANSFORM_OT_mirror";
155 {0,
nullptr, 0,
nullptr,
nullptr},
182 uiItemsEnumO(layout,
"TRANSFORM_OT_select_orientation",
"orientation");
193 ot->name =
"Select Orientation";
194 ot->description =
"Select transformation orientation";
195 ot->idname =
"TRANSFORM_OT_select_orientation";
241 ot->name =
"Delete Orientation";
242 ot->description =
"Delete transformation orientation";
243 ot->idname =
"TRANSFORM_OT_delete_orientation";
266 "Create Orientation's 'use' parameter only valid in a 3DView context");
289 ot->name =
"Create Orientation";
290 ot->description =
"Create transformation orientation from selection";
291 ot->idname =
"TRANSFORM_OT_create_orientation";
299 ot->srna,
"name",
nullptr,
MAX_NAME,
"Name",
"Name of the new custom orientation");
305 "Use the current view instead of the active object to create the new orientation");
310 ot->srna,
"use",
false,
"Use After Creation",
"Select orientation after its creation");
314 "Overwrite Previous",
315 "Overwrite previously created orientation with same name");
318#ifdef USE_LOOPSLIDE_HACK
330 bool mesh_select_mode[3];
335 short selectmode_orig;
353# error "loopslide hack removed!"
358#ifdef USE_LOOPSLIDE_HACK
410#if defined(WITH_INPUT_NDOF) && 0
430 if (!is_navigating) {
471 if (mode_prev != t->
mode) {
564 if (!
ELEM(prop_con,
nullptr, prop)) {
568 if (
STREQ(prop_id,
"constraint_axis") &&
580 if (
STREQ(prop_id,
"orient_axis")) {
606 if (
STREQ(prop_id,
"use_snap_project")) {
611 if (
STREQ(prop_id,
"correct_uv")) {
645 ot->srna,
"orient_matrix", 3, 3,
nullptr, 0.0f, 0.0f,
"Matrix",
"", 0.0f, 0.0f);
670 RNA_def_boolean(
ot->srna,
"use_proportional_edit",
false,
"Proportional Editing",
"");
672 "proportional_edit_falloff",
675 "Proportional Falloff",
676 "Falloff type for proportional editing mode");
690 RNA_def_boolean(
ot->srna,
"use_proportional_projected",
false,
"Projected (2D)",
"");
706 RNA_def_boolean(
ot->srna,
"use_snap_project",
false,
"Project Individual Elements",
"");
716 "Point on source that will snap to target");
720 prop =
RNA_def_boolean(
ot->srna,
"use_snap_self",
true,
"Target: Include Active",
"");
722 prop =
RNA_def_boolean(
ot->srna,
"use_snap_edit",
true,
"Target: Include Edit",
"");
724 prop =
RNA_def_boolean(
ot->srna,
"use_snap_nonedit",
true,
"Target: Include Non-Edited",
"");
727 ot->srna,
"use_snap_selectable",
false,
"Target: Exclude Non-Selectable",
"");
735 prop =
RNA_def_boolean(
ot->srna,
"snap_align",
false,
"Align with Point Normal",
"");
756 "Edit Grease Pencil",
757 "Edit selected Grease Pencil strokes");
762 prop =
RNA_def_boolean(
ot->srna,
"cursor_transform",
false,
"Transform Cursor",
"");
768 ot->srna,
"texture_space",
false,
"Edit Texture Space",
"Edit object data texture space");
771 ot->srna,
"remove_on_cancel",
false,
"Remove on Cancel",
"Remove elements on cancel");
774 "use_duplicated_keyframes",
776 "Duplicated Keyframes",
777 "Transform duplicated keyframes");
783 ot->srna,
"correct_uv",
true,
"Correct UVs",
"Correct UV coordinates when transforming");
796 ot->srna,
"view2d_edge_pan",
false,
"Edge Pan",
"Enable edge panning in 2D view");
804 "Confirm on Release",
805 "Always confirm operation when releasing button");
809 ot->srna,
"use_accurate",
false,
"Accurate",
"Use accurate transformation");
815 "use_automerge_and_split",
817 "Auto Merge & Split",
818 "Forces the use of Auto Merge and Split");
827 ot->description =
"Move selected items";
854 ot->description =
"Scale (resize) selected items";
871 "mouse_dir_constraint",
876 "Mouse Directional Constraint",
892 ot->name =
"Skin Resize";
893 ot->description =
"Scale selected vertices' skin radii";
918 ot->name =
"Trackball";
919 ot->description =
"Trackball style rotation of selected items";
944 ot->description =
"Rotate selected items";
989 ot->description =
"Tilt selected control vertices of 3D curve";
1013 ot->description =
"Bend selected items between the 3D cursor and the mouse";
1048 ot->description =
"Shear selected items along the given axis";
1072 ot->name =
"Push/Pull";
1073 ot->description =
"Push/Pull selected items";
1095 ot->name =
"Shrink/Fatten";
1096 ot->description =
"Shrink/fatten selected vertices along normals";
1114 "Scale the offset to give more even thickness");
1124 ot->name =
"To Sphere";
1125 ot->description =
"Move selected items outward in a spherical shape around geometric center";
1147 ot->name =
"Mirror";
1148 ot->description =
"Mirror selected items around one or more axes";
1166 ot->name =
"Scale B-Bone";
1167 ot->description =
"Scale selected bendy bones display size";
1192 ot->name =
"Edge Slide";
1193 ot->description =
"Slide an edge loop along a mesh";
1213 "Make the edge loop match the shape of the adjacent edge loop");
1221 "When Even mode is active, flips between the two adjacent edge loops");
1222 RNA_def_boolean(
ot->srna,
"use_clamp",
true,
"Clamp",
"Clamp within the edge extents");
1230 ot->name =
"Vertex Slide";
1231 ot->description =
"Slide a vertex along a mesh";
1248 "Make the edge loop match the shape of the adjacent edge loop");
1256 "When Even mode is active, flips between the two adjacent edge loops");
1257 RNA_def_boolean(
ot->srna,
"use_clamp",
true,
"Clamp",
"Clamp within the edge extents");
1265 ot->name =
"Edge Crease";
1266 ot->description =
"Change the crease of edges";
1288 ot->name =
"Vertex Crease";
1289 ot->description =
"Change the crease of vertices";
1311 ot->name =
"Edge Bevel Weight";
1312 ot->description =
"Change the bevel weight of edges";
1333 ot->name =
"Sequence Slide";
1334 ot->description =
"Slide a sequence strip in time";
1353 "use_restore_handle_selection",
1355 "Restore Handle Selection",
1356 "Restore handle selection after tweaking");
1367 ot->name =
"Rotate Normals";
1368 ot->description =
"Rotate split normal of selected items";
1390 ot->name =
"Transform";
1391 ot->description =
"Transform selected items by mode type";
1392 ot->idname =
"TRANSFORM_OT_transform";
1426 if (gzgroup !=
nullptr) {
1429 const int drag_action =
RNA_enum_get(&gzg_ptr,
"drag_action");
1430 const char *op_id =
nullptr;
1431 switch (drag_action) {
1433 op_id =
"TRANSFORM_OT_translate";
1436 op_id =
"TRANSFORM_OT_rotate";
1439 op_id =
"TRANSFORM_OT_resize";
1462 ot->name =
"Transform from Gizmo";
1463 ot->description =
"Transform selected items by mode type";
1464 ot->idname =
"TRANSFORM_OT_from_gizmo";
ScrArea * CTX_wm_area(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmMsgBus * CTX_wm_message_bus(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_scene_orientation_slot_set_index(TransformOrientationSlot *orient_slot, int orientation)
MINLINE bool is_zero_v4(const float v[4]) ATTR_WARN_UNUSED_RESULT
#define BLT_I18NCONTEXT_ID_CURVE_LEGACY
Object is a sort of wrapper for general info.
@ V3D_GIZMO_SHOW_OBJECT_ROTATE
@ V3D_GIZMO_SHOW_OBJECT_SCALE
@ V3D_GIZMO_SHOW_OBJECT_TRANSLATE
@ OP_IS_MODAL_GRAB_CURSOR
bool EDBM_selectmode_set_multi(bContext *C, short selectmode)
bool ED_operator_screenactive(bContext *C)
bool ED_operator_object_active(bContext *C)
bool ED_operator_sequencer_active(bContext *C)
bool ED_operator_view3d_active(bContext *C)
bool ED_operator_region_view3d_active(bContext *C)
bool ED_operator_areaactive(bContext *C)
bool ED_operator_editmesh(bContext *C)
bool ED_view3d_navigation_do(bContext *C, ViewOpsData *vod, const wmEvent *event, const float depth_loc_override[3])
Read Guarded memory(de)allocation.
const EnumPropertyItem * rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname)
@ OPTYPE_DEPENDS_ON_CURSOR
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
VecBase< float, 2 > float2
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
const char * RNA_property_identifier(const PropertyRNA *prop)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
PropertyRNA * RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float_distance(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float_translation(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identifier, const int rows, const int columns, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const bool *default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_property_array(PropertyRNA *prop, int length)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
const EnumPropertyItem rna_enum_axis_xyz_items[]
const EnumPropertyItem rna_enum_proportional_falloff_items[]
const EnumPropertyItem rna_enum_snap_source_items[]
const EnumPropertyItem rna_enum_snap_element_items[]
struct wmGizmoMap * gizmo_map
struct ToolSettings * toolsettings
TransformOrientationSlot orientation_slots[4]
float values_modal_offset[4]
struct ReportList * reports
struct wmOperatorType * type
void WM_operator_type_set(wmOperator *op, wmOperatorType *ot)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
int WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmGizmoGroup * WM_gizmomap_group_find(wmGizmoMap *gzmap, const char *idname)
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)
void WM_operatortype_props_advanced_begin(wmOperatorType *ot)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_free(PointerRNA *ptr)