Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/RNA_types.h
| Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | typedef enum PropertySubType { | ||||
| PROP_COORDS = 31, /* generic array, no units applied, only that x/y/z/w are used (python vec) */ | PROP_COORDS = 31, /* generic array, no units applied, only that x/y/z/w are used (python vec) */ | ||||
| /* booleans */ | /* booleans */ | ||||
| PROP_LAYER = 40, | PROP_LAYER = 40, | ||||
| PROP_LAYER_MEMBER = 41, | PROP_LAYER_MEMBER = 41, | ||||
| } PropertySubType; | } PropertySubType; | ||||
| /* Make sure enums are updated with these */ | /* Make sure enums are updated with these */ | ||||
| /* HIGHEST FLAG IN USE: 1 << 31 */ | /* HIGHEST FLAG IN USE: 1 << 31 | ||||
| * FREE FLAGS: 2, 3, 7, 9, 11, 13, 14, 15, 30 */ | |||||
| typedef enum PropertyFlag { | typedef enum PropertyFlag { | ||||
| /* editable means the property is editable in the user | /* editable means the property is editable in the user | ||||
| * interface, properties are editable by default except | * interface, properties are editable by default except | ||||
| * for pointers and collections. */ | * for pointers and collections. */ | ||||
| PROP_EDITABLE = (1 << 0), | PROP_EDITABLE = (1 << 0), | ||||
| /* this property is editable even if it is lib linked, | /* this property is editable even if it is lib linked, | ||||
| * meaning it will get lost on reload, but it's useful | * meaning it will get lost on reload, but it's useful | ||||
| Show All 13 Lines | typedef enum PropertyFlag { | ||||
| /* icon */ | /* icon */ | ||||
| PROP_ICONS_CONSECUTIVE = (1 << 12), | PROP_ICONS_CONSECUTIVE = (1 << 12), | ||||
| /* hidden in the user interface */ | /* hidden in the user interface */ | ||||
| PROP_HIDDEN = (1 << 19), | PROP_HIDDEN = (1 << 19), | ||||
| /* do not write in presets */ | /* do not write in presets */ | ||||
| PROP_SKIP_SAVE = (1 << 28), | PROP_SKIP_SAVE = (1 << 28), | ||||
| /* function parameter flags */ | |||||
| PROP_REQUIRED = (1 << 2), | |||||
| PROP_OUTPUT = (1 << 3), | |||||
| PROP_RNAPTR = (1 << 11), | |||||
| /* This allows for non-breaking API updates, when adding non-critical new parameter to a callback function. | |||||
| * This way, old py code defining funcs without that parameter would still work. | |||||
| * WARNING: any parameter after the first PYFUNC_OPTIONAL one will be considered as optional! | |||||
| * NOTE: only for input parameters! | |||||
| */ | |||||
| PROP_PYFUNC_OPTIONAL = (1 << 30), | |||||
| /* registering */ | |||||
| PROP_REGISTER = (1 << 4), | |||||
| PROP_REGISTER_OPTIONAL = PROP_REGISTER | (1 << 5), | |||||
| /* numbers */ | /* numbers */ | ||||
| /* each value is related proportionally (object scale, image size) */ | /* each value is related proportionally (object scale, image size) */ | ||||
| PROP_PROPORTIONAL = (1 << 26), | PROP_PROPORTIONAL = (1 << 26), | ||||
| /* pointers */ | /* pointers */ | ||||
| PROP_ID_REFCOUNT = (1 << 6), | PROP_ID_REFCOUNT = (1 << 6), | ||||
| Show All 16 Lines | typedef enum PropertyFlag { | ||||
| * note: these can't be animated so use with care. | * note: these can't be animated so use with care. | ||||
| */ | */ | ||||
| PROP_ENUM_FLAG = (1 << 21), | PROP_ENUM_FLAG = (1 << 21), | ||||
| /* need context for update function */ | /* need context for update function */ | ||||
| PROP_CONTEXT_UPDATE = (1 << 22), | PROP_CONTEXT_UPDATE = (1 << 22), | ||||
| PROP_CONTEXT_PROPERTY_UPDATE = (1 << 22) | (1 << 27), | PROP_CONTEXT_PROPERTY_UPDATE = (1 << 22) | (1 << 27), | ||||
| /* registering */ | |||||
| PROP_REGISTER = (1 << 4), | |||||
| PROP_REGISTER_OPTIONAL = PROP_REGISTER | (1 << 5), | |||||
| /* Use for arrays or for any data that should not have a reference kept | /* Use for arrays or for any data that should not have a reference kept | ||||
| * most common case is functions that return arrays where the array */ | * most common case is functions that return arrays where the array */ | ||||
| PROP_THICK_WRAP = (1 << 23), | PROP_THICK_WRAP = (1 << 23), | ||||
| /* internal flags */ | PROP_EXPORT = (1 << 8), /* XXX Is this still used? makesrna.c seems to ignore it currently... */ | ||||
| PROP_BUILTIN = (1 << 7), | PROP_IDPROPERTY = (1 << 10), /* This is an IDProperty, not a DNA one. */ | ||||
| PROP_EXPORT = (1 << 8), | |||||
| PROP_RUNTIME = (1 << 9), | |||||
| PROP_IDPROPERTY = (1 << 10), | |||||
| PROP_RAW_ACCESS = (1 << 13), | |||||
| PROP_RAW_ARRAY = (1 << 14), | |||||
| PROP_FREE_POINTERS = (1 << 15), | |||||
| PROP_DYNAMIC = (1 << 17), /* for dynamic arrays, and retvals of type string */ | PROP_DYNAMIC = (1 << 17), /* for dynamic arrays, and retvals of type string */ | ||||
| PROP_ENUM_NO_CONTEXT = (1 << 24), /* for enum that shouldn't be contextual */ | PROP_ENUM_NO_CONTEXT = (1 << 24), /* for enum that shouldn't be contextual */ | ||||
| PROP_ENUM_NO_TRANSLATE = (1 << 29), /* for enums not to be translated (e.g. renderlayers' names in nodes) */ | PROP_ENUM_NO_TRANSLATE = (1 << 29), /* for enums not to be translated (e.g. renderlayers' names in nodes) */ | ||||
| } PropertyFlag; | } PropertyFlag; | ||||
| /* Function parameters flags. | |||||
| * WARNING: 16bits only. */ | |||||
| typedef enum ParameterFlag { | |||||
| PARM_REQUIRED = (1 << 1), | |||||
mont29: woops, should start at `1 << 0`! | |||||
| PARM_OUTPUT = (1 << 2), | |||||
| PARM_RNAPTR = (1 << 3), | |||||
| /* This allows for non-breaking API updates, when adding non-critical new parameter to a callback function. | |||||
| * This way, old py code defining funcs without that parameter would still work. | |||||
| * WARNING: any parameter after the first PYFUNC_OPTIONAL one will be considered as optional! | |||||
| * NOTE: only for input parameters! | |||||
| */ | |||||
| PARM_PYFUNC_OPTIONAL = (1 << 4), | |||||
| } ParameterFlag; | |||||
| struct CollectionPropertyIterator; | struct CollectionPropertyIterator; | ||||
| struct Link; | struct Link; | ||||
| typedef int (*IteratorSkipFunc)(struct CollectionPropertyIterator *iter, void *data); | typedef int (*IteratorSkipFunc)(struct CollectionPropertyIterator *iter, void *data); | ||||
| typedef struct ListBaseIterator { | typedef struct ListBaseIterator { | ||||
| struct Link *link; | struct Link *link; | ||||
| int flag; | int flag; | ||||
| IteratorSkipFunc skip; | IteratorSkipFunc skip; | ||||
| ▲ Show 20 Lines • Show All 215 Lines • Show Last 20 Lines | |||||
woops, should start at 1 << 0!