From BlenderWiki

Jump to: navigation, search

Datablocks & Libraries Management

Datablock Remapping

A core low-level feature regarding datablocks management has been added, called 'ID remapping'. It allows to replace a given datablock by another, while Blender is running. Until now it was partially possible for a few types of datablock, but highly confusing code spread across the code base, often not totally in sync, missing some pieces here and there, etc.

This will be very important for future asset management, but is already used in 2.78 to add ability to (from the outliner menus):

  • From Blender File view, right-clicking on a library:
    • Reload and Relocate libraries (no need anymore to save and re-open .blend file to update libraries or change their paths).
  • From All Scenes, Current Scene and similar views, right-clicking on a datablock:
    • Fully Delete a datablock.
    • Remap Users of a datablock to another one (of same type of course) - means you can e.g. replace all usages of a material or texture by another one.

At a lower level, this work also aimed at cleaning up and simplifying ID management code (copying, making unique, deleting, appending/linking, making local, etc.).

This concludes design task T45351.
Commits: rB897e97f078e6 and rB7547c6a250cd6f (and a lot others after initial merge).