60 Py_VISIT(
self->data_rna);
66 Py_CLEAR(
self->data_rna);
72 PyObject_GC_UnTrack(
self);
73 Py_CLEAR(
self->data_rna);
74 PyObject_GC_Del(
self);
78 PyVarObject_HEAD_INIT(
NULL, 0)
"bpy_rna_data_context",
110 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
157 ".. method:: temp_data(filepath=None)\n"
159 " A context manager that temporarily creates blender file data.\n"
161 " :arg filepath: The file path for the newly temporary data. "
162 "When None, the path of the currently open file is used.\n"
163 " :type filepath: str or NoneType\n"
165 " :return: Blend file data which is freed once the context exists.\n"
166 " :rtype: :class:`bpy.types.BlendData`\n");
171 const char *filepath =
NULL;
172 static const char *_keywords[] = {
"filepath",
NULL};
173 static _PyArg_Parser _parser = {
"|$z:temp_data", _keywords, 0};
174 if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &filepath)) {
182 return (PyObject *)
ret;
193 PyObject_GC_Track(
self);
195 return (PyObject *)
self->data_rna;
208 METH_STATIC | METH_VARARGS | METH_KEYWORDS,
209 bpy_rna_data_context_load_doc,
struct Main * BKE_main_new(void)
void BKE_main_free(struct Main *mainvar)
#define STRNCPY(dst, src)
#define RNA_POINTER_INVALIDATE(ptr)
PyObject * pyrna_struct_CreatePyObject(PointerRNA *ptr)
static PyObject * bpy_rna_data_context_exit(BPy_DataContext *self, PyObject *args)
static PyObject * bpy_rna_data_context_enter(BPy_DataContext *self)
static int bpy_rna_data_context_clear(BPy_DataContext *self)
static PyTypeObject bpy_rna_data_context_Type
static int bpy_rna_data_context_traverse(BPy_DataContext *self, visitproc visit, void *arg)
PyMethodDef BPY_rna_data_context_method_def
static void bpy_rna_data_context_dealloc(BPy_DataContext *self)
static PyMethodDef bpy_rna_data_context_methods[]
PyDoc_STRVAR(bpy_rna_data_context_load_doc, ".. method:: temp_data(filepath=None)\n" "\n" " A context manager that temporarily creates blender file data.\n" "\n" " :arg filepath: The file path for the newly temporary data. " "When None, the path of the currently open file is used.\n" " :type filepath: str or NoneType\n" "\n" " :return: Blend file data which is freed once the context exists.\n" " :rtype: :class:`bpy.types.BlendData`\n")
static PyObject * bpy_rna_data_temp_data(PyObject *self, PyObject *args, PyObject *kwds)
int BPY_rna_data_context_type_ready(void)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
PyObject_HEAD BPy_StructRNA * data_rna