Blender  V3.3
object_modes.c File Reference
#include "DNA_gpencil_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_workspace_types.h"
#include "BLI_kdopbvh.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "PIL_time.h"
#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "ED_armature.h"
#include "ED_gpencil.h"
#include "ED_outliner.h"
#include "ED_screen.h"
#include "ED_transform_snap_object_context.h"
#include "ED_undo.h"
#include "ED_view3d.h"
#include "WM_toolsystem.h"
#include "ED_object.h"
#include "object_intern.h"

Go to the source code of this file.

Functions

High Level Mode Operations
static const char * object_mode_op_string (eObjectMode mode)
 
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)
 
Generic Mode Enter/Exit

Supports exiting a mode without it being in the current context. This could be done for entering modes too if it's needed.

bool ED_object_mode_set_ex (bContext *C, eObjectMode mode, bool use_undo, ReportList *reports)
 
bool ED_object_mode_set (bContext *C, eObjectMode mode)
 
static bool ed_object_mode_generic_exit_ex (struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, bool only_test)
 
static void ed_object_posemode_set_for_weight_paint_ex (bContext *C, Main *bmain, Object *ob_arm, const bool is_mode_set)
 
void ED_object_posemode_set_for_weight_paint (bContext *C, Main *bmain, Object *ob, const bool is_mode_set)
 
void ED_object_mode_generic_exit (struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
 
bool ED_object_mode_generic_has_data (struct Depsgraph *depsgraph, const struct Object *ob)
 
Transfer Mode

Enters the same mode of the current active object in another object, leaving the mode of the current object.

static bool object_transfer_mode_poll (bContext *C)
 
static void object_transfer_mode_reposition_view_pivot (bContext *C, const int mval[2])
 
static void object_overlay_mode_transfer_animation_start (bContext *C, Object *ob_dst)
 
static bool object_transfer_mode_to_base (bContext *C, wmOperator *op, Base *base_dst)
 
static int object_transfer_mode_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void OBJECT_OT_transfer_mode (wmOperatorType *ot)
 

Detailed Description

General utils to handle mode switching, actual mode switching logic is per-object type.

Definition in file object_modes.c.

Function Documentation

◆ ED_object_mode_compat_set()

bool ED_object_mode_compat_set ( struct bContext C,
struct Object ob,
eObjectMode  mode,
struct ReportList reports 
)

◆ ED_object_mode_compat_test()

bool ED_object_mode_compat_test ( const Object ob,
eObjectMode  mode 
)

◆ ED_object_mode_generic_exit()

void ED_object_mode_generic_exit ( struct Main bmain,
struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob 
)

◆ ed_object_mode_generic_exit_ex()

static bool ed_object_mode_generic_exit_ex ( struct Main bmain,
struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob,
bool  only_test 
)
static

◆ ED_object_mode_generic_has_data()

bool ED_object_mode_generic_has_data ( struct Depsgraph depsgraph,
const struct Object ob 
)

Definition at line 395 of file object_modes.c.

References depsgraph, ed_object_mode_generic_exit_ex(), and NULL.

◆ ED_object_mode_set()

bool ED_object_mode_set ( bContext C,
eObjectMode  mode 
)

◆ ED_object_mode_set_ex()

bool ED_object_mode_set_ex ( bContext C,
eObjectMode  mode,
bool  use_undo,
ReportList reports 
)

◆ ED_object_posemode_set_for_weight_paint()

void ED_object_posemode_set_for_weight_paint ( bContext C,
Main bmain,
Object ob,
const bool  is_mode_set 
)

◆ ed_object_posemode_set_for_weight_paint_ex()

static void ed_object_posemode_set_for_weight_paint_ex ( bContext C,
Main bmain,
Object ob_arm,
const bool  is_mode_set 
)
static

◆ object_mode_op_string()

static const char* object_mode_op_string ( eObjectMode  mode)
static

◆ OBJECT_OT_transfer_mode()

void OBJECT_OT_transfer_mode ( wmOperatorType ot)

◆ object_overlay_mode_transfer_animation_start()

static void object_overlay_mode_transfer_animation_start ( bContext C,
Object ob_dst 
)
static

◆ object_transfer_mode_invoke()

static int object_transfer_mode_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ object_transfer_mode_poll()

static bool object_transfer_mode_poll ( bContext C)
static

◆ object_transfer_mode_reposition_view_pivot()

static void object_transfer_mode_reposition_view_pivot ( bContext C,
const int  mval[2] 
)
static

◆ object_transfer_mode_to_base()

static bool object_transfer_mode_to_base ( bContext C,
wmOperator op,
Base base_dst 
)
static