Page MenuHome

run BLI_CB_EVT_VERSION_UPDATE callbacks on append / relocate as well

Authored by Philipp Oeser (lichtwerk) on Mar 11 2019, 10:53 PM.



this way fires and e.g. cycles can do its
own [python] do_versions() in the addon in these situations as well

Fixes T62415

Diff Detail

rB Blender
T62415 (branched from master)
Build Status
Buildable 3105
Build 3105: arc lint + arc unit

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.

The problem is that it will re-run the versioning on all datablocks, which might have already been versioned or even edited by the user. The versioning code does not always give correct results in that case.

It should only be done on datablocks with LIB_TAG_PRE_EXISTING. I guess we need to expose that tag in the API.

It is also not clear to me that append works correctly, I think the versioning callback has to run before make local so that we can determine which library it came from.

Implementing correct versioning in an add-on is a getting a bit complicated, not sure if we can simplify it somehow. We'll need an example of how to do it correctly in the API docs at some point.

This revision now requires changes to proceed.Mar 12 2019, 5:19 PM