Blender V2.61 - r43446
|
#include <Python.h>
#include "bpy_app.h"
#include "bpy_app_ffmpeg.h"
#include "bpy_app_handlers.h"
#include "bpy_driver.h"
#include "BLI_path_util.h"
#include "BLI_utildefines.h"
#include "BKE_blender.h"
#include "BKE_global.h"
#include "structseq.h"
#include "../generic/py_capi_utils.h"
Go to the source code of this file.
Defines | |
#define | DO_EXPAND(VAL) VAL ## 1 |
#define | EXPAND(VAL) DO_EXPAND(VAL) |
#define | SetIntItem(flag) PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag)) |
#define | SetStrItem(str) PyStructSequence_SET_ITEM(app_info, pos++, PyUnicode_FromString(str)) |
#define | SetObjItem(obj) PyStructSequence_SET_ITEM(app_info, pos++, obj) |
Functions | |
static PyObject * | make_app_info (void) |
PyDoc_STRVAR (bpy_app_debug_doc,"Boolean, set when blender is running in debug mode (started with --debug)") | |
static PyObject * | bpy_app_debug_get (PyObject *UNUSED(self), void *UNUSED(closure)) |
static int | bpy_app_debug_set (PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure)) |
PyDoc_STRVAR (bpy_app_debug_value_doc,"Int, number which can be set to non-zero values for testing purposes") | |
static PyObject * | bpy_app_debug_value_get (PyObject *UNUSED(self), void *UNUSED(closure)) |
static int | bpy_app_debug_value_set (PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure)) |
PyDoc_STRVAR (bpy_app_tempdir_doc,"String, the temp directory used by blender (read-only)") | |
static PyObject * | bpy_app_tempdir_get (PyObject *UNUSED(self), void *UNUSED(closure)) |
PyDoc_STRVAR (bpy_app_driver_dict_doc,"Dictionary for drivers namespace, editable in-place, reset on file load (read-only)") | |
static PyObject * | bpy_app_driver_dict_get (PyObject *UNUSED(self), void *UNUSED(closure)) |
static void | py_struct_seq_getset_init (void) |
PyObject * | BPY_app_struct (void) |
Variables | |
char | build_date [] |
char | build_time [] |
char | build_rev [] |
char | build_platform [] |
char | build_type [] |
char | build_cflags [] |
char | build_cxxflags [] |
char | build_linkflags [] |
char | build_system [] |
static PyTypeObject | BlenderAppType |
static PyStructSequence_Field | app_info_fields [] |
static PyStructSequence_Desc | app_info_desc |
static PyGetSetDef | bpy_app_getsets [] |
This file defines a 'PyStructSequence' accessed via 'bpy.app', mostly exposing static applications variables such as version and buildinfo however some writable variables have been added such as 'debug' and 'tempdir'
Definition in file bpy_app.c.
#define EXPAND | ( | VAL | ) | DO_EXPAND(VAL) |
#define SetIntItem | ( | flag | ) | PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag)) |
#define SetObjItem | ( | obj | ) | PyStructSequence_SET_ITEM(app_info, pos++, obj) |
Referenced by make_app_info(), and make_ffmpeg_info().
Referenced by make_app_info().
static PyObject* bpy_app_debug_get | ( | PyObject * | UNUSEDself, |
void * | UNUSEDclosure | ||
) | [static] |
static int bpy_app_debug_set | ( | PyObject * | UNUSEDself, |
PyObject * | value, | ||
void * | UNUSEDclosure | ||
) | [static] |
static PyObject* bpy_app_debug_value_get | ( | PyObject * | UNUSEDself, |
void * | UNUSEDclosure | ||
) | [static] |
static int bpy_app_debug_value_set | ( | PyObject * | UNUSEDself, |
PyObject * | value, | ||
void * | UNUSEDclosure | ||
) | [static] |
static PyObject* bpy_app_driver_dict_get | ( | PyObject * | UNUSEDself, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 227 of file bpy_app.c.
References bpy_pydriver_create_dict(), bpy_pydriver_Dict, and NULL.
PyObject* BPY_app_struct | ( | void | ) |
Definition at line 260 of file bpy_app.c.
References app_info_desc, BlenderAppType, make_app_info(), NULL, and py_struct_seq_getset_init().
Referenced by BPy_init_modules().
static PyObject* bpy_app_tempdir_get | ( | PyObject * | UNUSEDself, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 219 of file bpy_app.c.
References BLI_temporary_dir(), and PyC_UnicodeFromByte().
static PyObject* make_app_info | ( | void | ) | [static] |
Definition at line 100 of file bpy_app.c.
References BLENDER_SUBVERSION, BLENDER_VERSION, BLENDER_VERSION_CHAR, BLENDER_VERSION_CYCLE, BlenderAppType, BLI_program_path(), BPY_app_ffmpeg_struct(), BPY_app_handlers_struct(), build_cflags, build_cxxflags, build_date, build_linkflags, build_platform, build_rev, build_system, build_time, build_type, G, NULL, SetObjItem, SetStrItem, and STRINGIFY.
Referenced by BPY_app_struct().
static void py_struct_seq_getset_init | ( | void | ) | [static] |
Definition at line 248 of file bpy_app.c.
References BlenderAppType.
Referenced by BPY_app_struct().
PyDoc_STRVAR | ( | bpy_app_tempdir_doc | , |
" | String, | ||
the temp directory used by blender(read-only)" | |||
) |
PyDoc_STRVAR | ( | bpy_app_driver_dict_doc | , |
"Dictionary for drivers | namespace, | ||
editable in- | place, | ||
reset on file load(read-only)" | |||
) |
PyDoc_STRVAR | ( | bpy_app_debug_value_doc | , |
" | Int, | ||
number which can be set to non-zero values for testing purposes" | |||
) |
PyDoc_STRVAR | ( | bpy_app_debug_doc | , |
" | Boolean, | ||
set when blender is running in debug mode(started with--debug)" | |||
) |
PyStructSequence_Desc app_info_desc [static] |
{ (char *)"bpy.app", (char *)"This module contains application values that remain unchanged during runtime.", app_info_fields, (sizeof(app_info_fields) / sizeof(PyStructSequence_Field)) - 1 }
Definition at line 90 of file bpy_app.c.
Referenced by BPY_app_struct().
PyStructSequence_Field app_info_fields[] [static] |
{ {(char *)"version", (char *)"The Blender version as a tuple of 3 numbers. eg. (2, 50, 11)"}, {(char *)"version_string", (char *)"The Blender version formatted as a string"}, {(char *)"version_char", (char *)"The Blender version character (for minor releases)"}, {(char *)"version_cycle", (char *)"The release status of this build alpha/beta/rc/release"}, {(char *)"binary_path", (char *)"The location of blenders executable, useful for utilities that spawn new instances"}, {(char *)"background", (char *)"Boolean, True when blender is running without a user interface (started with -b)"}, {(char *)"build_date", (char *)"The date this blender instance was built"}, {(char *)"build_time", (char *)"The time this blender instance was built"}, {(char *)"build_revision", (char *)"The subversion revision this blender instance was built with"}, {(char *)"build_platform", (char *)"The platform this blender instance was built for"}, {(char *)"build_type", (char *)"The type of build (Release, Debug)"}, {(char *)"build_cflags", (char *)"C compiler flags"}, {(char *)"build_cxxflags", (char *)"C++ compiler flags"}, {(char *)"build_linkflags", (char *)"Binary linking flags"}, {(char *)"build_system", (char *)"Build system used"}, {(char *)"ffmpeg", (char *)"FFmpeg library information backend"}, {(char *)"handlers", (char *)"Application handler callbacks"}, {NULL} }
PyTypeObject BlenderAppType [static] |
Definition at line 63 of file bpy_app.c.
Referenced by BPY_app_struct(), make_app_info(), and py_struct_seq_getset_init().
PyGetSetDef bpy_app_getsets[] [static] |
{ {(char *)"debug", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, NULL}, {(char *)"debug_value", bpy_app_debug_value_get, bpy_app_debug_value_set, (char *)bpy_app_debug_value_doc, NULL}, {(char *)"tempdir", bpy_app_tempdir_get, NULL, (char *)bpy_app_tempdir_doc, NULL}, {(char *)"driver_namespace", bpy_app_driver_dict_get, NULL, (char *)bpy_app_driver_dict_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} }
char build_cflags[] |
Definition at line 53 of file buildinfo.c.
Referenced by make_app_info(), and print_version().
char build_cxxflags[] |
Definition at line 54 of file buildinfo.c.
Referenced by make_app_info(), and print_version().
char build_date[] |
Definition at line 40 of file buildinfo.c.
Referenced by debug_mode(), make_app_info(), and print_version().
char build_linkflags[] |
Definition at line 55 of file buildinfo.c.
Referenced by make_app_info(), and print_version().
char build_platform[] |
Definition at line 44 of file buildinfo.c.
Referenced by debug_mode(), make_app_info(), and print_version().
char build_rev[] |
Definition at line 42 of file buildinfo.c.
Referenced by DocumentExporter::exportCurrentScene(), make_app_info(), print_version(), wm_block_create_splash(), and write_global().
char build_system[] |
Definition at line 56 of file buildinfo.c.
Referenced by make_app_info(), and print_version().
char build_time[] |
Definition at line 41 of file buildinfo.c.
Referenced by debug_mode(), make_app_info(), and print_version().
char build_type[] |
Definition at line 45 of file buildinfo.c.
Referenced by debug_mode(), make_app_info(), and print_version().