Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_internal_types.h
| Show All 34 Lines | |||||
| struct BlenderRNA; | struct BlenderRNA; | ||||
| struct ContainerRNA; | struct ContainerRNA; | ||||
| struct StructRNA; | struct StructRNA; | ||||
| struct PropertyRNA; | struct PropertyRNA; | ||||
| struct PointerRNA; | struct PointerRNA; | ||||
| struct FunctionRNA; | struct FunctionRNA; | ||||
| struct CollectionPropertyIterator; | struct CollectionPropertyIterator; | ||||
| struct bContext; | struct bContext; | ||||
| struct IDOverrideStatic; | |||||
| struct IDOverrideStaticProperty; | |||||
| struct IDOverrideStaticPropertyOperation; | |||||
| struct IDProperty; | struct IDProperty; | ||||
| struct GHash; | struct GHash; | ||||
| struct Main; | struct Main; | ||||
| struct Scene; | struct Scene; | ||||
| /* store local properties here */ | /* store local properties here */ | ||||
| #define RNA_IDP_UI "_RNA_UI" | #define RNA_IDP_UI "_RNA_UI" | ||||
| ▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
| typedef void (*PropFloatArraySetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, const float *values); | typedef void (*PropFloatArraySetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, const float *values); | ||||
| typedef void (*PropFloatRangeFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, float *min, float *max, float *softmin, float *softmax); | typedef void (*PropFloatRangeFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, float *min, float *max, float *softmin, float *softmax); | ||||
| typedef void (*PropStringGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, char *value); | typedef void (*PropStringGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, char *value); | ||||
| typedef int (*PropStringLengthFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop); | typedef int (*PropStringLengthFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop); | ||||
| typedef void (*PropStringSetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, const char *value); | typedef void (*PropStringSetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, const char *value); | ||||
| typedef int (*PropEnumGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop); | typedef int (*PropEnumGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop); | ||||
| typedef void (*PropEnumSetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, int value); | typedef void (*PropEnumSetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, int value); | ||||
| /* Handling override operations, and also comparison. */ | |||||
| enum { | |||||
| /* Do not compare properties that are not overridable. */ | |||||
| RNA_OVERRIDE_COMPARE_IGNORE_NON_OVERRIDABLE = 1 << 0, | |||||
| /* Do not compare properties that are already overridden. */ | |||||
| RNA_OVERRIDE_COMPARE_IGNORE_OVERRIDDEN = 1 << 1, | |||||
| }; | |||||
| /** | |||||
| * If \a override is NULL, merely do comparison between prop_a from ptr_a and prop_b from ptr_b, | |||||
| * following comparison mode given. | |||||
| * If \a override and \a rna_path are not NULL, it will add a new override operation for overridable properties | |||||
| * that differ and have not yet been overridden (and set accordingly \a r_override_changed if given). | |||||
| * | |||||
| * \note Given PropertyRNA are final (in case of IDProps...). | |||||
| * \note In non-array cases, \a len values are 0. | |||||
| * \note \a override, \a rna_path and \a r_override_changed may be NULL pointers. | |||||
| */ | |||||
| typedef int (*RNAPropOverrideDiff)( | |||||
| struct PointerRNA *ptr_a, struct PointerRNA *ptr_b, | |||||
| struct PropertyRNA *prop_a, struct PropertyRNA *prop_b, | |||||
| const int len_a, const int len_b, | |||||
| const int mode, | |||||
| struct IDOverrideStatic *override, const char *rna_path, | |||||
| const int flags, bool *r_override_changed); | |||||
| /** | |||||
| * 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...). | |||||
| * \note In non-array cases, \a len values are 0. | |||||
| * \note 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). | |||||
| */ | |||||
| typedef bool (*RNAPropOverrideStore)( | |||||
| struct PointerRNA *ptr_local, struct PointerRNA *ptr_reference, struct PointerRNA *ptr_storage, | |||||
| struct PropertyRNA *prop_local, struct PropertyRNA *prop_reference, struct PropertyRNA *prop_storage, | |||||
| const int len_local, const int len_reference, const int len_storage, | |||||
| struct IDOverrideStaticPropertyOperation *opop); | |||||
| /** | |||||
| * Apply given override operation from src to dst (using value from storage as second operand | |||||
| * for differential operations). | |||||
| * | |||||
| * \note Given PropertyRNA are final (in case of IDProps...). | |||||
| * \note In non-array cases, \a len values are 0. | |||||
| */ | |||||
| typedef bool (*RNAPropOverrideApply)( | |||||
| struct PointerRNA *ptr_dst, struct PointerRNA *ptr_src, struct PointerRNA *ptr_storage, | |||||
| struct PropertyRNA *prop_dst, struct PropertyRNA *prop_src, struct PropertyRNA *prop_storage, | |||||
| const int len_dst, const int len_src, const int len_storage, | |||||
| struct IDOverrideStaticPropertyOperation *opop); | |||||
| /* Container - generic abstracted container of RNA properties */ | /* Container - generic abstracted container of RNA properties */ | ||||
| typedef struct ContainerRNA { | typedef struct ContainerRNA { | ||||
| void *next, *prev; | void *next, *prev; | ||||
| struct GHash *prophash; | struct GHash *prophash; | ||||
| ListBase properties; | ListBase properties; | ||||
| } ContainerRNA; | } ContainerRNA; | ||||
| ▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | struct PropertyRNA { | ||||
| /* Callback for testing if editable. Its r_info parameter can be used to | /* Callback for testing if editable. Its r_info parameter can be used to | ||||
| * return info on editable state that might be shown to user. E.g. tooltips | * return info on editable state that might be shown to user. E.g. tooltips | ||||
| * of disabled buttons can show reason why button is disabled using this. */ | * of disabled buttons can show reason why button is disabled using this. */ | ||||
| EditableFunc editable; | EditableFunc editable; | ||||
| /* callback for testing if array-item editable (if applicable) */ | /* callback for testing if array-item editable (if applicable) */ | ||||
| ItemEditableFunc itemeditable; | ItemEditableFunc itemeditable; | ||||
| /* Override handling callbacks (diff is also used for comparison). */ | |||||
| RNAPropOverrideDiff override_diff; | |||||
| RNAPropOverrideStore override_store; | |||||
| RNAPropOverrideApply override_apply; | |||||
| /* raw access */ | /* raw access */ | ||||
| int rawoffset; | int rawoffset; | ||||
| RawPropertyType rawtype; | RawPropertyType rawtype; | ||||
| /* This is used for accessing props/functions of this property | /* This is used for accessing props/functions of this property | ||||
| * any property can have this but should only be used for collections and arrays | * any property can have this but should only be used for collections and arrays | ||||
| * since python will convert int/bool/pointer's */ | * since python will convert int/bool/pointer's */ | ||||
| struct StructRNA *srna; /* attributes attached directly to this collection */ | struct StructRNA *srna; /* attributes attached directly to this collection */ | ||||
| ▲ Show 20 Lines • Show All 218 Lines • Show Last 20 Lines | |||||