Blender
V3.3
|
#include <Python.h>
#include <stddef.h>
#include "MEM_guardedalloc.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_blendfile.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BLO_writefile.h"
#include "RNA_types.h"
#include "bpy_capi_utils.h"
#include "bpy_library.h"
#include "bpy_rna.h"
#include "../generic/py_capi_utils.h"
Go to the source code of this file.
Functions | |
PyDoc_STRVAR (bpy_lib_write_doc, ".. method:: write(filepath, datablocks, path_remap=False, fake_user=False, compress=False)\n" "\n" " Write data-blocks into a blend file.\n" "\n" " .. note::\n" "\n" " Indirectly referenced data-blocks will be expanded and written too.\n" "\n" " :arg filepath: The path to write the blend-file.\n" " :type filepath: string\n" " :arg datablocks: set of data-blocks (:class:`bpy.types.ID` instances).\n" " :type datablocks: set\n" " :arg path_remap: Optionally remap paths when writing the file:\n" "\n" " - ``NONE`` No path manipulation (default).\n" " - ``RELATIVE`` Remap paths that are already relative to the new location.\n" " - ``RELATIVE_ALL`` Remap all paths to be relative to the new location.\n" " - ``ABSOLUTE`` Make all paths absolute on writing.\n" "\n" " :type path_remap: string\n" " :arg fake_user: When True, data-blocks will be written with fake-user flag enabled.\n" " :type fake_user: bool\n" " :arg compress: When True, write a compressed blend file.\n" " :type compress: bool\n") | |
static PyObject * | bpy_lib_write (BPy_PropertyRNA *self, PyObject *args, PyObject *kw) |
Variables | |
PyMethodDef | BPY_library_write_method_def |
Python API for writing a set of data-blocks into a file. Useful for writing out asset-libraries, defines: bpy.data.libraries.write(...)
.
Definition in file bpy_library_write.c.
|
static |
Definition at line 60 of file bpy_library_write.c.
References BKE_blendfile_write_partial(), BKE_blendfile_write_partial_begin(), BKE_blendfile_write_partial_end(), BKE_blendfile_write_partial_tag_ID(), BKE_main_blendfile_path_from_global(), BKE_reports_clear(), BKE_reports_init(), BKE_reports_print(), BLI_path_abs(), BLI_strncpy(), BLO_WRITE_PATH_REMAP_ABSOLUTE, BLO_WRITE_PATH_REMAP_NONE, BLO_WRITE_PATH_REMAP_RELATIVE, BLO_WRITE_PATH_REMAP_RELATIVE_ALL, BPy_reports_to_error(), FILE_MAX, G_FILE_COMPRESS, hash, id, LIB_FAKEUSER, MEM_freeN, MEM_mallocN, NULL, pos, PyC_ParseBool(), PyC_ParseStringEnum(), pyrna_id_FromPyObject(), ret, RPT_ERROR_ALL, RPT_STORE, and PyC_StringEnum::value_found.
PyDoc_STRVAR | ( | bpy_lib_write_doc | , |
".. method:: write(filepath, datablocks, path_remap=False, fake_user=False, compress=False)\n" "\n" " Write data-blocks into a blend file.\n" "\n" " .. note::\n" "\n" " Indirectly referenced data-blocks will be expanded and written too.\n" "\n" " :arg filepath: The path to write the blend-file.\n" " :type filepath: string\n" " :arg datablocks: set of data-blocks (:class:`bpy.types.ID` instances).\n" " :type datablocks: set\n" " :arg path_remap: Optionally remap paths when writing the file:\n" "\n" " - ``NONE`` No path manipulation (default).\n" " - ``RELATIVE`` Remap paths that are already relative to the new location.\n" " - ``RELATIVE_ALL`` Remap all paths to be relative to the new location.\n" " - ``ABSOLUTE`` Make all paths absolute on writing.\n" "\n" " :type path_remap: string\n" " :arg fake_user: When | True, | ||
data-blocks will be written with fake-user flag enabled.\n" " :type fake_user:bool\n" " :arg compress:When | True, | ||
write a compressed blend file.\n" " :type compress:bool\n" | |||
) |
PyMethodDef BPY_library_write_method_def |
Definition at line 215 of file bpy_library_write.c.
Referenced by BPY_rna_types_extend_capi().