Blender Git Loki

Git Commits -> Revision e591618

Revision e591618 by Bastien Montagne (master)
October 20, 2015, 12:44 (GMT)
First step to handle missing libs/datablocks when reading a file.

Idea is, instead of ignoring completely missing linked datablocks, to
create void placeholders for them.

That way, you can work on your file, save it, and find again your missing data once
lib becomes available again. Or you can edit missing lib's path (in Outliner),
save and reload the file, and you are done.

Also, Outliner now shows broken libraries (and placeholders) with a 'broken lib' icon.

Future plans are also to be able to relocate missing libs and reload them at runtime.

Code notes:
- Placeholder ID is just a regular datablock of same type as expected linked one,
with 'default' data, and a LIB_MISSING bitflag set.
- To allow creation of such datablocks, creation of datablocks in BKE was split in two step:
+ Allocation of memory itself.
+ Setting of all internal data to default values.

See also the design task (T43351).

Reviewed by @campbellbarton, thanks a bunch!

Differential Revision: https://developer.blender.org/D1394

Commit Details:

Full Hash: e5916187e808c1c22229589d103f4de4d4411b5b
Parent Commit: dcb56d7
Lines Changed: +419, -112

38 Modified Paths:

/source/blender/blenkernel/BKE_brush.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_camera.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_curve.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_font.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_lamp.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_lattice.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_library.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_linestyle.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_material.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_mball.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_mesh.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_object.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_scene.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_speaker.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_text.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_world.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/brush.c (+13, -5) (Diff)
/source/blender/blenkernel/intern/camera.c (+11, -4) (Diff)
/source/blender/blenkernel/intern/curve.c (+14, -6) (Diff)
/source/blender/blenkernel/intern/font.c (+20, -0) (Diff)
/source/blender/blenkernel/intern/lamp.c (+13, -5) (Diff)
/source/blender/blenkernel/intern/lattice.c (+13, -6) (Diff)
/source/blender/blenkernel/intern/library.c (+120, -4) (Diff)
/source/blender/blenkernel/intern/linestyle.c (+4, -2) (Diff)
/source/blender/blenkernel/intern/material.c (+5, -3) (Diff)
/source/blender/blenkernel/intern/mball.c (+13, -6) (Diff)
/source/blender/blenkernel/intern/mesh.c (+12, -5) (Diff)
/source/blender/blenkernel/intern/node.c (+5, -0) (Diff)
/source/blender/blenkernel/intern/object.c (+19, -12) (Diff)
/source/blender/blenkernel/intern/scene.c (+12, -3) (Diff)
/source/blender/blenkernel/intern/speaker.c (+11, -4) (Diff)
/source/blender/blenkernel/intern/text.c (+13, -6) (Diff)
/source/blender/blenkernel/intern/texture.c (+2, -0) (Diff)
/source/blender/blenkernel/intern/world.c (+12, -4) (Diff)
/source/blender/blenloader/intern/readfile.c (+67, -33) (Diff)
/source/blender/editors/space_outliner/outliner_draw.c (+17, -3) (Diff)
/source/blender/makesdna/DNA_ID.h (+4, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021