BKE libquery: Add option to also process ID.lib pointer.
This was never needed before, but upcomming work for Brush Asset project requires it.
This commit is contained in:
@@ -142,6 +142,9 @@ enum {
|
||||
/** Also process internal ID pointers like `ID.newid` or `ID.orig_id`.
|
||||
* WARNING: Dangerous, use with caution. */
|
||||
IDWALK_DO_INTERNAL_RUNTIME_POINTERS = (1 << 9),
|
||||
/** Also process the ID.lib pointer. It is an option because this pointer can usually be fully
|
||||
ignored. */
|
||||
IDWALK_DO_LIBRARY_POINTER = (1 << 10),
|
||||
};
|
||||
|
||||
typedef struct LibraryForeachIDData LibraryForeachIDData;
|
||||
|
||||
@@ -294,8 +294,9 @@ static bool library_foreach_ID_link(Main *bmain,
|
||||
continue;
|
||||
}
|
||||
|
||||
/* NOTE: ID.lib pointer is purposefully fully ignored here...
|
||||
* We may want to add it at some point? */
|
||||
if (flag & IDWALK_DO_LIBRARY_POINTER) {
|
||||
CALLBACK_INVOKE(id->lib, IDWALK_CB_NEVER_SELF);
|
||||
}
|
||||
|
||||
if (flag & IDWALK_DO_INTERNAL_RUNTIME_POINTERS) {
|
||||
CALLBACK_INVOKE_ID(id->newid, IDWALK_CB_INTERNAL);
|
||||
|
||||
Reference in New Issue
Block a user