Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Functions
WM_api.h File Reference
#include "BLI_compiler_attrs.h"
#include "BLI_sys_types.h"
#include "DNA_windowmanager_types.h"
#include "WM_keymap.h"
#include "WM_types.h"

Go to the source code of this file.

Classes

struct  wmEventHandler_KeymapResult
 
struct  CheckerIntervalParams
 

Macros

#define WM_operatortype_prop_tag(property, tags)
 

Typedefs

typedef struct wmGizmo wmGizmo
 
typedef struct wmGizmoMap wmGizmoMap
 
typedef struct wmGizmoMapType wmGizmoMapType
 
typedef struct wmJob wmJob
 
typedef enum eWindowAlignment eWindowAlignment
 
typedef bool(* EventHandlerPoll) (const ARegion *region, const struct wmEvent *event)
 
typedef struct wmEventHandler_KeymapResult wmEventHandler_KeymapResult
 
typedef void() wmEventHandler_KeymapDynamicFn(wmWindowManager *wm, struct wmWindow *win, struct wmEventHandler_Keymap *handler, struct wmEventHandler_KeymapResult *km_result)
 
typedef int(* wmUIHandlerFunc) (struct bContext *C, const struct wmEvent *event, void *userdata)
 
typedef void(* wmUIHandlerRemoveFunc) (struct bContext *C, void *userdata)
 
typedef enum eFileSel_Flag eFileSel_Flag
 
typedef enum eFileSel_Action eFileSel_Action
 
typedef void(* wm_jobs_start_callback) (void *custom_data, short *stop, short *do_update, float *progress)
 
typedef struct ARegion *(* wmTooltipInitFn) (struct bContext *C, struct ARegion *region, int *pass, double *r_pass_delay, bool *r_exit_on_event)
 

Enumerations

enum  eWindowAlignment { WIN_ALIGN_ABSOLUTE = 0 , WIN_ALIGN_LOCATION_CENTER , WIN_ALIGN_PARENT_CENTER }
 
enum  { WM_HANDLER_BLOCKING = (1 << 0) , WM_HANDLER_ACCEPT_DBL_CLICK = (1 << 1) , WM_HANDLER_DO_FREE = (1 << 7) }
 
enum  eFileSel_Flag {
  WM_FILESEL_RELPATH = 1 << 0 , WM_FILESEL_DIRECTORY = 1 << 1 , WM_FILESEL_FILENAME = 1 << 2 , WM_FILESEL_FILEPATH = 1 << 3 ,
  WM_FILESEL_FILES = 1 << 4 , WM_FILESEL_SHOW_PROPS = 1 << 5
}
 
enum  eFileSel_Action { FILE_OPENFILE = 0 , FILE_SAVE = 1 }
 
enum  { WM_JOB_PRIORITY = (1 << 0) , WM_JOB_EXCL_RENDER = (1 << 1) , WM_JOB_PROGRESS = (1 << 2) }
 
enum  {
  WM_JOB_TYPE_ANY = 0 , WM_JOB_TYPE_COMPOSITE , WM_JOB_TYPE_RENDER , WM_JOB_TYPE_RENDER_PREVIEW ,
  WM_JOB_TYPE_LOAD_PREVIEW , WM_JOB_TYPE_OBJECT_SIM_OCEAN , WM_JOB_TYPE_OBJECT_SIM_FLUID , WM_JOB_TYPE_OBJECT_BAKE_TEXTURE ,
  WM_JOB_TYPE_OBJECT_BAKE , WM_JOB_TYPE_FILESEL_READDIR , WM_JOB_TYPE_CLIP_BUILD_PROXY , WM_JOB_TYPE_CLIP_TRACK_MARKERS ,
  WM_JOB_TYPE_CLIP_SOLVE_CAMERA , WM_JOB_TYPE_CLIP_PREFETCH , WM_JOB_TYPE_SEQ_BUILD_PROXY , WM_JOB_TYPE_SEQ_BUILD_PREVIEW ,
  WM_JOB_TYPE_POINTCACHE , WM_JOB_TYPE_DPAINT_BAKE , WM_JOB_TYPE_ALEMBIC , WM_JOB_TYPE_SHADER_COMPILATION ,
  WM_JOB_TYPE_STUDIOLIGHT , WM_JOB_TYPE_LIGHT_BAKE , WM_JOB_TYPE_FSMENU_BOOKMARK_VALIDATE , WM_JOB_TYPE_QUADRIFLOW_REMESH ,
  WM_JOB_TYPE_TRACE_IMAGE , WM_JOB_TYPE_LINEART , WM_JOB_TYPE_SEQ_DRAW_THUMBNAIL , WM_JOB_TYPE_SEQ_DRAG_DROP_PREVIEW
}
 

Functions

void WM_init_state_app_template_set (const char *app_template)
 
const char * WM_init_state_app_template_get (void)
 
void WM_init_state_size_set (int stax, int stay, int sizx, int sizy)
 
void WM_init_state_fullscreen_set (void)
 
void WM_init_state_normal_set (void)
 
void WM_init_state_maximized_set (void)
 
void WM_init_state_start_with_console_set (bool value)
 
void WM_init_window_focus_set (bool do_it)
 
void WM_init_native_pixels (bool do_it)
 
void WM_init_input_devices (void)
 
void WM_init (struct bContext *C, int argc, const char **argv)
 
void WM_exit_ex (struct bContext *C, bool do_python)
 
void WM_exit (struct bContext *C) ATTR_NORETURN
 Main exit function to close Blender ordinarily. More...
 
void WM_main (struct bContext *C) ATTR_NORETURN
 
void WM_init_splash (struct bContext *C)
 
void WM_init_opengl (void)
 
void WM_check (struct bContext *C)
 
void WM_reinit_gizmomap_all (struct Main *bmain)
 
void WM_script_tag_reload (void)
 
wmWindowWM_window_find_under_cursor (wmWindow *win, const int mval[2], int r_mval[2])
 
void WM_window_pixel_sample_read (const wmWindowManager *wm, const wmWindow *win, const int pos[2], float r_col[3])
 
uintWM_window_pixels_read (struct wmWindowManager *wm, struct wmWindow *win, int r_size[2])
 
int WM_window_pixels_x (const struct wmWindow *win)
 
int WM_window_pixels_y (const struct wmWindow *win)
 
void WM_window_rect_calc (const struct wmWindow *win, struct rcti *r_rect)
 
void WM_window_screen_rect_calc (const struct wmWindow *win, struct rcti *r_rect)
 
bool WM_window_is_fullscreen (const struct wmWindow *win)
 
bool WM_window_is_maximized (const struct wmWindow *win)
 
void WM_windows_scene_data_sync (const ListBase *win_lb, struct Scene *scene) ATTR_NONNULL()
 
struct SceneWM_windows_scene_get_from_screen (const struct wmWindowManager *wm, const struct bScreen *screen) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
 
struct ViewLayerWM_windows_view_layer_get_from_screen (const struct wmWindowManager *wm, const struct bScreen *screen) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
 
struct WorkSpaceWM_windows_workspace_get_from_screen (const wmWindowManager *wm, const struct bScreen *screen) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
 
struct SceneWM_window_get_active_scene (const struct wmWindow *win) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
 
void WM_window_set_active_scene (struct Main *bmain, struct bContext *C, struct wmWindow *win, struct Scene *scene_new) ATTR_NONNULL()
 
struct WorkSpaceWM_window_get_active_workspace (const struct wmWindow *win) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
 
void WM_window_set_active_workspace (struct bContext *C, struct wmWindow *win, struct WorkSpace *workspace) ATTR_NONNULL(1)
 
struct WorkSpaceLayoutWM_window_get_active_layout (const struct wmWindow *win) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
 
void WM_window_set_active_layout (struct wmWindow *win, struct WorkSpace *workspace, struct WorkSpaceLayout *layout) ATTR_NONNULL(1)
 
struct bScreenWM_window_get_active_screen (const struct wmWindow *win) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
 
void WM_window_set_active_screen (struct wmWindow *win, struct WorkSpace *workspace, struct bScreen *screen) ATTR_NONNULL(1)
 
struct ViewLayerWM_window_get_active_view_layer (const struct wmWindow *win) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
 
void WM_window_set_active_view_layer (struct wmWindow *win, struct ViewLayer *view_layer) ATTR_NONNULL(1)
 
void WM_window_ensure_active_view_layer (struct wmWindow *win) ATTR_NONNULL(1)
 
bool WM_window_is_temp_screen (const struct wmWindow *win) ATTR_WARN_UNUSED_RESULT
 
voidWM_opengl_context_create (void)
 
void WM_opengl_context_dispose (void *context)
 
void WM_opengl_context_activate (void *context)
 
void WM_opengl_context_release (void *context)
 
struct wmWindowWM_window_open (struct bContext *C, const char *title, int x, int y, int sizex, int sizey, int space_type, bool toplevel, bool dialog, bool temp, eWindowAlignment alignment)
 
void WM_window_set_dpi (const wmWindow *win)
 
bool WM_stereo3d_enabled (struct wmWindow *win, bool only_fullscreen_test)
 
void WM_file_autoexec_init (const char *filepath)
 
bool WM_file_read (struct bContext *C, const char *filepath, struct ReportList *reports)
 
void WM_file_autosave_init (struct wmWindowManager *wm)
 
bool WM_file_recover_last_session (struct bContext *C, struct ReportList *reports)
 
void WM_file_tag_modified (void)
 
struct IDWM_file_link_datablock (struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct View3D *v3d, const char *filepath, short id_code, const char *id_name, int flag)
 
struct IDWM_file_append_datablock (struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct View3D *v3d, const char *filepath, short id_code, const char *id_name, int flag)
 
void WM_lib_reload (struct Library *lib, struct bContext *C, struct ReportList *reports)
 
void WM_cursor_set (struct wmWindow *win, int curs)
 
bool WM_cursor_set_from_tool (struct wmWindow *win, const ScrArea *area, const ARegion *region)
 
void WM_cursor_modal_set (struct wmWindow *win, int val)
 
void WM_cursor_modal_restore (struct wmWindow *win)
 
void WM_cursor_wait (bool val)
 
void WM_cursor_grab_enable (struct wmWindow *win, int wrap, bool hide, int bounds[4])
 
void WM_cursor_grab_disable (struct wmWindow *win, const int mouse_ungrab_xy[2])
 
void WM_cursor_time (struct wmWindow *win, int nr)
 
struct wmPaintCursorWM_paint_cursor_activate (short space_type, short region_type, bool(*poll)(struct bContext *C), void(*draw)(struct bContext *C, int, int, void *customdata), void *customdata)
 
bool WM_paint_cursor_end (struct wmPaintCursor *handle)
 
void WM_paint_cursor_remove_by_type (struct wmWindowManager *wm, void *draw_fn, void(*free)(void *))
 
void WM_paint_cursor_tag_redraw (struct wmWindow *win, struct ARegion *region)
 
void WM_cursor_warp (struct wmWindow *win, int x, int y)
 
struct wmEventHandler_KeymapWM_event_add_keymap_handler (ListBase *handlers, wmKeyMap *keymap)
 
struct wmEventHandler_KeymapWM_event_add_keymap_handler_poll (ListBase *handlers, wmKeyMap *keymap, EventHandlerPoll poll)
 
struct wmEventHandler_KeymapWM_event_add_keymap_handler_v2d_mask (ListBase *handlers, wmKeyMap *keymap)
 
struct wmEventHandler_KeymapWM_event_add_keymap_handler_priority (ListBase *handlers, wmKeyMap *keymap, int priority)
 
void WM_event_get_keymap_from_toolsystem_with_gizmos (struct wmWindowManager *wm, struct wmWindow *win, struct wmEventHandler_Keymap *handler, wmEventHandler_KeymapResult *km_result)
 
void WM_event_get_keymap_from_toolsystem (struct wmWindowManager *wm, struct wmWindow *win, struct wmEventHandler_Keymap *handler, wmEventHandler_KeymapResult *km_result)
 
struct wmEventHandler_KeymapWM_event_add_keymap_handler_dynamic (ListBase *handlers, wmEventHandler_KeymapDynamicFn *keymap_fn, void *user_data)
 
void WM_event_remove_keymap_handler (ListBase *handlers, wmKeyMap *keymap)
 
void WM_event_set_keymap_handler_post_callback (struct wmEventHandler_Keymap *handler, void(keymap_tag)(wmKeyMap *keymap, wmKeyMapItem *kmi, void *user_data), void *user_data)
 
void WM_event_get_keymaps_from_handler (wmWindowManager *wm, struct wmWindow *win, struct wmEventHandler_Keymap *handler, struct wmEventHandler_KeymapResult *km_result)
 
wmKeyMapItemWM_event_match_keymap_item (struct bContext *C, wmKeyMap *keymap, const struct wmEvent *event)
 
wmKeyMapItemWM_event_match_keymap_item_from_handlers (struct bContext *C, struct wmWindowManager *wm, struct wmWindow *win, struct ListBase *handlers, const struct wmEvent *event)
 
struct wmEventHandler_UIWM_event_add_ui_handler (const struct bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, char flag)
 
wmOperatorWM_operator_find_modal_by_type (wmWindow *win, const wmOperatorType *ot)
 
void WM_event_remove_ui_handler (ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, bool postpone)
 
void WM_event_remove_area_handler (struct ListBase *handlers, void *area)
 
void WM_event_free_ui_handler_all (struct bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn)
 
struct wmEventHandler_OpWM_event_add_modal_handler (struct bContext *C, struct wmOperator *op)
 
void WM_event_modal_handler_area_replace (wmWindow *win, const struct ScrArea *old_area, struct ScrArea *new_area)
 
void WM_event_modal_handler_region_replace (wmWindow *win, const struct ARegion *old_region, struct ARegion *new_region)
 
void WM_event_remove_handlers (struct bContext *C, ListBase *handlers)
 
struct wmEventHandler_DropboxWM_event_add_dropbox_handler (ListBase *handlers, ListBase *dropboxes)
 
void WM_event_add_mousemove (wmWindow *win)
 
void WM_event_add_notifier_ex (struct wmWindowManager *wm, const struct wmWindow *win, unsigned int type, void *reference)
 
void WM_event_add_notifier (const struct bContext *C, unsigned int type, void *reference)
 
void WM_main_add_notifier (unsigned int type, void *reference)
 
void WM_main_remove_notifier_reference (const void *reference)
 
void WM_main_remap_editor_id_reference (const struct IDRemapper *mappings)
 
void WM_report_banner_show (void)
 
void WM_report_banners_cancel (struct Main *bmain)
 
void WM_report (eReportType type, const char *message)
 
void WM_reportf (eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(2
 
void struct wmEventwm_event_add_ex (struct wmWindow *win, const struct wmEvent *event_to_add, const struct wmEvent *event_to_add_after) ATTR_NONNULL(1
 
void struct wmEvent struct wmEventwm_event_add (struct wmWindow *win, const struct wmEvent *event_to_add) ATTR_NONNULL(1
 
void struct wmEvent struct wmEvent void wm_event_init_from_window (struct wmWindow *win, struct wmEvent *event)
 
struct wmTimerWM_event_add_timer (struct wmWindowManager *wm, struct wmWindow *win, int event_type, double timestep)
 
struct wmTimerWM_event_add_timer_notifier (struct wmWindowManager *wm, struct wmWindow *win, unsigned int type, double timestep)
 
void WM_event_remove_timer (struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer)
 
void WM_event_remove_timer_notifier (struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer)
 
void WM_event_timer_sleep (struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer, bool do_sleep)
 
int WM_generic_select_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_generic_select_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
void WM_operator_view3d_unit_defaults (struct bContext *C, struct wmOperator *op)
 
int WM_operator_smooth_viewtx_get (const struct wmOperator *op)
 
int WM_menu_invoke_ex (struct bContext *C, struct wmOperator *op, wmOperatorCallContext opcontext)
 
int WM_menu_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
void WM_menu_name_call (struct bContext *C, const char *menu_name, short context)
 
int WM_enum_search_invoke_previews (struct bContext *C, struct wmOperator *op, short prv_cols, short prv_rows)
 
int WM_enum_search_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_operator_confirm (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_operator_confirm_or_exec (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_operator_filesel (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
bool WM_operator_filesel_ensure_ext_imtype (wmOperator *op, const struct ImageFormatData *im_format)
 
bool WM_operator_winactive (struct bContext *C)
 
int WM_operator_props_popup_confirm (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_operator_props_popup_call (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_operator_props_popup (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_operator_props_dialog_popup (struct bContext *C, struct wmOperator *op, int width)
 
int WM_operator_redo_popup (struct bContext *C, struct wmOperator *op)
 
int WM_operator_ui_popup (struct bContext *C, struct wmOperator *op, int width)
 
int WM_operator_confirm_message_ex (struct bContext *C, struct wmOperator *op, const char *title, int icon, const char *message, wmOperatorCallContext opcontext)
 
int WM_operator_confirm_message (struct bContext *C, struct wmOperator *op, const char *message)
 
void WM_operator_free (struct wmOperator *op)
 
void WM_operator_free_all_after (wmWindowManager *wm, struct wmOperator *op)
 
void WM_operator_type_set (struct wmOperator *op, struct wmOperatorType *ot)
 
void WM_operator_stack_clear (struct wmWindowManager *wm)
 
void WM_operator_handlers_clear (wmWindowManager *wm, struct wmOperatorType *ot)
 
bool WM_operator_poll (struct bContext *C, struct wmOperatorType *ot)
 
bool WM_operator_poll_context (struct bContext *C, struct wmOperatorType *ot, short context)
 
int WM_operator_call_ex (struct bContext *C, struct wmOperator *op, bool store)
 
int WM_operator_call (struct bContext *C, struct wmOperator *op)
 
int WM_operator_call_notest (struct bContext *C, struct wmOperator *op)
 
int WM_operator_repeat (struct bContext *C, struct wmOperator *op)
 
int WM_operator_repeat_last (struct bContext *C, struct wmOperator *op)
 
bool WM_operator_repeat_check (const struct bContext *C, struct wmOperator *op)
 
bool WM_operator_is_repeat (const struct bContext *C, const struct wmOperator *op)
 
bool WM_operator_name_poll (struct bContext *C, const char *opstring)
 
int WM_operator_name_call_ptr (struct bContext *C, struct wmOperatorType *ot, wmOperatorCallContext context, struct PointerRNA *properties, const wmEvent *event)
 
int WM_operator_name_call (struct bContext *C, const char *opstring, wmOperatorCallContext context, struct PointerRNA *properties, const wmEvent *event)
 
int WM_operator_name_call_with_properties (struct bContext *C, const char *opstring, wmOperatorCallContext context, struct IDProperty *properties, const wmEvent *event)
 
int WM_operator_call_py (struct bContext *C, struct wmOperatorType *ot, wmOperatorCallContext context, struct PointerRNA *properties, struct ReportList *reports, bool is_undo)
 
void WM_operator_name_call_ptr_with_depends_on_cursor (struct bContext *C, wmOperatorType *ot, wmOperatorCallContext opcontext, PointerRNA *properties, const wmEvent *event, const char *drawstr)
 
void WM_operator_properties_alloc (struct PointerRNA **ptr, struct IDProperty **properties, const char *opstring)
 
void WM_operator_properties_sanitize (struct PointerRNA *ptr, bool no_context)
 
bool WM_operator_properties_default (struct PointerRNA *ptr, bool do_update)
 
void WM_operator_properties_reset (struct wmOperator *op)
 
void WM_operator_properties_create (struct PointerRNA *ptr, const char *opstring)
 
void WM_operator_properties_create_ptr (struct PointerRNA *ptr, struct wmOperatorType *ot)
 
void WM_operator_properties_clear (struct PointerRNA *ptr)
 
void WM_operator_properties_free (struct PointerRNA *ptr)
 
bool WM_operator_check_ui_empty (struct wmOperatorType *ot)
 
bool WM_operator_check_ui_enabled (const struct bContext *C, const char *idname)
 
IDPropertyWM_operator_last_properties_ensure_idprops (struct wmOperatorType *ot)
 
void WM_operator_last_properties_ensure (struct wmOperatorType *ot, struct PointerRNA *ptr)
 
wmOperatorWM_operator_last_redo (const struct bContext *C)
 
IDWM_operator_drop_load_path (struct bContext *C, struct wmOperator *op, short idcode)
 
bool WM_operator_last_properties_init (struct wmOperator *op)
 
bool WM_operator_last_properties_store (struct wmOperator *op)
 
void WM_operator_properties_confirm_or_exec (struct wmOperatorType *ot)
 
void WM_operator_properties_filesel (struct wmOperatorType *ot, int filter, short type, eFileSel_Action action, eFileSel_Flag flag, short display, short sort)
 
void WM_operator_properties_id_lookup_set_from_id (PointerRNA *ptr, const ID *id)
 
struct IDWM_operator_properties_id_lookup_from_name_or_session_uuid (struct Main *bmain, PointerRNA *ptr, enum ID_Type type)
 
bool WM_operator_properties_id_lookup_is_set (PointerRNA *ptr)
 
void WM_operator_properties_id_lookup (wmOperatorType *ot, const bool add_name_prop)
 
void WM_operator_properties_use_cursor_init (struct wmOperatorType *ot)
 
void WM_operator_properties_border (struct wmOperatorType *ot)
 
void WM_operator_properties_border_to_rcti (struct wmOperator *op, struct rcti *rect)
 
void WM_operator_properties_border_to_rctf (struct wmOperator *op, rctf *rect)
 
void WM_operator_properties_gesture_box_ex (struct wmOperatorType *ot, bool deselect, bool extend)
 
void WM_operator_properties_gesture_box (struct wmOperatorType *ot)
 
void WM_operator_properties_gesture_box_select (struct wmOperatorType *ot)
 
void WM_operator_properties_gesture_box_zoom (struct wmOperatorType *ot)
 
void WM_operator_properties_gesture_lasso (struct wmOperatorType *ot)
 
void WM_operator_properties_gesture_straightline (struct wmOperatorType *ot, int cursor)
 
void WM_operator_properties_gesture_circle (struct wmOperatorType *ot)
 
void WM_operator_properties_mouse_select (struct wmOperatorType *ot)
 
void WM_operator_properties_select_all (struct wmOperatorType *ot)
 
void WM_operator_properties_select_action (struct wmOperatorType *ot, int default_action, bool hide_gui)
 
void WM_operator_properties_select_action_simple (struct wmOperatorType *ot, int default_action, bool hide_gui)
 
void WM_operator_properties_select_random (struct wmOperatorType *ot)
 
int WM_operator_properties_select_random_seed_increment_get (wmOperator *op)
 
void WM_operator_properties_select_operation (struct wmOperatorType *ot)
 
void WM_operator_properties_select_operation_simple (struct wmOperatorType *ot)
 
void WM_operator_properties_select_walk_direction (struct wmOperatorType *ot)
 
void WM_operator_properties_generic_select (struct wmOperatorType *ot)
 
void WM_operator_properties_checker_interval (struct wmOperatorType *ot, bool nth_can_disable)
 
void WM_operator_properties_checker_interval_from_op (struct wmOperator *op, struct CheckerIntervalParams *op_params)
 
bool WM_operator_properties_checker_interval_test (const struct CheckerIntervalParams *op_params, int depth)
 
char * WM_operator_pystring_ex (struct bContext *C, struct wmOperator *op, bool all_args, bool macro_args, struct wmOperatorType *ot, struct PointerRNA *opptr)
 
char * WM_operator_pystring (struct bContext *C, struct wmOperator *op, bool all_args, bool macro_args)
 
bool WM_operator_pystring_abbreviate (char *str, int str_len_max)
 
char * WM_prop_pystring_assign (struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int index)
 
size_t WM_operator_bl_idname (char *dst, const char *src) ATTR_NONNULL(1
 
size_t size_t WM_operator_py_idname (char *dst, const char *src) ATTR_NONNULL(1
 
size_t size_t bool WM_operator_py_idname_ok_or_report (struct ReportList *reports, const char *classname, const char *idname)
 
char * WM_context_path_resolve_property_full (const struct bContext *C, const PointerRNA *ptr, PropertyRNA *prop, int index)
 
char * WM_context_path_resolve_full (struct bContext *C, const PointerRNA *ptr)
 
struct wmOperatorTypeWM_operatortype_find (const char *idname, bool quiet)
 
void WM_operatortype_iter (struct GHashIterator *ghi)
 
void WM_operatortype_append (void(*opfunc)(struct wmOperatorType *))
 
void WM_operatortype_append_ptr (void(*opfunc)(struct wmOperatorType *, void *), void *userdata)
 
void WM_operatortype_append_macro_ptr (void(*opfunc)(struct wmOperatorType *, void *), void *userdata)
 
void WM_operatortype_remove_ptr (struct wmOperatorType *ot)
 
bool WM_operatortype_remove (const char *idname)
 
void WM_operatortype_last_properties_clear_all (void)
 
void WM_operatortype_idname_visit_for_search (const struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *edit_text, StringPropertySearchVisitFunc visit_fn, void *visit_user_data)
 
void WM_operatortype_props_advanced_begin (struct wmOperatorType *ot)
 
void WM_operatortype_props_advanced_end (struct wmOperatorType *ot)
 
struct wmOperatorTypeWM_operatortype_append_macro (const char *idname, const char *name, const char *description, int flag)
 
struct wmOperatorTypeMacroWM_operatortype_macro_define (struct wmOperatorType *ot, const char *idname)
 
const char * WM_operatortype_name (struct wmOperatorType *ot, struct PointerRNA *properties)
 
char * WM_operatortype_description (struct bContext *C, struct wmOperatorType *ot, struct PointerRNA *properties)
 
char * WM_operatortype_description_or_name (struct bContext *C, struct wmOperatorType *ot, struct PointerRNA *properties)
 
void WM_operator_type_modal_from_exec_for_object_edit_coords (struct wmOperatorType *ot)
 
void WM_uilisttype_init (void)
 
struct uiListTypeWM_uilisttype_find (const char *idname, bool quiet)
 
bool WM_uilisttype_add (struct uiListType *ult)
 
void WM_uilisttype_remove_ptr (struct Main *bmain, struct uiListType *ult)
 
void WM_uilisttype_free (void)
 
void WM_uilisttype_to_full_list_id (const struct uiListType *ult, const char *list_id, char r_full_list_id[])
 
const char * WM_uilisttype_list_id_get (const struct uiListType *ult, struct uiList *list)
 
void WM_menutype_init (void)
 
struct MenuTypeWM_menutype_find (const char *idname, bool quiet)
 
void WM_menutype_iter (struct GHashIterator *ghi)
 
bool WM_menutype_add (struct MenuType *mt)
 
void WM_menutype_freelink (struct MenuType *mt)
 
void WM_menutype_free (void)
 
bool WM_menutype_poll (struct bContext *C, struct MenuType *mt)
 
void WM_menutype_idname_visit_for_search (const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, const char *edit_text, StringPropertySearchVisitFunc visit_fn, void *visit_user_data)
 
void WM_paneltype_init (void)
 
void WM_paneltype_clear (void)
 
struct PanelTypeWM_paneltype_find (const char *idname, bool quiet)
 
bool WM_paneltype_add (struct PanelType *pt)
 
void WM_paneltype_remove (struct PanelType *pt)
 
void WM_paneltype_idname_visit_for_search (const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, const char *edit_text, StringPropertySearchVisitFunc visit_fn, void *visit_user_data)
 
int WM_gesture_box_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_gesture_box_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
void WM_gesture_box_cancel (struct bContext *C, struct wmOperator *op)
 
int WM_gesture_circle_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_gesture_circle_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
void WM_gesture_circle_cancel (struct bContext *C, struct wmOperator *op)
 
int WM_gesture_lines_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_gesture_lines_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
void WM_gesture_lines_cancel (struct bContext *C, struct wmOperator *op)
 
int WM_gesture_lasso_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_gesture_lasso_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
void WM_gesture_lasso_cancel (struct bContext *C, struct wmOperator *op)
 
const int(* WM_gesture_lasso_path_to_array (struct bContext *C, struct wmOperator *op, int *mcoords_len))[2]
 
int WM_gesture_straightline_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_gesture_straightline_active_side_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_gesture_straightline_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
int WM_gesture_straightline_oneshot_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
 
void WM_gesture_straightline_cancel (struct bContext *C, struct wmOperator *op)
 
struct wmGestureWM_gesture_new (struct wmWindow *window, const struct ARegion *region, const struct wmEvent *event, int type)
 
void WM_gesture_end (struct wmWindow *win, struct wmGesture *gesture)
 
void WM_gestures_remove (struct wmWindow *win)
 
void WM_gestures_free_all (struct wmWindow *win)
 
bool WM_gesture_is_modal_first (const struct wmGesture *gesture)
 
void WM_event_add_fileselect (struct bContext *C, struct wmOperator *op)
 
void WM_event_fileselect_event (struct wmWindowManager *wm, void *ophandle, int eventval)
 
void WM_operator_region_active_win_set (struct bContext *C)
 
int WM_operator_flag_only_pass_through_on_press (int retval, const struct wmEvent *event)
 
void WM_event_start_drag (struct bContext *C, int icon, int type, void *poin, double value, unsigned int flags)
 
wmDragWM_drag_data_create (struct bContext *C, int icon, int type, void *poin, double value, unsigned int flags)
 
void WM_event_start_prepared_drag (struct bContext *C, wmDrag *drag)
 
void WM_event_drag_image (struct wmDrag *, struct ImBuf *, float scale)
 
void WM_drag_free (struct wmDrag *drag)
 
void WM_drag_data_free (int dragtype, void *poin)
 
void WM_drag_free_list (struct ListBase *lb)
 
struct wmDropBoxWM_dropbox_add (ListBase *lb, const char *idname, bool(*poll)(struct bContext *, struct wmDrag *, const struct wmEvent *event), void(*copy)(struct bContext *, struct wmDrag *, struct wmDropBox *), void(*cancel)(struct Main *, struct wmDrag *, struct wmDropBox *), WMDropboxTooltipFunc tooltip)
 
void WM_drag_draw_item_name_fn (struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2])
 
void WM_drag_draw_default_fn (struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2])
 
ListBaseWM_dropboxmap_find (const char *idname, int spaceid, int regionid)
 
IDWM_drag_asset_id_import (wmDragAsset *asset_drag, int flag_extra)
 
bool WM_drag_asset_will_import_linked (const wmDrag *drag)
 
void WM_drag_add_local_ID (struct wmDrag *drag, struct ID *id, struct ID *from_parent)
 
struct IDWM_drag_get_local_ID (const struct wmDrag *drag, short idcode)
 
struct IDWM_drag_get_local_ID_from_event (const struct wmEvent *event, short idcode)
 
bool WM_drag_is_ID_type (const struct wmDrag *drag, int idcode)
 
wmDragAssetWM_drag_create_asset_data (const struct AssetHandle *asset, struct AssetMetaData *metadata, const char *path, int import_type)
 
struct wmDragAssetWM_drag_get_asset_data (const struct wmDrag *drag, int idcode)
 
struct AssetMetaDataWM_drag_get_asset_meta_data (const struct wmDrag *drag, int idcode)
 
struct IDWM_drag_get_local_ID_or_import_from_asset (const struct wmDrag *drag, int idcode)
 
void WM_drag_free_imported_drag_ID (struct Main *bmain, struct wmDrag *drag, struct wmDropBox *drop)
 Free asset ID imported for canceled drop. More...
 
struct wmDragAssetCatalogWM_drag_get_asset_catalog_data (const struct wmDrag *drag)
 
void WM_drag_add_asset_list_item (wmDrag *drag, const struct bContext *C, const struct AssetLibraryReference *asset_library_ref, const struct AssetHandle *asset)
 
const ListBaseWM_drag_asset_list_get (const wmDrag *drag)
 
const char * WM_drag_get_item_name (struct wmDrag *drag)
 
void wmViewport (const struct rcti *winrct)
 
void wmPartialViewport (rcti *drawrct, const rcti *winrct, const rcti *partialrct)
 
void wmWindowViewport (struct wmWindow *win)
 
void wmOrtho2 (float x1, float x2, float y1, float y2)
 
void wmOrtho2_region_pixelspace (const struct ARegion *region)
 
void wmOrtho2_pixelspace (float x, float y)
 
void wmGetProjectionMatrix (float mat[4][4], const struct rcti *winrct)
 
struct wmJobWM_jobs_get (struct wmWindowManager *wm, struct wmWindow *win, const void *owner, const char *name, int flag, int job_type)
 
bool WM_jobs_test (const struct wmWindowManager *wm, const void *owner, int job_type)
 
float WM_jobs_progress (const struct wmWindowManager *wm, const void *owner)
 
const char * WM_jobs_name (const struct wmWindowManager *wm, const void *owner)
 
double WM_jobs_starttime (const struct wmWindowManager *wm, const void *owner)
 
voidWM_jobs_customdata_from_type (struct wmWindowManager *wm, const void *owner, int job_type)
 
bool WM_jobs_is_running (const struct wmJob *wm_job)
 
bool WM_jobs_is_stopped (const wmWindowManager *wm, const void *owner)
 
voidWM_jobs_customdata_get (struct wmJob *)
 
void WM_jobs_customdata_set (struct wmJob *, void *customdata, void(*free)(void *))
 
void WM_jobs_timer (struct wmJob *, double timestep, unsigned int note, unsigned int endnote)
 
void WM_jobs_delay_start (struct wmJob *, double delay_time)
 
void WM_jobs_callbacks (struct wmJob *, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
 
void WM_jobs_callbacks_ex (wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *), void(*completed)(void *), void(*canceled)(void *))
 
void WM_jobs_start (struct wmWindowManager *wm, struct wmJob *)
 
void WM_jobs_stop (struct wmWindowManager *wm, const void *owner, void *startjob)
 
void WM_jobs_kill (struct wmWindowManager *wm, void *owner, void(*)(void *, short int *, short int *, float *))
 
void WM_jobs_kill_all (struct wmWindowManager *wm)
 
void WM_jobs_kill_all_except (struct wmWindowManager *wm, const void *owner)
 
void WM_jobs_kill_type (struct wmWindowManager *wm, const void *owner, int job_type)
 
bool WM_jobs_has_running (const struct wmWindowManager *wm)
 
bool WM_jobs_has_running_type (const struct wmWindowManager *wm, int job_type)
 
void WM_job_main_thread_lock_acquire (struct wmJob *job)
 
void WM_job_main_thread_lock_release (struct wmJob *job)
 
char * WM_clipboard_text_get (bool selection, int *r_len)
 
char * WM_clipboard_text_get_firstline (bool selection, int *r_len)
 
void WM_clipboard_text_set (const char *buf, bool selection)
 
void WM_progress_set (struct wmWindow *win, float progress)
 
void WM_progress_clear (struct wmWindow *win)
 
voidWM_draw_cb_activate (struct wmWindow *win, void(*draw)(const struct wmWindow *, void *), void *customdata)
 
void WM_draw_cb_exit (struct wmWindow *win, void *handle)
 
void WM_redraw_windows (struct bContext *C)
 
void WM_draw_region_viewport_ensure (struct ARegion *region, short space_type)
 
void WM_draw_region_viewport_bind (struct ARegion *region)
 
void WM_draw_region_viewport_unbind (struct ARegion *region)
 
void WM_draw_region_free (struct ARegion *region, bool hide)
 
struct GPUViewportWM_draw_region_get_viewport (struct ARegion *region)
 
struct GPUViewportWM_draw_region_get_bound_viewport (struct ARegion *region)
 
void WM_main_playanim (int argc, const char **argv)
 
bool write_crash_blend (void)
 
void WM_set_locked_interface (struct wmWindowManager *wm, bool lock)
 
void WM_event_tablet_data_default_set (struct wmTabletData *tablet_data)
 
struct wmEventWM_event_add_simulate (struct wmWindow *win, const struct wmEvent *event_to_add)
 
const char * WM_window_cursor_keymap_status_get (const struct wmWindow *win, int button_index, int type_index)
 
void WM_window_cursor_keymap_status_refresh (struct bContext *C, struct wmWindow *win)
 
void WM_window_status_area_tag_redraw (struct wmWindow *win)
 
struct ScrAreaWM_window_status_area_find (struct wmWindow *win, struct bScreen *screen)
 
bool WM_window_modal_keymap_status_draw (struct bContext *C, struct wmWindow *win, struct uiLayout *layout)
 
void WM_event_print (const struct wmEvent *event)
 
bool WM_event_is_modal_drag_exit (const struct wmEvent *event, short init_event_type, short init_event_val)
 
bool WM_event_is_mouse_drag (const struct wmEvent *event)
 
bool WM_event_is_mouse_drag_or_press (const wmEvent *event)
 
int WM_event_drag_direction (const wmEvent *event)
 
char WM_event_utf8_to_ascii (const struct wmEvent *event) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
 
bool WM_cursor_test_motion_and_update (const int mval[2]) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
 
int WM_event_drag_threshold (const struct wmEvent *event)
 
bool WM_event_drag_test (const struct wmEvent *event, const int prev_xy[2])
 
bool WM_event_drag_test_with_delta (const struct wmEvent *event, const int delta[2])
 
void WM_event_drag_start_mval (const wmEvent *event, const ARegion *region, int r_mval[2])
 
void WM_event_drag_start_mval_fl (const wmEvent *event, const ARegion *region, float r_mval[2])
 
void WM_event_drag_start_xy (const wmEvent *event, int r_xy[2])
 
int WM_userdef_event_map (int kmitype)
 
int WM_userdef_event_type_from_keymap_type (int kmitype)
 
float WM_event_tablet_data (const struct wmEvent *event, int *pen_flip, float tilt[2])
 
bool WM_event_is_tablet (const struct wmEvent *event)
 
int WM_event_absolute_delta_x (const struct wmEvent *event)
 
int WM_event_absolute_delta_y (const struct wmEvent *event)
 
void WM_tooltip_immediate_init (struct bContext *C, struct wmWindow *win, struct ScrArea *area, struct ARegion *region, wmTooltipInitFn init)
 
void WM_tooltip_timer_init_ex (struct bContext *C, struct wmWindow *win, struct ScrArea *area, struct ARegion *region, wmTooltipInitFn init, double delay)
 
void WM_tooltip_timer_init (struct bContext *C, struct wmWindow *win, struct ScrArea *area, struct ARegion *region, wmTooltipInitFn init)
 
void WM_tooltip_timer_clear (struct bContext *C, struct wmWindow *win)
 
void WM_tooltip_clear (struct bContext *C, struct wmWindow *win)
 
void WM_tooltip_init (struct bContext *C, struct wmWindow *win)
 
void WM_tooltip_refresh (struct bContext *C, struct wmWindow *win)
 
double WM_tooltip_time_closed (void)
 
struct wmGenericCallbackWM_generic_callback_steal (struct wmGenericCallback *callback)
 
void WM_generic_callback_free (struct wmGenericCallback *callback)
 
void WM_generic_user_data_free (struct wmGenericUserData *wm_userdata)
 
bool WM_region_use_viewport (struct ScrArea *area, struct ARegion *region)
 

Macro Definition Documentation

◆ WM_operatortype_prop_tag

#define WM_operatortype_prop_tag (   property,
  tags 
)
Value:
{ \
CHECK_TYPE(tags, eOperatorPropTags); \
RNA_def_property_tags(prop, tags); \
} \
(void)0
eOperatorPropTags
Definition: WM_types.h:223
SyclQueue void void size_t num_bytes void

Definition at line 1013 of file WM_api.h.

Typedef Documentation

◆ eFileSel_Action

◆ eFileSel_Flag

◆ EventHandlerPoll

typedef bool(* EventHandlerPoll) (const ARegion *region, const struct wmEvent *event)

Definition at line 320 of file WM_api.h.

◆ eWindowAlignment

◆ wm_jobs_start_callback

typedef void(* wm_jobs_start_callback) (void *custom_data, short *stop, short *do_update, float *progress)

Definition at line 1412 of file WM_api.h.

◆ wmEventHandler_KeymapDynamicFn

typedef void() wmEventHandler_KeymapDynamicFn(wmWindowManager *wm, struct wmWindow *win, struct wmEventHandler_Keymap *handler, struct wmEventHandler_KeymapResult *km_result)

Definition at line 339 of file WM_api.h.

◆ wmEventHandler_KeymapResult

◆ wmGizmo

typedef struct wmGizmo wmGizmo

Definition at line 1 of file WM_api.h.

◆ wmGizmoMap

typedef struct wmGizmoMap wmGizmoMap

Definition at line 1 of file WM_api.h.

◆ wmGizmoMapType

Definition at line 1 of file WM_api.h.

◆ wmJob

typedef struct wmJob wmJob

Definition at line 1 of file WM_api.h.

◆ wmTooltipInitFn

typedef struct ARegion*(* wmTooltipInitFn) (struct bContext *C, struct ARegion *region, int *pass, double *r_pass_delay, bool *r_exit_on_event)

Definition at line 1605 of file WM_api.h.

◆ wmUIHandlerFunc

typedef int(* wmUIHandlerFunc) (struct bContext *C, const struct wmEvent *event, void *userdata)

Definition at line 378 of file WM_api.h.

◆ wmUIHandlerRemoveFunc

typedef void(* wmUIHandlerRemoveFunc) (struct bContext *C, void *userdata)

Definition at line 379 of file WM_api.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
WM_HANDLER_BLOCKING 
WM_HANDLER_ACCEPT_DBL_CLICK 
WM_HANDLER_DO_FREE 

Definition at line 430 of file WM_api.h.

◆ anonymous enum

anonymous enum
Enumerator
WM_JOB_PRIORITY 
WM_JOB_EXCL_RENDER 
WM_JOB_PROGRESS 

Definition at line 1336 of file WM_api.h.

◆ anonymous enum

anonymous enum

Identifying jobs by owner alone is unreliable, this isn't saved, order can change (keep 0 for 'any').

Enumerator
WM_JOB_TYPE_ANY 
WM_JOB_TYPE_COMPOSITE 
WM_JOB_TYPE_RENDER 
WM_JOB_TYPE_RENDER_PREVIEW 
WM_JOB_TYPE_LOAD_PREVIEW 

Job for the UI to load previews from the file system (uses OS thumbnail cache).

WM_JOB_TYPE_OBJECT_SIM_OCEAN 
WM_JOB_TYPE_OBJECT_SIM_FLUID 
WM_JOB_TYPE_OBJECT_BAKE_TEXTURE 
WM_JOB_TYPE_OBJECT_BAKE 
WM_JOB_TYPE_FILESEL_READDIR 
WM_JOB_TYPE_CLIP_BUILD_PROXY 
WM_JOB_TYPE_CLIP_TRACK_MARKERS 
WM_JOB_TYPE_CLIP_SOLVE_CAMERA 
WM_JOB_TYPE_CLIP_PREFETCH 
WM_JOB_TYPE_SEQ_BUILD_PROXY 
WM_JOB_TYPE_SEQ_BUILD_PREVIEW 
WM_JOB_TYPE_POINTCACHE 
WM_JOB_TYPE_DPAINT_BAKE 
WM_JOB_TYPE_ALEMBIC 
WM_JOB_TYPE_SHADER_COMPILATION 
WM_JOB_TYPE_STUDIOLIGHT 
WM_JOB_TYPE_LIGHT_BAKE 
WM_JOB_TYPE_FSMENU_BOOKMARK_VALIDATE 
WM_JOB_TYPE_QUADRIFLOW_REMESH 
WM_JOB_TYPE_TRACE_IMAGE 
WM_JOB_TYPE_LINEART 
WM_JOB_TYPE_SEQ_DRAW_THUMBNAIL 
WM_JOB_TYPE_SEQ_DRAG_DROP_PREVIEW 

Definition at line 1346 of file WM_api.h.

◆ eFileSel_Action

Action for WM_operator_properties_filesel.

Enumerator
FILE_OPENFILE 
FILE_SAVE 

Definition at line 763 of file WM_api.h.

◆ eFileSel_Flag

Flags for WM_operator_properties_filesel.

Enumerator
WM_FILESEL_RELPATH 
WM_FILESEL_DIRECTORY 
WM_FILESEL_FILENAME 
WM_FILESEL_FILEPATH 
WM_FILESEL_FILES 
WM_FILESEL_SHOW_PROPS 

Show the properties sidebar by default.

Definition at line 751 of file WM_api.h.

◆ eWindowAlignment

Enumerator
WIN_ALIGN_ABSOLUTE 
WIN_ALIGN_LOCATION_CENTER 
WIN_ALIGN_PARENT_CENTER 

Definition at line 216 of file WM_api.h.

Function Documentation

◆ WM_check()

void WM_check ( struct bContext C)

◆ WM_clipboard_text_get()

char* WM_clipboard_text_get ( bool  selection,
int *  r_len 
)

Return text from the clipboard.

Note
Caller needs to check for valid utf8 if this is a requirement.

Definition at line 1770 of file wm_window.c.

References wm_clipboard_text_get_ex().

Referenced by console_paste_exec(), paste_text_exec(), pyrna_WindowManager_clipboard_get(), and text_paste_exec().

◆ WM_clipboard_text_get_firstline()

char* WM_clipboard_text_get_firstline ( bool  selection,
int *  r_len 
)

Convenience function for pasting to areas of Blender which don't support newlines.

Definition at line 1775 of file wm_window.c.

References wm_clipboard_text_get_ex().

Referenced by handleNumInput(), ui_but_get_pasted_text_from_clipboard(), and ui_textedit_copypaste().

◆ WM_clipboard_text_set()

void WM_clipboard_text_set ( const char *  buf,
bool  selection 
)

◆ WM_context_path_resolve_full()

char* WM_context_path_resolve_full ( struct bContext C,
const PointerRNA ptr 
)

◆ WM_context_path_resolve_property_full()

char* WM_context_path_resolve_property_full ( const struct bContext C,
const PointerRNA ptr,
PropertyRNA prop,
int  index 
)

Calculate the path to ptr from context C, or return NULL if it can't be calculated.

◆ WM_cursor_grab_disable()

void WM_cursor_grab_disable ( struct wmWindow win,
const int  mouse_ungrab_xy[2] 
)

◆ WM_cursor_grab_enable()

void WM_cursor_grab_enable ( struct wmWindow win,
int  wrap,
bool  hide,
int  bounds[4] 
)

◆ WM_cursor_modal_restore()

void WM_cursor_modal_restore ( struct wmWindow win)

◆ WM_cursor_modal_set()

void WM_cursor_modal_set ( struct wmWindow win,
int  val 
)

◆ WM_cursor_set()

void WM_cursor_set ( struct wmWindow win,
int  curs 
)

◆ WM_cursor_set_from_tool()

bool WM_cursor_set_from_tool ( struct wmWindow win,
const ScrArea area,
const ARegion region 
)

◆ WM_cursor_test_motion_and_update()

bool WM_cursor_test_motion_and_update ( const int  mval[2])

Detect motion between selection (callers should only use this for selection picking), typically mouse press/click events.

Parameters
mvalRegion relative coordinates, call with (-1, -1) resets the last cursor location.
Returns
True when there was motion since last called.

NOTE(@campbellbarton): The logic used here isn't foolproof. It's possible that users move the cursor past WM_EVENT_CURSOR_MOTION_THRESHOLD then back to a position within the threshold (between mouse clicks). In practice users never reported this since the threshold is very small (a few pixels). To prevent the unlikely case of values matching from another region, changing regions resets this value to (-1, -1).

Definition at line 329 of file wm_event_query.c.

References copy_v2_v2_int(), len_manhattan_v2v2_int(), and WM_EVENT_CURSOR_MOTION_THRESHOLD.

Referenced by ED_screen_set_active_region(), get_nearest_editbonepoint(), mixed_bones_object_selectbuffer_extended(), seq_select_seq_from_preview(), and unified_findnearest().

◆ WM_cursor_time()

void WM_cursor_time ( struct wmWindow win,
int  nr 
)

After this you can call restore too.

Definition at line 317 of file wm_cursors.c.

References wmWindow::cursor, wmWindow::lastcursor, mask(), window_set_custom_cursor(), x, and y.

Referenced by gpencil_do_frame_fill(), gpencil_fill_modal(), and screen_opengl_render_anim_step().

◆ WM_cursor_wait()

void WM_cursor_wait ( bool  val)

◆ WM_cursor_warp()

void WM_cursor_warp ( struct wmWindow win,
int  x,
int  y 
)

This function requires access to the GHOST_SystemHandle (g_system).

Definition at line 2054 of file wm_window.c.

References wmWindow::eventstate, g_system, GHOST_SetCursorPosition(), wmWindow::ghostwin, wmEvent::prev_xy, wm_cursor_position_to_ghost_client_coords(), x, wmEvent::xy, and y.

Referenced by initFlyInfo(), wm_cursor_warp_relative(), and wm_gizmomap_modal_set().

◆ WM_drag_add_asset_list_item()

void WM_drag_add_asset_list_item ( wmDrag drag,
const struct bContext C,
const struct AssetLibraryReference asset_library_ref,
const struct AssetHandle asset 
)
Note
Does not store asset in any way, so it's fine to pass a temporary.

◆ WM_drag_add_local_ID()

void WM_drag_add_local_ID ( struct wmDrag drag,
struct ID id,
struct ID from_parent 
)

◆ WM_drag_asset_id_import()

ID* WM_drag_asset_id_import ( wmDragAsset asset_drag,
int  flag_extra 
)

◆ WM_drag_asset_list_get()

const ListBase* WM_drag_asset_list_get ( const wmDrag drag)

◆ WM_drag_asset_will_import_linked()

bool WM_drag_asset_will_import_linked ( const wmDrag drag)

◆ WM_drag_create_asset_data()

wmDragAsset* WM_drag_create_asset_data ( const struct AssetHandle asset,
struct AssetMetaData metadata,
const char *  path,
int  import_type 
)
Note
Does not store asset in any way, so it's fine to pass a temporary.

◆ WM_drag_data_create()

wmDrag* WM_drag_data_create ( struct bContext C,
int  icon,
int  type,
void poin,
double  value,
unsigned int  flags 
)

Create and fill the dragging data, but don't start dragging just yet (unlike WM_event_start_drag()). Must be followed up by WM_event_start_prepared_drag(), otherwise the returned pointer will leak memory.

Note that poin should be valid allocated and not on stack.

Definition at line 177 of file wm_dragdrop.cc.

References BLI_freelistN(), BLI_strncpy(), C, CTX_data_collection_get(), CTX_wm_asset_library_ref(), FILE_MAX, wmDrag::flags, wmDrag::icon, LISTBASE_FOREACH, MEM_freeN, wmDrag::path, wmDrag::poin, type, wmDrag::type, wmDrag::value, WM_drag_add_asset_list_item(), WM_drag_add_local_ID(), WM_DRAG_ASSET, WM_DRAG_ASSET_CATALOG, WM_DRAG_ASSET_LIST, WM_DRAG_FREE_DATA, WM_DRAG_ID, and WM_DRAG_PATH.

Referenced by outliner_item_drag_drop_invoke(), ui_but_drag_start(), and WM_event_start_drag().

◆ WM_drag_data_free()

void WM_drag_data_free ( int  dragtype,
void poin 
)

◆ WM_drag_draw_default_fn()

void WM_drag_draw_default_fn ( struct bContext C,
struct wmWindow win,
struct wmDrag drag,
const int  xy[2] 
)

Definition at line 961 of file wm_dragdrop.cc.

References C, wm_drag_draw_default(), and xy.

◆ WM_drag_draw_item_name_fn()

void WM_drag_draw_item_name_fn ( struct bContext C,
struct wmWindow win,
struct wmDrag drag,
const int  xy[2] 
)

◆ WM_drag_free()

void WM_drag_free ( struct wmDrag drag)

◆ WM_drag_free_imported_drag_ID()

void WM_drag_free_imported_drag_ID ( struct Main bmain,
struct wmDrag drag,
struct wmDropBox drop 
)

Free asset ID imported for canceled drop.

If the asset was imported (linked/appended) using WM_drag_get_local_ID_or_import_from_asset()` (typically via a wmDropBox.copy() callback), we want the ID to be removed again if the drop operator cancels. This is for use as wmDropBox.cancel() callback.

Definition at line 686 of file wm_dragdrop.cc.

References BKE_id_free_us(), wmDragAsset::id_type, id_us_plus(), wmDropBox::ptr, wmDrag::type, WM_DRAG_ASSET, WM_drag_get_asset_data(), and WM_operator_properties_id_lookup_from_name_or_session_uuid().

Referenced by ED_dropboxes_ui(), blender::ed::space_node::node_dropboxes(), and view3d_dropboxes().

◆ WM_drag_free_list()

void WM_drag_free_list ( struct ListBase lb)

◆ WM_drag_get_asset_catalog_data()

struct wmDragAssetCatalog* WM_drag_get_asset_catalog_data ( const struct wmDrag drag)

◆ WM_drag_get_asset_data()

struct wmDragAsset* WM_drag_get_asset_data ( const struct wmDrag drag,
int  idcode 
)

◆ WM_drag_get_asset_meta_data()

struct AssetMetaData* WM_drag_get_asset_meta_data ( const struct wmDrag drag,
int  idcode 
)

◆ WM_drag_get_item_name()

const char* WM_drag_get_item_name ( struct wmDrag drag)

◆ WM_drag_get_local_ID()

struct ID* WM_drag_get_local_ID ( const struct wmDrag drag,
short  idcode 
)

◆ WM_drag_get_local_ID_from_event()

struct ID* WM_drag_get_local_ID_from_event ( const struct wmEvent event,
short  idcode 
)

◆ WM_drag_get_local_ID_or_import_from_asset()

struct ID* WM_drag_get_local_ID_or_import_from_asset ( const struct wmDrag drag,
int  idcode 
)

When dragging a local ID, return that. Otherwise, if dragging an asset-handle, link or append that depending on what was chosen by the drag-box (currently append only in fact).

Use WM_drag_free_imported_drag_ID() as cancel callback of the drop-box, so that the asset import is rolled back if the drop operator fails.

◆ WM_drag_is_ID_type()

bool WM_drag_is_ID_type ( const struct wmDrag drag,
int  idcode 
)

Check if the drag data is either a local ID or an external ID asset of type idcode.

◆ WM_draw_cb_activate()

void* WM_draw_cb_activate ( struct wmWindow win,
void(*)(const struct wmWindow *, void *)  draw,
void customdata 
)

◆ WM_draw_cb_exit()

void WM_draw_cb_exit ( struct wmWindow win,
void handle 
)

◆ WM_draw_region_free()

void WM_draw_region_free ( struct ARegion region,
bool  hide 
)

◆ WM_draw_region_get_bound_viewport()

struct GPUViewport* WM_draw_region_get_bound_viewport ( struct ARegion region)

◆ WM_draw_region_get_viewport()

struct GPUViewport* WM_draw_region_get_viewport ( struct ARegion region)

◆ WM_draw_region_viewport_bind()

void WM_draw_region_viewport_bind ( struct ARegion region)

Definition at line 1411 of file wm_draw.c.

References NULL, and wm_draw_region_bind().

Referenced by ED_view3d_depth_override(), and ui_region_redraw_immediately().

◆ WM_draw_region_viewport_ensure()

void WM_draw_region_viewport_ensure ( struct ARegion region,
short  space_type 
)

◆ WM_draw_region_viewport_unbind()

void WM_draw_region_viewport_unbind ( struct ARegion region)

Definition at line 1416 of file wm_draw.c.

References wm_draw_region_unbind().

Referenced by ED_view3d_depth_override(), and ui_region_redraw_immediately().

◆ WM_dropbox_add()

struct wmDropBox* WM_dropbox_add ( ListBase lb,
const char *  idname,
bool(*)(struct bContext *, struct wmDrag *, const struct wmEvent *event)  poll,
void(*)(struct bContext *, struct wmDrag *, struct wmDropBox *)  copy,
void(*)(struct Main *, struct wmDrag *, struct wmDropBox *)  cancel,
WMDropboxTooltipFunc  tooltip 
)

◆ WM_dropboxmap_find()

ListBase* WM_dropboxmap_find ( const char *  idname,
int  spaceid,
int  regionid 
)

◆ WM_enum_search_invoke()

int WM_enum_search_invoke ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_enum_search_invoke_previews()

int WM_enum_search_invoke_previews ( struct bContext C,
struct wmOperator op,
short  prv_cols,
short  prv_rows 
)

Similar to WM_enum_search_invoke, but draws previews. Also, this can't be used as invoke callback directly since it needs additional info.

Definition at line 1131 of file wm_operators.c.

References C, NULL, EnumSearchMenu::op, OPERATOR_INTERFACE, EnumSearchMenu::prv_cols, EnumSearchMenu::prv_rows, UI_popup_block_invoke(), EnumSearchMenu::use_previews, and wm_enum_search_menu().

◆ WM_event_absolute_delta_x()

int WM_event_absolute_delta_x ( const struct wmEvent event)

Definition at line 552 of file wm_event_query.c.

References wmEvent::flag, and WM_EVENT_SCROLL_INVERT.

Referenced by view_zoomdrag_invoke().

◆ WM_event_absolute_delta_y()

int WM_event_absolute_delta_y ( const struct wmEvent event)

Definition at line 563 of file wm_event_query.c.

References wmEvent::flag, and WM_EVENT_SCROLL_INVERT.

Referenced by ui_pan_to_scroll(), and view_zoomdrag_invoke().

◆ wm_event_add()

void struct wmEvent struct wmEvent* wm_event_add ( struct wmWindow win,
const struct wmEvent event_to_add 
)

◆ WM_event_add_dropbox_handler()

struct wmEventHandler_Dropbox* WM_event_add_dropbox_handler ( ListBase handlers,
ListBase dropboxes 
)

◆ wm_event_add_ex()

void struct wmEvent* wm_event_add_ex ( struct wmWindow win,
const struct wmEvent event_to_add,
const struct wmEvent event_to_add_after 
)

◆ WM_event_add_fileselect()

void WM_event_add_fileselect ( struct bContext C,
struct wmOperator op 
)

The idea here is to keep a handler alive on window queue, owning the operator. The file window can send event to make it execute, thus ensuring executing happens outside of lower level queues, with UI refreshed. Should also allow multi-window solutions.

Definition at line 4088 of file wm_event_system.cc.

References wmEventHandler_Op::area, BLI_addhead(), BLI_assert, C, wmOperatorType::check, wmEventHandler_Op::context, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), CTX_wm_window_set(), ED_fileselect_handler_area_find(), wmWindow::eventstate, EVT_FILESELECT_CANCEL, EVT_FILESELECT_EXTERNAL_CANCEL, EVT_FILESELECT_FULL_OPEN, wmEventHandler_Op::head, wmEventHandler_Op::is_fileselect, LISTBASE_FOREACH_MUTABLE, wmWindow::modalhandlers, wmEventHandler_Op::op, wmEventHandler_Op::region, wmOperator::type, wmEventHandler::type, UI_popup_handlers_remove_all(), wmEventHandler_Op::win, WM_event_fileselect_event(), wm_event_find_fileselect_root_window_from_context(), wm_handler_fileselect_do(), wm_handler_op_context_get_if_valid(), and WM_HANDLER_TYPE_OP.

Referenced by asset_bundle_install_invoke(), cachefile_layer_open_invoke(), cachefile_open_invoke(), clip_filesel(), file_browse_invoke(), find_missing_files_invoke(), image_filesel(), multires_external_save_invoke(), open_invoke(), paste_from_file_invoke(), preferences_asset_library_add_invoke(), rigidbody_world_export_invoke(), screenshot_invoke(), sequencer_add_image_strip_invoke(), sequencer_add_movie_strip_invoke(), sequencer_add_sound_strip_invoke(), sequencer_change_path_invoke(), sequencer_export_subtitles_invoke(), text_open_invoke(), text_save_as_invoke(), volume_import_invoke(), wm_lib_relocate_invoke(), wm_link_append_invoke(), wm_open_mainfile__select_file_path(), WM_operator_filesel(), wm_recover_auto_save_invoke(), wm_save_as_mainfile_invoke(), and wm_save_mainfile_invoke().

◆ WM_event_add_keymap_handler()

struct wmEventHandler_Keymap* WM_event_add_keymap_handler ( ListBase handlers,
wmKeyMap keymap 
)

◆ WM_event_add_keymap_handler_dynamic()

struct wmEventHandler_Keymap* WM_event_add_keymap_handler_dynamic ( ListBase handlers,
wmEventHandler_KeymapDynamicFn keymap_fn,
void user_data 
)

◆ WM_event_add_keymap_handler_poll()

struct wmEventHandler_Keymap* WM_event_add_keymap_handler_poll ( ListBase handlers,
wmKeyMap keymap,
EventHandlerPoll  poll 
)

◆ WM_event_add_keymap_handler_priority()

struct wmEventHandler_Keymap* WM_event_add_keymap_handler_priority ( ListBase handlers,
wmKeyMap keymap,
int  priority 
)
Note
Priorities not implemented yet, for time being just insert in begin of list.

◆ WM_event_add_keymap_handler_v2d_mask()

struct wmEventHandler_Keymap* WM_event_add_keymap_handler_v2d_mask ( ListBase handlers,
wmKeyMap keymap 
)

◆ WM_event_add_modal_handler()

struct wmEventHandler_Op* WM_event_add_modal_handler ( struct bContext C,
struct wmOperator op 
)

Definition at line 4181 of file wm_event_system.cc.

References wmEventHandler_Op::area, BLI_addhead(), C, wmEventHandler_Op::context, CTX_wm_area(), CTX_wm_region(), CTX_wm_window(), wmEventHandler_Op::head, wmWindow::modalhandlers, wmOperatorType::modalkeymap, wmEventHandler_Op::op, wmOperator::opm, wmEventHandler_Op::region, wmEventHandler_Op::region_type, ARegion::regiontype, wmOperator::type, wmEventHandler::type, WM_HANDLER_TYPE_OP, and WM_window_status_area_tag_redraw().

Referenced by actionzone_invoke(), add_marker_at_click_invoke(), animchannels_select_filter_invoke(), annotation_draw_invoke(), area_join_invoke(), area_move_invoke(), area_split_invoke(), area_swap_invoke(), bake_invoke(), brush_edit_invoke(), change_frame_invoke(), clip_prefetch_invoke(), console_modal_select_invoke(), curve_draw_invoke(), curve_pen_invoke(), datadropper_invoke(), depthdropper_invoke(), driverdropper_invoke(), dyntopo_detail_size_edit_invoke(), ED_imbuf_sample_invoke(), ed_marker_move_invoke(), edbm_bevel_invoke(), edbm_inset_invoke(), edbm_point_normals_invoke(), eyedropper_colorband_invoke(), eyedropper_gpencil_invoke(), eyedropper_invoke(), face_set_extract_invoke(), fluid_bake_invoke(), fly_invoke(), gizmo_tweak_invoke(), gpencil_draw_invoke(), gpencil_fill_invoke(), gpencil_interpolate_invoke(), gpencil_primitive_invoke(), gpencil_sculpt_brush_invoke(), gpencil_transform_fill_invoke(), gpencil_vertexpaint_brush_invoke(), gpencil_weightpaint_brush_invoke(), grab_clone_invoke(), graph_slider_invoke(), graphview_cursor_invoke(), image_view_pan_init(), image_view_zoom_init(), knifetool_invoke(), light_cache_bake_invoke(), lineart_gpencil_bake_common(), loopcut_init(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), minimize_stretch_invoke(), multiresbake_image_exec(), blender::ed::space_node::node_insert_offset_invoke(), blender::ed::space_node::node_link_invoke(), blender::ed::space_node::node_resize_init(), object_transform_axis_target_invoke(), op_generic_value_invoke(), outliner_item_openclose_invoke(), blender::ed::sculpt_paint::image::ops::paint::paint_invoke(), paintcurve_slide_invoke(), pose_slide_invoke_common(), poselib_blend_invoke(), poselib_preview_invoke(), ptcache_bake_invoke(), radial_control_invoke(), region_scale_invoke(), sample_color_invoke(), blender::ed::space_node::sample_invoke(), screen_opengl_render_invoke(), screen_render_invoke(), scroller_activate_invoke(), sculpt_brush_stroke_invoke(), sculpt_cloth_filter_invoke(), sculpt_color_filter_invoke(), blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(), sculpt_expand_invoke(), sculpt_mask_expand_invoke(), sculpt_mesh_filter_invoke(), sculpt_sample_detail_size_invoke(), blender::ed::sculpt_paint::select_grow::select_grow_invoke(), sequencer_slip_invoke(), slide_marker_invoke(), slide_plane_marker_invoke(), slide_point_invoke(), slide_spline_curvature_invoke(), blender::ed::space_node::snode_bg_viewmove_invoke(), solve_camera_invoke(), stencil_control_invoke(), stitch_invoke(), text_autocomplete_invoke(), text_scroll_bar_invoke(), text_scroll_invoke(), text_selection_set_invoke(), track_markers(), transform_invoke(), uv_sculpt_stroke_invoke(), view3d_interactive_add_invoke(), view_edge_pan_invoke(), view_pan_init(), view_pan_invoke(), view_zoom_init(), view_zoomdrag_invoke(), viewdolly_invoke(), viewmove_invoke(), viewroll_invoke(), viewrotate_invoke(), viewzoom_invoke(), voxel_size_edit_invoke(), vpaint_invoke(), walk_invoke(), WM_generic_select_modal(), WM_gesture_box_invoke(), WM_gesture_circle_invoke(), WM_gesture_lasso_invoke(), WM_gesture_lines_invoke(), WM_gesture_straightline_invoke(), wm_xr_navigation_fly_invoke(), wm_xr_navigation_grab_invoke(), wm_xr_navigation_teleport_invoke(), and wpaint_invoke().

◆ WM_event_add_mousemove()

void WM_event_add_mousemove ( wmWindow win)

◆ WM_event_add_notifier()

void WM_event_add_notifier ( const struct bContext C,
unsigned int  type,
void reference 
)

◆ WM_event_add_notifier_ex()

void WM_event_add_notifier_ex ( struct wmWindowManager wm,
const struct wmWindow win,
unsigned int  type,
void reference 
)

◆ WM_event_add_simulate()

struct wmEvent* WM_event_add_simulate ( struct wmWindow win,
const struct wmEvent event_to_add 
)

For testing only, see G_FLAG_EVENT_SIMULATE.

◆ WM_event_add_timer()

struct wmTimer* WM_event_add_timer ( struct wmWindowManager wm,
struct wmWindow win,
int  event_type,
double  timestep 
)

◆ WM_event_add_timer_notifier()

struct wmTimer* WM_event_add_timer_notifier ( struct wmWindowManager wm,
struct wmWindow win,
unsigned int  type,
double  timestep 
)

◆ WM_event_add_ui_handler()

struct wmEventHandler_UI* WM_event_add_ui_handler ( const struct bContext C,
ListBase handlers,
wmUIHandlerFunc  handle_fn,
wmUIHandlerRemoveFunc  remove_fn,
void user_data,
char  flag 
)

◆ WM_event_drag_direction()

int WM_event_drag_direction ( const wmEvent event)

◆ WM_event_drag_image()

void WM_event_drag_image ( struct wmDrag drag,
struct ImBuf imb,
float  scale 
)

Definition at line 288 of file wm_dragdrop.cc.

References wmDrag::imb, and wmDrag::imbuf_scale.

Referenced by ui_but_drag_start().

◆ WM_event_drag_start_mval()

void WM_event_drag_start_mval ( const wmEvent event,
const ARegion region,
int  r_mval[2] 
)

◆ WM_event_drag_start_mval_fl()

void WM_event_drag_start_mval_fl ( const wmEvent event,
const ARegion region,
float  r_mval[2] 
)

◆ WM_event_drag_start_xy()

void WM_event_drag_start_xy ( const wmEvent event,
int  r_xy[2] 
)

◆ WM_event_drag_test()

bool WM_event_drag_test ( const struct wmEvent event,
const int  prev_xy[2] 
)

◆ WM_event_drag_test_with_delta()

bool WM_event_drag_test_with_delta ( const struct wmEvent event,
const int  delta[2] 
)

◆ WM_event_drag_threshold()

int WM_event_drag_threshold ( const struct wmEvent event)

◆ WM_event_fileselect_event()

void WM_event_fileselect_event ( struct wmWindowManager wm,
void ophandle,
int  eventval 
)

◆ WM_event_free_ui_handler_all()

void WM_event_free_ui_handler_all ( struct bContext C,
ListBase handlers,
wmUIHandlerFunc  handle_fn,
wmUIHandlerRemoveFunc  remove_fn 
)

◆ WM_event_get_keymap_from_toolsystem()

void WM_event_get_keymap_from_toolsystem ( struct wmWindowManager wm,
struct wmWindow win,
struct wmEventHandler_Keymap handler,
wmEventHandler_KeymapResult km_result 
)

Definition at line 4379 of file wm_event_system.cc.

References wm_event_get_keymap_from_toolsystem_ex().

Referenced by ed_default_handlers().

◆ WM_event_get_keymap_from_toolsystem_with_gizmos()

void WM_event_get_keymap_from_toolsystem_with_gizmos ( struct wmWindowManager wm,
struct wmWindow win,
struct wmEventHandler_Keymap handler,
wmEventHandler_KeymapResult km_result 
)

Definition at line 4371 of file wm_event_system.cc.

References wm_event_get_keymap_from_toolsystem_ex().

Referenced by ed_default_handlers().

◆ WM_event_get_keymaps_from_handler()

void WM_event_get_keymaps_from_handler ( wmWindowManager wm,
struct wmWindow win,
struct wmEventHandler_Keymap handler,
struct wmEventHandler_KeymapResult km_result 
)

◆ wm_event_init_from_window()

void struct wmEvent struct wmEvent void wm_event_init_from_window ( struct wmWindow win,
struct wmEvent event 
)

◆ WM_event_is_modal_drag_exit()

bool WM_event_is_modal_drag_exit ( const struct wmEvent event,
short  init_event_type,
short  init_event_val 
)

For modal callbacks, check configuration for how to interpret exit when dragging.

◆ WM_event_is_mouse_drag()

bool WM_event_is_mouse_drag ( const struct wmEvent event)

◆ WM_event_is_mouse_drag_or_press()

bool WM_event_is_mouse_drag_or_press ( const wmEvent event)

◆ WM_event_is_tablet()

bool WM_event_is_tablet ( const struct wmEvent event)

◆ WM_event_match_keymap_item()

wmKeyMapItem* WM_event_match_keymap_item ( struct bContext C,
wmKeyMap keymap,
const struct wmEvent event 
)

◆ WM_event_match_keymap_item_from_handlers()

wmKeyMapItem* WM_event_match_keymap_item_from_handlers ( struct bContext C,
struct wmWindowManager wm,
struct wmWindow win,
struct ListBase handlers,
const struct wmEvent event 
)

◆ WM_event_modal_handler_area_replace()

void WM_event_modal_handler_area_replace ( wmWindow win,
const struct ScrArea old_area,
struct ScrArea new_area 
)

Modal handlers store a pointer to an area which might be freed while the handler runs. Use this function to NULL all handler pointers to old_area.

◆ WM_event_modal_handler_region_replace()

void WM_event_modal_handler_region_replace ( wmWindow win,
const struct ARegion old_region,
struct ARegion new_region 
)

Modal handlers store a pointer to a region which might be freed while the handler runs. Use this function to NULL all handler pointers to old_region.

◆ WM_event_print()

void WM_event_print ( const struct wmEvent event)

For debugging only, getting inspecting events manually is tedious.

◆ WM_event_remove_area_handler()

void WM_event_remove_area_handler ( struct ListBase handlers,
void area 
)

◆ WM_event_remove_handlers()

void WM_event_remove_handlers ( struct bContext C,
ListBase handlers 
)

◆ WM_event_remove_keymap_handler()

void WM_event_remove_keymap_handler ( ListBase handlers,
wmKeyMap keymap 
)

◆ WM_event_remove_timer()

void WM_event_remove_timer ( struct wmWindowManager wm,
struct wmWindow win,
struct wmTimer timer 
)

Mark the given timer to be removed, actual removal and deletion is deferred and handled internally by the window manager code.

◆ WM_event_remove_timer_notifier()

void WM_event_remove_timer_notifier ( struct wmWindowManager wm,
struct wmWindow win,
struct wmTimer timer 
)

◆ WM_event_remove_ui_handler()

void WM_event_remove_ui_handler ( ListBase handlers,
wmUIHandlerFunc  handle_fn,
wmUIHandlerRemoveFunc  remove_fn,
void user_data,
bool  postpone 
)

◆ WM_event_set_keymap_handler_post_callback()

void WM_event_set_keymap_handler_post_callback ( struct wmEventHandler_Keymap handler,
void(keymap_tag)(wmKeyMap *keymap, wmKeyMapItem *kmi, void *user_data ,
void user_data 
)

◆ WM_event_start_drag()

void WM_event_start_drag ( struct bContext C,
int  icon,
int  type,
void poin,
double  value,
unsigned int  flags 
)

Start dragging immediately with the given data. Note that poin should be valid allocated and not on stack.

Definition at line 237 of file wm_dragdrop.cc.

References C, type, WM_drag_data_create(), and WM_event_start_prepared_drag().

Referenced by blender::ui::ViewItemAPIWrapper::drag_start(), ghost_event_proc(), ui_but_drag_init(), and ui_but_drag_start().

◆ WM_event_start_prepared_drag()

void WM_event_start_prepared_drag ( struct bContext C,
wmDrag drag 
)

Invoke dragging using the given drag data.

Definition at line 229 of file wm_dragdrop.cc.

References BLI_addtail(), C, CTX_wm_manager(), wmWindowManager::drags, and wm_dropbox_invoke().

Referenced by outliner_item_drag_drop_invoke(), ui_but_drag_start(), and WM_event_start_drag().

◆ WM_event_tablet_data()

float WM_event_tablet_data ( const struct wmEvent event,
int *  pen_flip,
float  tilt[2] 
)

If this is a tablet event, return tablet pressure and set *pen_flip to 1 if the eraser tool is being used, 0 otherwise.

◆ WM_event_tablet_data_default_set()

void WM_event_tablet_data_default_set ( struct wmTabletData tablet_data)

Definition at line 4896 of file wm_event_system.cc.

References wm_event_tablet_data_default().

◆ WM_event_timer_sleep()

void WM_event_timer_sleep ( struct wmWindowManager wm,
struct wmWindow win,
struct wmTimer timer,
bool  do_sleep 
)

To (de)activate running timers temporary.

◆ WM_event_utf8_to_ascii()

char WM_event_utf8_to_ascii ( const struct wmEvent event)

◆ WM_exit()

void WM_exit ( struct bContext C)

Main exit function to close Blender ordinarily.

Note
Use wm_exit_schedule_delayed() to close Blender from an operator. Might leak memory otherwise.

Definition at line 646 of file wm_init_exit.c.

References C, G, G_DEBUG, and WM_exit_ex().

Referenced by arg_handle_load_file(), main(), and wm_exit_handler().

◆ WM_exit_ex()

void WM_exit_ex ( struct bContext C,
bool  do_python 
)
Note
doesn't run exit() call WM_exit() for that.

Definition at line 434 of file wm_init_exit.c.

References ANIM_driver_vars_copybuf_free(), ANIM_drivers_copybuf_free(), ANIM_fcurves_copybuf_free(), ANIM_fmodifiers_copybuf_free(), ANIM_keyingset_infos_exit(), BKE_addon_pref_type_free(), BKE_appdir_exit(), BKE_blender_atexit(), BKE_blender_free(), BKE_blender_userdef_data_free(), BKE_blendfile_userdef_write_all(), BKE_image_free_unused_gpu_textures(), BKE_keyconfig_pref_type_free(), BKE_mask_clipboard_free(), BKE_materials_exit(), BKE_mball_cubeTable_free(), BKE_node_clipboard_free(), BKE_sound_exit(), BKE_subdiv_exit(), BKE_tempdir_base(), BKE_tempdir_session_purge(), BKE_tracking_clipboard_free(), BKE_vfont_clipboard_free(), BLENDER_QUIT_FILE, BLF_exit(), BLI_join_dirfile(), BLI_task_scheduler_exit(), BLI_threadapi_exit(), BLI_timer_free(), BLO_memfile_write_file(), BLO_write_file(), BLT_lang_free(), BPY_python_end(), BPY_run_string_eval(), C, CLG_exit(), COM_deinitialize(), CTX_data_main(), CTX_free(), CTX_py_init_get(), CTX_wm_manager(), CTX_wm_window_set(), DNA_sdna_current_free(), DRW_opengl_context_destroy(), DRW_opengl_context_disable_ex(), DRW_opengl_context_enable_ex(), DRW_subdiv_free(), ED_assetlist_storage_exit(), ED_editors_exit(), ED_editors_flush_edits(), ED_file_exit(), ED_gpencil_anim_copybuf_free(), ED_gpencil_strokes_copybuf_free(), ED_preview_free_dbase(), ED_preview_restart_queue_free(), ED_screen_exit(), ED_undosys_stack_memfile_get_active(), ED_undosys_type_free(), FILE_MAX, free_openrecent(), G, G_FILE_COMPRESS, G_FLAG_USERPREF_NO_SAVE_ON_EXIT, GHOST_DisposeSystemPaths(), GPU_exit(), GPU_pass_cache_free(), LISTBASE_FOREACH, NULL, opengl_is_init, RE_engines_exit(), RE_FreeAllRender(), RNA_exit(), SEQ_clipboard_free(), UI_exit(), wmWindowManager::undo_stack, USER_PREF_FLAG_SAVE, void, wmWindowManager::windows, wm_autosave_delete(), wm_dropbox_free(), WM_event_remove_handlers(), wm_free_reports(), wm_ghost_exit(), wm_gizmogrouptype_free(), wm_gizmomaptypes_free(), wm_gizmotype_free(), WM_jobs_kill_all(), WM_menutype_free(), wm_operatortype_free(), WM_paneltype_clear(), wm_surfaces_free(), wm_test_autorun_revert_action_set(), WM_uilisttype_free(), and WM_window_get_active_screen().

Referenced by bpy_atexit(), and WM_exit().

◆ WM_file_append_datablock()

struct ID* WM_file_append_datablock ( struct Main bmain,
struct Scene scene,
struct ViewLayer view_layer,
struct View3D v3d,
const char *  filepath,
short  id_code,
const char *  id_name,
int  flag 
)
Note
scene (and related view_layer and v3d) pointers may be NULL, in which case no instantiation of appended objects, collections etc. will be performed.

Definition at line 554 of file wm_files_link.c.

References BLI_assert, FILE_LINK, id, id_name(), scene, and wm_file_link_append_datablock_ex().

Referenced by WM_drag_asset_id_import(), and workspace_append_activate_exec().

◆ WM_file_autoexec_init()

void WM_file_autoexec_init ( const char *  filepath)

◆ WM_file_autosave_init()

void WM_file_autosave_init ( struct wmWindowManager wm)

Definition at line 1984 of file wm_files.c.

References wm_autosave_timer_begin().

Referenced by WM_check().

◆ WM_file_link_datablock()

struct ID* WM_file_link_datablock ( struct Main bmain,
struct Scene scene,
struct ViewLayer view_layer,
struct View3D v3d,
const char *  filepath,
short  id_code,
const char *  id_name,
int  flag 
)
Note
scene (and related view_layer and v3d) pointers may be NULL, in which case no instantiation of linked objects, collections etc. will be performed.

Definition at line 540 of file wm_files_link.c.

References FILE_LINK, id_name(), scene, and wm_file_link_append_datablock_ex().

Referenced by WM_drag_asset_id_import().

◆ WM_file_read()

bool WM_file_read ( struct bContext C,
const char *  filepath,
struct ReportList reports 
)

◆ WM_file_recover_last_session()

bool WM_file_recover_last_session ( struct bContext C,
struct ReportList reports 
)

◆ WM_file_tag_modified()

void WM_file_tag_modified ( void  )

◆ WM_generic_callback_free()

void WM_generic_callback_free ( struct wmGenericCallback callback)

◆ WM_generic_callback_steal()

struct wmGenericCallback* WM_generic_callback_steal ( struct wmGenericCallback callback)

◆ WM_generic_select_invoke()

int WM_generic_select_invoke ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

Helper to get select and tweak-transform to work conflict free and as desired. See WM_operator_properties_generic_select() for details.

To be used together with WM_generic_select_modal() and WM_operator_properties_generic_select().

◆ WM_generic_select_modal()

int WM_generic_select_modal ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

Helper to get select and tweak-transform to work conflict free and as desired. See WM_operator_properties_generic_select() for details.

To be used together with WM_generic_select_invoke() and WM_operator_properties_generic_select().

◆ WM_generic_user_data_free()

void WM_generic_user_data_free ( struct wmGenericUserData wm_userdata)

◆ WM_gesture_box_cancel()

void WM_gesture_box_cancel ( struct bContext C,
struct wmOperator op 
)

◆ WM_gesture_box_invoke()

int WM_gesture_box_invoke ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_gesture_box_modal()

int WM_gesture_box_modal ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_gesture_circle_cancel()

void WM_gesture_circle_cancel ( struct bContext C,
struct wmOperator op 
)

◆ WM_gesture_circle_invoke()

int WM_gesture_circle_invoke ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_gesture_circle_modal()

int WM_gesture_circle_modal ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_gesture_end()

void WM_gesture_end ( struct wmWindow win,
struct wmGesture gesture 
)

◆ WM_gesture_is_modal_first()

bool WM_gesture_is_modal_first ( const struct wmGesture gesture)

◆ WM_gesture_lasso_cancel()

void WM_gesture_lasso_cancel ( struct bContext C,
struct wmOperator op 
)

◆ WM_gesture_lasso_invoke()

int WM_gesture_lasso_invoke ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_gesture_lasso_modal()

int WM_gesture_lasso_modal ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_gesture_lasso_path_to_array()

const int(* WM_gesture_lasso_path_to_array ( struct bContext C,
struct wmOperator op,
int *  mcoords_len 
) )[2]

helper function, we may want to add options for conversion to view space

caller must free.

◆ WM_gesture_lines_cancel()

void WM_gesture_lines_cancel ( struct bContext C,
struct wmOperator op 
)

◆ WM_gesture_lines_invoke()

int WM_gesture_lines_invoke ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_gesture_lines_modal()

int WM_gesture_lines_modal ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_gesture_new()

struct wmGesture* WM_gesture_new ( struct wmWindow window,
const struct ARegion region,
const struct wmEvent event,
int  type 
)

Context checked on having screen, window and area.

◆ WM_gesture_straightline_active_side_invoke()

int WM_gesture_straightline_active_side_invoke ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

This invoke callback starts the straight-line gesture with a viewport preview to the right side of the line.

◆ WM_gesture_straightline_cancel()

void WM_gesture_straightline_cancel ( struct bContext C,
struct wmOperator op 
)

◆ WM_gesture_straightline_invoke()

int WM_gesture_straightline_invoke ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_gesture_straightline_modal()

int WM_gesture_straightline_modal ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

This modal callback calls exec once per mouse move event while the gesture is active with the updated line start and end values, so it can be used for tools that have a real time preview (like a gradient updating in real time over the mesh).

◆ WM_gesture_straightline_oneshot_modal()

int WM_gesture_straightline_oneshot_modal ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

This modal one-shot callback only calls exec once after the gesture finishes without any updates during the gesture execution. Should be used for operations that are intended to be applied once without real time preview (like a trimming tool that only applies the bisect operation once after finishing the gesture as the bisect operation is too heavy to be computed in real time for a preview).

◆ WM_gestures_free_all()

void WM_gestures_free_all ( struct wmWindow win)

Definition at line 94 of file wm_gesture.c.

References ListBase::first, wmWindow::gesture, and WM_gesture_end().

Referenced by wm_window_free().

◆ WM_gestures_remove()

void WM_gestures_remove ( struct wmWindow win)

Definition at line 101 of file wm_gesture.c.

References ListBase::first, wmWindow::gesture, and WM_gesture_end().

Referenced by ui_but_drag_init().

◆ WM_init()

void WM_init ( struct bContext C,
int  argc,
const char **  argv 
)

Initialize Blender and load the startup file & preferences (only called once).

NOTE(@campbellbarton): Startup file and order of initialization.

Loading BLENDER_STARTUP_FILE, BLENDER_USERPREF_FILE, starting Python and other sub-systems, have inter-dependencies, for example.

  • Some sub-systems depend on the preferences (initializing icons depend on the theme).
  • Add-ons depends on the preferences to know what has been enabled.
  • Add-ons depends on the window-manger to register their key-maps.
  • Evaluating the startup file depends on Python for animation-drivers (see T89046).
  • Starting Python depends on the startup file so key-maps can be added in the window-manger.

Loading preferences early, then application subsystems and finally the startup data would simplify things if it weren't for key-maps being part of the window-manager which is blend file data. Creating a dummy window-manager early, or moving the key-maps into the preferences would resolve this and may be worth looking into long-term, see: D12184 for details.

Definition at line 212 of file wm_init_exit.c.

References BIFICONID_LAST, BKE_addon_pref_type_init(), BKE_icons_init(), BKE_keyconfig_pref_type_init(), BKE_library_callback_free_notifier_reference_set(), BKE_library_callback_remap_editor_id_reference_set(), BKE_main_blendfile_path_from_global(), BKE_material_copybuf_clear(), BKE_region_callback_free_gizmomap_set(), BKE_region_callback_refresh_tag_gizmomap_set(), BKE_sound_jack_sync_callback_set(), BKE_spacedata_callback_id_remap_set(), BKE_studiolight_init(), BKE_subdiv_init(), BLF_init(), BLI_assert, BLI_strncpy(), BLT_lang_init(), BLT_lang_set(), BPY_python_reset(), BPY_python_start(), C, DEG_editors_set_update_cb(), ED_file_init(), ED_node_init_butfuncs(), ED_render_clear_mtex_copybuf(), ED_render_id_flush_update(), ED_render_scene_update(), ED_spacedata_id_remap_single(), ED_spacemacros_init(), ED_spacetypes_init(), ED_undosys_type_init(), G, G_FILE_NO_UI, G_MAIN, GHOST_CreateSystemPaths(), GHOST_kConsoleWindowStateHideForNonConsoleLaunch, GHOST_kConsoleWindowStateShow, GHOST_setConsoleWindowState(), GPU_context_active_get(), GPU_context_begin_frame(), GPU_context_end_frame(), GPU_render_begin(), GPU_render_end(), IMB_thumb_clear_translations(), NULL, sound_jack_sync_callback(), UI_init(), UNUSED_VARS, wm_ghost_init(), wm_gizmogrouptype_init(), wm_gizmomap_remove(), WM_gizmomap_tag_refresh(), wm_gizmotype_init(), wm_history_file_read(), wm_homefile_read_ex(), wm_homefile_read_post(), wm_init_cursor_data(), WM_init_opengl(), wm_init_reports(), WM_init_state_app_template_get(), WM_main_remap_editor_id_reference(), WM_main_remove_notifier_reference(), WM_menutype_init(), WM_msgbus_types_init(), wm_operatortype_init(), wm_operatortypes_register(), WM_paneltype_init(), WM_platform_support_perform_checks(), wm_start_with_console, and WM_uilisttype_init().

Referenced by main().

◆ WM_init_input_devices()

void WM_init_input_devices ( void  )

◆ WM_init_native_pixels()

void WM_init_native_pixels ( bool  do_it)

Definition at line 2023 of file wm_window.c.

References WMInitStruct::native_pixels, and wm_init_state.

Referenced by arg_handle_native_pixels_set().

◆ WM_init_opengl()

void WM_init_opengl ( void  )

◆ WM_init_splash()

void WM_init_splash ( struct bContext C)

◆ WM_init_state_app_template_get()

const char* WM_init_state_app_template_get ( void  )

Definition at line 1037 of file wm_files.c.

References NULL, and wm_init_state_app_template.

Referenced by wm_homefile_read_exec(), WM_init(), and wm_userpref_read_exec().

◆ WM_init_state_app_template_set()

void WM_init_state_app_template_set ( const char *  app_template)

Used for setting app-template from the command line:

  • non-empty string: overrides.
  • empty string: override, using no app template.
  • NULL: clears override.

Definition at line 1025 of file wm_files.c.

References app_template, STRNCPY, and wm_init_state_app_template.

Referenced by arg_handle_app_template(), and wm_homefile_read_exec().

◆ WM_init_state_fullscreen_set()

void WM_init_state_fullscreen_set ( void  )

For border-less and border windows set from command-line.

Definition at line 2000 of file wm_window.c.

References GHOST_kWindowStateFullScreen, WMInitStruct::override_flag, WIN_OVERRIDE_WINSTATE, WMInitStruct::windowstate, and wm_init_state.

Referenced by arg_handle_without_borders().

◆ WM_init_state_maximized_set()

void WM_init_state_maximized_set ( void  )

◆ WM_init_state_normal_set()

void WM_init_state_normal_set ( void  )

◆ WM_init_state_size_set()

void WM_init_state_size_set ( int  stax,
int  stay,
int  sizx,
int  sizy 
)

◆ WM_init_state_start_with_console_set()

void WM_init_state_start_with_console_set ( bool  value)

Definition at line 148 of file wm_init_exit.c.

References wm_start_with_console.

Referenced by arg_handle_start_with_console().

◆ WM_init_window_focus_set()

void WM_init_window_focus_set ( bool  do_it)

Definition at line 2018 of file wm_window.c.

References WMInitStruct::window_focus, and wm_init_state.

Referenced by arg_handle_no_window_focus().

◆ WM_job_main_thread_lock_acquire()

void WM_job_main_thread_lock_acquire ( struct wmJob job)

Definition at line 134 of file wm_jobs.c.

References BLI_ticket_mutex_lock(), and wmJob::main_thread_mutex.

Referenced by WM_jobs_get(), wm_jobs_kill_job(), and wm_jobs_timer().

◆ WM_job_main_thread_lock_release()

void WM_job_main_thread_lock_release ( struct wmJob job)

Definition at line 139 of file wm_jobs.c.

References BLI_ticket_mutex_unlock(), and wmJob::main_thread_mutex.

Referenced by wm_job_free(), wm_jobs_kill_job(), and wm_jobs_timer().

◆ WM_jobs_callbacks()

void WM_jobs_callbacks ( struct wmJob wm_job,
wm_jobs_start_callback  startjob,
void(*)(void *)  initjob,
void(*)(void *)  update,
void(*)(void *)  endjob 
)

◆ WM_jobs_callbacks_ex()

void WM_jobs_callbacks_ex ( wmJob wm_job,
wm_jobs_start_callback  startjob,
void(*)(void *)  initjob,
void(*)(void *)  update,
void(*)(void *)  endjob,
void(*)(void *)  completed,
void(*)(void *)  canceled 
)

◆ WM_jobs_customdata_from_type()

void* WM_jobs_customdata_from_type ( struct wmWindowManager wm,
const void owner,
int  job_type 
)

◆ WM_jobs_customdata_get()

void* WM_jobs_customdata_get ( struct wmJob wm_job)

◆ WM_jobs_customdata_set()

void WM_jobs_customdata_set ( struct wmJob wm_job,
void customdata,
void(*)(void *)  free 
)

◆ WM_jobs_delay_start()

void WM_jobs_delay_start ( struct wmJob wm_job,
double  delay_time 
)

◆ WM_jobs_get()

struct wmJob* WM_jobs_get ( struct wmWindowManager wm,
struct wmWindow win,
const void owner,
const char *  name,
int  flag,
int  job_type 
)

◆ WM_jobs_has_running()

bool WM_jobs_has_running ( const struct wmWindowManager wm)

◆ WM_jobs_has_running_type()

bool WM_jobs_has_running_type ( const struct wmWindowManager wm,
int  job_type 
)

Definition at line 710 of file wm_jobs.c.

References wmJob::job_type, wmWindowManager::jobs, LISTBASE_FOREACH, and wmJob::running.

Referenced by bpy_app_is_job_running().

◆ WM_jobs_is_running()

bool WM_jobs_is_running ( const struct wmJob wm_job)

◆ WM_jobs_is_stopped()

bool WM_jobs_is_stopped ( const wmWindowManager wm,
const void owner 
)

Definition at line 309 of file wm_jobs.c.

References wmJob::owner, wmJob::stop, wm_job_find(), and WM_JOB_TYPE_ANY.

Referenced by uiTemplateRunningJobs().

◆ WM_jobs_kill()

void WM_jobs_kill ( struct wmWindowManager wm,
void owner,
void(*)(void *, short int *, short int *, float *)  startjob 
)

Actually terminate thread and job timer.

Definition at line 594 of file wm_jobs.c.

References wmWindowManager::jobs, LISTBASE_FOREACH_MUTABLE, wmJob::owner, wmJob::startjob, and wm_jobs_kill_job().

Referenced by ED_preview_kill_jobs().

◆ WM_jobs_kill_all()

void WM_jobs_kill_all ( struct wmWindowManager wm)

Wait until every job ended.

Definition at line 551 of file wm_jobs.c.

References ListBase::first, wmWindowManager::jobs, SEQ_prefetch_stop_all(), and wm_jobs_kill_job().

Referenced by ed_undo_step_pre(), WM_exit_ex(), and wm_window_match_init().

◆ WM_jobs_kill_all_except()

void WM_jobs_kill_all_except ( struct wmWindowManager wm,
const void owner 
)

Wait until every job ended, except for one owner (used in undo to keep screen job alive).

Definition at line 563 of file wm_jobs.c.

References wmWindowManager::jobs, LISTBASE_FOREACH_MUTABLE, wmJob::owner, and wm_jobs_kill_job().

Referenced by screen_opengl_render_init(), and screen_render_invoke().

◆ WM_jobs_kill_type()

void WM_jobs_kill_type ( struct wmWindowManager wm,
const void owner,
int  job_type 
)

◆ WM_jobs_name()

const char* WM_jobs_name ( const struct wmWindowManager wm,
const void owner 
)

◆ WM_jobs_progress()

float WM_jobs_progress ( const struct wmWindowManager wm,
const void owner 
)

◆ WM_jobs_start()

void WM_jobs_start ( struct wmWindowManager wm,
struct wmJob wm_job 
)

◆ WM_jobs_starttime()

double WM_jobs_starttime ( const struct wmWindowManager wm,
const void owner 
)

Time that job started.

◆ WM_jobs_stop()

void WM_jobs_stop ( struct wmWindowManager wm,
const void owner,
void startjob 
)

Signal job(s) from this owner or callback to stop, timer is required to get handled.

Definition at line 583 of file wm_jobs.c.

References wmWindowManager::jobs, LISTBASE_FOREACH, wmJob::owner, wmJob::running, wmJob::startjob, and wmJob::stop.

Referenced by do_running_jobs(), and sequencer_thumbnail_start_job_if_necessary().

◆ WM_jobs_test()

bool WM_jobs_test ( const struct wmWindowManager wm,
const void owner,
int  job_type 
)

Returns true if job runs, for UI (progress) indicators.

◆ WM_jobs_timer()

void WM_jobs_timer ( struct wmJob wm_job,
double  timestep,
unsigned int  note,
unsigned int  endnote 
)

◆ WM_lib_reload()

void WM_lib_reload ( struct Library lib,
struct bContext C,
struct ReportList reports 
)

◆ WM_main()

void WM_main ( struct bContext C)

◆ WM_main_add_notifier()

void WM_main_add_notifier ( unsigned int  type,
void reference 
)

Definition at line 293 of file wm_event_system.cc.

References wmNotifier::action, BLI_addtail(), wmNotifier::category, wmNotifier::data, ListBase::first, G_MAIN, NOTE_ACTION, NOTE_CATEGORY, NOTE_DATA, NOTE_SUBTYPE, wmWindowManager::notifier_queue, wmNotifier::reference, wmNotifier::subtype, type, Main::wm, and wm_test_duplicate_notifier().

Referenced by action_unlink_exec(), blender::ed::asset_browser::AssetCatalogTreeView::activate_catalog_by_id(), ANIM_apply_keyingset(), armature_circle_select(), armature_select_linked_impl(), asset_clear_exec(), asset_mark_exec(), blender::ed::space_node::backimage_fit_exec(), blender::ed::space_node::backimage_zoom_exec(), bpy_app_debug_value_set(), bpy_batch_remove(), bpy_orphans_purge(), bpy_rna_region_from_string(), brush_generic_tool_set(), brush_scale_size_exec(), cachefile_layer_add_exec(), cachefile_layer_move_exec(), cachefile_layer_remove_exec(), blender::ed::asset::AssetList::clear(), collection_duplicate_exec(), collection_flag_exec(), collection_hierarchy_delete_exec(), collection_instance_exec(), collection_isolate_exec(), collection_link_exec(), collection_new_exec(), collection_objects_select_exec(), collection_view_layer_exec(), collection_visibility_exec(), blender::ed::space_node::compo_updatejob(), copy_particle_systems_to_object(), blender::ed::curves::convert_from_particle_system::curves_convert_from_particle_system_exec(), blender::ed::curves::convert_to_particle_system::curves_convert_to_particle_system_exec(), blender::ed::curves::disable_selection::curves_disable_selection_exec(), blender::ed::curves::set_selection_domain::curves_set_selection_domain_exec(), do_lasso_select_armature(), do_lasso_select_objects(), do_lasso_select_pose(), blender::ed::asset_browser::AssetCatalogDropController::drop_asset_catalog_into_catalog(), blender::ed::asset_browser::AssetCatalogDropController::drop_assets_into_catalog(), ED_asset_catalog_add(), ED_asset_catalog_move(), ED_asset_catalog_remove(), ED_asset_catalog_rename(), ED_fileselect_activate_asset_catalog(), ED_fileselect_activate_by_id(), ED_fileselect_activate_by_relpath(), ED_fileselect_clear(), ED_fileselect_deselect_all(), ED_gpencil_set_active_channel(), ED_gpencil_tag_scene_gpencil(), ED_mesh_color_add(), ED_mesh_color_remove_index(), ED_mesh_sculpt_color_add(), ED_mesh_sculpt_color_remove_index(), ED_mesh_uv_add(), ED_mesh_uv_remove_index(), ED_node_set_active(), ED_node_tag_update_id(), ED_node_tree_pop(), ED_node_tree_push(), ED_node_tree_start(), ED_object_base_active_refresh(), ED_object_constraint_copy_for_object(), ED_object_constraint_copy_for_pose(), ED_object_constraint_link(), ED_object_constraint_move_to_index(), ED_object_editmode_enter_ex(), ED_object_editmode_exit_ex(), ED_object_gpencil_modifier_copy_to_object(), ED_object_gpencil_modifier_move_to_index(), ED_object_modifier_copy_to_object(), ED_object_modifier_move_to_index(), ED_object_particle_edit_mode_enter_ex(), ED_object_particle_edit_mode_exit_ex(), ED_object_shaderfx_copy(), ED_object_shaderfx_link(), ED_object_shaderfx_move_to_index(), ED_object_texture_paint_mode_enter_ex(), ED_object_texture_paint_mode_exit_ex(), ED_pose_bone_select_tag_update(), ED_scene_view_layer_delete(), ED_space_image_set(), ED_undo_push(), ED_uvedit_pack_islands_multi(), ED_view3d_camera_lock_sync(), EDBM_selectmode_disable(), EDBM_selectmode_set_multi(), EDBM_selectmode_toggle_multi(), edbm_shortest_path_pick_ex(), EDBM_update(), edgering_select(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), eyedropper_add_material(), eyedropper_gpencil_modal(), generateStrokes(), blender::ed::geometry::geometry_attribute_add_exec(), blender::ed::geometry::geometry_attribute_convert_exec(), blender::ed::geometry::geometry_attribute_remove_exec(), blender::ed::geometry::geometry_color_attribute_add_exec(), blender::ed::geometry::geometry_color_attribute_duplicate_exec(), blender::ed::geometry::geometry_color_attribute_remove_exec(), blender::ed::geometry::geometry_color_attribute_set_render_exec(), ghost_event_proc(), gizmo_area_light_prop_matrix_set(), gpencil_brush_reset_all_exec(), gpencil_brush_reset_exec(), gpencil_selectmode_toggle_exec(), gpencil_update_geometry(), gpencil_uv_transform_calc(), gpencil_uv_transform_exit(), icon_preview_endjob(), blender::io::usd::import_endjob(), import_endjob(), blender::io::usd::import_startjob(), lib_id_override_editable_toggle_exec(), lineart_gpencil_bake_endjob(), make_paths_absolute_exec(), make_paths_relative_exec(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), nlaedit_disable_tweakmode(), obedit_circle_select(), object_duplicates_make_real_exec(), outliner_hide_exec(), outliner_orphans_purge_exec(), outliner_select_sync_to_edit_bone(), outliner_select_sync_to_pose_bone(), outliner_unhide_all_exec(), override_remove_button_exec(), override_type_set_button_exec(), posttrans_gpd_clean(), posttrans_mask_clean(), preferences_asset_library_add_exec(), preferences_asset_library_remove_exec(), preview_endjob(), proj_paint_add_slot(), proxy_endjob(), ptcache_job_endjob(), rearrange_gpencil_channels(), render_endjob(), rna_property_update(), save_image_op(), scene_drop_invoke(), sculpt_dynamic_topology_toggle_exec(), sculpt_sample_detail_size_modal(), select_component_domain_invoke(), select_grouped_exec(), blender::ed::space_node::send_notifiers_after_tree_change(), shaderfx_copy_exec(), blender::ed::space_node::snode_bg_viewmove_modal(), solve_camera_freejob(), thumbnail_endjob(), trace_end_job(), track_markers_endjob(), tree_element_layer_collection_activate(), tree_element_master_collection_activate(), ui_rna_update_preferences_dirty(), uv_select_mode_exec(), uv_select_tag_update_for_object(), uv_shortest_path_pick_ex(), uvedit_pack_islands_multi(), uvedit_unwrap_multi(), view3d_collection_drop_copy_external_asset(), view3d_ob_drop_copy_external_asset(), viewRedrawPost(), weight_sample_invoke(), WM_file_tag_modified(), WM_operator_stack_clear(), wm_window_timer(), wm_xr_session_gpu_binding_context_create(), wm_xr_session_gpu_binding_context_destroy(), and wm_xr_session_update_screen().

◆ WM_main_playanim()

void WM_main_playanim ( int  argc,
const char **  argv 
)

Definition at line 1846 of file wm_playanim.c.

References NULL, and wm_main_playanim_intern().

Referenced by arg_handle_playback_mode().

◆ WM_main_remap_editor_id_reference()

void WM_main_remap_editor_id_reference ( const struct IDRemapper *  mappings)

◆ WM_main_remove_notifier_reference()

void WM_main_remove_notifier_reference ( const void reference)

Clear notifiers by reference, Used so listeners don't act on freed data.

Definition at line 314 of file wm_event_system.cc.

References ListBase::first, G_MAIN, LISTBASE_FOREACH_MUTABLE, wmWindowManager::message_bus, wmWindowManager::notifier_queue, Main::wm, WM_msg_id_remove(), and wm_notifier_clear().

Referenced by WM_init().

◆ WM_menu_invoke()

int WM_menu_invoke ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_menu_invoke_ex()

int WM_menu_invoke_ex ( struct bContext C,
struct wmOperator op,
wmOperatorCallContext  opcontext 
)

◆ WM_menu_name_call()

void WM_menu_name_call ( struct bContext C,
const char *  menu_name,
short  context 
)

◆ WM_menutype_add()

bool WM_menutype_add ( struct MenuType mt)

◆ WM_menutype_find()

struct MenuType* WM_menutype_find ( const char *  idname,
bool  quiet 
)

◆ WM_menutype_free()

void WM_menutype_free ( void  )

◆ WM_menutype_freelink()

void WM_menutype_freelink ( struct MenuType mt)

◆ WM_menutype_idname_visit_for_search()

void WM_menutype_idname_visit_for_search ( const struct bContext C,
struct PointerRNA ptr,
struct PropertyRNA prop,
const char *  edit_text,
StringPropertySearchVisitFunc  visit_fn,
void visit_user_data 
)

◆ WM_menutype_init()

void WM_menutype_init ( void  )
Note
Called on initialize WM_init().

Definition at line 66 of file wm_menu_type.c.

References BLI_ghash_str_new_ex(), and menutypes_hash.

Referenced by WM_init().

◆ WM_menutype_iter()

void WM_menutype_iter ( struct GHashIterator ghi)

Definition at line 46 of file wm_menu_type.c.

References BLI_ghashIterator_init(), and menutypes_hash.

Referenced by menu_items_from_ui_create().

◆ WM_menutype_poll()

bool WM_menutype_poll ( struct bContext C,
struct MenuType mt 
)

◆ WM_opengl_context_activate()

void WM_opengl_context_activate ( void context)

Definition at line 2380 of file wm_window.c.

◆ WM_opengl_context_create()

void* WM_opengl_context_create ( void  )

Definition at line 2353 of file wm_window.c.

◆ WM_opengl_context_dispose()

void WM_opengl_context_dispose ( void context)

Definition at line 2374 of file wm_window.c.

◆ WM_opengl_context_release()

void WM_opengl_context_release ( void context)

Definition at line 2386 of file wm_window.c.

◆ WM_operator_bl_idname()

size_t WM_operator_bl_idname ( char *  dst,
const char *  src 
)

Convert: some.op -> SOME_OT_op or leave as-is.

Returns
the length of dst.

◆ WM_operator_call()

int WM_operator_call ( struct bContext C,
struct wmOperator op 
)

Definition at line 1158 of file wm_event_system.cc.

References C, and WM_operator_call_ex().

◆ WM_operator_call_ex()

int WM_operator_call_ex ( struct bContext C,
struct wmOperator op,
bool  store 
)

For running operators with frozen context (modal handlers, menus).

Parameters
storeStore properties for re-use when an operator has finished (unless PROP_SKIP_SAVE is set).
Warning
do not use this within an operator to call itself! T29537.

Definition at line 1153 of file wm_event_system.cc.

References C, and wm_operator_exec().

Referenced by dialog_exec_cb(), WM_operator_call(), and wm_operator_ui_popup_ok().

◆ WM_operator_call_notest()

int WM_operator_call_notest ( struct bContext C,
struct wmOperator op 
)

This is intended to be used when an invoke operator wants to call exec on itself and is basically like running op->type->exec() directly, no poll checks no freeing, since we assume whoever called invoke will take care of that

Definition at line 1163 of file wm_event_system.cc.

References C, and wm_operator_exec_notest().

Referenced by op_generic_value_invoke(), and WM_operator_filesel().

◆ WM_operator_call_py()

int WM_operator_call_py ( struct bContext C,
struct wmOperatorType ot,
wmOperatorCallContext  context,
struct PointerRNA properties,
struct ReportList reports,
bool  is_undo 
)

Similar to WM_operator_name_call called with WM_OP_EXEC_DEFAULT context.

  • wmOperatorType is used instead of operator name since python already has the operator type.
  • poll() must be called by python before this runs.
  • reports can be passed to this function (so python can report them as exceptions).

Definition at line 1700 of file wm_event_system.cc.

References C, blender::compositor::context, CTX_wm_manager(), wmWindowManager::op_undo_depth, OPERATOR_CANCELLED, ot, and wm_operator_call_internal().

Referenced by pyop_call().

◆ WM_operator_check_ui_empty()

bool WM_operator_check_ui_empty ( struct wmOperatorType ot)

◆ WM_operator_check_ui_enabled()

bool WM_operator_check_ui_enabled ( const struct bContext C,
const char *  idname 
)

Return false, if the UI should be disabled.

◆ WM_operator_confirm()

int WM_operator_confirm ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

Invoke callback, confirm menu + exec.

◆ WM_operator_confirm_message()

int WM_operator_confirm_message ( struct bContext C,
struct wmOperator op,
const char *  message 
)

◆ WM_operator_confirm_message_ex()

int WM_operator_confirm_message_ex ( struct bContext C,
struct wmOperator op,
const char *  title,
int  icon,
const char *  message,
wmOperatorCallContext  opcontext 
)

◆ WM_operator_confirm_or_exec()

int WM_operator_confirm_or_exec ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_operator_drop_load_path()

ID* WM_operator_drop_load_path ( struct bContext C,
struct wmOperator op,
short  idcode 
)

◆ WM_operator_filesel()

int WM_operator_filesel ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

Invoke callback, file selector "filepath" unset + exec.

wmOperatorType.invoke, opens file-select if path property not set, otherwise executes.

◆ WM_operator_filesel_ensure_ext_imtype()

bool WM_operator_filesel_ensure_ext_imtype ( wmOperator op,
const struct ImageFormatData im_format 
)

◆ WM_operator_find_modal_by_type()

wmOperator* WM_operator_find_modal_by_type ( wmWindow win,
const wmOperatorType ot 
)

Return the first modal operator of type ot or NULL.

Definition at line 4601 of file wm_event_system.cc.

References LISTBASE_FOREACH, wmWindow::modalhandlers, wmEventHandler_Op::op, ot, wmOperator::type, and WM_HANDLER_TYPE_OP.

Referenced by gizmo_modal().

◆ WM_operator_flag_only_pass_through_on_press()

int WM_operator_flag_only_pass_through_on_press ( int  retval,
const struct wmEvent event 
)

◆ WM_operator_free()

void WM_operator_free ( struct wmOperator op)

◆ WM_operator_free_all_after()

void WM_operator_free_all_after ( wmWindowManager wm,
struct wmOperator op 
)

◆ WM_operator_handlers_clear()

void WM_operator_handlers_clear ( wmWindowManager wm,
struct wmOperatorType ot 
)

This function is needed in the case when an addon id disabled while a modal operator it defined is running.

Definition at line 401 of file wm.c.

References ARRAY_SIZE, wmEventHandler::flag, wmEventHandler_Op::head, LISTBASE_FOREACH, NULL, wmEventHandler_Op::op, ot, wmOperator::type, wmWindowManager::windows, WM_HANDLER_DO_FREE, WM_HANDLER_TYPE_OP, and WM_operator_free().

◆ WM_operator_is_repeat()

bool WM_operator_is_repeat ( const struct bContext C,
const struct wmOperator op 
)

◆ WM_operator_last_properties_ensure()

void WM_operator_last_properties_ensure ( struct wmOperatorType ot,
struct PointerRNA ptr 
)

◆ WM_operator_last_properties_ensure_idprops()

IDProperty* WM_operator_last_properties_ensure_idprops ( struct wmOperatorType ot)

◆ WM_operator_last_properties_init()

bool WM_operator_last_properties_init ( struct wmOperator op)

◆ WM_operator_last_properties_store()

bool WM_operator_last_properties_store ( struct wmOperator op)

◆ WM_operator_last_redo()

wmOperator* WM_operator_last_redo ( const struct bContext C)

◆ WM_operator_name_call()

int WM_operator_name_call ( struct bContext C,
const char *  opstring,
wmOperatorCallContext  context,
struct PointerRNA properties,
const wmEvent event 
)

◆ WM_operator_name_call_ptr()

int WM_operator_name_call_ptr ( struct bContext C,
struct wmOperatorType ot,
wmOperatorCallContext  context,
struct PointerRNA properties,
const wmEvent event 
)

Invokes operator in context.

Parameters
eventOptionally pass in an event to use when context uses one of the WM_OP_INVOKE_* values. When left unset the wmWindow.eventstate will be used, this can cause problems for operators that read the events type - for example, storing the key that was pressed so as to be able to detect it's release. In these cases it's necessary to forward the current event being handled.

Definition at line 1644 of file wm_event_system.cc.

References BLI_assert, C, blender::compositor::context, wmOperatorType::idname, ot, wm_operator_call_internal(), and WM_operatortype_find().

Referenced by add_driver_button_menu_exec(), bone_mouse_select_menu(), constraint_reorder(), doc_view_manual_ui_context_exec(), ED_object_mode_set_ex(), file_browse_invoke(), file_directory_enter_handle(), ghost_event_proc(), gpencil_modifier_reorder(), id_remap_fn(), image_file_browse_invoke(), lib_relocate(), blender::ed::space_node::link_drag_search_exec_fn(), modifier_reorder(), object_mouse_select_menu(), operator_search_exec_fn(), outliner_item_drag_drop_invoke(), sculpt_detail_size_set_radial_control(), shaderfx_reorder(), transform_from_gizmo_invoke(), ui_but_anim_decorate_cb(), ui_handler_wait_for_input(), view3d_interactive_add_modal(), view3d_lightcache_update(), WM_gizmo_operator_invoke(), WM_menu_name_call(), WM_operator_name_call(), WM_operator_name_call_ptr_with_depends_on_cursor(), WM_operator_name_call_with_properties(), wm_test_autorun_revert_action_exec(), and WM_toolsystem_ref_set_by_id_ex().

◆ WM_operator_name_call_ptr_with_depends_on_cursor()

void WM_operator_name_call_ptr_with_depends_on_cursor ( struct bContext C,
wmOperatorType ot,
wmOperatorCallContext  opcontext,
PointerRNA properties,
const wmEvent event,
const char *  drawstr 
)

◆ WM_operator_name_call_with_properties()

int WM_operator_name_call_with_properties ( struct bContext C,
const char *  opstring,
wmOperatorCallContext  context,
struct IDProperty properties,
const wmEvent event 
)

◆ WM_operator_name_poll()

bool WM_operator_name_poll ( struct bContext C,
const char *  opstring 
)

Definition at line 1667 of file wm_event_system.cc.

References C, ot, WM_operator_poll(), and WM_operatortype_find().

Referenced by file_panel_asset_catalog_buttons_draw().

◆ WM_operator_poll()

bool WM_operator_poll ( struct bContext C,
struct wmOperatorType ot 
)

◆ WM_operator_poll_context()

bool WM_operator_poll_context ( struct bContext C,
struct wmOperatorType ot,
short  context 
)

◆ WM_operator_properties_alloc()

void WM_operator_properties_alloc ( struct PointerRNA **  ptr,
struct IDProperty **  properties,
const char *  opstring 
)

◆ WM_operator_properties_border()

void WM_operator_properties_border ( struct wmOperatorType ot)

◆ WM_operator_properties_border_to_rctf()

void WM_operator_properties_border_to_rctf ( struct wmOperator op,
rctf rect 
)

◆ WM_operator_properties_border_to_rcti()

void WM_operator_properties_border_to_rcti ( struct wmOperator op,
struct rcti rect 
)

◆ WM_operator_properties_checker_interval()

void WM_operator_properties_checker_interval ( struct wmOperatorType ot,
bool  nth_can_disable 
)
Parameters
nth_can_disableEnable if we want to be able to select no interval at all.

Definition at line 603 of file wm_operator_props.c.

References min_ii(), ot, RNA_def_int(), and wmOperatorType::srna.

Referenced by CURVE_OT_select_nth(), MESH_OT_select_nth(), and path_select_properties().

◆ WM_operator_properties_checker_interval_from_op()

void WM_operator_properties_checker_interval_from_op ( struct wmOperator op,
struct CheckerIntervalParams op_params 
)

◆ WM_operator_properties_checker_interval_test()

bool WM_operator_properties_checker_interval_test ( const struct CheckerIntervalParams op_params,
int  depth 
)

◆ WM_operator_properties_clear()

void WM_operator_properties_clear ( struct PointerRNA ptr)

Definition at line 774 of file wm_operators.c.

References PointerRNA::data, IDP_ClearProperty(), and ptr.

Referenced by wm_macro_modal().

◆ WM_operator_properties_confirm_or_exec()

void WM_operator_properties_confirm_or_exec ( struct wmOperatorType ot)

◆ WM_operator_properties_create()

void WM_operator_properties_create ( struct PointerRNA ptr,
const char *  opstring 
)

◆ WM_operator_properties_create_ptr()

void WM_operator_properties_create_ptr ( struct PointerRNA ptr,
struct wmOperatorType ot 
)

◆ WM_operator_properties_default()

bool WM_operator_properties_default ( struct PointerRNA ptr,
bool  do_update 
)

Set all props to their default.

Parameters
do_updateOnly update un-initialized props.
Note
There's nothing specific to operators here. This could be made a general function.

Definition at line 730 of file wm_operators.c.

References PROP_POINTER, ptr, RNA_property_is_set(), RNA_property_pointer_get(), RNA_property_pointer_type(), RNA_property_reset(), RNA_property_type(), RNA_STRUCT_BEGIN, and RNA_STRUCT_END.

Referenced by wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), and WM_operator_type_set().

◆ WM_operator_properties_filesel()

void WM_operator_properties_filesel ( struct wmOperatorType ot,
int  filter,
short  type,
eFileSel_Action  action,
eFileSel_Flag  flag,
short  display,
short  sort 
)

Default properties for file-select.

Definition at line 64 of file wm_operator_props.c.

References DummyRNA_NULL_items, FILE_DEFAULTDISPLAY, FILE_HORIZONTALDISPLAY, FILE_IMGDISPLAY, FILE_LOADLIB, FILE_MAX, FILE_SAVE, FILE_SPECIAL, FILE_TYPE_ALEMBIC, FILE_TYPE_ARCHIVE, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_BTX, FILE_TYPE_COLLADA, FILE_TYPE_FOLDER, FILE_TYPE_FTFONT, FILE_TYPE_IMAGE, FILE_TYPE_MOVIE, FILE_TYPE_OBJECT_IO, FILE_TYPE_PYSCRIPT, FILE_TYPE_SOUND, FILE_TYPE_TEXT, FILE_TYPE_USD, FILE_TYPE_VOLUME, FILE_VERTICALDISPLAY, filter(), NULL, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_collection_runtime(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_int(), RNA_def_property_flag(), RNA_def_string_dir_path(), RNA_def_string_file_name(), RNA_def_string_file_path(), sort(), wmOperatorType::srna, type, WM_FILESEL_DIRECTORY, WM_FILESEL_FILENAME, WM_FILESEL_FILEPATH, WM_FILESEL_FILES, WM_FILESEL_RELPATH, WM_FILESEL_SHOW_PROPS, and wm_operator_properties_filesel_sort_items_itemf().

Referenced by ASSET_OT_bundle_install(), BUTTONS_OT_directory_browse(), BUTTONS_OT_file_browse(), CACHEFILE_OT_layer_add(), CACHEFILE_OT_open(), CLIP_OT_open(), ED_OT_lib_id_load_custom_preview(), FILE_OT_find_missing_files(), FONT_OT_open(), FONT_OT_text_paste_from_file(), GRAPH_OT_sound_bake(), IMAGE_OT_file_browse(), IMAGE_OT_open(), IMAGE_OT_replace(), IMAGE_OT_save_as(), blender::ed::space_node::NODE_OT_add_file(), OBJECT_OT_multires_external_save(), OBJECT_OT_volume_import(), PREFERENCES_OT_asset_library_add(), RIGIDBODY_OT_world_export(), screen_screenshot_impl(), SEQUENCER_OT_change_path(), SEQUENCER_OT_export_subtitles(), SEQUENCER_OT_image_strip_add(), SEQUENCER_OT_movie_strip_add(), SEQUENCER_OT_sound_strip_add(), SOUND_OT_mixdown(), SOUND_OT_open(), SOUND_OT_open_mono(), TEXT_OT_open(), TEXT_OT_save_as(), VIEW3D_OT_background_image_add(), WM_OT_append(), WM_OT_lib_reload(), WM_OT_lib_relocate(), WM_OT_link(), WM_OT_open_mainfile(), WM_OT_recover_auto_save(), WM_OT_save_as_mainfile(), and WM_OT_save_mainfile().

◆ WM_operator_properties_free()

void WM_operator_properties_free ( struct PointerRNA ptr)

◆ WM_operator_properties_generic_select()

void WM_operator_properties_generic_select ( struct wmOperatorType ot)

Selecting and tweaking items are overlapping operations. Getting both to work without conflicts requires special care. See https://wiki.blender.org/wiki/Human_Interface_Guidelines/Selection#Select-tweaking for the desired behavior.

For default click selection (with no modifier keys held), the select operators can do the following:

  • On a mouse press on an unselected item, change selection and finish immediately after. This sends an undo push and allows transform to take over should a click-drag event be caught.
  • On a mouse press on a selected item, don't change selection state, but start modal execution of the operator. Idea is that we wait with deselecting other items until we know that the intention wasn't to tweak (mouse press+drag) all selected items.
  • If a click-drag is recognized before the release event happens, cancel the operator, so that transform can take over and no undo-push is sent.
  • If the release event occurs rather than a click-drag one, deselect all items but the one under the cursor, and finish the modal operator.

This utility, together with WM_generic_select_invoke() and WM_generic_select_modal() should help getting the wanted behavior to work. Most generic logic should be handled in these, so that the select operators only have to care for the case dependent handling.

Every select operator has slightly different requirements, e.g. sequencer strip selection also needs to account for handle selection. This should be the baseline behavior though.

Definition at line 497 of file wm_operator_props.c.

References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.

Referenced by ACTION_OT_clickselect(), FILE_OT_select(), GRAPH_OT_clickselect(), MARKER_OT_select(), NLA_OT_click_select(), and SEQUENCER_OT_select().

◆ WM_operator_properties_gesture_box()

void WM_operator_properties_gesture_box ( struct wmOperatorType ot)

◆ WM_operator_properties_gesture_box_ex()

void WM_operator_properties_gesture_box_ex ( struct wmOperatorType ot,
bool  deselect,
bool  extend 
)

◆ WM_operator_properties_gesture_box_select()

void WM_operator_properties_gesture_box_select ( struct wmOperatorType ot)

◆ WM_operator_properties_gesture_box_zoom()

void WM_operator_properties_gesture_box_zoom ( struct wmOperatorType ot)

◆ WM_operator_properties_gesture_circle()

void WM_operator_properties_gesture_circle ( struct wmOperatorType ot)

◆ WM_operator_properties_gesture_lasso()

void WM_operator_properties_gesture_lasso ( struct wmOperatorType ot)

◆ WM_operator_properties_gesture_straightline()

void WM_operator_properties_gesture_straightline ( struct wmOperatorType ot,
int  cursor 
)

◆ WM_operator_properties_id_lookup()

void WM_operator_properties_id_lookup ( wmOperatorType ot,
const bool  add_name_prop 
)

Adds "name" and "session_uuid" properties so the caller can tell the operator which ID to act on. See WM_operator_properties_id_lookup_from_name_or_session_uuid(). Both properties will be hidden in the UI and not be saved over consecutive operator calls.

Note
New operators should probably use "session_uuid" only (set add_name_prop to #false), since this works properly with linked data and/or library overrides (in both cases, multiple IDs with the same name and type may be present). The "name" property is only kept to not break compatibility with old scripts using some previously existing operators.

Definition at line 271 of file wm_operator_props.c.

References INT32_MAX, INT32_MIN, MAX_ID_NAME, NULL, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_int(), RNA_def_property_flag(), RNA_def_string(), and wmOperatorType::srna.

Referenced by blender::ed::space_node::NODE_OT_add_collection(), blender::ed::space_node::NODE_OT_add_file(), blender::ed::space_node::NODE_OT_add_group(), blender::ed::space_node::NODE_OT_add_mask(), blender::ed::space_node::NODE_OT_add_object(), OBJECT_OT_add_named(), OBJECT_OT_collection_external_asset_drop(), OBJECT_OT_collection_instance_add(), OBJECT_OT_data_instance_add(), OBJECT_OT_drop_named_image(), OBJECT_OT_drop_named_material(), UI_OT_drop_material(), VIEW3D_OT_background_image_add(), and VIEW3D_OT_drop_world().

◆ WM_operator_properties_id_lookup_from_name_or_session_uuid()

struct ID* WM_operator_properties_id_lookup_from_name_or_session_uuid ( struct Main bmain,
PointerRNA ptr,
enum ID_Type  type 
)

◆ WM_operator_properties_id_lookup_is_set()

bool WM_operator_properties_id_lookup_is_set ( PointerRNA ptr)

Check if either the "session_uuid" or "name" property is set inside ptr. If this is the case the ID can be looked up by WM_operator_properties_id_lookup_from_name_or_session_uuid().

Definition at line 265 of file wm_operator_props.c.

References ptr, and RNA_struct_property_is_set().

Referenced by blender::ed::space_node::node_add_file_invoke(), object_instance_add_invoke(), and WM_operator_drop_load_path().

◆ WM_operator_properties_id_lookup_set_from_id()

void WM_operator_properties_id_lookup_set_from_id ( PointerRNA ptr,
const ID id 
)

Tries to pass id to an operator via either a "session_uuid" or a "name" property defined in the properties of ptr. The former is preferred, since it works properly with linking and library overrides (which may both result in multiple IDs with the same name and type).

Also see WM_operator_properties_id_lookup() and WM_operator_properties_id_lookup_from_name_or_session_uuid()

Definition at line 229 of file wm_operator_props.c.

References BLI_assert_unreachable, id, ID::name, ptr, RNA_int_set(), RNA_string_set(), RNA_struct_find_property(), and ID::session_uuid.

Referenced by view3d_id_drop_copy(), view3d_id_drop_copy_with_type(), and view3d_id_path_drop_copy().

◆ WM_operator_properties_mouse_select()

void WM_operator_properties_mouse_select ( struct wmOperatorType ot)

◆ WM_operator_properties_reset()

void WM_operator_properties_reset ( struct wmOperator op)

◆ WM_operator_properties_sanitize()

void WM_operator_properties_sanitize ( struct PointerRNA ptr,
bool  no_context 
)

◆ WM_operator_properties_select_action()

void WM_operator_properties_select_action ( struct wmOperatorType ot,
int  default_action,
bool  hide_gui 
)

◆ WM_operator_properties_select_action_simple()

void WM_operator_properties_select_action_simple ( struct wmOperatorType ot,
int  default_action,
bool  hide_gui 
)

◆ WM_operator_properties_select_all()

void WM_operator_properties_select_all ( struct wmOperatorType ot)

◆ WM_operator_properties_select_operation()

void WM_operator_properties_select_operation ( struct wmOperatorType ot)

◆ WM_operator_properties_select_operation_simple()

void WM_operator_properties_select_operation_simple ( struct wmOperatorType ot)

◆ WM_operator_properties_select_random()

void WM_operator_properties_select_random ( struct wmOperatorType ot)

◆ WM_operator_properties_select_random_seed_increment_get()

int WM_operator_properties_select_random_seed_increment_get ( wmOperator op)

◆ WM_operator_properties_select_walk_direction()

void WM_operator_properties_select_walk_direction ( struct wmOperatorType ot)

◆ WM_operator_properties_use_cursor_init()

void WM_operator_properties_use_cursor_init ( struct wmOperatorType ot)

Disable using cursor position, use when view operators are initialized from buttons.

Definition at line 433 of file wm_operator_props.c.

References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.

Referenced by CLIP_OT_view_zoom(), IMAGE_OT_view_zoom(), VIEW2D_OT_zoom(), and view3d_operator_properties_common().

◆ WM_operator_props_dialog_popup()

int WM_operator_props_dialog_popup ( struct bContext C,
struct wmOperator op,
int  width 
)

◆ WM_operator_props_popup()

int WM_operator_props_popup ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

◆ WM_operator_props_popup_call()

int WM_operator_props_popup_call ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

Same as WM_operator_props_popup but call the operator first, This way - the button values correspond to the result of the operator. Without this, first access to a button will make the result jump, see T32452.

◆ WM_operator_props_popup_confirm()

int WM_operator_props_popup_confirm ( struct bContext C,
struct wmOperator op,
const struct wmEvent event 
)

Invoke callback, exec + redo popup.

Same as WM_operator_props_popup but don't use operator redo. just wraps WM_operator_props_dialog_popup.

◆ WM_operator_py_idname()

size_t size_t WM_operator_py_idname ( char *  dst,
const char *  src 
)

Convert: SOME_OT_op -> some.op or leave as-is.

Returns
the length of dst.

◆ WM_operator_py_idname_ok_or_report()

size_t size_t bool WM_operator_py_idname_ok_or_report ( struct ReportList reports,
const char *  classname,
const char *  idname 
)

Sanity check to ensure WM_operator_bl_idname won't fail.

Returns
true when there are no problems with idname, otherwise report an error.

Definition at line 144 of file wm_operators.c.

References BKE_reportf(), MAX_NAME, and RPT_ERROR.

◆ WM_operator_pystring()

char* WM_operator_pystring ( struct bContext C,
struct wmOperator op,
bool  all_args,
bool  macro_args 
)

◆ WM_operator_pystring_abbreviate()

bool WM_operator_pystring_abbreviate ( char *  str,
int  str_len_max 
)
Returns
true if the string was shortened.

Definition at line 272 of file wm_operators.c.

References str.

Referenced by ui_tooltip_text_python_from_op().

◆ WM_operator_pystring_ex()

char* WM_operator_pystring_ex ( struct bContext C,
struct wmOperator op,
bool  all_args,
bool  macro_args,
struct wmOperatorType ot,
struct PointerRNA opptr 
)

Operator as a Python command (resulting string must be freed).

Print a string representation of the operator, with the arguments that it runs so Python can run it again.

When calling from an existing wmOperator, better to use simple version: WM_operator_pystring(C, op);

Note
Both op and opptr may be NULL (op is only used for macro operators).

Definition at line 192 of file wm_operators.c.

References BLI_dynstr_append(), BLI_dynstr_appendf(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), C, ListBase::first, wmOperatorType::idname, wmOperator::macro, wmOperatorType::macro, MEM_freeN, wmOperator::next, NULL, OP_MAX_TYPENAME, ot, wmOperator::ptr, RNA_pointer_as_string_id(), RNA_pointer_as_string_keywords(), wmOperator::type, WM_operator_properties_create_ptr(), WM_operator_properties_free(), and WM_operator_py_idname().

Referenced by copy_python_command_button_exec(), pyop_as_string(), ui_but_copy_operator(), ui_layout_introspect_button(), ui_tooltip_text_python_from_op(), and WM_operator_pystring().

◆ WM_operator_redo_popup()

int WM_operator_redo_popup ( struct bContext C,
struct wmOperator op 
)

◆ WM_operator_region_active_win_set()

void WM_operator_region_active_win_set ( struct bContext C)

Sets the active region for this space from the context.

See also
BKE_area_find_region_active_win

Definition at line 941 of file wm_event_system.cc.

References blender::compositor::area(), BLI_findindex(), C, CTX_wm_area(), CTX_wm_region(), ARegion::regiontype, and RGN_TYPE_WINDOW.

Referenced by wm_operator_finished().

◆ WM_operator_repeat()

int WM_operator_repeat ( struct bContext C,
struct wmOperator op 
)

Execute this operator again, put here so it can share above code

Definition at line 1168 of file wm_event_system.cc.

References C, wmOperator::flag, OP_IS_REPEAT, ret, and wm_operator_exec().

Referenced by ED_undo_operator_repeat(), repeat_history_exec(), and wm_block_redo_cb().

◆ WM_operator_repeat_check()

bool WM_operator_repeat_check ( const struct bContext C,
struct wmOperator op 
)
Returns
true if WM_operator_repeat can run. Simple check for now but may become more involved. To be sure the operator can run call WM_operator_poll(C, op->type) also, since this call checks if WM_operator_repeat() can run at all, not that it WILL run at any time.

◆ WM_operator_repeat_last()

int WM_operator_repeat_last ( struct bContext C,
struct wmOperator op 
)

Definition at line 1176 of file wm_event_system.cc.

References C, wmOperator::flag, OP_IS_REPEAT_LAST, ret, and wm_operator_exec().

Referenced by repeat_last_exec().

◆ WM_operator_smooth_viewtx_get()

int WM_operator_smooth_viewtx_get ( const struct wmOperator op)

◆ WM_operator_stack_clear()

void WM_operator_stack_clear ( struct wmWindowManager wm)

◆ WM_operator_type_modal_from_exec_for_object_edit_coords()

void WM_operator_type_modal_from_exec_for_object_edit_coords ( struct wmOperatorType ot)

Allow an operator with only and execute function to run modally, re-doing the action, using vertex coordinate store/restore instead of operator undo.

Definition at line 329 of file wm_operator_utils.c.

References BLI_assert, wmOperatorType::cancel, wmOperatorType::invoke, wmOperatorType::modal, NULL, op_generic_value_cancel(), op_generic_value_invoke(), op_generic_value_modal(), ot, wmOperatorType::prop, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.

Referenced by MESH_OT_vertices_smooth(), and TRANSFORM_OT_vertex_random().

◆ WM_operator_type_set()

void WM_operator_type_set ( struct wmOperator op,
struct wmOperatorType ot 
)

Use with extreme care! Properties, custom-data etc - must be compatible.

Parameters
opOperator to assign the type to.
otOperator type to assign.

Definition at line 336 of file wm.c.

References BLI_assert, PointerRNA::data, IDP_SyncGroupTypes(), NULL, ot, wmOperator::properties, wmOperator::ptr, ptr, wmOperator::py_instance, wmOperatorType::srna, wmOperator::type, PointerRNA::type, WM_operator_properties_create_ptr(), WM_operator_properties_default(), and WM_operator_properties_free().

Referenced by transform_modal().

◆ WM_operator_ui_popup()

int WM_operator_ui_popup ( struct bContext C,
struct wmOperator op,
int  width 
)

◆ WM_operator_view3d_unit_defaults()

void WM_operator_view3d_unit_defaults ( struct bContext C,
struct wmOperator op 
)

◆ WM_operator_winactive()

bool WM_operator_winactive ( struct bContext C)

◆ WM_operatortype_append()

void WM_operatortype_append ( void(*)(struct wmOperatorType *)  opfunc)

◆ WM_operatortype_append_macro()

struct wmOperatorType* WM_operatortype_append_macro ( const char *  idname,
const char *  name,
const char *  description,
int  flag 
)

◆ WM_operatortype_append_macro_ptr()

void WM_operatortype_append_macro_ptr ( void(*)(struct wmOperatorType *, void *)  opfunc,
void userdata 
)

◆ WM_operatortype_append_ptr()

void WM_operatortype_append_ptr ( void(*)(struct wmOperatorType *, void *)  opfunc,
void userdata 
)

◆ WM_operatortype_description()

char* WM_operatortype_description ( struct bContext C,
struct wmOperatorType ot,
struct PointerRNA properties 
)

◆ WM_operatortype_description_or_name()

char* WM_operatortype_description_or_name ( struct bContext C,
struct wmOperatorType ot,
struct PointerRNA properties 
)

Use when we want a label, preferring the description.

Definition at line 598 of file wm_operator_type.c.

References BLI_strdup(), C, NULL, ot, WM_operatortype_description(), and WM_operatortype_name().

Referenced by ui_tooltip_data_from_gizmo().

◆ WM_operatortype_find()

struct wmOperatorType* WM_operatortype_find ( const char *  idname,
bool  quiet 
)

Definition at line 51 of file wm_operator_type.c.

References BLI_ghash_lookup(), CLOG_INFO, global_ops_hash, NULL, OP_MAX_TYPENAME, ot, WM_LOG_OPERATORS, and WM_operator_bl_idname().

Referenced by add_driver_button_menu_exec(), bone_mouse_select_menu(), constraint_reorder(), doc_view_manual_ui_context_exec(), ED_object_mode_compat_set(), ED_object_mode_set_ex(), file_browse_invoke(), file_directory_enter_handle(), ghost_event_proc(), gizmo2d_resize_setup(), gizmo2d_rotate_setup(), gizmo2d_xform_setup(), gizmo_mesh_extrude_setup(), gizmo_mesh_spin_init_setup(), gizmo_mesh_spin_redo_setup(), gizmogroup_init_properties_from_twtype(), gpencil_modifier_reorder(), id_remap_fn(), image_file_browse_invoke(), keymap_handler_log_kmi_op_str(), lib_reload_fn(), lib_relocate_fn(), blender::ed::space_node::link_drag_search_exec_fn(), modifier_reorder(), blender::nodes::node_composite_output_file_cc::node_composit_buts_file_output_ex(), object_mouse_select_menu(), ot_lookup_from_py_string(), outliner_item_drag_drop_invoke(), outliner_lib_relocate_invoke_do(), outliner_operator_menu(), panel_activate_state(), poselib_add_menu_invoke__replacemenu(), pyop_as_string(), pyop_call(), pyop_poll(), PYOP_wrap_macro_define(), screen_user_menu_draw(), sculpt_detail_size_set_radial_control(), shaderfx_reorder(), template_operator_property_buts_draw_single(), transform_from_gizmo_invoke(), transform_modal(), ui_but_anim_decorate_cb(), UI_but_extra_operator_icon_add(), UI_but_is_tool(), ui_but_menu_add_path_operators(), UI_but_operatortype_get_from_enum_menu(), ui_but_predefined_extra_operator_icons_add(), UI_list_custom_activate_operator_set(), UI_list_custom_drag_operator_set(), ui_popup_context_menu_for_button(), ui_tooltip_data_from_tool(), uiDefButO(), uiDefIconButO(), uiDefIconTextButO(), uiItemBooleanO(), uiItemEnumO(), uiItemEnumO_string(), uiItemEnumO_value(), uiItemFloatO(), uiItemFullO(), uiItemIntO(), uiItemMenuEnumFullO(), uiItemsFullEnumO(), uiItemStringO(), uiTemplateEditModeSelection(), unpack_menu(), view3d_interactive_add_modal(), view3d_lightcache_update(), view3d_panel_vgroup(), WIDGETGROUP_light_target_setup(), WIDGETGROUP_navigate_setup(), WIDGETGROUP_ruler_setup(), WIDGETGROUP_xform_cage_setup(), WIDGETGROUP_xform_shear_setup(), WM_dropbox_add(), WM_event_match_keymap_item(), wm_handler_operator_call(), wm_handlers_do_gizmo_handler(), wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), wm_keymap_item_properties_update_ot(), WM_menu_name_call(), WM_modalkeymap_assign(), WM_operator_check_ui_empty(), wm_operator_create(), WM_operator_name_call(), WM_operator_name_call_ptr(), WM_operator_name_call_ptr_with_depends_on_cursor(), WM_operator_name_call_with_properties(), WM_operator_name_poll(), WM_operator_poll(), WM_operator_properties_create(), WM_operator_repeat_check(), WM_operatortype_append_macro(), WM_operatortype_macro_define(), WM_operatortype_remove(), WM_operatortype_remove_ptr(), wm_test_autorun_revert_action_exec(), WM_toolsystem_ref_set_by_id_ex(), WM_window_cursor_keymap_status_refresh(), WM_xr_actionmap_item_properties_update_ot(), and workspace_add_menu().

◆ WM_operatortype_idname_visit_for_search()

void WM_operatortype_idname_visit_for_search ( const struct bContext C,
PointerRNA ptr,
PropertyRNA prop,
const char *  edit_text,
StringPropertySearchVisitFunc  visit_fn,
void visit_user_data 
)

◆ WM_operatortype_iter()

void WM_operatortype_iter ( struct GHashIterator ghi)

◆ WM_operatortype_last_properties_clear_all()

void WM_operatortype_last_properties_clear_all ( void  )

◆ WM_operatortype_macro_define()

struct wmOperatorTypeMacro* WM_operatortype_macro_define ( struct wmOperatorType ot,
const char *  idname 
)

◆ WM_operatortype_name()

const char* WM_operatortype_name ( struct wmOperatorType ot,
struct PointerRNA properties 
)

◆ WM_operatortype_props_advanced_begin()

void WM_operatortype_props_advanced_begin ( struct wmOperatorType ot)

◆ WM_operatortype_props_advanced_end()

void WM_operatortype_props_advanced_end ( struct wmOperatorType ot)

Tags all operator-properties of ot defined since the first WM_operatortype_props_advanced_begin call, or the last WM_operatortype_props_advanced_end call, with OP_PROP_TAG_ADVANCED.

Note
This is called for all operators during registration (see wm_operatortype_append__end). So it does not need to be explicitly called in operator-type definition.

Definition at line 211 of file wm_operator_type.c.

References counter, OP_PROP_TAG_ADVANCED, ot, ot_prop_basic_count, RNA_STRUCT_BEGIN, RNA_STRUCT_END, WM_operator_properties_create_ptr(), and WM_operatortype_prop_tag.

Referenced by wm_operatortype_append__end().

◆ WM_operatortype_remove()

bool WM_operatortype_remove ( const char *  idname)

Definition at line 160 of file wm_operator_type.c.

References NULL, ot, WM_operatortype_find(), and WM_operatortype_remove_ptr().

◆ WM_operatortype_remove_ptr()

void WM_operatortype_remove_ptr ( struct wmOperatorType ot)

◆ WM_paint_cursor_activate()

struct wmPaintCursor* WM_paint_cursor_activate ( short  space_type,
short  region_type,
bool(*)(struct bContext *C poll,
void(*)(struct bContext *C, int, int, void *customdata)  draw,
void customdata 
)

◆ WM_paint_cursor_end()

bool WM_paint_cursor_end ( struct wmPaintCursor handle)

◆ WM_paint_cursor_remove_by_type()

void WM_paint_cursor_remove_by_type ( struct wmWindowManager wm,
void draw_fn,
void(*)(void *)  free 
)

◆ WM_paint_cursor_tag_redraw()

void WM_paint_cursor_tag_redraw ( struct wmWindow win,
struct ARegion region 
)

◆ WM_paneltype_add()

bool WM_paneltype_add ( struct PanelType pt)

Definition at line 44 of file wm_panel_type.c.

References BLI_ghash_insert(), g_paneltypes_hash, and PanelType::idname.

Referenced by graph_buttons_register().

◆ WM_paneltype_clear()

void WM_paneltype_clear ( void  )

Definition at line 64 of file wm_panel_type.c.

References BLI_ghash_free(), g_paneltypes_hash, and NULL.

Referenced by WM_exit_ex().

◆ WM_paneltype_find()

struct PanelType* WM_paneltype_find ( const char *  idname,
bool  quiet 
)

◆ WM_paneltype_idname_visit_for_search()

void WM_paneltype_idname_visit_for_search ( const struct bContext C,
struct PointerRNA ptr,
struct PropertyRNA prop,
const char *  edit_text,
StringPropertySearchVisitFunc  visit_fn,
void visit_user_data 
)

◆ WM_paneltype_init()

void WM_paneltype_init ( void  )

Called on initialize WM_init().

Definition at line 58 of file wm_panel_type.c.

References BLI_ghash_str_new_ex(), and g_paneltypes_hash.

Referenced by WM_init().

◆ WM_paneltype_remove()

void WM_paneltype_remove ( struct PanelType pt)

◆ WM_progress_clear()

void WM_progress_clear ( struct wmWindow win)

Definition at line 1833 of file wm_window.c.

References GHOST_EndProgressBar(), and wmWindow::ghostwin.

Referenced by wm_jobs_update_progress_bars().

◆ WM_progress_set()

void WM_progress_set ( struct wmWindow win,
float  progress 
)

Definition at line 1825 of file wm_window.c.

References GHOST_SetProgressBar(), and wmWindow::ghostwin.

Referenced by wm_jobs_update_progress_bars().

◆ WM_prop_pystring_assign()

char* WM_prop_pystring_assign ( struct bContext C,
struct PointerRNA ptr,
struct PropertyRNA prop,
int  index 
)

◆ WM_redraw_windows()

void WM_redraw_windows ( struct bContext C)

◆ WM_region_use_viewport()

bool WM_region_use_viewport ( struct ScrArea area,
struct ARegion region 
)

◆ WM_reinit_gizmomap_all()

void WM_reinit_gizmomap_all ( struct Main bmain)

◆ WM_report()

void WM_report ( eReportType  type,
const char *  message 
)

◆ WM_report_banner_show()

void WM_report_banner_show ( void  )

◆ WM_report_banners_cancel()

void WM_report_banners_cancel ( struct Main bmain)

Hide all currently displayed banners and abort their timer.

Definition at line 821 of file wm_event_system.cc.

References BKE_reports_clear(), ListBase::first, wmWindowManager::reports, ReportList::reporttimer, Main::wm, and WM_event_remove_timer().

Referenced by fluid_bake_exec(), fluid_bake_invoke(), and fluid_free_exec().

◆ WM_reportf()

void WM_reportf ( eReportType  type,
const char *  format,
  ... 
)

◆ WM_script_tag_reload()

void WM_script_tag_reload ( void  )

Needed for cases when operators are re-registered (when operator type pointers are stored).

Definition at line 663 of file wm_init_exit.c.

References UI_interface_tag_script_reload().

◆ WM_set_locked_interface()

void WM_set_locked_interface ( struct wmWindowManager wm,
bool  lock 
)

◆ WM_stereo3d_enabled()

bool WM_stereo3d_enabled ( struct wmWindow win,
bool  only_fullscreen_test 
)

◆ WM_tooltip_clear()

void WM_tooltip_clear ( struct bContext C,
struct wmWindow win 
)

◆ WM_tooltip_immediate_init()

void WM_tooltip_immediate_init ( struct bContext C,
struct wmWindow win,
struct ScrArea area,
struct ARegion region,
wmTooltipInitFn  init 
)

◆ WM_tooltip_init()

void WM_tooltip_init ( struct bContext C,
struct wmWindow win 
)

◆ WM_tooltip_refresh()

void WM_tooltip_refresh ( struct bContext C,
struct wmWindow win 
)

◆ WM_tooltip_time_closed()

double WM_tooltip_time_closed ( void  )

Definition at line 26 of file wm_tooltip.c.

References g_tooltip_time_closed.

Referenced by button_activate_init().

◆ WM_tooltip_timer_clear()

void WM_tooltip_timer_clear ( struct bContext C,
struct wmWindow win 
)

◆ WM_tooltip_timer_init()

void WM_tooltip_timer_init ( struct bContext C,
struct wmWindow win,
struct ScrArea area,
struct ARegion region,
wmTooltipInitFn  init 
)

◆ WM_tooltip_timer_init_ex()

void WM_tooltip_timer_init_ex ( struct bContext C,
struct wmWindow win,
struct ScrArea area,
struct ARegion region,
wmTooltipInitFn  init,
double  delay 
)

◆ WM_uilisttype_add()

bool WM_uilisttype_add ( struct uiListType ult)

Definition at line 50 of file wm_uilist_type.c.

References BLI_ghash_insert(), uiListType::idname, and uilisttypes_hash.

Referenced by ED_uilisttypes_ui(), and panelRegister().

◆ WM_uilisttype_find()

struct uiListType* WM_uilisttype_find ( const char *  idname,
bool  quiet 
)

Definition at line 34 of file wm_uilist_type.c.

References BLI_ghash_lookup(), NULL, and uilisttypes_hash.

Referenced by ui_template_list_data_retrieve().

◆ WM_uilisttype_free()

void WM_uilisttype_free ( void  )

◆ WM_uilisttype_init()

void WM_uilisttype_init ( void  )

Called on initialize WM_init()

Definition at line 119 of file wm_uilist_type.c.

References BLI_ghash_str_new_ex(), and uilisttypes_hash.

Referenced by WM_init().

◆ WM_uilisttype_list_id_get()

const char* WM_uilisttype_list_id_get ( const struct uiListType ult,
struct uiList list 
)

Get the "non-full" list-ID, see WM_uilisttype_to_full_list_id() for details.

Note
Assumes uiList.list_id was set using WM_uilisttype_to_full_list_id()!

◆ WM_uilisttype_remove_ptr()

void WM_uilisttype_remove_ptr ( struct Main bmain,
struct uiListType ult 
)

◆ WM_uilisttype_to_full_list_id()

void WM_uilisttype_to_full_list_id ( const struct uiListType ult,
const char *  list_id,
char  r_full_list_id[] 
)

The "full" list-ID is an internal name used for storing and identifying a list. It is built like this: "{uiListType.idname}_{list_id}", whereby "list_id" is an optional parameter passed to UILayout.template_list(). If it is not set, the full list-ID is just "{uiListType.idname}_".

Note that whenever the Python API refers to the list-ID, it's the short, "non-full" one it passed to UILayout.template_list(). C code can query that through WM_uilisttype_list_id_get().

◆ WM_userdef_event_map()

int WM_userdef_event_map ( int  kmitype)

Event map that takes preferences into account.

Definition at line 420 of file wm_event_query.c.

References USER_WHEELZOOMDIR, WHEELDOWNMOUSE, WHEELINMOUSE, WHEELOUTMOUSE, and WHEELUPMOUSE.

Referenced by wm_eventmatch(), and WM_keymap_item_compare().

◆ WM_userdef_event_type_from_keymap_type()

int WM_userdef_event_type_from_keymap_type ( int  kmitype)

◆ WM_window_cursor_keymap_status_get()

const char* WM_window_cursor_keymap_status_get ( const struct wmWindow win,
int  button_index,
int  type_index 
)

◆ WM_window_cursor_keymap_status_refresh()

void WM_window_cursor_keymap_status_refresh ( struct bContext C,
struct wmWindow win 
)

◆ WM_window_ensure_active_view_layer()

void WM_window_ensure_active_view_layer ( struct wmWindow win)

◆ WM_window_find_under_cursor()

wmWindow* WM_window_find_under_cursor ( wmWindow win,
const int  mval[2],
int  r_mval[2] 
)

◆ WM_window_get_active_layout()

struct WorkSpaceLayout* WM_window_get_active_layout ( const struct wmWindow win)

◆ WM_window_get_active_scene()

struct Scene* WM_window_get_active_scene ( const struct wmWindow win)

◆ WM_window_get_active_screen()

struct bScreen* WM_window_get_active_screen ( const struct wmWindow win)

Get the active screen of the active workspace in win.

◆ WM_window_get_active_view_layer()

struct ViewLayer* WM_window_get_active_view_layer ( const struct wmWindow win)

◆ WM_window_get_active_workspace()

struct WorkSpace* WM_window_get_active_workspace ( const struct wmWindow win)

◆ WM_window_is_fullscreen()

bool WM_window_is_fullscreen ( const struct wmWindow win)

◆ WM_window_is_maximized()

bool WM_window_is_maximized ( const struct wmWindow win)

◆ WM_window_is_temp_screen()

bool WM_window_is_temp_screen ( const struct wmWindow win)

◆ WM_window_modal_keymap_status_draw()

bool WM_window_modal_keymap_status_draw ( struct bContext C,
struct wmWindow win,
struct uiLayout layout 
)

◆ WM_window_open()

struct wmWindow* WM_window_open ( struct bContext C,
const char *  title,
int  x,
int  y,
int  sizex,
int  sizey,
int  space_type,
bool  toplevel,
bool  dialog,
bool  temp,
eWindowAlignment  alignment 
)
Parameters
space_typeSPACE_VIEW3D, SPACE_INFO, ... (eSpace_Type)
toplevelNot a child owned by other windows. A peer of main window.
dialogwhether this should be made as a dialog-style window
tempwhether this is considered a short-lived window
alignmenthow this window is positioned relative to its parent
Returns
the window or NULL in case of failure.

Definition at line 721 of file wm_window.c.

References blender::compositor::area(), bScreen::areabase, BKE_workspace_active_set(), BKE_workspace_layout_screen_get(), BLI_listbase_is_single(), BLI_rcti_size_x(), BLI_rcti_size_y(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), ED_area_newspace(), ED_screen_change(), ED_screen_refresh(), ED_screen_scene_change(), ED_workspace_layout_add(), ListBase::first, GHOST_GetNativePixelSize(), GHOST_SetTitle(), wmWindow::ghostwin, LISTBASE_FOREACH, ViewLayer::name, NULL, wmWindow::posx, wmWindow::posy, scene, wmWindow::sizex, wmWindow::sizey, SPACE_EMPTY, wmWindow::stereo3d_format, STRNCPY, bScreen::temp, wmWindow::view_layer_name, WIN_ALIGN_LOCATION_CENTER, WIN_ALIGN_PARENT_CENTER, wmWindowManager::windows, WM_check(), wm_window_check_size(), wm_window_close(), WM_window_get_active_scene(), WM_window_get_active_screen(), WM_window_get_active_workspace(), wm_window_ghostwindow_ensure(), wm_window_new(), wm_window_raise(), WM_window_set_active_layout(), wm_window_set_size(), wm_window_update_size_position(), wmWindow::workspace_hook, x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.

Referenced by area_dupli_invoke(), drivers_editor_show_exec(), ED_screen_temp_space_open(), info_log_show_exec(), render_view_open(), userpref_show_exec(), and wm_window_new_exec().

◆ WM_window_pixel_sample_read()

void WM_window_pixel_sample_read ( const wmWindowManager wm,
const wmWindow win,
const int  pos[2],
float  r_col[3] 
)

◆ WM_window_pixels_read()

uint* WM_window_pixels_read ( struct wmWindowManager wm,
struct wmWindow win,
int  r_size[2] 
)

◆ WM_window_pixels_x()

int WM_window_pixels_x ( const struct wmWindow win)

Support for native pixel size

Note
macOS retina opens window in size X, but it has up to 2 x more pixels.

◆ WM_window_pixels_y()

int WM_window_pixels_y ( const struct wmWindow win)

◆ WM_window_rect_calc()

void WM_window_rect_calc ( const struct wmWindow win,
struct rcti r_rect 
)

Get boundaries usable by all window contents, including global areas.

◆ WM_window_screen_rect_calc()

void WM_window_screen_rect_calc ( const struct wmWindow win,
struct rcti r_rect 
)

Get boundaries usable by screen-layouts, excluding global areas.

Note
Depends on #U.dpi_fac. Should that be outdated, call WM_window_set_dpi first.

◆ WM_window_set_active_layout()

void WM_window_set_active_layout ( struct wmWindow win,
struct WorkSpace workspace,
struct WorkSpaceLayout layout 
)

◆ WM_window_set_active_scene()

void WM_window_set_active_scene ( struct Main bmain,
struct bContext C,
struct wmWindow win,
struct Scene scene_new 
)

◆ WM_window_set_active_screen()

void WM_window_set_active_screen ( struct wmWindow win,
struct WorkSpace workspace,
struct bScreen screen 
)

◆ WM_window_set_active_view_layer()

void WM_window_set_active_view_layer ( struct wmWindow win,
struct ViewLayer view_layer 
)

◆ WM_window_set_active_workspace()

void WM_window_set_active_workspace ( struct bContext C,
struct wmWindow win,
struct WorkSpace workspace 
)

◆ WM_window_set_dpi()

void WM_window_set_dpi ( const wmWindow win)

◆ WM_window_status_area_find()

struct ScrArea* WM_window_status_area_find ( struct wmWindow win,
struct bScreen screen 
)

Similar to BKE_screen_area_map_find_area_xy and related functions, use here since the area is stored in the window manager.

Definition at line 5796 of file wm_event_system.cc.

References blender::compositor::area(), ScrAreaMap::areabase, wmWindow::global_areas, LISTBASE_FOREACH, SCREENFULL, SPACE_STATUSBAR, and bScreen::state.

Referenced by WM_window_cursor_keymap_status_refresh(), and WM_window_status_area_tag_redraw().

◆ WM_window_status_area_tag_redraw()

void WM_window_status_area_tag_redraw ( struct wmWindow win)

◆ WM_windows_scene_data_sync()

void WM_windows_scene_data_sync ( const ListBase win_lb,
struct Scene scene 
)

Some editor data may need to be synced with scene data (3D View camera and layers). This function ensures data is synced for editors in visible work-spaces and their visible layouts.

Definition at line 2142 of file wm_window.c.

References ED_workspace_scene_data_sync(), LISTBASE_FOREACH, scene, and WM_window_get_active_scene().

Referenced by tree_element_camera_activate().

◆ WM_windows_scene_get_from_screen()

struct Scene* WM_windows_scene_get_from_screen ( const struct wmWindowManager wm,
const struct bScreen screen 
)

◆ WM_windows_view_layer_get_from_screen()

struct ViewLayer* WM_windows_view_layer_get_from_screen ( const struct wmWindowManager wm,
const struct bScreen screen 
)

◆ WM_windows_workspace_get_from_screen()

struct WorkSpace* WM_windows_workspace_get_from_screen ( const wmWindowManager wm,
const struct bScreen screen 
)

◆ wmGetProjectionMatrix()

void wmGetProjectionMatrix ( float  mat[4][4],
const struct rcti winrct 
)

◆ wmOrtho2()

void wmOrtho2 ( float  x1,
float  x2,
float  y1,
float  y2 
)

◆ wmOrtho2_pixelspace()

void wmOrtho2_pixelspace ( float  x,
float  y 
)

◆ wmOrtho2_region_pixelspace()

void wmOrtho2_region_pixelspace ( const struct ARegion region)

Default pixel alignment for regions.

◆ wmPartialViewport()

void wmPartialViewport ( rcti drawrct,
const rcti winrct,
const rcti partialrct 
)

◆ wmViewport()

void wmViewport ( const struct rcti winrct)

◆ wmWindowViewport()

void wmWindowViewport ( struct wmWindow win)

◆ write_crash_blend()

bool write_crash_blend ( void  )

Debugging only, convenience function to write on crash. Convenient to save a blend file from a debugger.

Definition at line 1710 of file wm_files.c.

References BKE_main_blendfile_path_from_global(), BLI_path_extension_replace(), BLI_strncpy(), BLO_write_file(), FILE_MAX, G, G_MAIN, and NULL.