This has one important implication that should be noted in comments imho: it is crucial to not free that storage until the whole Main has been written (otherwise it could lead to same memory being re-used several time for different data, which would break .blend files in unpredictable ways). AFAICT current code is correct on that regard, but this should still be clearly documented.
This should not be needed, BKE_id_new_nomain
already calls BKE_libblock_init_empty
which calls the relevant initi_data
callback.
Not sure what is a 'pre-order vector'? or is a typo? Like pre-ordered vector
? Same below.
Picky detail, but there should not be extra spaces on this empty line ;)
This change should also be conditioned to #ifdef WITH_GREASE_PENCIL_V3
?
This change should also be conditioned to #ifdef WITH_GREASE_PENCIL_V3
?
Shouldn't this change also be conditioned by the #ifdef WITH_GREASE_PENCIL_V3
?
Would rather add the new case immediately after the legacy GP one... At the very least before the generic 'do nothing' block of cases, and the deprecated ones.
not sure if this still needs an answer? but since we use the full ID name, it should always have at least the first two 'id code' chars, hence the assert.
Ah, did not know (or remember) that DEBUG_STRSIZE
was already a thing in existing code... now things make much more sense.