Blender V5.3
blender::StructRNA Struct Reference

#include <rna_internal_types.hh>

Public Attributes

ContainerRNA cont = {}
UString identifier
void * py_type = nullptr
void * blender_type = nullptr
StructFlag flag = {}
const EnumPropertyItem * prop_tag_defines = nullptr
const char * name = nullptr
const char * description = nullptr
const char * translation_context = nullptr
int icon = 0
PropertyRNA * nameproperty = nullptr
PropertyRNA * iteratorproperty = nullptr
StructRNA * base = nullptr
StructRNA * nested = nullptr
StructRefineFunc refine = nullptr
StructPathFunc path = nullptr
StructRegisterFunc reg = nullptr
StructUnregisterFunc unreg = nullptr
StructInstanceFunc instance = nullptr
IDPropertiesFunc idproperties = nullptr
IDPropertiesFunc system_idproperties = nullptr
Vector< std::unique_ptr< FunctionRNA > > functions

Detailed Description

Note
Changes to this struct require updating rna_generate_struct in makesrna.cc.

Definition at line 671 of file rna_internal_types.hh.

Member Data Documentation

◆ base

◆ blender_type

void* blender::StructRNA::blender_type = nullptr

◆ cont

◆ description

const char* blender::StructRNA::description = nullptr

◆ flag

◆ functions

◆ icon

◆ identifier

UString blender::StructRNA::identifier

Unique identifier, keep after cont.

Definition at line 675 of file rna_internal_types.hh.

Referenced by blender::RNA_boolean_get(), blender::RNA_boolean_get_array(), blender::RNA_boolean_set(), blender::RNA_boolean_set_array(), blender::rna_brna_structs_add(), blender::RNA_collection_add(), blender::RNA_collection_begin(), blender::RNA_collection_clear(), blender::RNA_collection_is_empty(), blender::RNA_collection_length(), blender::RNA_def_function(), blender::rna_def_function_funcs(), blender::rna_def_function_wrapper_funcs(), blender::RNA_def_property_array(), blender::rna_def_property_begin_func(), blender::RNA_def_property_boolean_array_default(), blender::RNA_def_property_boolean_default(), blender::RNA_def_property_boolean_default_func(), blender::RNA_def_property_boolean_funcs(), blender::rna_def_property_boolean_sdna(), blender::RNA_def_property_collection_funcs(), blender::RNA_def_property_collection_sdna(), blender::RNA_def_property_deprecated(), blender::rna_def_property_end_func(), blender::RNA_def_property_enum_default(), blender::RNA_def_property_enum_default_func(), blender::RNA_def_property_enum_funcs(), blender::RNA_def_property_enum_items(), blender::RNA_def_property_enum_native_type(), blender::RNA_def_property_enum_sdna(), blender::RNA_def_property_flag(), blender::RNA_def_property_float_array_default(), blender::RNA_def_property_float_default(), blender::RNA_def_property_float_default_func(), blender::RNA_def_property_float_funcs(), blender::RNA_def_property_float_sdna(), blender::rna_def_property_funcs(), blender::rna_def_property_get_func(), blender::RNA_def_property_int_array_default(), blender::RNA_def_property_int_default(), blender::RNA_def_property_int_default_func(), blender::RNA_def_property_int_funcs(), blender::RNA_def_property_int_sdna(), blender::rna_def_property_length_func(), blender::rna_def_property_lookup_int_func(), blender::rna_def_property_lookup_string_func(), blender::RNA_def_property_multi_array(), blender::rna_def_property_next_func(), blender::RNA_def_property_pointer_funcs(), blender::RNA_def_property_pointer_sdna(), blender::RNA_def_property_range(), blender::rna_def_property_search_func(), blender::rna_def_property_set_func(), blender::RNA_def_property_string_default(), blender::RNA_def_property_string_default_func(), blender::RNA_def_property_string_filepath_filter_func(), blender::RNA_def_property_string_funcs(), blender::RNA_def_property_string_maxlength(), blender::RNA_def_property_string_sdna(), blender::RNA_def_property_string_search_func(), blender::RNA_def_property_struct_type(), blender::RNA_def_property_ui_range(), blender::RNA_def_property_ui_scale_type(), blender::rna_def_property_wrapper_funcs(), blender::RNA_def_struct_name_property(), blender::RNA_def_struct_nested(), blender::RNA_def_struct_ptr(), blender::RNA_enum_get(), blender::RNA_enum_is_equal(), blender::RNA_enum_set(), blender::RNA_enum_set_identifier(), blender::rna_find_dna_type(), blender::rna_find_struct(), blender::rna_find_type(), blender::RNA_float_get(), blender::RNA_float_get_array(), blender::RNA_float_set(), blender::RNA_float_set_array(), blender::rna_generate_function_prototypes(), blender::rna_generate_internal_property_prototypes(), blender::rna_generate_parameter_prototypes(), blender::rna_generate_property(), blender::rna_generate_property_decl(), blender::rna_generate_static_parameter_prototypes(), blender::rna_generate_struct_register_func(), blender::RNA_int_get(), blender::RNA_int_get_array(), blender::RNA_int_set(), blender::RNA_int_set_array(), blender::RNA_pointer_add(), blender::RNA_pointer_get(), blender::RNA_pointer_set(), blender::RNA_property_pointer_add(), blender::RNA_property_pointer_remove(), blender::RNA_property_pointer_set(), blender::RNA_string_get(), blender::RNA_string_get(), blender::RNA_string_get_alloc(), blender::RNA_string_length(), blender::RNA_string_set(), blender::RNA_struct_available_or_report(), blender::RNA_struct_free(), blender::RNA_struct_identifier(), blender::rna_struct_override_type_matches(), and blender::RNA_struct_to_string().

◆ idproperties

IDPropertiesFunc blender::StructRNA::idproperties = nullptr

◆ instance

StructInstanceFunc blender::StructRNA::instance = nullptr

Optionally support reusing Python instances for this type.

Without this, an operator class created for #wmOperatorType.invoke (for example) would have a different instance passed to the #wmOperatorType.modal callback. So any variables assigned to self from Python would not be available to other callbacks.

Being able to access the instance also has the advantage that we can invalidate the Python instance when the data has been removed, see: BPY_DECREF_RNA_INVALIDATE so accessing the variables from Python raises an exception instead of crashing.

Definition at line 741 of file rna_internal_types.hh.

Referenced by blender::RNA_def_struct_ptr(), blender::RNA_def_struct_register_funcs(), blender::rna_generate_struct_register_func(), and blender::RNA_struct_instance().

◆ iteratorproperty

PropertyRNA* blender::StructRNA::iteratorproperty = nullptr

Property to iterate over properties.

Definition at line 707 of file rna_internal_types.hh.

Referenced by blender::RNA_def_struct_ptr(), blender::rna_generate_struct_register_func(), and blender::RNA_struct_iterator_property().

◆ name

◆ nameproperty

◆ nested

StructRNA* blender::StructRNA::nested = nullptr

Only use for nested structs, where both the parent and child access the same C Struct but nesting is used for grouping properties. The parent property is used so we know NULL checks are not needed, and that this struct will never exist without its parent.

Definition at line 718 of file rna_internal_types.hh.

Referenced by blender::RNA_def_struct_nested(), blender::RNA_def_struct_ptr(), blender::rna_generate_struct_register_func(), and blender::RNA_path_from_ID_to_struct().

◆ path

◆ prop_tag_defines

const EnumPropertyItem* blender::StructRNA::prop_tag_defines = nullptr

Each StructRNA type can define its own tags which properties can set (PropertyRNA.tags) for changed behavior based on struct-type.

Definition at line 692 of file rna_internal_types.hh.

Referenced by blender::RNA_def_struct_property_tags(), blender::RNA_def_struct_ptr(), and blender::RNA_struct_property_tag_defines().

◆ py_type

void* blender::StructRNA::py_type = nullptr

Python type, this is a sub-type of pyrna_struct_Type but used so each struct can have its own type which is useful for subclassing RNA.

Owns a reference so the value isn't freed by Python.

Definition at line 683 of file rna_internal_types.hh.

Referenced by blender::RNA_struct_free_extension(), blender::RNA_struct_py_type_get(), and blender::RNA_struct_py_type_set().

◆ refine

StructRefineFunc blender::StructRNA::refine = nullptr

◆ reg

StructRegisterFunc blender::StructRNA::reg = nullptr

◆ system_idproperties

◆ translation_context

◆ unreg


The documentation for this struct was generated from the following file: