Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_internal_types.h
| Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | struct PropertyRNA { | ||||
| /* magic bytes to distinguish with IDProperty */ | /* magic bytes to distinguish with IDProperty */ | ||||
| int magic; | int magic; | ||||
| /* unique identifier */ | /* unique identifier */ | ||||
| const char *identifier; | const char *identifier; | ||||
| /* various options */ | /* various options */ | ||||
| int flag; | int flag; | ||||
| /* Function parameters flags. */ | |||||
| short flag_parameter; | |||||
| /* Internal ("private") flags. */ | |||||
| short flag_internal; | |||||
| /* user readable name */ | /* user readable name */ | ||||
| const char *name; | const char *name; | ||||
| /* single line description, displayed in the tooltip for example */ | /* single line description, displayed in the tooltip for example */ | ||||
| const char *description; | const char *description; | ||||
| /* icon ID */ | /* icon ID */ | ||||
| int icon; | int icon; | ||||
| /* context for translation */ | /* context for translation */ | ||||
| const char *translation_context; | const char *translation_context; | ||||
| /* property type as it appears to the outside */ | /* property type as it appears to the outside */ | ||||
| PropertyType type; | PropertyType type; | ||||
| /* subtype, 'interpretation' of the property */ | /* subtype, 'interpretation' of the property */ | ||||
| PropertySubType subtype; | PropertySubType subtype; | ||||
| /* if non-NULL, overrides arraylength. Must not return 0? */ | /* if non-NULL, overrides arraylength. Must not return 0? */ | ||||
| PropArrayLengthGetFunc getlength; | PropArrayLengthGetFunc getlength; | ||||
| /* dimension of array */ | /* dimension of array */ | ||||
| unsigned int arraydimension; | unsigned int arraydimension; | ||||
| /* array lengths lengths for all dimensions (when arraydimension > 0) */ | /* array lengths lengths for all dimensions (when arraydimension > 0) */ | ||||
| unsigned int arraylength[RNA_MAX_ARRAY_DIMENSION]; | unsigned int arraylength[RNA_MAX_ARRAY_DIMENSION]; | ||||
| unsigned int totarraylength; | unsigned int totarraylength; | ||||
| /* callback for updates on change */ | /* callback for updates on change */ | ||||
| UpdateFunc update; | UpdateFunc update; | ||||
| int noteflag; | int noteflag; | ||||
| /* 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; | ||||
| Show All 9 Lines | struct PropertyRNA { | ||||
| * 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 */ | ||||
| /* python handle to hold all callbacks | /* python handle to hold all callbacks | ||||
| * (in a pointer array at the moment, may later be a tuple) */ | * (in a pointer array at the moment, may later be a tuple) */ | ||||
| void *py_data; | void *py_data; | ||||
| }; | }; | ||||
| /* internal flags WARNING! 16bits only! */ | |||||
| typedef 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), | |||||
| } PropertyFlagIntern; | |||||
| /* Property Types */ | /* Property Types */ | ||||
| typedef struct BoolPropertyRNA { | typedef struct BoolPropertyRNA { | ||||
| PropertyRNA property; | PropertyRNA property; | ||||
| PropBooleanGetFunc get; | PropBooleanGetFunc get; | ||||
| PropBooleanSetFunc set; | PropBooleanSetFunc set; | ||||
| PropBooleanArrayGetFunc getarray; | PropBooleanArrayGetFunc getarray; | ||||
| ▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | struct StructRNA { | ||||
| /* unique identifier, keep after 'cont' */ | /* unique identifier, keep after 'cont' */ | ||||
| const char *identifier; | const char *identifier; | ||||
| /* python type, this is a subtype of pyrna_struct_Type but used so each struct can have its own type | /* python type, this is a subtype of pyrna_struct_Type but used so each struct can have its own type | ||||
| * which is useful for subclassing RNA */ | * which is useful for subclassing RNA */ | ||||
| void *py_type; | void *py_type; | ||||
| void *blender_type; | void *blender_type; | ||||
| /* various options */ | /* various options */ | ||||
| int flag; | int flag; | ||||
| /* user readable name */ | /* user readable name */ | ||||
| const char *name; | const char *name; | ||||
| /* single line description, displayed in the tooltip for example */ | /* single line description, displayed in the tooltip for example */ | ||||
| const char *description; | const char *description; | ||||
| /* context for translation */ | /* context for translation */ | ||||
| const char *translation_context; | const char *translation_context; | ||||
| /* icon ID */ | /* icon ID */ | ||||
| int icon; | int icon; | ||||
| /* property that defines the name */ | /* property that defines the name */ | ||||
| PropertyRNA *nameproperty; | PropertyRNA *nameproperty; | ||||
| /* property to iterate over properties */ | /* property to iterate over properties */ | ||||
| PropertyRNA *iteratorproperty; | PropertyRNA *iteratorproperty; | ||||
| /* struct this is derivedfrom */ | /* struct this is derivedfrom */ | ||||
| struct StructRNA *base; | struct StructRNA *base; | ||||
| Show All 36 Lines | |||||