Blender V5.0
#include <cstdlib>
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_string_utf8_symbols.h"
#include "BLT_translation.hh"
#include "BKE_screen.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "rna_internal.hh"
#include "WM_api.hh"
#include "WM_keymap.hh"
#include "WM_types.hh"

Go to the source code of this file.

Functions

static void rna_def_operator_options_runtime (BlenderRNA *brna)
static void rna_def_operator_common (StructRNA *srna)
static void rna_def_operator (BlenderRNA *brna)
static void rna_def_macro_operator (BlenderRNA *brna)
static void rna_def_operator_type_macro (BlenderRNA *brna)
static void rna_def_operator_utils (BlenderRNA *brna)
static void rna_def_operator_filelist_element (BlenderRNA *brna)
static void rna_def_event_ndof_motion (BlenderRNA *brna)
static void rna_def_event (BlenderRNA *brna)
static void rna_def_timer (BlenderRNA *brna)
static void rna_def_popup_menu_wrapper (BlenderRNA *brna, const char *rna_type, const char *c_type, const char *layout_get_fn)
static void rna_def_popupmenu (BlenderRNA *brna)
static void rna_def_popovermenu (BlenderRNA *brna)
static void rna_def_piemenu (BlenderRNA *brna)
static void rna_def_window_stereo3d (BlenderRNA *brna)
static void rna_def_window (BlenderRNA *brna)
static void rna_def_wm_keyconfigs (BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_windowmanager (BlenderRNA *brna)
static void rna_def_keymap_items (BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_wm_keymaps (BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_keyconfig_prefs (BlenderRNA *brna)
static void rna_def_keyconfig (BlenderRNA *brna)
void RNA_def_wm (BlenderRNA *brna)

Variables

const EnumPropertyItem rna_enum_wm_job_type_items []
const EnumPropertyItem rna_enum_event_type_items []
const EnumPropertyItem rna_enum_event_value_items []
const EnumPropertyItem rna_enum_event_direction_items []
static const EnumPropertyItem rna_enum_ndof_motion_progress_items []
const EnumPropertyItem rna_enum_keymap_propvalue_items []
const EnumPropertyItem rna_enum_event_type_mask_items []
const EnumPropertyItem rna_enum_operator_type_flag_items []
const EnumPropertyItem rna_enum_operator_return_items []
const EnumPropertyItem rna_enum_operator_property_tag_items []
const EnumPropertyItem rna_enum_wm_report_items []

Function Documentation

◆ rna_def_event()

◆ rna_def_event_ndof_motion()

◆ rna_def_keyconfig()

void rna_def_keyconfig ( BlenderRNA * brna)
static

Definition at line 2984 of file rna_wm.cc.

References BLT_I18NCONTEXT_ID_WINDOWMANAGER, BLT_I18NCONTEXT_UI_EVENTS, KEYCONF_USER, KEYMAP_CHILDREN_EXPANDED, KEYMAP_EXPANDED, KEYMAP_MODAL, KEYMAP_USER_MODIFIED, KM_ANY, KM_MOD_HELD, KMI_EXPANDED, KMI_INACTIVE, KMI_REPEAT_IGNORE, KMI_TYPE_KEYBOARD, KMI_TYPE_MOUSE, KMI_TYPE_NDOF, KMI_TYPE_TEXTINPUT, KMI_TYPE_TIMER, KMI_USER_MODIFIED, PROP_BOOLEAN, PROP_COLLECTION, PROP_EDITABLE, PROP_ENUM, PROP_INT, PROP_NO_DEG_UPDATE, PROP_NONE, PROP_POINTER, PROP_STRING, PROP_STRING_SEARCH_SORT, PROP_STRING_SEARCH_SUGGESTION, RNA_api_keyconfig(), RNA_api_keymap(), RNA_api_keymapitem(), rna_def_keymap_items(), RNA_def_property(), RNA_def_property_boolean_funcs(), RNA_def_property_boolean_negative_sdna(), RNA_def_property_boolean_sdna(), RNA_def_property_clear_flag(), RNA_def_property_collection_funcs(), RNA_def_property_collection_sdna(), RNA_def_property_enum_funcs(), RNA_def_property_enum_items(), RNA_def_property_enum_sdna(), RNA_def_property_flag(), RNA_def_property_int_sdna(), RNA_def_property_pointer_funcs(), RNA_def_property_range(), RNA_def_property_string_funcs(), RNA_def_property_string_sdna(), RNA_def_property_string_search_func(), RNA_def_property_struct_type(), RNA_def_property_translation_context(), RNA_def_property_ui_icon(), RNA_def_property_ui_text(), RNA_def_property_update(), RNA_def_struct(), RNA_def_struct_name_property(), RNA_def_struct_sdna(), RNA_def_struct_ui_text(), rna_def_wm_keymaps(), rna_enum_event_direction_items, rna_enum_event_type_items, rna_enum_event_value_items, rna_enum_keymap_propvalue_items, rna_enum_region_type_items, and rna_enum_space_type_items.

Referenced by RNA_def_wm().

◆ rna_def_keyconfig_prefs()

◆ rna_def_keymap_items()

void rna_def_keymap_items ( BlenderRNA * brna,
PropertyRNA * cprop )
static

◆ rna_def_macro_operator()

◆ rna_def_operator()

◆ rna_def_operator_common()

◆ rna_def_operator_filelist_element()

void rna_def_operator_filelist_element ( BlenderRNA * brna)
static

◆ rna_def_operator_options_runtime()

void rna_def_operator_options_runtime ( BlenderRNA * brna)
static

◆ rna_def_operator_type_macro()

◆ rna_def_operator_utils()

◆ rna_def_piemenu()

void rna_def_piemenu ( BlenderRNA * brna)
static

Definition at line 2679 of file rna_wm.cc.

References rna_def_popup_menu_wrapper().

Referenced by RNA_def_wm().

◆ rna_def_popovermenu()

void rna_def_popovermenu ( BlenderRNA * brna)
static

Definition at line 2674 of file rna_wm.cc.

References rna_def_popup_menu_wrapper().

Referenced by RNA_def_wm().

◆ rna_def_popup_menu_wrapper()

void rna_def_popup_menu_wrapper ( BlenderRNA * brna,
const char * rna_type,
const char * c_type,
const char * layout_get_fn )
static

◆ rna_def_popupmenu()

void rna_def_popupmenu ( BlenderRNA * brna)
static

Definition at line 2669 of file rna_wm.cc.

References rna_def_popup_menu_wrapper().

Referenced by RNA_def_wm().

◆ rna_def_timer()

◆ rna_def_window()

◆ rna_def_window_stereo3d()

◆ rna_def_windowmanager()

◆ RNA_def_wm()

◆ rna_def_wm_keyconfigs()

◆ rna_def_wm_keymaps()

void rna_def_wm_keymaps ( BlenderRNA * brna,
PropertyRNA * cprop )
static

Variable Documentation

◆ rna_enum_event_direction_items

const EnumPropertyItem rna_enum_event_direction_items[]
Initial value:
= {
{KM_ANY, "ANY", 0, "Any", ""},
{KM_DIRECTION_N, "NORTH", 0, "North", ""},
{KM_DIRECTION_NE, "NORTH_EAST", 0, "North-East", ""},
{KM_DIRECTION_E, "EAST", 0, "East", ""},
{KM_DIRECTION_SE, "SOUTH_EAST", 0, "South-East", ""},
{KM_DIRECTION_S, "SOUTH", 0, "South", ""},
{KM_DIRECTION_SW, "SOUTH_WEST", 0, "South-West", ""},
{KM_DIRECTION_W, "WEST", 0, "West", ""},
{KM_DIRECTION_NW, "NORTH_WEST", 0, "North-West", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ KM_ANY
Definition WM_types.hh:309
@ KM_DIRECTION_NW
Definition WM_types.hh:341
@ KM_DIRECTION_N
Definition WM_types.hh:334
@ KM_DIRECTION_SW
Definition WM_types.hh:339
@ KM_DIRECTION_NE
Definition WM_types.hh:335
@ KM_DIRECTION_E
Definition WM_types.hh:336
@ KM_DIRECTION_W
Definition WM_types.hh:340
@ KM_DIRECTION_SE
Definition WM_types.hh:337
@ KM_DIRECTION_S
Definition WM_types.hh:338

Definition at line 489 of file rna_wm.cc.

Referenced by RNA_api_keymapitems(), rna_def_event(), and rna_def_keyconfig().

◆ rna_enum_event_type_items

◆ rna_enum_event_type_mask_items

const EnumPropertyItem rna_enum_event_type_mask_items[]
Initial value:
= {
{EVT_TYPE_MASK_KEYBOARD_MODIFIER, "KEYBOARD_MODIFIER", 0, "Keyboard Modifier", ""},
{EVT_TYPE_MASK_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""},
{EVT_TYPE_MASK_MOUSE_WHEEL, "MOUSE_WHEEL", 0, "Mouse Wheel", ""},
{EVT_TYPE_MASK_MOUSE_GESTURE, "MOUSE_GESTURE", 0, "Mouse Gesture", ""},
{EVT_TYPE_MASK_MOUSE_BUTTON, "MOUSE_BUTTON", 0, "Mouse Button", ""},
{EVT_TYPE_MASK_MOUSE, "MOUSE", 0, "Mouse", ""},
{EVT_TYPE_MASK_NDOF, "NDOF", 0, "NDOF", ""},
{EVT_TYPE_MASK_ACTIONZONE, "ACTIONZONE", 0, "Action Zone", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ EVT_TYPE_MASK_ACTIONZONE
@ EVT_TYPE_MASK_KEYBOARD_MODIFIER
@ EVT_TYPE_MASK_NDOF
@ EVT_TYPE_MASK_MOUSE_WHEEL
@ EVT_TYPE_MASK_MOUSE_GESTURE
@ EVT_TYPE_MASK_MOUSE_BUTTON
@ EVT_TYPE_MASK_MOUSE
@ EVT_TYPE_MASK_KEYBOARD

Definition at line 518 of file rna_wm.cc.

Referenced by RNA_api_keyconfigs(), and RNA_api_keymapitems().

◆ rna_enum_event_value_items

const EnumPropertyItem rna_enum_event_value_items[]
Initial value:
= {
{KM_ANY, "ANY", 0, "Any", ""},
{KM_PRESS, "PRESS", 0, "Press", ""},
{KM_RELEASE, "RELEASE", 0, "Release", ""},
{KM_CLICK, "CLICK", 0, "Click", ""},
{KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
{KM_PRESS_DRAG, "CLICK_DRAG", 0, "Drag", ""},
{KM_NOTHING, "NOTHING", 0, "Nothing", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ KM_NOTHING
Definition WM_types.hh:310
@ KM_PRESS
Definition WM_types.hh:311
@ KM_DBL_CLICK
Definition WM_types.hh:314
@ KM_PRESS_DRAG
Definition WM_types.hh:319
@ KM_RELEASE
Definition WM_types.hh:312
@ KM_CLICK
Definition WM_types.hh:313
Note
This contains overlapping items from:
  • #rna_enum_event_value_keymouse_items
  • #rna_enum_event_value_tweak_items

This is needed for km.keymap_items.new value argument, to accept values from different types.

Definition at line 477 of file rna_wm.cc.

Referenced by event_ids_from_type_and_value(), RNA_api_keymapitems(), RNA_api_window(), rna_def_event(), and rna_def_keyconfig().

◆ rna_enum_keymap_propvalue_items

const EnumPropertyItem rna_enum_keymap_propvalue_items[]
Initial value:
= {
{0, "NONE", 0, "", ""},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 512 of file rna_wm.cc.

Referenced by rna_def_keyconfig().

◆ rna_enum_ndof_motion_progress_items

const EnumPropertyItem rna_enum_ndof_motion_progress_items[]
static
Initial value:
= {
{P_STARTING, "STARTING", 0, "Starting", ""},
{P_IN_PROGRESS, "IN_PROGRESS", 0, "In progress", ""},
{P_FINISHING, "FINISHING", 0, "Finishing", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ P_IN_PROGRESS
Definition WM_types.hh:853
@ P_STARTING
Definition WM_types.hh:852
@ P_FINISHING
Definition WM_types.hh:854
Note
Only exposing the enum values that are actually sent for NDOF motion.

Definition at line 505 of file rna_wm.cc.

Referenced by rna_def_event_ndof_motion().

◆ rna_enum_operator_property_tag_items

const EnumPropertyItem rna_enum_operator_property_tag_items[]
Initial value:
= {
"ADVANCED",
0,
"Advanced",
"The property is advanced so UI is suggested to hide it"},
{0, nullptr, 0, nullptr, nullptr},
}
#define OP_PROP_TAG_ADVANCED
Definition WM_types.hh:266

Definition at line 606 of file rna_wm.cc.

Referenced by rna_def_operator(), and wm_operatortype_append__begin().

◆ rna_enum_operator_return_items

const EnumPropertyItem rna_enum_operator_return_items[]
Initial value:
= {
"RUNNING_MODAL",
0,
"Running Modal",
"Keep the operator running with blender"},
"CANCELLED",
0,
"Cancelled",
"The operator exited without doing anything, so no undo entry should be pushed"},
"FINISHED",
0,
"Finished",
"The operator exited after completing its action"},
{OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"},
{OPERATOR_INTERFACE, "INTERFACE", 0, "Interface", "Handled but not executed (popup menus)"},
{0, nullptr, 0, nullptr, nullptr},
}
@ OPERATOR_CANCELLED
@ OPERATOR_INTERFACE
@ OPERATOR_FINISHED
@ OPERATOR_RUNNING_MODAL
@ OPERATOR_PASS_THROUGH

Definition at line 584 of file rna_wm.cc.

Referenced by pyop_call(), RNA_api_operator(), rna_def_gizmo(), and rna_generic_op_invoke().

◆ rna_enum_operator_type_flag_items

const EnumPropertyItem rna_enum_operator_type_flag_items[]

Definition at line 539 of file rna_wm.cc.

Referenced by pyop_get_bl_options(), and rna_def_operator_common().

◆ rna_enum_wm_job_type_items

const EnumPropertyItem rna_enum_wm_job_type_items[]
Initial value:
= {
{WM_JOB_TYPE_RENDER, "RENDER", 0, "Regular rendering", ""},
{WM_JOB_TYPE_RENDER_PREVIEW, "RENDER_PREVIEW", 0, "Rendering previews", ""},
{WM_JOB_TYPE_OBJECT_BAKE, "OBJECT_BAKE", 0, "Object Baking", ""},
{WM_JOB_TYPE_COMPOSITE, "COMPOSITE", 0, "Compositing", ""},
{WM_JOB_TYPE_SHADER_COMPILATION, "SHADER_COMPILATION", 0, "Shader compilation", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ WM_JOB_TYPE_COMPOSITE
Definition WM_api.hh:1777
@ WM_JOB_TYPE_OBJECT_BAKE
Definition WM_api.hh:1785
@ WM_JOB_TYPE_RENDER_PREVIEW
Definition WM_api.hh:1779
@ WM_JOB_TYPE_RENDER
Definition WM_api.hh:1778
@ WM_JOB_TYPE_SHADER_COMPILATION
Definition WM_api.hh:1800

Job types for use in the bpy.app.is_job_running(job_type) call.

This is a subset of the WM_JOB_TYPE_... anonymous enum defined in WM_api.hh. It is intentionally kept as a subset, such that by default how jobs are handled is kept as an "internal implementation detail" of Blender, rather than a public, reliable part of the API.

This array can be expanded on a case-by-case basis, when there is a clear and testable use case.

Definition at line 206 of file rna_wm.cc.

Referenced by bpy_app_is_job_running().

◆ rna_enum_wm_report_items

const EnumPropertyItem rna_enum_wm_report_items[]
Initial value:
= {
{RPT_DEBUG, "DEBUG", 0, "Debug", ""},
{RPT_INFO, "INFO", 0, "Info", ""},
{RPT_OPERATOR, "OPERATOR", 0, "Operator", ""},
{RPT_PROPERTY, "PROPERTY", 0, "Property", ""},
{RPT_WARNING, "WARNING", 0, "Warning", ""},
{RPT_ERROR, "ERROR", 0, "Error", ""},
{RPT_ERROR_INVALID_INPUT, "ERROR_INVALID_INPUT", 0, "Invalid Input", ""},
{RPT_ERROR_INVALID_CONTEXT, "ERROR_INVALID_CONTEXT", 0, "Invalid Context", ""},
{RPT_ERROR_OUT_OF_MEMORY, "ERROR_OUT_OF_MEMORY", 0, "Out of Memory", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ RPT_ERROR_OUT_OF_MEMORY
Definition BKE_report.hh:42
@ RPT_INFO
Definition BKE_report.hh:35
@ RPT_OPERATOR
Definition BKE_report.hh:36
@ RPT_ERROR_INVALID_INPUT
Definition BKE_report.hh:40
@ RPT_DEBUG
Definition BKE_report.hh:34
@ RPT_ERROR
Definition BKE_report.hh:39
@ RPT_ERROR_INVALID_CONTEXT
Definition BKE_report.hh:41
@ RPT_WARNING
Definition BKE_report.hh:38
@ RPT_PROPERTY
Definition BKE_report.hh:37

Definition at line 616 of file rna_wm.cc.

Referenced by RNA_api_macro(), RNA_api_operator(), and rna_def_render_engine().