55static const float VecOne[3] = {1, 1, 1};
60static const char OP_RESIZE[] =
"TRANSFORM_OT_resize";
62static const char OP_SHEAR[] =
"TRANSFORM_OT_shear";
63static const char OP_BEND[] =
"TRANSFORM_OT_bend";
66static const char OP_TILT[] =
"TRANSFORM_OT_tilt";
68static const char OP_MIRROR[] =
"TRANSFORM_OT_mirror";
145 "BONE_ENVELOPE_DIST",
147 "Bone Envelope Distance",
150 "CURVE_SHRINKFATTEN",
152 "Curve Shrink/Fatten",
157 "Mask Shrink/Fatten",
172 "Grease Pencil Opacity",
174 {0,
nullptr, 0,
nullptr,
nullptr},
205 layout->
op_enum(
"TRANSFORM_OT_select_orientation",
"orientation");
216 ot->name =
"Select Orientation";
217 ot->description =
"Select transformation orientation";
218 ot->idname =
"TRANSFORM_OT_select_orientation";
266 ot->name =
"Delete Orientation";
267 ot->description =
"Delete transformation orientation";
268 ot->idname =
"TRANSFORM_OT_delete_orientation";
291 "Create Orientation's 'use' parameter only valid in a 3DView context");
314 ot->name =
"Create Orientation";
315 ot->description =
"Create transformation orientation from selection";
316 ot->idname =
"TRANSFORM_OT_create_orientation";
324 ot->srna,
"name",
nullptr,
MAX_NAME,
"Name",
"Name of the new custom orientation");
330 "Use the current view instead of the active object to create the new orientation");
335 ot->srna,
"use",
false,
"Use After Creation",
"Select orientation after its creation");
339 "Overwrite Previous",
340 "Overwrite previously created orientation with same name");
343#ifdef USE_LOOPSLIDE_HACK
355 bool mesh_select_mode[3];
360 short selectmode_orig;
378# error "loopslide hack removed!"
383#ifdef USE_LOOPSLIDE_HACK
436#if defined(WITH_INPUT_NDOF) && 0
457 if (!is_navigating) {
498 if (mode_prev != t->
mode) {
591 if (!
ELEM(prop_con,
nullptr, prop)) {
595 if (
STREQ(prop_id,
"constraint_axis") &&
607 if (
STREQ(prop_id,
"orient_axis")) {
633 if (
STREQ(prop_id,
"use_snap_project")) {
637 if (
STREQ(prop_id,
"use_even_offset")) {
646 if (
STREQ(prop_id,
"correct_uv")) {
680 ot->srna,
"orient_matrix", 3, 3,
nullptr, 0.0f, 0.0f,
"Matrix",
"", 0.0f, 0.0f);
705 RNA_def_boolean(
ot->srna,
"use_proportional_edit",
false,
"Proportional Editing",
"");
707 "proportional_edit_falloff",
710 "Proportional Falloff",
711 "Falloff type for proportional editing mode");
725 RNA_def_boolean(
ot->srna,
"use_proportional_projected",
false,
"Projected (2D)",
"");
741 RNA_def_boolean(
ot->srna,
"use_snap_project",
false,
"Project Individual Elements",
"");
751 "Point on source that will snap to target");
755 prop =
RNA_def_boolean(
ot->srna,
"use_snap_self",
true,
"Target: Include Active",
"");
757 prop =
RNA_def_boolean(
ot->srna,
"use_snap_edit",
true,
"Target: Include Edit",
"");
759 prop =
RNA_def_boolean(
ot->srna,
"use_snap_nonedit",
true,
"Target: Include Non-Edited",
"");
762 ot->srna,
"use_snap_selectable",
false,
"Target: Exclude Non-Selectable",
"");
770 prop =
RNA_def_boolean(
ot->srna,
"snap_align",
false,
"Align with Point Normal",
"");
791 "Edit Grease Pencil",
792 "Edit selected Grease Pencil strokes");
797 prop =
RNA_def_boolean(
ot->srna,
"cursor_transform",
false,
"Transform Cursor",
"");
803 ot->srna,
"texture_space",
false,
"Edit Texture Space",
"Edit object data texture space");
806 ot->srna,
"remove_on_cancel",
false,
"Remove on Cancel",
"Remove elements on cancel");
809 "use_duplicated_keyframes",
811 "Duplicated Keyframes",
812 "Transform duplicated keyframes");
818 ot->srna,
"correct_uv",
true,
"Correct UVs",
"Correct UV coordinates when transforming");
831 ot->srna,
"view2d_edge_pan",
false,
"Edge Pan",
"Enable edge panning in 2D view");
839 "Confirm on Release",
840 "Always confirm operation when releasing button");
844 ot->srna,
"use_accurate",
false,
"Accurate",
"Use accurate transformation");
850 "use_automerge_and_split",
852 "Auto Merge & Split",
853 "Forces the use of Auto Merge and Split");
862 "Translate origin instead of selection");
871 ot->description =
"Move selected items";
898 ot->description =
"Scale (resize) selected items";
915 "mouse_dir_constraint",
920 "Mouse Directional Constraint",
936 ot->name =
"Skin Resize";
937 ot->description =
"Scale selected vertices' skin radii";
962 ot->name =
"Trackball";
963 ot->description =
"Trackball style rotation of selected items";
988 ot->description =
"Rotate selected items";
1033 ot->description =
"Tilt selected control vertices of 3D curve";
1057 ot->description =
"Bend selected items between the 3D cursor and the mouse";
1092 ot->description =
"Shear selected items along the given axis";
1116 ot->name =
"Push/Pull";
1117 ot->description =
"Push/Pull selected items";
1139 ot->name =
"Shrink/Fatten";
1140 ot->description =
"Shrink/fatten selected vertices along normals";
1158 "Scale the offset to give more even thickness");
1168 ot->name =
"To Sphere";
1169 ot->description =
"Move selected items outward in a spherical shape around geometric center";
1191 ot->name =
"Mirror";
1192 ot->description =
"Mirror selected items around one or more axes";
1210 ot->name =
"Scale B-Bone";
1211 ot->description =
"Scale selected bendy bones display size";
1236 ot->name =
"Edge Slide";
1237 ot->description =
"Slide an edge loop along a mesh";
1257 "Make the edge loop match the shape of the adjacent edge loop");
1265 "When Even mode is active, flips between the two adjacent edge loops");
1266 RNA_def_boolean(
ot->srna,
"use_clamp",
true,
"Clamp",
"Clamp within the edge extents");
1274 ot->name =
"Vertex Slide";
1275 ot->description =
"Slide a vertex along a mesh";
1292 "Make the edge loop match the shape of the adjacent edge loop");
1300 "When Even mode is active, flips between the two adjacent edge loops");
1301 RNA_def_boolean(
ot->srna,
"use_clamp",
true,
"Clamp",
"Clamp within the edge extents");
1309 ot->name =
"Edge Crease";
1310 ot->description =
"Change the crease of edges";
1332 ot->name =
"Vertex Crease";
1333 ot->description =
"Change the crease of vertices";
1355 ot->name =
"Edge Bevel Weight";
1356 ot->description =
"Change the bevel weight of edges";
1377 ot->name =
"Sequence Slide";
1378 ot->description =
"Slide a sequence strip in time";
1397 "use_restore_handle_selection",
1399 "Restore Handle Selection",
1400 "Restore handle selection after tweaking");
1411 ot->name =
"Rotate Normals";
1412 ot->description =
"Rotate custom normal of selected items";
1435 ot->name =
"Transform";
1436 ot->description =
"Transform selected items by mode type";
1437 ot->idname =
"TRANSFORM_OT_transform";
1472 if (gzgroup !=
nullptr) {
1475 const int drag_action =
RNA_enum_get(&gzg_ptr,
"drag_action");
1476 const char *op_id =
nullptr;
1477 switch (drag_action) {
1479 op_id =
"TRANSFORM_OT_translate";
1482 op_id =
"TRANSFORM_OT_rotate";
1485 op_id =
"TRANSFORM_OT_resize";
1508 ot->name =
"Transform from Gizmo";
1509 ot->description =
"Transform selected items by mode type";
1510 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_regionactive(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_active_screen_and_scene(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)
@ OPTYPE_DEPENDS_ON_CURSOR
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
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)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
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_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
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[]
ARegionRuntimeHandle * runtime
struct ToolSettings * toolsettings
TransformOrientationSlot orientation_slots[4]
void op_enum(blender::StringRefNull opname, blender::StringRefNull propname, IDProperty *properties, blender::wm::OpCallContext context, eUI_Item_Flag flag, const int active=-1)
struct ReportList * reports
struct wmOperatorType * type
void WM_operator_type_set(wmOperator *op, wmOperatorType *ot)
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, blender::wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
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)