|
Blender V4.3
|
#include <Python.h>#include <cstddef>#include "MEM_guardedalloc.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BKE_blendfile.hh"#include "BKE_global.hh"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_report.hh"#include "BLO_writefile.hh"#include "RNA_types.hh"#include "bpy_capi_utils.hh"#include "bpy_library.hh"#include "bpy_rna.hh"#include "../generic/py_capi_utils.hh"#include "../generic/python_compat.hh"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: str | bytes\n" " :arg datablocks: set of data-blocks.\n" " :type datablocks: set[:class:`bpy.types.ID`]\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: str\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.cc.
|
static |
Definition at line 67 of file bpy_library_write.cc.
References BKE_main_blendfile_path_from_global(), BKE_reports_free(), BKE_reports_init(), BKE_reports_print(), BLI_assert, BLI_path_abs(), 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, Main::filepath, G_FILE_COMPRESS, hash, pos, PY_ARG_PARSER_HEAD_COMPAT, PyC_ParseBool(), PyC_ParseStringEnum(), PyC_ParseUnicodeAsBytesAndSize(), pyrna_id_FromPyObject(), RPT_ERROR_ALL, RPT_STORE, self, STRNCPY, PyC_UnicodeAsBytesAndSize_Data::value, PyC_UnicodeAsBytesAndSize_Data::value_coerce, 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: str | bytes\n" " :arg datablocks: set of data-blocks.\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: str\n" " :arg fake_user: When | True[:class:`bpy.types.ID`], | ||
| 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 185 of file bpy_library_write.cc.
Referenced by BPY_rna_types_extend_capi().