Blender V4.3
#include <cstdlib>
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_string_utf8_symbols.h"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "BKE_keyconfig.h"
#include "BKE_screen.hh"
#include "BKE_workspace.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "rna_internal.hh"
#include "WM_api.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 (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 []
 
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_keyconfig()

static void rna_def_keyconfig ( BlenderRNA * brna)
static

Definition at line 2773 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()

static 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()

static void rna_def_operator_filelist_element ( BlenderRNA * brna)
static

◆ rna_def_operator_options_runtime()

static void rna_def_operator_options_runtime ( BlenderRNA * brna)
static

◆ rna_def_operator_type_macro()

◆ rna_def_operator_utils()

◆ rna_def_piemenu()

static void rna_def_piemenu ( BlenderRNA * brna)
static

Definition at line 2497 of file rna_wm.cc.

References rna_def_popup_menu_wrapper().

Referenced by RNA_def_wm().

◆ rna_def_popovermenu()

static void rna_def_popovermenu ( BlenderRNA * brna)
static

Definition at line 2492 of file rna_wm.cc.

References rna_def_popup_menu_wrapper().

Referenced by RNA_def_wm().

◆ rna_def_popup_menu_wrapper()

static 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()

static void rna_def_popupmenu ( BlenderRNA * brna)
static

Definition at line 2487 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()

static 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:282
@ KM_DIRECTION_NW
Definition WM_types.hh:308
@ KM_DIRECTION_N
Definition WM_types.hh:301
@ KM_DIRECTION_SW
Definition WM_types.hh:306
@ KM_DIRECTION_NE
Definition WM_types.hh:302
@ KM_DIRECTION_E
Definition WM_types.hh:303
@ KM_DIRECTION_W
Definition WM_types.hh:307
@ KM_DIRECTION_SE
Definition WM_types.hh:304
@ KM_DIRECTION_S
Definition WM_types.hh:305

Definition at line 477 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 496 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_CLICK_DRAG, "CLICK_DRAG", 0, "Click Drag", ""},
{KM_NOTHING, "NOTHING", 0, "Nothing", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ KM_NOTHING
Definition WM_types.hh:283
@ KM_PRESS
Definition WM_types.hh:284
@ KM_CLICK_DRAG
Definition WM_types.hh:292
@ KM_DBL_CLICK
Definition WM_types.hh:287
@ KM_RELEASE
Definition WM_types.hh:285
@ KM_CLICK
Definition WM_types.hh:286
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 465 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 490 of file rna_wm.cc.

Referenced by rna_def_keyconfig().

◆ 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:243

Definition at line 584 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_RUNNING_MODAL
@ OPERATOR_PASS_THROUGH

Definition at line 562 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 517 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:1577
@ WM_JOB_TYPE_OBJECT_BAKE
Definition WM_api.hh:1585
@ WM_JOB_TYPE_RENDER_PREVIEW
Definition WM_api.hh:1579
@ WM_JOB_TYPE_RENDER
Definition WM_api.hh:1578
@ WM_JOB_TYPE_SHADER_COMPILATION
Definition WM_api.hh:1600

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 197 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
@ RPT_ERROR_INVALID_INPUT
@ RPT_ERROR_INVALID_CONTEXT

Definition at line 594 of file rna_wm.cc.

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