Blender V4.3
rna_internal_types.hh File Reference
#include <optional>
#include <string>
#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  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)   (*(const char **)(((ContainerRNA *)(cont)) + 1))
 

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 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 = void (*)(PointerRNA *ptr, PropertyRNA *prop, char *value)
 
using PropStringLengthFuncEx = int (*)(PointerRNA *ptr, PropertyRNA *prop)
 
using PropStringSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const char *value)
 
using PropEnumGetFuncEx = int (*)(PointerRNA *ptr, PropertyRNA *prop)
 
using PropEnumSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, int value)
 
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)
}
 

Macro Definition Documentation

◆ CONTAINER_RNA_ID

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

Typedef Documentation

◆ ContextPropUpdateFunc

Definition at line 49 of file rna_internal_types.hh.

◆ ContextUpdateFunc

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

Definition at line 50 of file rna_internal_types.hh.

◆ EditableFunc

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

Definition at line 52 of file rna_internal_types.hh.

◆ IDPropertiesFunc

Definition at line 54 of file rna_internal_types.hh.

◆ ItemEditableFunc

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

Definition at line 53 of file rna_internal_types.hh.

◆ PropArrayLengthGetFunc

Definition at line 58 of file rna_internal_types.hh.

◆ PropBooleanArrayGetFunc

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

Definition at line 61 of file rna_internal_types.hh.

◆ PropBooleanArrayGetFuncEx

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

Definition at line 106 of file rna_internal_types.hh.

◆ PropBooleanArraySetFunc

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

Definition at line 62 of file rna_internal_types.hh.

◆ PropBooleanArraySetFuncEx

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

Definition at line 107 of file rna_internal_types.hh.

◆ PropBooleanGetFunc

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

Definition at line 59 of file rna_internal_types.hh.

◆ PropBooleanGetFuncEx

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

Definition at line 104 of file rna_internal_types.hh.

◆ PropBooleanSetFunc

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

Definition at line 60 of file rna_internal_types.hh.

◆ PropBooleanSetFuncEx

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

Definition at line 105 of file rna_internal_types.hh.

◆ PropCollectionAssignIntFunc

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

Definition at line 99 of file rna_internal_types.hh.

◆ PropCollectionBeginFunc

Definition at line 90 of file rna_internal_types.hh.

◆ PropCollectionEndFunc

Definition at line 92 of file rna_internal_types.hh.

◆ PropCollectionGetFunc

◆ PropCollectionLengthFunc

Definition at line 94 of file rna_internal_types.hh.

◆ PropCollectionLookupIntFunc

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

Definition at line 95 of file rna_internal_types.hh.

◆ PropCollectionLookupStringFunc

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

Definition at line 96 of file rna_internal_types.hh.

◆ PropCollectionNextFunc

Definition at line 91 of file rna_internal_types.hh.

◆ PropEnumGetFunc

Definition at line 77 of file rna_internal_types.hh.

◆ PropEnumGetFuncEx

Definition at line 123 of file rna_internal_types.hh.

◆ PropEnumItemFunc

Initial value:

Definition at line 79 of file rna_internal_types.hh.

◆ PropEnumSetFunc

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

Definition at line 78 of file rna_internal_types.hh.

◆ PropEnumSetFuncEx

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

Definition at line 124 of file rna_internal_types.hh.

◆ PropFloatArrayGetFunc

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

Definition at line 70 of file rna_internal_types.hh.

◆ PropFloatArrayGetFuncEx

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

Definition at line 116 of file rna_internal_types.hh.

◆ PropFloatArraySetFunc

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

Definition at line 71 of file rna_internal_types.hh.

◆ PropFloatArraySetFuncEx

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

Definition at line 117 of file rna_internal_types.hh.

◆ PropFloatGetFunc

Definition at line 68 of file rna_internal_types.hh.

◆ PropFloatGetFuncEx

Definition at line 114 of file rna_internal_types.hh.

◆ PropFloatRangeFunc

Initial value:
void (*)(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
#define min(a, b)
Definition sort.c:32
float max

Definition at line 72 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 118 of file rna_internal_types.hh.

◆ PropFloatSetFunc

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

Definition at line 69 of file rna_internal_types.hh.

◆ PropFloatSetFuncEx

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

Definition at line 115 of file rna_internal_types.hh.

◆ PropIntArrayGetFunc

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

Definition at line 65 of file rna_internal_types.hh.

◆ PropIntArrayGetFuncEx

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

Definition at line 110 of file rna_internal_types.hh.

◆ PropIntArraySetFunc

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

Definition at line 66 of file rna_internal_types.hh.

◆ PropIntArraySetFuncEx

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

Definition at line 111 of file rna_internal_types.hh.

◆ PropIntGetFunc

Definition at line 63 of file rna_internal_types.hh.

◆ PropIntGetFuncEx

Definition at line 108 of file rna_internal_types.hh.

◆ PropIntRangeFunc

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

Definition at line 67 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 112 of file rna_internal_types.hh.

◆ PropIntSetFunc

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

Definition at line 64 of file rna_internal_types.hh.

◆ PropIntSetFuncEx

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

Definition at line 109 of file rna_internal_types.hh.

◆ PropPointerGetFunc

Definition at line 83 of file rna_internal_types.hh.

◆ PropPointerPollFunc

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

Definition at line 86 of file rna_internal_types.hh.

◆ PropPointerPollFuncPy

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

Definition at line 87 of file rna_internal_types.hh.

◆ PropPointerSetFunc

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

Definition at line 85 of file rna_internal_types.hh.

◆ PropPointerTypeFunc

Definition at line 84 of file rna_internal_types.hh.

◆ PropStringGetFunc

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

Definition at line 74 of file rna_internal_types.hh.

◆ PropStringGetFuncEx

using PropStringGetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, char *value)

Definition at line 120 of file rna_internal_types.hh.

◆ PropStringLengthFunc

Definition at line 75 of file rna_internal_types.hh.

◆ PropStringLengthFuncEx

Definition at line 121 of file rna_internal_types.hh.

◆ PropStringSetFunc

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

Definition at line 76 of file rna_internal_types.hh.

◆ PropStringSetFuncEx

using PropStringSetFuncEx = void (*)(PointerRNA *ptr, PropertyRNA *prop, const char *value)

Definition at line 122 of file rna_internal_types.hh.

◆ RNAPropOverrideApply

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

Definition at line 288 of file rna_internal_types.hh.

◆ RNAPropOverrideDiff

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

Definition at line 225 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 237 of file rna_internal_types.hh.

◆ StructPathFunc

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

Definition at line 56 of file rna_internal_types.hh.

◆ StructRefineFunc

Definition at line 55 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 48 of file rna_internal_types.hh.

Enumeration Type Documentation

◆ PropertyFlagIntern

Enumerator
PROP_INTERN_BUILTIN 
PROP_INTERN_RUNTIME 
PROP_INTERN_RAW_ACCESS 
PROP_INTERN_RAW_ARRAY 
PROP_INTERN_FREE_POINTERS 
PROP_INTERN_PTR_OWNERSHIP_FORCED 

Definition at line 389 of file rna_internal_types.hh.