Blender  V2.59
Defines | Functions | Variables
creator.c File Reference
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_args.h"
#include "BLI_threads.h"
#include "BLI_scanfill.h"
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
#include "DNA_ID.h"
#include "DNA_scene_types.h"
#include "BLI_blenlib.h"
#include "BKE_utildefines.h"
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_font.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_packedFile.h"
#include "BKE_scene.h"
#include "BKE_node.h"
#include "BKE_report.h"
#include "BKE_sound.h"
#include "IMB_imbuf.h"
#include "RE_pipeline.h"
#include "ED_datafiles.h"
#include "WM_api.h"
#include "RNA_define.h"
#include "GPU_draw.h"
#include "GPU_extensions.h"
#include <signal.h>

Go to the source code of this file.

Defines

#define SYS_SystemHandle   int
#define BLEND_VERSION_STRING_FMT   "Blender %d.%02d (sub %d)\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION
#define PY_ENABLE_AUTO   ", (default)"
#define PY_DISABLE_AUTO   ""

Functions

static int print_help (int argc, const char **argv, void *data)
static int print_version (int argc, const char **argv, void *data)
int pluginapi_force_ref (void)
static void setCallbacks (void)
static void blender_esc (int sig)
static void strip_quotes (char *str)
static int print_version (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int print_help (int UNUSED(argc), const char **UNUSED(argv), void *data)
double PIL_check_seconds_timer (void)
static int end_arguments (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int enable_python (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int disable_python (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int background_mode (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int debug_mode (int UNUSED(argc), const char **UNUSED(argv), void *data)
static int set_fpe (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int set_factory_startup (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int set_env (int argc, const char **argv, void *UNUSED(data))
static int playback_mode (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int prefsize (int argc, const char **argv, void *UNUSED(data))
static int with_borders (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int without_borders (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int start_with_console (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int register_extension (int UNUSED(argc), const char **UNUSED(argv), void *data)
static int no_joystick (int UNUSED(argc), const char **UNUSED(argv), void *data)
static int no_glsl (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int no_audio (int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
static int set_audio (int argc, const char **argv, void *UNUSED(data))
static int set_output (int argc, const char **argv, void *data)
static int set_engine (int argc, const char **argv, void *data)
static int set_image_type (int argc, const char **argv, void *data)
static int set_threads (int argc, const char **argv, void *UNUSED(data))
static int set_extension (int argc, const char **argv, void *data)
static int set_ge_parameters (int argc, const char **argv, void *data)
static int render_frame (int argc, const char **argv, void *data)
static int render_animation (int UNUSED(argc), const char **UNUSED(argv), void *data)
static int set_scene (int argc, const char **argv, void *data)
static int set_start_frame (int argc, const char **argv, void *data)
static int set_end_frame (int argc, const char **argv, void *data)
static int set_skip_frame (int argc, const char **argv, void *data)
static int run_python (int argc, const char **argv, void *data)
static int run_python_console (int UNUSED(argc), const char **argv, void *data)
static int set_addons (int argc, const char **argv, void *data)
static int load_file (int UNUSED(argc), const char **argv, void *data)
static void setupArguments (bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
int main (int argc, const char **argv)
static void error_cb (const char *err)
static void mem_error_cb (const char *errorStr)

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 []
char bprogname [FILE_MAX]
char btempdir [FILE_MAX]
int wm_start_with_console

Detailed Description

Definition in file creator.c.


Define Documentation

#define BLEND_VERSION_STRING_FMT   "Blender %d.%02d (sub %d)\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION

Definition at line 153 of file creator.c.

Referenced by debug_mode(), print_help(), and print_version().

#define PY_DISABLE_AUTO   ""

Referenced by setupArguments().

#define PY_ENABLE_AUTO   ", (default)"

Referenced by setupArguments().

#define SYS_SystemHandle   int

Definition at line 114 of file creator.c.


Function Documentation

static int background_mode ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 360 of file creator.c.

References Global::background, and G.

Referenced by setupArguments().

static void blender_esc ( int  sig) [static]

Definition at line 168 of file creator.c.

References Global::afbreek, and G.

Referenced by main().

static int debug_mode ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  data 
) [static]
static int disable_python ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 353 of file creator.c.

References Global::f, G, G_SCRIPT_AUTOEXEC, and G_SCRIPT_OVERRIDE_PREF.

Referenced by setupArguments().

static int enable_python ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 346 of file creator.c.

References Global::f, G, G_SCRIPT_AUTOEXEC, and G_SCRIPT_OVERRIDE_PREF.

Referenced by setupArguments().

static int end_arguments ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 341 of file creator.c.

Referenced by setupArguments().

static void error_cb ( const char *  err) [static]

Definition at line 1329 of file creator.c.

Referenced by setCallbacks().

static int load_file ( int   UNUSEDargc,
const char **  argv,
void *  data 
) [static]
int main ( int  argc,
const char **  argv 
)
static void mem_error_cb ( const char *  errorStr) [static]

Definition at line 1335 of file creator.c.

Referenced by setCallbacks().

static int no_audio ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 522 of file creator.c.

References sound_force_device().

Referenced by setupArguments().

static int no_glsl ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 516 of file creator.c.

References GPU_extensions_disable().

Referenced by setupArguments().

static int no_joystick ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  data 
) [static]

Definition at line 498 of file creator.c.

References Global::f, G, G_DEBUG, and SYS_WriteCommandLineInt().

Referenced by setupArguments().

double PIL_check_seconds_timer ( void  )
static int playback_mode ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 433 of file creator.c.

References Global::background, and G.

Referenced by setupArguments().

int pluginapi_force_ref ( void  )
static int prefsize ( int  argc,
const char **  argv,
void *  UNUSEDdata 
) [static]

Definition at line 448 of file creator.c.

References WM_setprefsize().

Referenced by setupArguments().

static int print_help ( int  argc,
const char **  argv,
void *  data 
) [static]

Referenced by setupArguments().

static int print_help ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  data 
) [static]
static int print_version ( int  argc,
const char **  argv,
void *  data 
) [static]

Referenced by setupArguments().

static int print_version ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]
static int register_extension ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  data 
) [static]

Definition at line 486 of file creator.c.

References Global::background, and G.

Referenced by setupArguments().

static int render_animation ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  data 
) [static]
static int render_frame ( int  argc,
const char **  argv,
void *  data 
) [static]
static int run_python ( int  argc,
const char **  argv,
void *  data 
) [static]

Definition at line 899 of file creator.c.

References BLI_path_cwd(), BLI_strncpy(), BPY_filepath_exec(), C, FILE_MAXDIR, FILE_MAXFILE, and NULL.

Referenced by setupArguments().

static int run_python_console ( int   UNUSEDargc,
const char **  argv,
void *  data 
) [static]

Definition at line 925 of file creator.c.

References BPY_string_exec(), and C.

Referenced by setupArguments().

static int set_addons ( int  argc,
const char **  argv,
void *  data 
) [static]

Definition at line 940 of file creator.c.

References BLI_snprintf(), BPY_string_exec(), C, and str.

Referenced by setupArguments().

static int set_audio ( int  argc,
const char **  argv,
void *  UNUSEDdata 
) [static]

Definition at line 528 of file creator.c.

References sound_define_from_str(), and sound_force_device().

Referenced by setupArguments().

static int set_end_frame ( int  argc,
const char **  argv,
void *  data 
) [static]

Definition at line 840 of file creator.c.

References C, CLAMPIS, CTX_data_scene(), RenderData::efra, MAXFRAME, MINFRAME, and Scene::r.

Referenced by setupArguments().

static int set_engine ( int  argc,
const char **  argv,
void *  data 
) [static]
static int set_env ( int  argc,
const char **  argv,
void *  UNUSEDdata 
) [static]

Definition at line 411 of file creator.c.

References BLI_setenv().

Referenced by setupArguments().

static int set_extension ( int  argc,
const char **  argv,
void *  data 
) [static]

Definition at line 662 of file creator.c.

References C, CTX_data_scene(), Scene::r, R_EXTENSION, and RenderData::scemode.

Referenced by setupArguments().

static int set_factory_startup ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 405 of file creator.c.

References Global::factory_startup, and G.

Referenced by setupArguments().

static int set_fpe ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 380 of file creator.c.

References NULL.

Referenced by setupArguments().

static int set_ge_parameters ( int  argc,
const char **  argv,
void *  data 
) [static]

gameengine parameters are automaticly put into system -g [paramname = value] -g [boolparamname] example: -g novertexarrays -g maxvertexarraysize = 512

Definition at line 685 of file creator.c.

References GPU_set_linear_mipmap(), GPU_set_mipmap(), SYS_WriteCommandLineInt(), and SYS_WriteCommandLineString().

Referenced by setupArguments().

static int set_image_type ( int  argc,
const char **  argv,
void *  data 
) [static]
static int set_output ( int  argc,
const char **  argv,
void *  data 
) [static]

Definition at line 539 of file creator.c.

References BLI_strncpy(), C, CTX_data_scene(), RenderData::pic, and Scene::r.

Referenced by setupArguments().

static int set_scene ( int  argc,
const char **  argv,
void *  data 
) [static]

Definition at line 806 of file creator.c.

References C, CTX_data_main(), CTX_data_scene_set(), and set_scene_name().

Referenced by setupArguments().

static int set_skip_frame ( int  argc,
const char **  argv,
void *  data 
) [static]

Definition at line 859 of file creator.c.

References C, CLAMPIS, CTX_data_scene(), RenderData::frame_step, MAXFRAME, and Scene::r.

Referenced by setupArguments().

static int set_start_frame ( int  argc,
const char **  argv,
void *  data 
) [static]

Definition at line 821 of file creator.c.

References C, CLAMPIS, CTX_data_scene(), MAXFRAME, MINFRAME, Scene::r, and RenderData::sfra.

Referenced by setupArguments().

static int set_threads ( int  argc,
const char **  argv,
void *  UNUSEDdata 
) [static]

Definition at line 647 of file creator.c.

References Global::background, G, and RE_set_max_threads().

Referenced by setupArguments().

static void setCallbacks ( void  ) [static]

Definition at line 1341 of file creator.c.

References BLI_setErrorCallBack(), error_cb(), mem_error_cb(), and MEM_set_error_callback().

Referenced by main().

static void setupArguments ( bContext C,
bArgs ba,
SYS_SystemHandle syshandle 
) [static]
static int start_with_console ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 480 of file creator.c.

Referenced by setupArguments().

static void strip_quotes ( char *  str) [static]

Definition at line 187 of file creator.c.

Referenced by main().

static int with_borders ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 467 of file creator.c.

References WM_setinitialstate_normal().

Referenced by setupArguments().

static int without_borders ( int   UNUSEDargc,
const char **  UNUSEDargv,
void *  UNUSEDdata 
) [static]

Definition at line 473 of file creator.c.

References WM_setinitialstate_fullscreen().

Referenced by setupArguments().


Variable Documentation

char bprogname[FILE_MAX]

Definition at line 150 of file creator.c.

char btempdir[FILE_MAX]
char build_cflags[]

Definition at line 59 of file buildinfo.c.

Definition at line 60 of file buildinfo.c.

char build_date[]

Definition at line 46 of file buildinfo.c.

Definition at line 61 of file buildinfo.c.

Definition at line 50 of file buildinfo.c.

char build_rev[]

Definition at line 48 of file buildinfo.c.

char build_system[]

Definition at line 62 of file buildinfo.c.

char build_time[]

Definition at line 47 of file buildinfo.c.

char build_type[]

Definition at line 51 of file buildinfo.c.

Definition at line 119 of file wm_init_exit.c.

Referenced by WM_init().