59static const float VecOne[3] = {1, 1, 1};
64static const char OP_RESIZE[] =
"TRANSFORM_OT_resize";
66static const char OP_SHEAR[] =
"TRANSFORM_OT_shear";
67static const char OP_BEND[] =
"TRANSFORM_OT_bend";
70static const char OP_TILT[] =
"TRANSFORM_OT_tilt";
72static const char OP_MIRROR[] =
"TRANSFORM_OT_mirror";
161 {0,
nullptr, 0,
nullptr,
nullptr},
164namespace ed::transform {
189 layout.
op_enum(
"TRANSFORM_OT_select_orientation",
"orientation");
190 popup_menu_end(
C, pup);
200 ot->
name =
"Select Orientation";
201 ot->
description =
"Select transformation orientation";
202 ot->
idname =
"TRANSFORM_OT_select_orientation";
250 ot->
name =
"Delete Orientation";
251 ot->
description =
"Delete transformation orientation";
252 ot->
idname =
"TRANSFORM_OT_delete_orientation";
275 "Create Orientation's 'use' parameter only valid in a 3DView context");
298 ot->
name =
"Create Orientation";
299 ot->
description =
"Create transformation orientation from selection";
300 ot->
idname =
"TRANSFORM_OT_create_orientation";
308 ot->
srna,
"name",
nullptr,
MAX_NAME,
"Name",
"Name of the new custom orientation");
314 "Use the current view instead of the active object to create the new orientation");
319 ot->
srna,
"use",
false,
"Use After Creation",
"Select orientation after its creation");
323 "Overwrite Previous",
324 "Overwrite previously created orientation with same name");
327#ifdef USE_LOOPSLIDE_HACK
339 bool mesh_select_mode[3];
344 short selectmode_orig;
362# error "loopslide hack removed!"
367#ifdef USE_LOOPSLIDE_HACK
420#if defined(WITH_INPUT_NDOF) && 0
441 if (!is_navigating) {
482 if (mode_prev != t->
mode) {
576 if (!
ELEM(prop_con,
nullptr, prop)) {
580 if (
STREQ(prop_id,
"constraint_axis") &&
592 if (
STREQ(prop_id,
"orient_axis")) {
618 if (
STREQ(prop_id,
"use_snap_project")) {
622 if (
STREQ(prop_id,
"use_even_offset")) {
631 if (
STREQ(prop_id,
"correct_uv")) {
665 ot->
srna,
"orient_matrix", 3, 3,
nullptr, 0.0f, 0.0f,
"Matrix",
"", 0.0f, 0.0f);
692 "proportional_edit_falloff",
695 "Proportional Falloff",
696 "Falloff type for proportional editing mode");
736 "Point on source that will snap to target");
744 prop =
RNA_def_boolean(ot->
srna,
"use_snap_nonedit",
true,
"Target: Include Non-Edited",
"");
747 ot->
srna,
"use_snap_selectable",
false,
"Target: Exclude Non-Selectable",
"");
776 "Edit Grease Pencil",
777 "Edit selected Grease Pencil strokes");
788 ot->
srna,
"texture_space",
false,
"Edit Texture Space",
"Edit object data texture space");
791 ot->
srna,
"remove_on_cancel",
false,
"Remove on Cancel",
"Remove elements on cancel");
794 "use_duplicated_keyframes",
796 "Duplicated Keyframes",
797 "Transform duplicated keyframes");
803 ot->
srna,
"correct_uv",
true,
"Correct UVs",
"Correct UV coordinates when transforming");
816 ot->
srna,
"view2d_edge_pan",
false,
"Edge Pan",
"Enable edge panning in 2D view");
824 "Confirm on Release",
825 "Always confirm operation when releasing button");
829 ot->
srna,
"use_accurate",
false,
"Accurate",
"Use accurate transformation");
835 "use_automerge_and_split",
837 "Auto Merge & Split",
838 "Forces the use of Auto Merge and Split");
847 "Translate origin instead of selection");
900 "mouse_dir_constraint",
905 "Mouse Directional Constraint",
921 ot->
name =
"Skin Resize";
922 ot->
description =
"Scale selected vertices' skin radii";
947 ot->
name =
"Trackball";
948 ot->
description =
"Trackball style rotation of selected items";
1002 Curve *cu = id_cast<Curve *>(obedit->
data);
1018 ot->
description =
"Tilt selected control vertices of 3D curve";
1042 ot->
description =
"Bend selected items between the 3D cursor and the mouse";
1077 ot->
description =
"Shear selected items along the given axis";
1102 ot->
name =
"Push/Pull";
1125 ot->
name =
"Shrink/Fatten";
1126 ot->
description =
"Shrink/fatten selected vertices along normals";
1144 "Scale the offset to give more even thickness");
1154 ot->
name =
"To Sphere";
1155 ot->
description =
"Move selected items outward in a spherical shape around geometric center";
1177 ot->
name =
"Mirror";
1178 ot->
description =
"Mirror selected items around one or more axes";
1196 ot->
name =
"Scale B-Bone";
1197 ot->
description =
"Scale selected bendy bones display size";
1222 ot->
name =
"Edge Slide";
1223 ot->
description =
"Slide an edge loop along a mesh";
1243 "Make the edge loop match the shape of the adjacent edge loop");
1251 "When Even mode is active, flips between the two adjacent edge loops");
1260 ot->
name =
"Vertex Slide";
1279 "Make the edge loop match the shape of the adjacent edge loop");
1287 "When Even mode is active, flips between the two adjacent edge loops");
1297 "World-space direction",
1308 ot->
name =
"Edge Crease";
1331 ot->
name =
"Vertex Crease";
1332 ot->
description =
"Change the crease of vertices";
1354 ot->
name =
"Edge Bevel Weight";
1355 ot->
description =
"Change the bevel weight of edges";
1378 if (
STR_ELEM(prop_id,
"all_channels",
"markers",
"insert")) {
1387 ot->
name =
"Sequence Slide";
1388 ot->
description =
"Slide a sequence strip in time";
1408 "use_restore_handle_selection",
1410 "Restore Handle Selection",
1411 "Restore handle selection after tweaking");
1419 "How to resolve overlap after transformation");
1433 ot->
name =
"Rotate Normals";
1434 ot->
description =
"Rotate custom normal of selected items";
1457 ot->
name =
"Transform";
1458 ot->
description =
"Transform selected items by mode type";
1459 ot->
idname =
"TRANSFORM_OT_transform";
1494 if (gzgroup !=
nullptr) {
1497 const int drag_action =
RNA_enum_get(&gzg_ptr,
"drag_action");
1498 const char *op_id =
nullptr;
1499 switch (drag_action) {
1501 op_id =
"TRANSFORM_OT_translate";
1504 op_id =
"TRANSFORM_OT_rotate";
1507 op_id =
"TRANSFORM_OT_resize";
1529 ot->
name =
"Transform from Gizmo";
1530 ot->
description =
"Transform selected items by mode type";
1531 ot->
idname =
"TRANSFORM_OT_from_gizmo";
#define BLT_I18NCONTEXT_ID_CURVE_LEGACY
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
void operator_properties_ripple(wmOperatorType *ot, eSeqRippleFlag options)
PopupMenu * popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
Layout * popup_menu_layout(PopupMenu *pup)
wmKeyMap * WM_keymap_active(const wmWindowManager *wm, wmKeyMap *keymap)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
ScrArea * CTX_wm_area(const bContext *C)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
int RNA_enum_get(PointerRNA *ptr, const char *name)
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)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
const EnumPropertyItem rna_enum_snap_source_items[]
@ V3D_GIZMO_SHOW_OBJECT_TRANSLATE
@ V3D_GIZMO_SHOW_OBJECT_SCALE
@ V3D_GIZMO_SHOW_OBJECT_ROTATE
void WM_operator_properties_free(PointerRNA *ptr)
const char * RNA_property_identifier(const PropertyRNA *prop)
void WM_operator_type_set(wmOperator *op, wmOperatorType *ot)
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
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)
bool ED_operator_areaactive(bContext *C)
@ OP_IS_MODAL_GRAB_CURSOR
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PointerRNA WM_operator_properties_create_ptr(wmOperatorType *ot)
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)
bool ED_view3d_navigation_do(bContext *C, ViewOpsData *vod, const wmEvent *event, const float depth_loc_override[3])
bool EDBM_selectmode_set_multi(bContext *C, short selectmode)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
MINLINE bool is_zero_v4(const float v[4]) ATTR_WARN_UNUSED_RESULT
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)
bool RNA_property_boolean_get(PointerRNA *ptr, 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_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
bool ED_operator_editmesh(bContext *C)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
VecBase< float, 2 > float2
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BKE_report(ReportList *reports, eReportType type, const char *message)
wmWindowManager * CTX_wm_manager(const bContext *C)
bool ED_operator_object_active_only_from_view_layer(bContext *C)
Object * CTX_data_edit_object(const bContext *C)
bool ED_operator_regionactive(bContext *C)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool ED_operator_view3d_active(bContext *C)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
const EnumPropertyItem * rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmMsgBus * CTX_wm_message_bus(const bContext *C)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
@ SEQ_RIPPLE_ALL_CHANNELS
const EnumPropertyItem rna_enum_transform_mode_type_items[]
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
bToolRef * WM_toolsystem_ref_from_context(const bContext *C)
void BKE_scene_orientation_slot_set_index(TransformOrientationSlot *orient_slot, int orientation)
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)
bool ED_operator_active_screen_and_scene(bContext *C)
const EnumPropertyItem rna_enum_snap_element_items[]
void WM_operatortype_props_advanced_begin(wmOperatorType *ot)
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
bool ED_operator_region_view3d_active(bContext *C)
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)
wmGizmoGroup * WM_gizmomap_group_find(wmGizmoMap *gzmap, const char *idname)
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)
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
const EnumPropertyItem rna_enum_strip_overlap_mode_items[]
Scene * CTX_data_scene(const bContext *C)
@ OPTYPE_DEPENDS_ON_CURSOR
std::string RNA_string_get(PointerRNA *ptr, const char *name)
bool ED_operator_sequencer_active(bContext *C)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
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)
void RNA_def_property_array(PropertyRNA *prop, int length)
ARegion * CTX_wm_region(const bContext *C)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
const EnumPropertyItem rna_enum_proportional_falloff_items[]
View3D * CTX_wm_view3d(const bContext *C)
bool ED_operator_screenactive(bContext *C)
const EnumPropertyItem rna_enum_axis_xyz_items[]
bke::ARegionRuntime * runtime
TransformOrientationSlot orientation_slots[4]
struct ToolSettings * toolsettings
void op_enum(StringRefNull opname, StringRefNull propname, IDProperty *properties, wm::OpCallContext context, eUI_Item_Flag flag, const int active=-1)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll_property(const bContext *C, wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
void(*) cancel(bContext *C, wmOperator *op)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)