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
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include "bpy_operator.h"
|
||||
#include "bpy_props.h"
|
||||
#include "bpy_rna.h"
|
||||
#include "bpy_rna_data.h"
|
||||
#include "bpy_rna_gizmo.h"
|
||||
#include "bpy_rna_id_collection.h"
|
||||
#include "bpy_rna_types_capi.h"
|
||||
@@ -425,6 +426,8 @@ void BPy_init_modules(struct bContext *C)
|
||||
/* needs to be first so bpy_types can run */
|
||||
BPY_library_load_type_ready();
|
||||
|
||||
BPY_rna_data_context_type_ready();
|
||||
|
||||
BPY_rna_gizmo_module(mod);
|
||||
|
||||
bpy_import_test("bpy_types");
|
||||
|
Reference in New Issue
Block a user