Blender V5.0
rna_internal_types.hh File Reference
#include <optional>
#include <string>
#include "BLI_vector_set.hh"
#include "DNA_listBase.h"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_types.hh"

Go to the source code of this file.

Classes

struct  PropertyRNAOrID
struct  RNAPropertyOverrideDiffContext
struct  RNAPropertyOverrideApplyContext
struct  PropertyRNAIdentifierGetter
struct  ContainerRNA
struct  FunctionRNA
struct  PropertyRNA
struct  BoolPropertyRNA
struct  IntPropertyRNA
struct  FloatPropertyRNA
struct  StringPropertyRNA
struct  EnumPropertyRNA
struct  PointerPropertyRNA
struct  CollectionPropertyRNA
struct  StructRNA
struct  BlenderRNA

Macros

#define CONTAINER_RNA_ID(cont)

Typedefs

using UpdateFunc = void (*)(Main *bmain, Scene *active_scene, PointerRNA *ptr)
using ContextPropUpdateFunc = void (*)(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
using ContextUpdateFunc = void (*)(bContext *C, PointerRNA *ptr)
using EditableFunc = int (*)(const PointerRNA *ptr, const char **r_info)
using ItemEditableFunc = int (*)(const PointerRNA *ptr, int index)
using IDPropertiesFunc = IDProperty **(*)(PointerRNA * ptr)
using StructRefineFunc = StructRNA *(*)(PointerRNA * ptr)
using StructPathFunc = std::optional<std::string> (*)(const PointerRNA *ptr)
using PropUINameFunc
using PropArrayLengthGetFunc = int (*)(const PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
using PropBooleanGetFunc = bool (*)(PointerRNA *ptr)
using PropBooleanSetFunc = void (*)(PointerRNA *ptr, bool value)
using PropBooleanArrayGetFunc = void (*)(PointerRNA *ptr, bool *values)
using PropBooleanArraySetFunc = void (*)(PointerRNA *ptr, const bool *values)
using PropIntGetFunc = int (*)(PointerRNA *ptr)
using PropIntSetFunc = void (*)(PointerRNA *ptr, int value)
using PropIntArrayGetFunc = void (*)(PointerRNA *ptr, int *values)
using PropIntArraySetFunc = void (*)(PointerRNA *ptr, const int *values)
using PropIntRangeFunc = void (*)(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
using PropFloatGetFunc = float (*)(PointerRNA *ptr)
using PropFloatSetFunc = void (*)(PointerRNA *ptr, float value)
using PropFloatArrayGetFunc = void (*)(PointerRNA *ptr, float *values)
using PropFloatArraySetFunc = void (*)(PointerRNA *ptr, const float *values)
using PropFloatRangeFunc
using PropStringGetFunc = void (*)(PointerRNA *ptr, char *value)
using PropStringLengthFunc = int (*)(PointerRNA *ptr)
using PropStringSetFunc = void (*)(PointerRNA *ptr, const char *value)
using PropEnumGetFunc = int (*)(PointerRNA *ptr)
using PropEnumSetFunc = void (*)(PointerRNA *ptr, int value)
using PropEnumItemFunc
using PropPointerGetFunc = PointerRNA (*)(PointerRNA *ptr)
using PropPointerTypeFunc = StructRNA *(*)(PointerRNA * ptr)
using PropPointerSetFunc = void (*)(PointerRNA *ptr, const PointerRNA value, ReportList *reports)
using PropPointerPollFunc = bool (*)(PointerRNA *ptr, const PointerRNA value)
using PropPointerPollFuncPy
using PropCollectionBeginFunc = void (*)(CollectionPropertyIterator *iter, PointerRNA *ptr)
using PropCollectionNextFunc = void (*)(CollectionPropertyIterator *iter)
using PropCollectionEndFunc = void (*)(CollectionPropertyIterator *iter)
using PropCollectionGetFunc = PointerRNA (*)(CollectionPropertyIterator *iter)
using PropCollectionLengthFunc = int (*)(PointerRNA *ptr)
using PropCollectionLookupIntFunc = bool (*)(PointerRNA *ptr, int key, PointerRNA *r_ptr)
using PropCollectionLookupStringFunc
using PropCollectionAssignIntFunc
using PropBooleanGetFuncEx = bool (*)(PointerRNA *ptr, PropertyRNA *prop)
using PropBooleanSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, bool value)
using PropBooleanArrayGetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, bool *values)
using PropBooleanArraySetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
using PropIntGetFuncEx = int (*)(PointerRNA *ptr, PropertyRNA *prop)
using PropIntSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, int value)
using PropIntArrayGetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, int *values)
using PropIntArraySetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const int *values)
using PropIntRangeFuncEx
using PropFloatGetFuncEx = float (*)(PointerRNA *ptr, PropertyRNA *prop)
using PropFloatSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, float value)
using PropFloatArrayGetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, float *values)
using PropFloatArraySetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const float *values)
using PropFloatRangeFuncEx
using PropStringGetFuncEx = std::string (*)(PointerRNA *ptr, PropertyRNA *prop)
using PropStringLengthFuncEx = int (*)(PointerRNA *ptr, PropertyRNA *prop)
using PropStringSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const std::string &value)
using PropEnumGetFuncEx = int (*)(PointerRNA *ptr, PropertyRNA *prop)
using PropEnumSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, int value)
using PropBooleanGetTransformFunc = BooleanPropertyGetTransformFunc
using PropBooleanSetTransformFunc = BooleanPropertySetTransformFunc
using PropBooleanArrayGetTransformFunc = BooleanArrayPropertyGetTransformFunc
using PropBooleanArraySetTransformFunc = BooleanArrayPropertySetTransformFunc
using PropIntGetTransformFunc = IntPropertyGetTransformFunc
using PropIntSetTransformFunc = IntPropertySetTransformFunc
using PropIntArrayGetTransformFunc = IntArrayPropertyGetTransformFunc
using PropIntArraySetTransformFunc = IntArrayPropertySetTransformFunc
using PropFloatGetTransformFunc = FloatPropertyGetTransformFunc
using PropFloatSetTransformFunc = FloatPropertySetTransformFunc
using PropFloatArrayGetTransformFunc = FloatArrayPropertyGetTransformFunc
using PropFloatArraySetTransformFunc = FloatArrayPropertySetTransformFunc
using PropStringGetTransformFunc = StringPropertyGetTransformFunc
using PropStringSetTransformFunc = StringPropertySetTransformFunc
using PropEnumGetTransformFunc = EnumPropertyGetTransformFunc
using PropEnumSetTransformFunc = EnumPropertySetTransformFunc
using RNAPropOverrideDiff = void (*)(Main *bmain, RNAPropertyOverrideDiffContext &rnadiff_ctx)
using RNAPropOverrideStore
using RNAPropOverrideApply = bool (*)(Main *bmain, RNAPropertyOverrideApplyContext &rnaapply_ctx)

Enumerations

enum  PropertyFlagIntern {
  PROP_INTERN_BUILTIN = (1 << 0) , PROP_INTERN_RUNTIME = (1 << 1) , PROP_INTERN_RAW_ACCESS = (1 << 2) , PROP_INTERN_RAW_ARRAY = (1 << 3) ,
  PROP_INTERN_FREE_POINTERS = (1 << 4) , PROP_INTERN_PTR_OWNERSHIP_FORCED = (1 << 5) , PROP_INTERN_PTR_ID_REFCOUNT_FORCED = (1 << 6)
}

Macro Definition Documentation

◆ CONTAINER_RNA_ID

#define CONTAINER_RNA_ID ( cont)
Value:
(*(const char **)(((ContainerRNA *)(cont)) + 1))

Definition at line 761 of file rna_internal_types.hh.

Referenced by RNA_def_float_percentage(), RNA_def_property(), and RNA_def_property_struct_runtime().

Typedef Documentation

◆ ContextPropUpdateFunc

Definition at line 51 of file rna_internal_types.hh.

◆ ContextUpdateFunc

using ContextUpdateFunc = void (*)(bContext *C, PointerRNA *ptr)

Definition at line 52 of file rna_internal_types.hh.

◆ EditableFunc

using EditableFunc = int (*)(const PointerRNA *ptr, const char **r_info)

Definition at line 54 of file rna_internal_types.hh.

◆ IDPropertiesFunc

Definition at line 56 of file rna_internal_types.hh.

◆ ItemEditableFunc

using ItemEditableFunc = int (*)(const PointerRNA *ptr, int index)

Definition at line 55 of file rna_internal_types.hh.

◆ PropArrayLengthGetFunc

Definition at line 63 of file rna_internal_types.hh.

◆ PropBooleanArrayGetFunc

using PropBooleanArrayGetFunc = void (*)(PointerRNA *ptr, bool *values)

Definition at line 66 of file rna_internal_types.hh.

◆ PropBooleanArrayGetFuncEx

using PropBooleanArrayGetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, bool *values)

Definition at line 115 of file rna_internal_types.hh.

◆ PropBooleanArrayGetTransformFunc

◆ PropBooleanArraySetFunc

using PropBooleanArraySetFunc = void (*)(PointerRNA *ptr, const bool *values)

Definition at line 67 of file rna_internal_types.hh.

◆ PropBooleanArraySetFuncEx

using PropBooleanArraySetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const bool *values)

Definition at line 116 of file rna_internal_types.hh.

◆ PropBooleanArraySetTransformFunc

◆ PropBooleanGetFunc

using PropBooleanGetFunc = bool (*)(PointerRNA *ptr)

Definition at line 64 of file rna_internal_types.hh.

◆ PropBooleanGetFuncEx

using PropBooleanGetFuncEx = bool (*)(PointerRNA *ptr, PropertyRNA *prop)

Definition at line 113 of file rna_internal_types.hh.

◆ PropBooleanGetTransformFunc

◆ PropBooleanSetFunc

using PropBooleanSetFunc = void (*)(PointerRNA *ptr, bool value)

Definition at line 65 of file rna_internal_types.hh.

◆ PropBooleanSetFuncEx

using PropBooleanSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, bool value)

Definition at line 114 of file rna_internal_types.hh.

◆ PropBooleanSetTransformFunc

◆ PropCollectionAssignIntFunc

Initial value:
bool (*)(PointerRNA *ptr,
int key,
const PointerRNA *assign_ptr)
PointerRNA * ptr
Definition wm_files.cc:4238

Definition at line 104 of file rna_internal_types.hh.

◆ PropCollectionBeginFunc

Definition at line 95 of file rna_internal_types.hh.

◆ PropCollectionEndFunc

Definition at line 97 of file rna_internal_types.hh.

◆ PropCollectionGetFunc

◆ PropCollectionLengthFunc

Definition at line 99 of file rna_internal_types.hh.

◆ PropCollectionLookupIntFunc

using PropCollectionLookupIntFunc = bool (*)(PointerRNA *ptr, int key, PointerRNA *r_ptr)

Definition at line 100 of file rna_internal_types.hh.

◆ PropCollectionLookupStringFunc

Initial value:
bool (*)(PointerRNA *ptr,
const char *key,
PointerRNA *r_ptr)

Definition at line 101 of file rna_internal_types.hh.

◆ PropCollectionNextFunc

Definition at line 96 of file rna_internal_types.hh.

◆ PropEnumGetFunc

using PropEnumGetFunc = int (*)(PointerRNA *ptr)

Definition at line 82 of file rna_internal_types.hh.

◆ PropEnumGetFuncEx

using PropEnumGetFuncEx = int (*)(PointerRNA *ptr, PropertyRNA *prop)

Definition at line 132 of file rna_internal_types.hh.

◆ PropEnumGetTransformFunc

◆ PropEnumItemFunc

Initial value:

Definition at line 84 of file rna_internal_types.hh.

◆ PropEnumSetFunc

using PropEnumSetFunc = void (*)(PointerRNA *ptr, int value)

Definition at line 83 of file rna_internal_types.hh.

◆ PropEnumSetFuncEx

using PropEnumSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, int value)

Definition at line 133 of file rna_internal_types.hh.

◆ PropEnumSetTransformFunc

◆ PropFloatArrayGetFunc

using PropFloatArrayGetFunc = void (*)(PointerRNA *ptr, float *values)

Definition at line 75 of file rna_internal_types.hh.

◆ PropFloatArrayGetFuncEx

using PropFloatArrayGetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, float *values)

Definition at line 125 of file rna_internal_types.hh.

◆ PropFloatArrayGetTransformFunc

◆ PropFloatArraySetFunc

using PropFloatArraySetFunc = void (*)(PointerRNA *ptr, const float *values)

Definition at line 76 of file rna_internal_types.hh.

◆ PropFloatArraySetFuncEx

using PropFloatArraySetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const float *values)

Definition at line 126 of file rna_internal_types.hh.

◆ PropFloatArraySetTransformFunc

◆ PropFloatGetFunc

Definition at line 73 of file rna_internal_types.hh.

◆ PropFloatGetFuncEx

Definition at line 123 of file rna_internal_types.hh.

◆ PropFloatGetTransformFunc

◆ PropFloatRangeFunc

Initial value:
void (*)(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
#define min(a, b)
Definition sort.cc:36
max
Definition text_draw.cc:251

Definition at line 77 of file rna_internal_types.hh.

◆ PropFloatRangeFuncEx

Initial value:
void (*)(
PointerRNA *ptr, PropertyRNA *prop, float *min, float *max, float *softmin, float *softmax)

Definition at line 127 of file rna_internal_types.hh.

◆ PropFloatSetFunc

using PropFloatSetFunc = void (*)(PointerRNA *ptr, float value)

Definition at line 74 of file rna_internal_types.hh.

◆ PropFloatSetFuncEx

using PropFloatSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, float value)

Definition at line 124 of file rna_internal_types.hh.

◆ PropFloatSetTransformFunc

◆ PropIntArrayGetFunc

using PropIntArrayGetFunc = void (*)(PointerRNA *ptr, int *values)

Definition at line 70 of file rna_internal_types.hh.

◆ PropIntArrayGetFuncEx

using PropIntArrayGetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, int *values)

Definition at line 119 of file rna_internal_types.hh.

◆ PropIntArrayGetTransformFunc

◆ PropIntArraySetFunc

using PropIntArraySetFunc = void (*)(PointerRNA *ptr, const int *values)

Definition at line 71 of file rna_internal_types.hh.

◆ PropIntArraySetFuncEx

using PropIntArraySetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const int *values)

Definition at line 120 of file rna_internal_types.hh.

◆ PropIntArraySetTransformFunc

◆ PropIntGetFunc

using PropIntGetFunc = int (*)(PointerRNA *ptr)

Definition at line 68 of file rna_internal_types.hh.

◆ PropIntGetFuncEx

using PropIntGetFuncEx = int (*)(PointerRNA *ptr, PropertyRNA *prop)

Definition at line 117 of file rna_internal_types.hh.

◆ PropIntGetTransformFunc

◆ PropIntRangeFunc

using PropIntRangeFunc = void (*)(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)

Definition at line 72 of file rna_internal_types.hh.

◆ PropIntRangeFuncEx

Initial value:
void (*)(PointerRNA *ptr, PropertyRNA *prop, int *min, int *max, int *softmin, int *softmax)

Definition at line 121 of file rna_internal_types.hh.

◆ PropIntSetFunc

using PropIntSetFunc = void (*)(PointerRNA *ptr, int value)

Definition at line 69 of file rna_internal_types.hh.

◆ PropIntSetFuncEx

using PropIntSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, int value)

Definition at line 118 of file rna_internal_types.hh.

◆ PropIntSetTransformFunc

◆ PropPointerGetFunc

Definition at line 88 of file rna_internal_types.hh.

◆ PropPointerPollFunc

using PropPointerPollFunc = bool (*)(PointerRNA *ptr, const PointerRNA value)

Definition at line 91 of file rna_internal_types.hh.

◆ PropPointerPollFuncPy

Initial value:
bool (*)(PointerRNA *ptr,
const PointerRNA value,
const PropertyRNA *prop)

Definition at line 92 of file rna_internal_types.hh.

◆ PropPointerSetFunc

using PropPointerSetFunc = void (*)(PointerRNA *ptr, const PointerRNA value, ReportList *reports)

Definition at line 90 of file rna_internal_types.hh.

◆ PropPointerTypeFunc

Definition at line 89 of file rna_internal_types.hh.

◆ PropStringGetFunc

using PropStringGetFunc = void (*)(PointerRNA *ptr, char *value)

Definition at line 79 of file rna_internal_types.hh.

◆ PropStringGetFuncEx

using PropStringGetFuncEx = std::string (*)(PointerRNA *ptr, PropertyRNA *prop)

Definition at line 129 of file rna_internal_types.hh.

◆ PropStringGetTransformFunc

◆ PropStringLengthFunc

using PropStringLengthFunc = int (*)(PointerRNA *ptr)

Definition at line 80 of file rna_internal_types.hh.

◆ PropStringLengthFuncEx

Definition at line 130 of file rna_internal_types.hh.

◆ PropStringSetFunc

using PropStringSetFunc = void (*)(PointerRNA *ptr, const char *value)

Definition at line 81 of file rna_internal_types.hh.

◆ PropStringSetFuncEx

using PropStringSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const std::string &value)

Definition at line 131 of file rna_internal_types.hh.

◆ PropStringSetTransformFunc

◆ PropUINameFunc

Initial value:
const char *(*)(const PointerRNA *ptr,
const PropertyRNA *prop,
bool do_translate)

Definition at line 59 of file rna_internal_types.hh.

◆ RNAPropOverrideApply

using RNAPropOverrideApply = bool (*)(Main *bmain, RNAPropertyOverrideApplyContext &rnaapply_ctx)

Definition at line 326 of file rna_internal_types.hh.

◆ RNAPropOverrideDiff

using RNAPropOverrideDiff = void (*)(Main *bmain, RNAPropertyOverrideDiffContext &rnadiff_ctx)

Definition at line 263 of file rna_internal_types.hh.

◆ RNAPropOverrideStore

Initial value:
bool (*)(Main *bmain,
PointerRNA *ptr_local,
PointerRNA *ptr_reference,
PointerRNA *ptr_storage,
PropertyRNA *prop_local,
PropertyRNA *prop_reference,
PropertyRNA *prop_storage,
int len_local,
int len_reference,
int len_storage,

Only used for differential override (add, sub, etc.). Store into storage the value needed to transform reference's value into local's value.

Note
Given PropertyRNA are final (in case of IDProps...).
In non-array cases, len values are 0.
Might change given override operation (e.g. change 'add' one into 'sub'), in case computed storage value is out of range (or even change it to basic 'set' operation if nothing else works).

Definition at line 275 of file rna_internal_types.hh.

◆ StructPathFunc

using StructPathFunc = std::optional<std::string> (*)(const PointerRNA *ptr)

Definition at line 58 of file rna_internal_types.hh.

◆ StructRefineFunc

Definition at line 57 of file rna_internal_types.hh.

◆ UpdateFunc

using UpdateFunc = void (*)(Main *bmain, Scene *active_scene, PointerRNA *ptr)

Update callback for an RNA property.

Note
This is NOT called automatically when writing into the property, it needs to be called manually (through RNA_property_update or RNA_property_update_main) when needed.
Parameters
bmainthe Main data-base to which ptr data belongs.
active_sceneThe current active scene (may be NULL in some cases).
ptrThe RNA pointer data to update.

Definition at line 50 of file rna_internal_types.hh.

Enumeration Type Documentation

◆ PropertyFlagIntern

Internal flags WARNING! 16bits only!

Enumerator
PROP_INTERN_BUILTIN 
PROP_INTERN_RUNTIME 
PROP_INTERN_RAW_ACCESS 
PROP_INTERN_RAW_ARRAY 
PROP_INTERN_FREE_POINTERS 
PROP_INTERN_PTR_OWNERSHIP_FORCED 

Negative mirror of PROP_PTR_NO_OWNERSHIP, used to prevent automatically setting that one in makesrna when pointer is an ID.

PROP_INTERN_PTR_ID_REFCOUNT_FORCED 

Indicates that PROP_ID_REFCOUNT has been explicitly set (using RNA_def_property_flag) or cleared (using RNA_def_property_clear_flag) by property definition code, and should therefore not be automatically defined based on STRUCT_ID_REFCOUNT of the property type (in rna_auto_types or RNA_def_property_struct_runtime).

Definition at line 463 of file rna_internal_types.hh.