Refactor writefile handling of data-blocks.

Instead of calling a function looping over whole list of a given ID
type, make whole loop over Main in parent function, and call functions
writing a single datablock at a time.

This design is more in line with all other places in Blender where we
handle whole content of Main (including readfile.c), and much more easy
to extend and add e.g. some generic processing of IDs before/after
writing, etc.

From user point, there should be no change at all, only difference is
that data-block types won't be saved in same order as before (.blend
file specs enforces no order here, so this is not an issue, but it could
bug some third party users using other, simplified .blend file reader maybe).

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D2510
This commit is contained in:
Bastien Montagne 2017-03-17 10:02:08 +01:00
parent e361adbca2
commit 98b81493f3
1 changed files with 1150 additions and 1161 deletions

File diff suppressed because it is too large Load Diff