Blender V5.3
bpy_library_write.cc File Reference
#include <Python.h>
#include <cstddef>
#include "BLI_path_utils.hh"
#include "BLI_string.hh"
#include "BKE_blendfile.hh"
#include "BKE_global.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_main.hh"
#include "BKE_main_invariants.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.

Namespaces

namespace  blender
 BMesh Iterators.

Functions

 blender::PyDoc_STRVAR (bpy_lib_write_doc, ".. method:: write(filepath, datablocks, *, " "path_remap='NONE', 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" " :param filepath: The path to write the blend-file.\n" " :type filepath: str | bytes\n" " :param datablocks: set of data-blocks.\n" " :type datablocks: set[:class:`bpy.types.ID`]\n" " :param 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" " :param fake_user: When True, data-blocks will be written with fake-user flag enabled.\n" " :type fake_user: bool\n" " :param compress: When True, write a compressed blend file.\n" " :type compress: bool\n")
static PyObject * blender::bpy_lib_write (BPy_PropertyRNA *self, PyObject *args, PyObject *kw)

Detailed Description

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.