|
Blender V4.3
|
#include <optional>#include <string>#include "../blenlib/BLI_function_ref.hh"#include "../blenlib/BLI_sys_types.h"#include "../blenlib/BLI_utildefines.h"#include "../blenlib/BLI_vector.hh"Go to the source code of this file.
Classes | |
| struct | PointerRNA |
| struct | PropertyPointerRNA |
| struct | PathResolvedRNA |
| struct | ListBaseIterator |
| struct | ArrayIterator |
| struct | CountIterator |
| struct | CollectionPropertyIterator |
| struct | CollectionVector |
| struct | RawArray |
| struct | EnumPropertyItem |
| struct | StringPropertySearchVisitParams |
| struct | ParameterList |
| struct | ParameterIterator |
| struct | ParameterDynAlloc |
| struct | ExtensionRNA |
| struct | PrimitiveStringRNA |
| struct | PrimitiveIntRNA |
| struct | PrimitiveFloatRNA |
| struct | PrimitiveBooleanRNA |
Macros | |
| #define | RNA_SUBTYPE_UNIT(subtype) ((subtype) & 0x00FF0000) |
| #define | RNA_SUBTYPE_VALUE(subtype) ((subtype) & ~0x00FF0000) |
| #define | RNA_SUBTYPE_UNIT_VALUE(subtype) ((subtype) >> 16) |
| #define | RNA_ENUM_BITFLAG_SIZE 32 |
| #define | RNA_TRANSLATION_PREC_DEFAULT 5 |
| #define | RNA_STACK_ARRAY 32 |
| #define | RNA_ENUM_ITEM_HEADING(name, description) |
| #define | RNA_ENUM_ITEM_SEPR |
| #define | RNA_ENUM_ITEM_SEPR_COLUMN RNA_ENUM_ITEM_HEADING("", NULL) |
Functions | |
| ENUM_OPERATORS (PropertyOverrideFlag, PROPOVERRIDE_NO_PROP_NAME) | |
Variables | |
| constexpr PointerRNA | PointerRNA_NULL {nullptr, nullptr, nullptr} |
| #define RNA_ENUM_BITFLAG_SIZE 32 |
Definition at line 125 of file RNA_types.hh.
Referenced by enum_items_from_py(), pyrna_enum_bitfield_as_set(), and pyrna_enum_to_py().
| #define RNA_ENUM_ITEM_HEADING | ( | name, | |
| description ) |
Heading for RNA enum items (shown in the UI).
The description is currently only shown in the Python documentation. By convention the value should be a non-empty string or NULL when there is no description (never an empty string).
Definition at line 522 of file RNA_types.hh.
| #define RNA_ENUM_ITEM_SEPR |
Separator for RNA enum items (shown in the UI).
Definition at line 528 of file RNA_types.hh.
Referenced by blender::ed::greasepencil::GREASE_PENCIL_OT_caps_set(), blender::ed::greasepencil::GREASE_PENCIL_OT_stroke_reorder(), blender::ed::object::OBJECT_OT_make_links_data(), rna_def_brush(), rna_def_color_mix(), rna_def_constraint_action(), rna_def_constraint_transform_like(), rna_def_drivertarget(), and RNA_enum_item_add_separator().
| #define RNA_ENUM_ITEM_SEPR_COLUMN RNA_ENUM_ITEM_HEADING("", NULL) |
Separator for RNA enum that begins a new column in menus (shown in the UI).
Definition at line 534 of file RNA_types.hh.
| #define RNA_STACK_ARRAY 32 |
Definition at line 129 of file RNA_types.hh.
| #define RNA_SUBTYPE_UNIT | ( | subtype | ) | ((subtype) & 0x00FF0000) |
Definition at line 121 of file RNA_types.hh.
Referenced by ANIM_unit_mapping_get_factor(), graph_panel_key_properties(), rna_property_subtype_unit(), rna_property_subtypename(), RNA_property_unit(), and UI_but_unit_type_get().
| #define RNA_SUBTYPE_UNIT_VALUE | ( | subtype | ) | ((subtype) >> 16) |
Definition at line 123 of file RNA_types.hh.
Referenced by radial_control_invoke(), ui_but_convert_to_unit_alt_name(), UI_but_unit_type_set(), ui_get_but_scale_unit(), ui_get_but_step_unit(), ui_get_but_string_unit(), ui_multibut_states_create(), ui_number_from_string_units_with_but(), and ui_numedit_apply_snapf().
| #define RNA_SUBTYPE_VALUE | ( | subtype | ) | ((subtype) & ~0x00FF0000) |
Definition at line 122 of file RNA_types.hh.
| #define RNA_TRANSLATION_PREC_DEFAULT 5 |
Definition at line 127 of file RNA_types.hh.
Referenced by rna_def_beztriple(), rna_def_bone(), rna_def_bone_common(), rna_def_bone_curved_common(), rna_def_bpoint(), rna_def_camera_background_image(), RNA_def_collections(), rna_def_constraint_stretch_to(), rna_def_curve(), rna_def_edit_bone(), RNA_def_float_translation(), rna_def_grease_pencil_layer(), rna_def_metaball(), rna_def_modifier_array(), rna_def_modifier_grease_pencil_array(), rna_def_modifier_grease_pencil_offset(), rna_def_mtex(), rna_def_object(), rna_def_pose_channel(), rna_def_softbody(), rna_def_space_view3d(), rna_def_texmapping(), rna_def_trackingMarker(), rna_def_trackingPlaneMarker(), rna_def_trackingTrack(), rna_def_view3d_cursor(), rna_def_xr_session_settings(), and v3d_editvertex_buts().
| using BooleanArrayPropertyGetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, bool *values) |
Definition at line 539 of file RNA_types.hh.
Definition at line 540 of file RNA_types.hh.
| using BooleanPropertyGetFunc = bool (*)(PointerRNA *ptr, PropertyRNA *prop) |
Definition at line 537 of file RNA_types.hh.
| using BooleanPropertySetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, bool value) |
Definition at line 538 of file RNA_types.hh.
| using CallFunc = void (*)(bContext *C, ReportList *reports, PointerRNA *ptr, ParameterList *parms) |
Definition at line 711 of file RNA_types.hh.
| using EnumPropertyGetFunc = int (*)(PointerRNA *ptr, PropertyRNA *prop) |
Definition at line 605 of file RNA_types.hh.
| using EnumPropertyItemFunc |
Definition at line 608 of file RNA_types.hh.
| using EnumPropertySetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, int value) |
Definition at line 606 of file RNA_types.hh.
| using FloatArrayPropertyGetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, float *values) |
Definition at line 551 of file RNA_types.hh.
Definition at line 552 of file RNA_types.hh.
| using FloatPropertyGetFunc = float (*)(PointerRNA *ptr, PropertyRNA *prop) |
Definition at line 549 of file RNA_types.hh.
| using FloatPropertyRangeFunc |
Definition at line 555 of file RNA_types.hh.
| using FloatPropertySetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, float value) |
Definition at line 550 of file RNA_types.hh.
| using IntArrayPropertyGetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, int *values) |
Definition at line 545 of file RNA_types.hh.
| using IntArrayPropertySetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, const int *values) |
Definition at line 546 of file RNA_types.hh.
| using IntPropertyGetFunc = int (*)(PointerRNA *ptr, PropertyRNA *prop) |
Definition at line 543 of file RNA_types.hh.
| using IntPropertyRangeFunc |
Definition at line 547 of file RNA_types.hh.
| using IntPropertySetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, int value) |
Definition at line 544 of file RNA_types.hh.
| using IteratorSkipFunc = bool (*)(CollectionPropertyIterator *iter, void *data) |
Definition at line 413 of file RNA_types.hh.
| using StringPropertyGetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, char *value) |
Definition at line 557 of file RNA_types.hh.
| using StringPropertyLengthFunc = int (*)(PointerRNA *ptr, PropertyRNA *prop) |
Definition at line 558 of file RNA_types.hh.
| using StringPropertySearchFunc |
| C | context, may be NULL (in this case all available items should be shown). |
| ptr | RNA pointer. |
| prop | RNA property. This must have its StringPropertyRNA.search callback set, to check this use RNA_property_string_search_flag(prop) & PROP_STRING_SEARCH_SUPPORTED. |
| edit_text | Optionally use the string being edited by the user as a basis for the search results (auto-complete Python attributes for e.g.). |
| visit_fn | This function is called with every search candidate and is typically responsible for storing the search results. |
Definition at line 598 of file RNA_types.hh.
| using StringPropertySetFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, const char *value) |
Definition at line 559 of file RNA_types.hh.
| using StructCallbackFunc |
Definition at line 747 of file RNA_types.hh.
| using StructFreeFunc = void (*)(void *data) |
Definition at line 751 of file RNA_types.hh.
| using StructInstanceFunc = void **(*)(PointerRNA *ptr) |
Definition at line 761 of file RNA_types.hh.
| using StructRegisterFunc |
Definition at line 752 of file RNA_types.hh.
| using StructUnregisterFunc = bool (*)(Main *bmain, StructRNA *type) |
Return true when type was successfully unregistered & freed.
Definition at line 760 of file RNA_types.hh.
| using StructValidateFunc = int (*)(PointerRNA *ptr, void *data, bool *have_function) |
Definition at line 746 of file RNA_types.hh.
| Enumerator | |
|---|---|
| PROP_STRING_SEARCH_SUPPORTED | Used so the result of RNA_property_string_search_flag can be used to check if search is supported. |
| PROP_STRING_SEARCH_SORT | Items resulting from the search must be sorted. |
| PROP_STRING_SEARCH_SUGGESTION | Allow members besides the ones listed to be entered.
|
Definition at line 570 of file RNA_types.hh.
| enum FunctionFlag |
Options affecting callback signature.
Those add additional parameters at the beginning of the C callback, like that:
rna_my_func([ID *_selfid], [<DNA_STRUCT> *self|StructRNA *type], [Main *bmain], [bContext *C], [ReportList *reports], <other RNA-defined parameters>);
| Enumerator | |
|---|---|
| FUNC_USE_SELF_ID | Pass ID owning 'self' data (i.e. ptr->owner_id, might be same as self in case data is an ID...). |
| FUNC_NO_SELF | Do not pass the object (DNA struct pointer) from which it is called, used to define static or class functions. |
| FUNC_USE_SELF_TYPE | Pass RNA type, used to define class functions, only valid when FUNC_NO_SELF is set. |
| FUNC_USE_MAIN | |
| FUNC_USE_CONTEXT | |
| FUNC_USE_REPORTS | |
| FUNC_REGISTER | This function is part of the registerable class' interface, and can be implemented/redefined in Python. |
| FUNC_REGISTER_OPTIONAL | Subclasses can choose not to implement this function. |
| FUNC_ALLOW_WRITE | If not set, the Python function implementing this call is not allowed to write into data-blocks. Except for WindowManager and Screen currently, see rna_id_write_error() in |
| FUNC_BUILTIN | UNUSED CURRENTLY? ??? |
| FUNC_EXPORT | UNUSED CURRENTLY. ??? |
| FUNC_RUNTIME | Function has been defined at runtime, not statically in RNA source code. |
| FUNC_FREE_POINTERS | UNUSED CURRENTLY? Function owns its identifier and description strings, and has to free them when deleted. |
Definition at line 662 of file RNA_types.hh.
| enum ParameterFlag |
Function parameters flags.
Definition at line 396 of file RNA_types.hh.
| enum PropertyFlag |
| Enumerator | |
|---|---|
| PROP_EDITABLE | Editable means the property is editable in the user interface, properties are editable by default except for pointers and collections. |
| PROP_LIB_EXCEPTION | This property is editable even if it is lib linked, meaning it will get lost on reload, but it's useful for editing. |
| PROP_ANIMATABLE | Animatable means the property can be driven by some other input, be it animation curves, expressions, .. properties are animatable by default except for pointers and collections. |
| PROP_TEXTEDIT_UPDATE | This flag means when the property's widget is in 'text-edit' mode, it will be updated after every typed char, instead of waiting final validation. Used e.g. for text search-box. It will also cause UI_BUT_VALUE_CLEAR to be set for text buttons. We could add a separate flag for search/filter properties, but this works just fine for now. |
| PROP_ICONS_CONSECUTIVE | |
| PROP_ICONS_REVERSE | |
| PROP_HIDDEN | Hide in the user interface. That is, from auto-generated operator property UIs (like the redo panel) and the outliner "Data API" display mode. Does not hide it in the keymap UI. Also don't save in presets, as if PROP_SKIP_PRESET was set. |
| PROP_SKIP_SAVE | Doesn't preserve the last value for repeated operator calls. Also don't save in presets, as if PROP_SKIP_PRESET was set. |
| PROP_PROPORTIONAL | Each value is related proportionally (object scale, image size). |
| PROP_ID_REFCOUNT | |
| PROP_ID_SELF_CHECK | Disallow assigning a variable to itself, eg an object tracking itself only apply this to types that are derived from an ID (). |
| PROP_NEVER_NULL | Use for...
|
| PROP_NEVER_UNLINK | Currently only used for UI, this is similar to PROP_NEVER_NULL except that the value may be NULL at times, used for ObData, where an Empty's will be NULL but setting NULL on a mesh object is not possible. So if it's not NULL, setting NULL can't be done! |
| PROP_PTR_NO_OWNERSHIP | Pointers to data that is not owned by the struct. Typical example: Bone.parent, Bone.child, etc., and nearly all ID pointers. This is crucial information for processes that walk the whole data of an ID e.g. (like library override). Note that all ID pointers are enforced to this by default, this probably will need to be rechecked (see ugly infamous node-trees of material/texture/scene/etc.). |
| PROP_ENUM_FLAG | flag contains multiple enums. NOTE: not to be confused with
|
| PROP_CONTEXT_UPDATE | |
| PROP_CONTEXT_PROPERTY_UPDATE | |
| PROP_REGISTER | |
| PROP_REGISTER_OPTIONAL | |
| PROP_THICK_WRAP | Use for allocated function return values of arrays or strings for any data that should not have a reference kept. It can be used for properties which are dynamically allocated too.
|
| PROP_IDPROPERTY | This is an IDProperty, not a DNA one. |
| PROP_DYNAMIC | For dynamic arrays & return values of type string. |
| PROP_ENUM_NO_CONTEXT | For enum that shouldn't be contextual |
| PROP_ENUM_NO_TRANSLATE | For enums not to be translated (e.g. view-layers' names in nodes). |
| PROP_NO_DEG_UPDATE | Don't do dependency graph tag from a property update callback. Use this for properties which defines interface state, for example, properties which denotes whether modifier panel is collapsed or not. |
| PROP_DEG_SYNC_ONLY | Property needs to ensure evaluated data-blocks are in sync with their original counter-part but the property does not affect evaluation itself. |
| PROP_PATH_OUTPUT | File-paths that refer to output get a special treatment such as having the +/- operators available in the file browser. |
| PROP_SKIP_PRESET | Do not write in presets (PROP_HIDDEN and PROP_SKIP_SAVE won't either). |
Definition at line 201 of file RNA_types.hh.
| enum PropertyOverrideFlag |
Flags related to comparing and overriding RNA properties. Make sure enums are updated with these.
FREE FLAGS: 2, 3, 4, 5, 6, 7, 8, 9, 12 and above.
| Enumerator | |
|---|---|
| PROPOVERRIDE_OVERRIDABLE_LIBRARY | Means that the property can be overridden by a local override of some linked datablock. |
| PROPOVERRIDE_NO_COMPARISON | Forbid usage of this property in comparison (& hence override) code. Useful e.g. for collections of data like mesh's geometry, particles, etc. Also for runtime data that should never be considered as part of actual Blend data (e.g. depsgraph from ViewLayers...). |
| PROPOVERRIDE_IGNORE | Means the property can be fully ignored by override process. Unlike NO_COMPARISON, it can still be used by diffing code, but no override operation will be created for it, and no attempt to restore the data from linked reference either. WARNING: This flag should be used with a lot of caution, as it completely by-passes override system. It is currently only used for ID's names, since we cannot prevent local override to get a different name from the linked reference, and ID names are 'rna name property' (i.e. are used in overrides of collections of IDs). See also |
| PROPOVERRIDE_LIBRARY_INSERTION | The property supports insertion (collections only). |
| PROPOVERRIDE_NO_PROP_NAME | Only use indices to compare items in the property, never names (collections only). Useful when StructRNA::nameproperty of the items is generated from other data (e.g. name of material slots is actually name of assigned material). |
Definition at line 353 of file RNA_types.hh.
| enum PropertyScaleType |
Use values besides PROP_SCALE_LINEAR so the movement of the mouse doesn't map linearly to the value of the slider.
For some settings it's useful to space motion in a non-linear way, see #77868.
NOTE: The scale types are available for all float sliders. For integer sliders they are only available if they use the visible value bar. Sliders with logarithmic scale and value bar must have a range > 0 while logarithmic sliders without the value bar can have a range of >= 0.
| Enumerator | |
|---|---|
| PROP_SCALE_LINEAR | Linear scale (default). |
| PROP_SCALE_LOG | Logarithmic scale
|
| PROP_SCALE_CUBIC | Cubic scale.
|
Definition at line 106 of file RNA_types.hh.
| enum PropertySubType |
bpy_props.cc and rna_rna.cc when adding items here. Watch it: these values are written to files as part of node socket button sub-types! Definition at line 135 of file RNA_types.hh.
| enum PropertyType |
| Enumerator | |
|---|---|
| PROP_BOOLEAN | |
| PROP_INT | |
| PROP_FLOAT | |
| PROP_STRING | |
| PROP_ENUM | |
| PROP_POINTER | |
| PROP_COLLECTION | |
Definition at line 64 of file RNA_types.hh.
| enum PropertyUnit |
Definition at line 75 of file RNA_types.hh.
| enum RawPropertyType |
| Enumerator | |
|---|---|
| PROP_RAW_UNSET | |
| PROP_RAW_INT | |
| PROP_RAW_SHORT | |
| PROP_RAW_CHAR | |
| PROP_RAW_BOOLEAN | |
| PROP_RAW_DOUBLE | |
| PROP_RAW_FLOAT | |
| PROP_RAW_UINT8 | |
| PROP_RAW_UINT16 | |
| PROP_RAW_INT64 | |
| PROP_RAW_UINT64 | |
| PROP_RAW_INT8 | |
Definition at line 471 of file RNA_types.hh.
| enum StructFlag |
| Enumerator | |
|---|---|
| STRUCT_ID | Indicates that this struct is an ID struct, and to use reference-counting. |
| STRUCT_ID_REFCOUNT | |
| STRUCT_UNDO | defaults on, indicates when changes in members of a StructRNA should trigger undo steps. |
| STRUCT_RUNTIME | |
| STRUCT_FREE_POINTERS | |
| STRUCT_NO_IDPROPERTIES | Menus and Panels don't need properties |
| STRUCT_NO_DATABLOCK_IDPROPERTIES | e.g. for Operator |
| STRUCT_CONTAINS_DATABLOCK_IDPROPERTIES | for PropertyGroup which contains pointers to datablocks |
| STRUCT_PUBLIC_NAMESPACE | Added to type-map BlenderRNA.structs_map |
| STRUCT_PUBLIC_NAMESPACE_INHERIT | All sub-types are added too. |
| STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID | When the PointerRNA.owner_id is NULL, this signifies the property should be accessed without any context (the key-map UI and import/export for example). So accessing the property should not read from the current context to derive values/limits. |
Definition at line 717 of file RNA_types.hh.
| ENUM_OPERATORS | ( | PropertyOverrideFlag | , |
| PROPOVERRIDE_NO_PROP_NAME | ) |
|
constexpr |
Definition at line 45 of file RNA_types.hh.
Referenced by add_nodes(), CTX_data_pointer_get(), CTX_data_pointer_get_type(), CTX_data_pointer_get_type_silent(), blender::ed::outliner::do_outliner_drivers_editop(), driver_get_variable_property(), ED_animedit_unlink_action(), blender::ui::eyedropper_colorband_init(), blender::nodes::socket_items::ops::get_active_node_to_operate_on(), lib_id_fake_user_toggle_exec(), object_fluid_gas_domain_find(), object_mesh_cache_find(), object_to_mesh(), override_idtemplate_ids_get(), pyrna_prop_collection_ass_subscript_int(), pyrna_py_to_prop(), pyrna_struct_as_ptr_or_null(), BlenderSession::reset_session(), rna_array_lookup_int(), RNA_parameter_list_create(), RNA_pointer_get(), rna_pointer_inherit_refine(), RNA_property_collection_lookup_string_index(), RNA_property_pointer_get(), RNA_property_pointer_get_default(), blender::deg::RNAPathKey::RNAPathKey(), blender::deg::RNAPathKey::RNAPathKey(), ui_but_add_search(), ui_but_string_set(), ui_do_but_COLOR(), uiItemFullO(), and WM_gizmo_target_property_clear_rna_ptr().