63 return "OBJECT_OT_editmode_toggle";
66 return "SCULPT_OT_sculptmode_toggle";
69 return "PAINT_OT_vertex_paint_toggle";
72 return "PAINT_OT_weight_paint_toggle";
75 return "PAINT_OT_texture_paint_toggle";
78 return "PARTICLE_OT_particle_edit_toggle";
81 return "OBJECT_OT_posemode_toggle";
84 return "GPENCIL_OT_editmode_toggle";
87 return "GPENCIL_OT_paintmode_toggle";
90 return "GPENCIL_OT_sculptmode_toggle";
93 return "GPENCIL_OT_weightmode_toggle";
96 return "GPENCIL_OT_vertexmode_toggle";
99 return "CURVES_OT_sculptmode_toggle";
147 if (
U.experimental.use_new_curves_tools) {
204 if (ob->
mode == mode) {
223 if (ob->
mode != mode) {
328 const bool is_mode_set)
333 if (ob_arm !=
NULL) {
360 const bool is_mode_set)
365 &virtualModifierData);
366 for (; md; md = md->
next) {
377 for (; md; md = md->
next) {
446 if (base_dst ==
NULL) {
453 if (ob_dst == ob_src) {
462 bool mode_transferred =
false;
486 mode_transferred =
true;
490 return mode_transferred;
500 if (!mode_transferred) {
514 ot->
name =
"Transfer Mode";
515 ot->
idname =
"OBJECT_OT_transfer_mode";
517 "Switches the active object and assigns the same mode to a new one under the mouse cursor, "
518 "leaving the active mode in the current one";
530 "use_flash_on_transfer",
533 "Flash the target object when transferring the mode");
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
struct GpencilModifierData * BKE_gpencil_modifiers_get_virtual_modifierlist(const struct Object *ob, struct GpencilVirtualModifierData *data)
void BKE_view_layer_base_deselect_all(struct ViewLayer *view_layer)
struct Base * BKE_view_layer_base_find(struct ViewLayer *view_layer, struct Object *ob)
void BKE_view_layer_base_select_and_set_active(struct ViewLayer *view_layer, struct Base *selbase)
struct ModifierData * BKE_modifiers_get_virtual_modifierlist(const struct Object *ob, struct VirtualModifierData *data)
General operations, lookup, etc. for blender objects.
bool BKE_object_is_in_editmode(const struct Object *ob)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
MINLINE void copy_v3_v3(float r[3], const float a[3])
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
struct Object * DEG_get_original_object(struct Object *object)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ eGpencilModifierType_Armature
#define OB_MODE_ALL_PAINT
#define OB_MODE_ALL_MODE_DATA
Object is a sort of wrapper for general info.
#define OBACT(_view_layer)
#define BASE_VISIBLE(v3d, base)
bool ED_object_particle_edit_mode_supported(const Object *ob)
void ED_object_vpaintmode_exit_ex(struct Object *ob)
void ED_object_wpaintmode_exit_ex(struct Object *ob)
bool ED_object_editmode_exit_ex(struct Main *bmain, struct Scene *scene, struct Object *obedit, int flag)
void ED_object_texture_paint_mode_exit_ex(struct Main *bmain, struct Scene *scene, Object *ob)
void ED_object_particle_edit_mode_exit_ex(struct Scene *scene, Object *ob)
void ED_object_sculptmode_exit_ex(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
void ED_outliner_select_sync_from_object_tag(struct bContext *C)
void ED_undo_group_begin(struct bContext *C)
void ED_undo_push(struct bContext *C, const char *str)
void ED_undo_group_end(struct bContext *C)
struct Base * ED_view3d_give_base_under_cursor(struct bContext *C, const int mval[2])
bool ED_view3d_autodist_simple(struct ARegion *region, const int mval[2], float mouse_worldloc[3], int margin, const float *force_depth)
Platform independent time functions.
@ OPTYPE_DEPENDS_ON_CURSOR
const Depsgraph * depsgraph
bool ED_object_gpencil_exit(struct Main *bmain, Object *ob)
void ED_object_posemode_set_for_weight_paint(bContext *C, Main *bmain, Object *ob, const bool is_mode_set)
bool ED_object_mode_compat_test(const Object *ob, eObjectMode mode)
bool ED_object_mode_compat_set(bContext *C, Object *ob, eObjectMode mode, ReportList *reports)
static bool object_transfer_mode_poll(bContext *C)
static bool ed_object_mode_generic_exit_ex(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, bool only_test)
static int object_transfer_mode_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void ED_object_mode_generic_exit(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
static bool object_transfer_mode_to_base(bContext *C, wmOperator *op, Base *base_dst)
bool ED_object_mode_generic_has_data(struct Depsgraph *depsgraph, const struct Object *ob)
static void ed_object_posemode_set_for_weight_paint_ex(bContext *C, Main *bmain, Object *ob_arm, const bool is_mode_set)
static void object_transfer_mode_reposition_view_pivot(bContext *C, const int mval[2])
void OBJECT_OT_transfer_mode(wmOperatorType *ot)
static void object_overlay_mode_transfer_animation_start(bContext *C, Object *ob_dst)
static const char * object_mode_op_string(eObjectMode mode)
bool ED_object_mode_set(bContext *C, eObjectMode mode)
bool ED_object_mode_set_ex(bContext *C, eObjectMode mode, bool use_undo, ReportList *reports)
bool ED_object_posemode_enter_ex(struct Main *bmain, Object *ob)
bool ED_object_posemode_exit_ex(struct Main *bmain, Object *ob)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
struct GpencilModifierData * next
struct ModifierData * next
double overlay_mode_transfer_start_time
struct SculptSession * sculpt
struct ToolSettings * toolsettings
float average_stroke_accum[3]
int average_stroke_counter
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
double PIL_check_seconds_timer(void)
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)
int WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)