Blender  V2.59
Defines | Functions | Variables
bpy_app.c File Reference
#include <Python.h>
#include "bpy_app.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)
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))
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))
static PyObject * bpy_app_tempdir_get (PyObject *UNUSED(self), void *UNUSED(closure))
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 []

Detailed Description

Definition in file bpy_app.c.


Define Documentation

#define DO_EXPAND (   VAL)    VAL ## 1

Definition at line 91 of file bpy_app.c.

#define EXPAND (   VAL)    DO_EXPAND(VAL)

Definition at line 92 of file bpy_app.c.

Referenced by sexpand().

#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().

#define SetStrItem (   str)    PyStructSequence_SET_ITEM(app_info, pos++, PyUnicode_FromString(str))

Referenced by make_app_info().


Function Documentation

static PyObject* bpy_app_debug_get ( PyObject *  UNUSEDself,
void *  UNUSEDclosure 
) [static]

Definition at line 162 of file bpy_app.c.

References Global::f, G, and G_DEBUG.

static int bpy_app_debug_set ( PyObject *  UNUSEDself,
PyObject *  value,
void *  UNUSEDclosure 
) [static]

Definition at line 167 of file bpy_app.c.

References Global::f, G, and G_DEBUG.

static PyObject* bpy_app_debug_value_get ( PyObject *  UNUSEDself,
void *  UNUSEDclosure 
) [static]

Definition at line 182 of file bpy_app.c.

References G, and Global::rt.

static int bpy_app_debug_value_set ( PyObject *  UNUSEDself,
PyObject *  value,
void *  UNUSEDclosure 
) [static]

Definition at line 187 of file bpy_app.c.

References G, and Global::rt.

static PyObject* bpy_app_driver_dict_get ( PyObject *  UNUSEDself,
void *  UNUSEDclosure 
) [static]

Definition at line 207 of file bpy_app.c.

References bpy_pydriver_create_dict(), bpy_pydriver_Dict, and NULL.

PyObject* BPY_app_struct ( void  )

Definition at line 240 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 201 of file bpy_app.c.

References btempdir, and PyC_UnicodeFromByte().

static PyObject* make_app_info ( void  ) [static]
static void py_struct_seq_getset_init ( void  ) [static]

Definition at line 228 of file bpy_app.c.

References BlenderAppType.

Referenced by BPY_app_struct().


Variable Documentation

PyStructSequence_Desc app_info_desc [static]
Initial value:
 {
        (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 84 of file bpy_app.c.

Referenced by BPY_app_struct().

PyStructSequence_Field app_info_fields[] [static]
Initial value:
 {
        {(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 *)"handlers", (char *)"Application handler callbacks"},
        {NULL}
}

Definition at line 60 of file bpy_app.c.

PyTypeObject BlenderAppType [static]

Definition at line 58 of file bpy_app.c.

Referenced by BPY_app_struct(), make_app_info(), and py_struct_seq_getset_init().

PyGetSetDef bpy_app_getsets[] [static]
Initial value:
 {
        {(char *)"debug", bpy_app_debug_get, bpy_app_debug_set, (char *)"Boolean, set when blender is running in debug mode (started with -d)", NULL},
        {(char *)"debug_value", bpy_app_debug_value_get, bpy_app_debug_value_set, (char *)"Int, number which can be set to non-zero values for testing purposes.", NULL},
        {(char *)"tempdir", bpy_app_tempdir_get, NULL, (char *)"String, the temp directory used by blender (read-only)", NULL},
        {(char *)"driver_namespace", bpy_app_driver_dict_get, NULL, (char *)"Dictionary for drivers namespace, editable in-place, reset on file load (read-only)", NULL},
        {NULL, NULL, NULL, NULL, NULL}
}

Definition at line 220 of file bpy_app.c.

char build_cflags[]

Definition at line 59 of file buildinfo.c.

Referenced by main(), make_app_info(), and print_version().

Definition at line 60 of file buildinfo.c.

Referenced by main(), make_app_info(), and print_version().

char build_date[]

Definition at line 46 of file buildinfo.c.

Referenced by debug_mode(), main(), make_app_info(), and print_version().

Definition at line 61 of file buildinfo.c.

Referenced by main(), make_app_info(), and print_version().

Definition at line 50 of file buildinfo.c.

Referenced by debug_mode(), main(), make_app_info(), and print_version().

char build_rev[]
char build_system[]

Definition at line 62 of file buildinfo.c.

Referenced by main(), make_app_info(), and print_version().

char build_time[]

Definition at line 47 of file buildinfo.c.

Referenced by debug_mode(), main(), make_app_info(), and print_version().

char build_type[]

Definition at line 51 of file buildinfo.c.

Referenced by debug_mode(), main(), make_app_info(), and print_version().