this way bpy.app.handlers.version_update fires and e.g. cycles can do its
own [python] do_versions() in the addon in these situations as well
Fixes T62415
Differential D4499
run BLI_CB_EVT_VERSION_UPDATE callbacks on append / relocate as well Authored by Philipp Oeser (lichtwerk) on Mar 11 2019, 10:53 PM. Tags None Subscribers None
Details this way bpy.app.handlers.version_update fires and e.g. cycles can do its Fixes T62415
Diff Detail
Event TimelineComment Actions 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. |