Page MenuHome

Add do_versions_after_liblink() to read code
AbandonedPublic

Authored by Bastien Montagne (mont29) on Dec 19 2016, 7:50 PM.

Details

Summary

Basic idea is to store fileversion in Library datablock, and split again Main by libraries after lib linking, do_versions_after_liblink on those separated Mains, and merge again.

This allows to still have correct versions for each data-block in that second do_versions step.

Related to/needed by D2403 and D2412

Diff Detail

Repository
rB Blender
Branch
readfile_doversions_after_linking
Build Status
Buildable 350
Build 350: arc lint + arc unit

Event Timeline

Bastien Montagne (mont29) retitled this revision from to Initial resurrection of `do_versions_after_linking()`..
Bastien Montagne (mont29) updated this object.
Bastien Montagne (mont29) retitled this revision from Initial resurrection of `do_versions_after_linking()`. to Add do_versions_after_liblink() to read code.Dec 19 2016, 8:18 PM
Bastien Montagne (mont29) updated this object.

Generally seems fine, but see the comment.

source/blender/blenloader/intern/readfile.c
10190

Can this be de-duplicated with the code above?

source/blender/blenloader/intern/readfile.c
10190

Eeeeh… not sure I understand what you mean? deduplicated with which code?

source/blender/blenloader/intern/readfile.c
10190

Two chunks above, below /* Skip in undo case. */

source/blender/blenloader/intern/readfile.c
10190

welll… for linking we have to only work on 'new' linked IDs (split them into own main), which we do not have to do in main file reading. Also, for lib linking we always skip the first of split mains (which is local file).

Sure we can factorize that into a function with a 'do_lib' bool to switch behaviors, but not sure it’s be worth it, given the length of the code here?

source/blender/blenloader/intern/readfile.c
10190

Well, if it's different logic then just keep it as is.

Just mentioned this because code looked suspeciosly similar.