Blender V2.61 - r43446
|
#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 |
Definition in file creator.c.
#define BLEND_VERSION_STRING_FMT |
"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 |
static int background_mode | ( | int | UNUSEDargc, |
const char ** | UNUSEDargv, | ||
void * | UNUSEDdata | ||
) | [static] |
static void blender_esc | ( | int | sig | ) | [static] |
static int debug_mode | ( | int | UNUSEDargc, |
const char ** | UNUSEDargv, | ||
void * | data | ||
) | [static] |
Definition at line 350 of file creator.c.
References BLEND_VERSION_STRING_FMT, BLI_argsPrint(), build_date, build_platform, build_time, build_type, G, G_DEBUG, and MEM_set_memory_debug().
Referenced by setupArguments().
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] |
Definition at line 922 of file creator.c.
References BKE_read_file(), BKE_READ_FILE_FAIL, BKE_reports_clear(), BKE_reports_init(), BLI_path_cwd(), BLI_strncpy(), BPY_app_handlers_reset(), BPY_driver_reset(), BPY_modules_load_user(), C, CTX_data_main(), CTX_wm_manager(), CTX_wm_manager_set(), CTX_wm_screen_set(), DAG_on_visible_update(), data, FALSE, FILE_MAX, G, NULL, RPT_PRINT, TRUE, wm_add_default(), WM_check(), and WM_read_file().
Referenced by main().
int main | ( | int | argc, |
const char ** | argv | ||
) |
Definition at line 1120 of file creator.c.
References BKE_font_register_builtin(), blender_esc(), BLI_argsFree(), BLI_argsInit(), BLI_argsParse(), BLI_cb_init(), BLI_init_program_path(), BLI_init_temporary_dir(), BLI_setenv(), BLI_threadapi_init(), C, CTX_create(), CTX_py_init_set(), datatoc_Bfont, datatoc_Bfont_size, G, G_FILE_AUTOPLAY, G_SCRIPT_AUTOEXEC, GHOST_HACK_getFirstFile(), IMB_init(), init_def_material(), init_nodesystem(), initglobals(), load_file(), NULL, pluginapi_force_ref(), RE_engines_init(), RNA_init(), setCallbacks(), setupArguments(), sound_init_once(), SYS_GetSystem(), UserDef::tempdir, U, WM_exit(), WM_init(), WM_init_game(), WM_init_splash(), WM_keymap_init(), and WM_main().
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 | ) |
Return an indication of time, expressed as seconds since some fixed point. Successive calls are guarenteed to generate values greator than or equal to the last call.
Definition at line 81 of file time.c.
Referenced by applySnapping(), BIF_retargetArmature(), BLI_fillrand(), BLI_thread_queue_pop_timeout(), bpy_context_clear(), bpy_context_set(), BPY_python_end(), button_activate_init(), do_render_all_options(), do_versions(), draw_image_buffer_repeated(), dynamicPaint_initBake(), flyApply(), flyEvent(), free_old_images(), KX_BlenderSystem::GetTimeInSeconds(), init_render_object(), initFlyInfo(), KX_BlenderSystem::KX_BlenderSystem(), minimize_stretch_init(), minimize_stretch_iteration(), minimize_stretch_modal(), multiple_scattering_diffusion(), object_add_collision_fields(), paint_apply_event(), panel_activate_state(), ptcache_bake_thread(), RE_InitState(), redraw_timer_exec(), softbody_step(), tag_image_time(), text_line_number_invoke(), track_markers_startjob(), ui_blockopen_end(), ui_do_animate(), ui_mouse_motion_towards_check(), ui_mouse_motion_towards_init(), view_zoomdrag_apply(), view_zoomdrag_invoke(), view_zoomdrag_modal(), viewzoom_apply(), viewzoom_invoke(), vol_precache_objectinstance_threads(), WM_event_add_timer(), wm_event_do_handlers(), wm_handlers_do(), wm_window_testbreak(), and wm_window_timer().
static int playback_mode | ( | int | UNUSEDargc, |
const char ** | UNUSEDargv, | ||
void * | UNUSEDdata | ||
) | [static] |
int pluginapi_force_ref | ( | void | ) |
Definition at line 273 of file pluginapi.c.
References allocImBuf(), callocN(), callocT(), de_interlace(), double_fast_x(), double_fast_y(), double_x(), double_y(), dupImBuf(), freeImBuf(), freeN(), freeT(), GET_INT_FROM_POINTER, half_x(), half_y(), hnoise(), hnoisep(), interlace(), ispic(), loadifffile(), loadiffname(), mallocN(), mallocT(), onehalf(), saveiff(), scalefastImBuf(), scaleImBuf(), testiffname(), turbulence(), and turbulence1().
Referenced by main().
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] |
Definition at line 202 of file creator.c.
References BLEND_VERSION_STRING_FMT, BLI_argsPrintArgDoc(), and BLI_argsPrintOtherDoc().
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] |
Definition at line 183 of file creator.c.
References BLEND_VERSION_STRING_FMT, build_cflags, build_cxxflags, build_date, build_linkflags, build_platform, build_rev, build_system, build_time, and build_type.
static int register_extension | ( | int | UNUSEDargc, |
const char ** | UNUSEDargv, | ||
void * | data | ||
) | [static] |
static int render_animation | ( | int | UNUSEDargc, |
const char ** | UNUSEDargv, | ||
void * | data | ||
) | [static] |
Definition at line 746 of file creator.c.
References BKE_reports_init(), C, CTX_data_main(), CTX_data_scene(), data, RenderData::efra, RenderData::frame_step, Scene::id, Scene::lay, ID::name, NULL, Scene::r, RE_BlenderAnim(), RE_NewRender(), RE_SetReports(), RPT_PRINT, and RenderData::sfra.
Referenced by setupArguments().
static int render_frame | ( | int | argc, |
const char ** | argv, | ||
void * | data | ||
) | [static] |
Definition at line 704 of file creator.c.
References BKE_reports_init(), C, CTX_data_main(), CTX_data_scene(), data, RenderData::efra, RenderData::frame_step, Scene::id, Scene::lay, MAX2, MAXFRAME, MIN2, MINAFRAME, ID::name, NULL, Scene::r, RE_BlenderAnim(), RE_NewRender(), RE_SetReports(), RPT_PRINT, and RenderData::sfra.
Referenced by setupArguments().
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] |
Definition at line 544 of file creator.c.
References BLI_findstring(), BLI_strncpy_utf8(), C, CTX_data_scene(), data, RenderData::engine, ListBase::first, RenderEngineType::idname, RenderEngineType::next, NULL, Scene::r, and R_engines.
Referenced by setupArguments().
static int set_env | ( | int | argc, |
const char ** | argv, | ||
void * | UNUSEDdata | ||
) | [static] |
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] |
static int set_fpe | ( | int | UNUSEDargc, |
const char ** | UNUSEDargv, | ||
void * | UNUSEDdata | ||
) | [static] |
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] |
Definition at line 579 of file creator.c.
References BKE_imtype_from_arg(), C, CTX_data_scene(), data, RenderData::im_format, ImageFormatData::imtype, Scene::r, and R_IMF_IMTYPE_INVALID.
Referenced by setupArguments().
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] |
Definition at line 991 of file creator.c.
References background_mode(), BLENDER_MAX_THREADS, BLENDER_STARTUP_FILE, BLENDER_SYSTEM_DATAFILES, BLENDER_SYSTEM_PLUGINS, BLENDER_SYSTEM_PYTHON, BLENDER_SYSTEM_SCRIPTS, BLI_argsAdd(), BLI_argsAddCase(), debug_mode(), disable_python(), enable_python(), end_arguments(), no_audio(), no_glsl(), no_joystick(), NULL, playback_mode(), prefsize(), print_help(), print_version(), PY_DISABLE_AUTO, PY_ENABLE_AUTO, register_extension(), render_animation(), render_frame(), run_python(), run_python_console(), set_addons(), set_audio(), set_end_frame(), set_engine(), set_env(), set_extension(), set_factory_startup(), set_fpe(), set_ge_parameters(), set_image_type(), set_output(), set_scene(), set_skip_frame(), set_start_frame(), set_threads(), start_with_console(), STRINGIFY, STRINGIFY_ARG, with_borders(), and without_borders().
Referenced by main().
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().
char build_cflags[] |
Definition at line 53 of file buildinfo.c.
char build_cxxflags[] |
Definition at line 54 of file buildinfo.c.
char build_date[] |
Definition at line 40 of file buildinfo.c.
char build_linkflags[] |
Definition at line 55 of file buildinfo.c.
char build_platform[] |
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().