Blender Git Loki

Git Commits -> Revision 9e09214

Revision 9e09214 by Campbell Barton (master)
March 8, 2021, 14:01 (GMT)
PyAPI: add bpy.types.BlendFile.temp_data for temporary library loading

This adds support for creating a `BlendFile` (internally called `Main`),
which is limited to a context.

Temporary data can now be created which can then use
`.libraries.load()` the same as with `bpy.data`.

To prevent errors caused by mixing the temporary ID's with data in
`bpy.data` they are tagged as temporary so they can't be assigned
to properties, however they can be passed as arguments to functions.

Reviewed By: mont29, sybren

Ref D10612

Commit Details:

Full Hash: 9e0921497912cbfe9846358d1cb1220f88315f80
Parent Commit: cfd11af
Lines Changed: +306, -7

2 Added Paths:

/source/blender/python/intern/bpy_rna_data.c (+219, -0) (View)
/source/blender/python/intern/bpy_rna_data.h (+29, -0) (View)

9 Modified Paths:

/source/blender/blenkernel/intern/lib_id.c (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+11, -2) (Diff)
/source/blender/blenloader/intern/versioning_250.c (+3, -1) (Diff)
/source/blender/makesdna/DNA_ID.h (+6, -0) (Diff)
/source/blender/python/intern/bpy.c (+3, -0) (Diff)
/source/blender/python/intern/bpy_library_load.c (+14, -2) (Diff)
/source/blender/python/intern/bpy_rna.c (+13, -0) (Diff)
/source/blender/python/intern/bpy_rna_types_capi.c (+5, -2) (Diff)
/source/blender/python/intern/CMakeLists.txt (+2, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021