Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_idtype.h
| Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | enum { | ||||
| /** Indicates that the given IDType does not support copying. */ | /** Indicates that the given IDType does not support copying. */ | ||||
| IDTYPE_FLAGS_NO_COPY = 1 << 0, | IDTYPE_FLAGS_NO_COPY = 1 << 0, | ||||
| /** Indicates that the given IDType does not support linking/appending from a library file. */ | /** Indicates that the given IDType does not support linking/appending from a library file. */ | ||||
| IDTYPE_FLAGS_NO_LIBLINKING = 1 << 1, | IDTYPE_FLAGS_NO_LIBLINKING = 1 << 1, | ||||
| /** Indicates that the given IDType should not be directly linked from a library file, but may be | /** Indicates that the given IDType should not be directly linked from a library file, but may be | ||||
| * appended. | * appended. | ||||
| * NOTE: Mutually exclusive with `IDTYPE_FLAGS_NO_LIBLINKING`. */ | * NOTE: Mutually exclusive with `IDTYPE_FLAGS_NO_LIBLINKING`. */ | ||||
| IDTYPE_FLAGS_ONLY_APPEND = 1 << 2, | IDTYPE_FLAGS_ONLY_APPEND = 1 << 2, | ||||
| /** Allow to re-use an existing local ID with matching weak library reference instead of creating | |||||
| * a new copy of it, when appending. See also #LibraryWeakReference in `DNA_ID.h`. */ | |||||
campbellbarton: A reference to `#LibraryWeakReference` would be good, it's handy to be able to quickly jump to… | |||||
| IDTYPE_FLAGS_APPEND_IS_REUSABLE = 1 << 3, | |||||
| /** Indicates that the given IDType does not have animation data. */ | /** Indicates that the given IDType does not have animation data. */ | ||||
| IDTYPE_FLAGS_NO_ANIMDATA = 1 << 3, | IDTYPE_FLAGS_NO_ANIMDATA = 1 << 4, | ||||
| }; | }; | ||||
| typedef struct IDCacheKey { | typedef struct IDCacheKey { | ||||
| /* The session UUID of the ID owning the cached data. */ | /* The session UUID of the ID owning the cached data. */ | ||||
| unsigned int id_session_uuid; | unsigned int id_session_uuid; | ||||
| /* Value uniquely identifying the cache within its ID. | /* Value uniquely identifying the cache within its ID. | ||||
| * Typically the offset of its member in the data-block struct, but can be anything. */ | * Typically the offset of its member in the data-block struct, but can be anything. */ | ||||
| size_t offset_in_ID; | size_t offset_in_ID; | ||||
| ▲ Show 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | |||||
| const char *BKE_idtype_idcode_to_name(const short idcode); | const char *BKE_idtype_idcode_to_name(const short idcode); | ||||
| const char *BKE_idtype_idcode_to_name_plural(const short idcode); | const char *BKE_idtype_idcode_to_name_plural(const short idcode); | ||||
| const char *BKE_idtype_idcode_to_translation_context(const short idcode); | const char *BKE_idtype_idcode_to_translation_context(const short idcode); | ||||
| bool BKE_idtype_idcode_is_valid(const short idcode); | bool BKE_idtype_idcode_is_valid(const short idcode); | ||||
| bool BKE_idtype_idcode_is_linkable(const short idcode); | bool BKE_idtype_idcode_is_linkable(const short idcode); | ||||
| bool BKE_idtype_idcode_is_only_appendable(const short idcode); | bool BKE_idtype_idcode_is_only_appendable(const short idcode); | ||||
| bool BKE_idtype_idcode_append_is_reusable(const short idcode); | |||||
| /* Macro currently, since any linkable IDtype should be localizable. */ | /* Macro currently, since any linkable IDtype should be localizable. */ | ||||
| #define BKE_idtype_idcode_is_localizable BKE_idtype_idcode_is_linkable | #define BKE_idtype_idcode_is_localizable BKE_idtype_idcode_is_linkable | ||||
| short BKE_idtype_idcode_from_name(const char *idtype_name); | short BKE_idtype_idcode_from_name(const char *idtype_name); | ||||
| uint64_t BKE_idtype_idcode_to_idfilter(const short idcode); | uint64_t BKE_idtype_idcode_to_idfilter(const short idcode); | ||||
| short BKE_idtype_idcode_from_idfilter(const uint64_t idfilter); | short BKE_idtype_idcode_from_idfilter(const uint64_t idfilter); | ||||
| Show All 16 Lines | |||||
A reference to #LibraryWeakReference would be good, it's handy to be able to quickly jump to declaration without having to dig around in the code.