Blender V4.3
creator_intern.h File Reference

Go to the source code of this file.

Classes

struct  ApplicationState
 

Macros

#define BLEND_VERSION_FMT   "Blender %d.%d.%d"
 
#define BLEND_VERSION_ARG   (BLENDER_VERSION / 100), (BLENDER_VERSION % 100), BLENDER_VERSION_PATCH
 

Enumerations

enum  {
  ARG_PASS_ENVIRONMENT = 1 , ARG_PASS_SETTINGS = 2 , ARG_PASS_SETTINGS_GUI = 3 , ARG_PASS_SETTINGS_FORCE = 4 ,
  ARG_PASS_FINAL = 5
}
 

Functions

void main_args_setup (struct bContext *C, struct bArgs *ba, bool all)
 
int main_args_handle_load_file (int argc, const char **argv, void *data)
 
int main_arg_deferred_handle ()
 
void main_arg_deferred_free ()
 
void main_signal_setup (void)
 
void main_signal_setup_background (void)
 
void main_signal_setup_fpe (void)
 

Variables

struct ApplicationState app_state
 
char build_date []
 
char build_time []
 
char build_hash []
 
unsigned long build_commit_timestamp
 
char build_commit_date [16]
 
char build_commit_time [16]
 
char build_branch []
 
char build_platform []
 
char build_type []
 
char build_cflags []
 
char build_cxxflags []
 
char build_linkflags []
 
char build_system []
 

Detailed Description

Functionality for main() initialization.

Definition in file creator_intern.h.

Macro Definition Documentation

◆ BLEND_VERSION_ARG

#define BLEND_VERSION_ARG   (BLENDER_VERSION / 100), (BLENDER_VERSION % 100), BLENDER_VERSION_PATCH

Definition at line 96 of file creator_intern.h.

Referenced by sig_handle_crash().

◆ BLEND_VERSION_FMT

#define BLEND_VERSION_FMT   "Blender %d.%d.%d"

Definition at line 95 of file creator_intern.h.

Referenced by sig_handle_crash().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Passes for use by main_args_setup. Keep in order of execution.

Enumerator
ARG_PASS_ENVIRONMENT 

Run before sub-system initialization.

ARG_PASS_SETTINGS 

General settings parsing, also animation player.

ARG_PASS_SETTINGS_GUI 

Windowing & graphical settings (ignored in background mode).

ARG_PASS_SETTINGS_FORCE 

Currently use for audio devices.

ARG_PASS_FINAL 

Actions & fall back to loading blend file.

Note
arguments in the final pass must use WM_exit instead of exit() environment is properly shut-down (temporary directory deleted, etc).

Definition at line 74 of file creator_intern.h.

Function Documentation

◆ main_arg_deferred_free()

void main_arg_deferred_free ( )

◆ main_arg_deferred_handle()

int main_arg_deferred_handle ( )

Handle an argument which requested deferred evaluation. Needed when arguments which evaluate early need Python to be initialized for example.

Definition at line 502 of file creator_args.cc.

References app_state, BA_ArgCallback_Deferred::argc, BA_ArgCallback_Deferred::argv, BA_ArgCallback_Deferred::data, BA_ArgCallback_Deferred::exit_code, BA_ArgCallback_Deferred::func, and ApplicationState::main_arg_deferred.

Referenced by main().

◆ main_args_handle_load_file()

int main_args_handle_load_file ( int argc,
const char ** argv,
void * data )

Handler for loading blend files.

Note
arguments that cannot be parsed are assumed to be blend files.

Definition at line 2548 of file creator_args.cc.

References data, and handle_load_file().

Referenced by main().

◆ main_args_setup()

void main_args_setup ( struct bContext * C,
struct bArgs * ba,
bool all )
Parameters
allWhen enabled, all arguments are initialized even for configurations that don't apply to the current system. Used for documentation (see Python API: bpy.app.help_text(all=True)).

Expand the doc-string from the function.

A version of CB that expands an additional suffix.

A version of CB that uses all, needed when the doc-string depends on build options.

Definition at line 2582 of file creator_args.cc.

References arg_handle_abort_handler_disable(), arg_handle_addons_set(), arg_handle_app_template(), arg_handle_arguments_end(), arg_handle_audio_disable(), arg_handle_audio_set(), arg_handle_background_mode_set(), arg_handle_command_set(), arg_handle_crash_handler_disable(), arg_handle_debug_exit_on_error(), arg_handle_debug_fpe_set(), arg_handle_debug_gpu_compile_shaders_set(), arg_handle_debug_gpu_renderdoc_set(), arg_handle_debug_gpu_scope_capture_set(), arg_handle_debug_gpu_set(), arg_handle_debug_mode_all(), arg_handle_debug_mode_cycles(), arg_handle_debug_mode_generic_set(), arg_handle_debug_mode_io(), arg_handle_debug_mode_libmv(), arg_handle_debug_mode_memory_set(), arg_handle_debug_mode_set(), arg_handle_debug_value_set(), arg_handle_enable_event_simulate(), arg_handle_engine_set(), arg_handle_env_system_set(), arg_handle_extension_set(), arg_handle_factory_startup_set(), arg_handle_frame_end_set(), arg_handle_frame_skip_set(), arg_handle_frame_start_set(), arg_handle_gpu_backend_set(), arg_handle_image_type_set(), arg_handle_internet_allow_set(), arg_handle_load_last_file(), arg_handle_log_file_set(), arg_handle_log_level_set(), arg_handle_log_set(), arg_handle_log_show_backtrace_set(), arg_handle_log_show_basename_set(), arg_handle_log_show_timestamp_set(), arg_handle_native_pixels_set(), arg_handle_no_window_focus(), arg_handle_output_set(), arg_handle_playback_mode(), arg_handle_print_help(), arg_handle_print_version(), arg_handle_python_console_run(), arg_handle_python_exit_code_set(), arg_handle_python_expr_run(), arg_handle_python_file_run(), arg_handle_python_set(), arg_handle_python_text_run(), arg_handle_python_use_system_env_set(), arg_handle_quiet_set(), arg_handle_register_extension(), arg_handle_register_extension_all(), arg_handle_render_animation(), arg_handle_render_frame(), arg_handle_scene_set(), arg_handle_start_with_console(), arg_handle_threads_set(), arg_handle_unregister_extension(), arg_handle_unregister_extension_all(), arg_handle_verbosity_set(), arg_handle_window_geometry(), arg_handle_window_maximized(), arg_handle_with_borders(), arg_handle_without_borders(), ARG_PASS_ENVIRONMENT, ARG_PASS_FINAL, ARG_PASS_SETTINGS, ARG_PASS_SETTINGS_FORCE, ARG_PASS_SETTINGS_GUI, BLI_args_add(), BLI_args_add_case(), BLI_args_pass_set(), BPY_python_app_help_text_fn, build_defs_init(), CB, CB_ALL, CB_EX, depsgraph, G_DEBUG_DEPSGRAPH, G_DEBUG_DEPSGRAPH_BUILD, G_DEBUG_DEPSGRAPH_EVAL, G_DEBUG_DEPSGRAPH_NO_THREADS, G_DEBUG_DEPSGRAPH_PRETTY, G_DEBUG_DEPSGRAPH_TAG, G_DEBUG_DEPSGRAPH_TIME, G_DEBUG_DEPSGRAPH_UID, G_DEBUG_EVENTS, G_DEBUG_FFMPEG, G_DEBUG_FREESTYLE, G_DEBUG_GHOST, G_DEBUG_GPU_FORCE_WORKAROUNDS, G_DEBUG_HANDLERS, G_DEBUG_JOBS, G_DEBUG_PYTHON, G_DEBUG_WINTAB, G_DEBUG_WM, G_DEBUG_XR, G_DEBUG_XR_TIME, main_args_help_as_string(), BuildDefs::with_cycles_logging, BuildDefs::with_ffmpeg, BuildDefs::with_freestyle, BuildDefs::with_libmv, BuildDefs::with_renderdoc, and BuildDefs::with_xr_openxr.

Referenced by main(), and main_args_help_as_string().

◆ main_signal_setup()

◆ main_signal_setup_background()

void main_signal_setup_background ( void )

Definition at line 215 of file creator_signals.cc.

References BLI_assert, G, and sig_handle_blender_esc().

Referenced by main().

◆ main_signal_setup_fpe()

void main_signal_setup_fpe ( void )

Definition at line 225 of file creator_signals.cc.

Referenced by arg_handle_debug_fpe_set().

Variable Documentation

◆ app_state

◆ build_branch

char build_branch[]
extern

Definition at line 69 of file bpy_app.cc.

Referenced by make_app_info(), and print_version_full().

◆ build_cflags

char build_cflags[]
extern

Definition at line 72 of file bpy_app.cc.

Referenced by make_app_info(), and print_version_full().

◆ build_commit_date

char build_commit_date[16]
extern

◆ build_commit_time

char build_commit_time[16]
extern

◆ build_commit_timestamp

unsigned long build_commit_timestamp
extern

Definition at line 65 of file bpy_app.cc.

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

◆ build_cxxflags

char build_cxxflags[]
extern

Definition at line 73 of file bpy_app.cc.

Referenced by make_app_info(), and print_version_full().

◆ build_date

char build_date[]
extern

◆ build_hash

◆ build_linkflags

char build_linkflags[]
extern

Definition at line 74 of file bpy_app.cc.

Referenced by make_app_info(), and print_version_full().

◆ build_platform

char build_platform[]
extern

Definition at line 70 of file bpy_app.cc.

Referenced by arg_handle_debug_mode_set(), make_app_info(), and print_version_full().

◆ build_system

char build_system[]
extern

Definition at line 75 of file bpy_app.cc.

Referenced by make_app_info(), and print_version_full().

◆ build_time

char build_time[]
extern

◆ build_type

char build_type[]
extern

Definition at line 71 of file bpy_app.cc.

Referenced by arg_handle_debug_mode_set(), make_app_info(), and print_version_full().