Blender  V3.3
Functions | Variables
bpy_library_write.c File Reference
#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
 

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.c.

Function Documentation

◆ bpy_lib_write()

static PyObject* bpy_lib_write ( BPy_PropertyRNA self,
PyObject *  args,
PyObject *  kw 
)
static

◆ PyDoc_STRVAR()

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"   
)

Variable Documentation

◆ BPY_library_write_method_def

PyMethodDef BPY_library_write_method_def
Initial value:
= {
"write",
(PyCFunction)bpy_lib_write,
METH_VARARGS | METH_KEYWORDS,
bpy_lib_write_doc,
}
static PyObject * bpy_lib_write(BPy_PropertyRNA *self, PyObject *args, PyObject *kw)

Definition at line 215 of file bpy_library_write.c.

Referenced by BPY_rna_types_extend_capi().