diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-03-08 17:01:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-08 17:01:31 +0300 |
commit | 9e0921497912cbfe9846358d1cb1220f88315f80 (patch) | |
tree | 093e2de27514b297de63ce6ea1597401507622ab /source/blender/python/intern/bpy_rna_data.h | |
parent | cfd11af9819433c5b83359b72f002fcd59fdc1ab (diff) |
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
Diffstat (limited to 'source/blender/python/intern/bpy_rna_data.h')
-rw-r--r-- | source/blender/python/intern/bpy_rna_data.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna_data.h b/source/blender/python/intern/bpy_rna_data.h new file mode 100644 index 00000000000..b1d226d9dc4 --- /dev/null +++ b/source/blender/python/intern/bpy_rna_data.h @@ -0,0 +1,29 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup pythonintern + */ + +#pragma once + +int BPY_rna_data_context_type_ready(void); + +extern PyMethodDef BPY_rna_data_context_method_def; + +#ifdef __cplusplus +} +#endif |