Blender V2.61 - r43446
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 "DNA_userdef_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 "BKE_image.h"
#include "IMB_imbuf.h"
#include "RE_engine.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
#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 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 []
int wm_start_with_console

Detailed Description

Definition in file creator.c.


Define Documentation

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

Definition at line 149 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 109 of file creator.c.


Function Documentation

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

Definition at line 344 of file creator.c.

References G.

Referenced by setupArguments().

static void blender_esc ( int  sig) [static]

Definition at line 166 of file creator.c.

References 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 337 of file creator.c.

References 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 330 of file creator.c.

References 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 325 of file creator.c.

Referenced by setupArguments().

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

Definition at line 1297 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 1303 of file creator.c.

Referenced by setCallbacks().

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

Definition at line 510 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 504 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 486 of file creator.c.

References data, 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 421 of file creator.c.

References G.

Referenced by setupArguments().

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

Definition at line 436 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 474 of file creator.c.

References 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 858 of file creator.c.

References BLI_path_cwd(), BLI_strncpy(), BPY_filepath_exec(), C, data, FILE_MAX, and NULL.

Referenced by setupArguments().

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

Definition at line 884 of file creator.c.

References BPY_string_exec(), C, and data.

Referenced by setupArguments().

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

Definition at line 899 of file creator.c.

References BLI_snprintf(), BPY_string_exec(), C, data, addon::engine::free(), str, and strlen().

Referenced by setupArguments().

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

Definition at line 516 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 798 of file creator.c.

References C, CLAMPIS, CTX_data_scene(), data, 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 399 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 620 of file creator.c.

References C, CTX_data_scene(), data, 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 393 of file creator.c.

References G.

Referenced by setupArguments().

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

Definition at line 368 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 643 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 527 of file creator.c.

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

Referenced by setupArguments().

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

Definition at line 764 of file creator.c.

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

Referenced by setupArguments().

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

Definition at line 817 of file creator.c.

References C, CLAMPIS, CTX_data_scene(), data, 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 779 of file creator.c.

References C, CLAMPIS, CTX_data_scene(), data, 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 605 of file creator.c.

References G, and RE_set_max_threads().

Referenced by setupArguments().

static void setCallbacks ( void  ) [static]

Definition at line 1309 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 468 of file creator.c.

Referenced by setupArguments().

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

Definition at line 455 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 461 of file creator.c.

References WM_setinitialstate_fullscreen().

Referenced by setupArguments().


Variable Documentation

char build_cflags[]

Definition at line 53 of file buildinfo.c.

Definition at line 54 of file buildinfo.c.

char build_date[]

Definition at line 40 of file buildinfo.c.

Definition at line 55 of file buildinfo.c.

Definition at line 44 of file buildinfo.c.

char build_rev[]

Definition at line 42 of file buildinfo.c.

char build_system[]

Definition at line 56 of file buildinfo.c.

char build_time[]

Definition at line 41 of file buildinfo.c.

char build_type[]

Definition at line 45 of file buildinfo.c.

Definition at line 121 of file wm_init_exit.c.

Referenced by WM_init().