Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

blender.c File Reference

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include <fcntl.h>
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_sequence_types.h"
#include "DNA_sound_types.h"
#include "BLI_blenlib.h"
#include "BLI_bpath.h"
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
#include "IMB_imbuf.h"
#include "IMB_moviecache.h"
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_displist.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_ipo.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_sequencer.h"
#include "BKE_sound.h"
#include "BLO_undofile.h"
#include "BLO_readfile.h"
#include "BLO_writefile.h"
#include "BKE_utildefines.h"
#include "RNA_access.h"
#include "WM_api.h"

Go to the source code of this file.

Classes

struct  UndoElem

Defines

#define UNDO_DISK   0
#define MAXUNDONAME   64

Typedefs

typedef struct UndoElem UndoElem

Functions

void free_blender (void)
void initglobals (void)
static void clear_global (void)
static int clean_paths_visit_cb (void *UNUSED(userdata), char *path_dst, const char *path_src)
static void clean_paths (Main *main)
static void setup_app_data (bContext *C, BlendFileData *bfd, const char *filepath)
static int handle_subversion_warning (Main *main, ReportList *reports)
static void keymap_item_free (wmKeyMapItem *kmi)
void BKE_userdef_free (void)
int BKE_read_file (bContext *C, const char *filepath, ReportList *reports)
int BKE_read_file_from_memory (bContext *C, char *filebuf, int filelength, ReportList *reports)
int BKE_read_file_from_memfile (bContext *C, MemFile *memfile, ReportList *reports)
void set_blender_test_break_cb (void(*func)(void))
int blender_test_break (void)
static int read_undosave (bContext *C, UndoElem *uel)
void BKE_write_undo (bContext *C, const char *name)
void BKE_undo_step (bContext *C, int step)
void BKE_reset_undo (void)
void BKE_undo_number (bContext *C, int nr)
void BKE_undo_name (bContext *C, const char *name)
int BKE_undo_valid (const char *name)
const char * BKE_undo_get_name (int nr, int *active)
char * BKE_undo_menu_string (void)
void BKE_undo_save_quit (void)
MainBKE_undo_get_main (Scene **scene)

Variables

Global G
UserDef U
char versionstr [48] = ""
static void(* blender_test_break_cb )(void) = NULL
static ListBase undobase = {NULL, NULL}
static UndoElemcurundo = NULL

Detailed Description

Definition in file blender.c.


Define Documentation

#define MAXUNDONAME   64

Definition at line 451 of file blender.c.

#define UNDO_DISK   0

Definition at line 449 of file blender.c.

Referenced by BKE_write_undo(), and read_undosave().


Typedef Documentation

typedef struct UndoElem UndoElem

Function Documentation

int BKE_read_file ( bContext C,
const char *  filepath,
ReportList reports 
)
int BKE_read_file_from_memfile ( bContext C,
MemFile memfile,
ReportList reports 
)
int BKE_read_file_from_memory ( bContext C,
char *  filebuf,
int  filelength,
ReportList reports 
)

Definition at line 398 of file blender.c.

References BKE_reports_prepend(), BLO_read_from_memory(), and setup_app_data().

Referenced by WM_read_homefile().

void BKE_reset_undo ( void  )
Main* BKE_undo_get_main ( Scene **  scene) [read]
const char* BKE_undo_get_name ( int  nr,
int *  active 
)

Definition at line 666 of file blender.c.

References BLI_findlink(), UndoElem::name, and NULL.

Referenced by rna_undo_itemf().

char* BKE_undo_menu_string ( void  )
void BKE_undo_name ( bContext C,
const char *  name 
)

Definition at line 643 of file blender.c.

References BKE_undo_step(), BLI_rfindstring(), and UndoElem::prev.

Referenced by ed_undo_step().

void BKE_undo_number ( bContext C,
int  nr 
)

Definition at line 636 of file blender.c.

References BKE_undo_step(), and BLI_findlink().

Referenced by undo_history_exec().

void BKE_undo_save_quit ( void  )
void BKE_undo_step ( bContext C,
int  step 
)
int BKE_undo_valid ( const char *  name)

Definition at line 654 of file blender.c.

References BLI_rfindstring(), ListBase::first, ListBase::last, and UndoElem::prev.

Referenced by ED_undo_valid().

void BKE_userdef_free ( void  )
void BKE_write_undo ( bContext C,
const char *  name 
)
int blender_test_break ( void  )
static void clean_paths ( Main main) [static]
static int clean_paths_visit_cb ( void *  UNUSEDuserdata,
char *  path_dst,
const char *  path_src 
) [static]

Definition at line 163 of file blender.c.

References BLI_clean(), FALSE, and TRUE.

Referenced by clean_paths().

static void clear_global ( void  ) [static]

Definition at line 152 of file blender.c.

References free_main(), Global::main, and NULL.

Referenced by setup_app_data().

void free_blender ( void  )
static int handle_subversion_warning ( Main main,
ReportList reports 
) [static]
void initglobals ( void  )
static void keymap_item_free ( wmKeyMapItem kmi) [static]

Definition at line 329 of file blender.c.

References IDP_FreeProperty(), MEM_freeN(), wmKeyMapItem::properties, and wmKeyMapItem::ptr.

Referenced by BKE_userdef_free().

static int read_undosave ( bContext C,
UndoElem uel 
) [static]
void set_blender_test_break_cb ( void(*)(void)  func)

Definition at line 430 of file blender.c.

References blender_test_break_cb.

Referenced by WM_init().

static void setup_app_data ( bContext C,
BlendFileData bfd,
const char *  filepath 
) [static]

Variable Documentation

void(* blender_test_break_cb)(void) = NULL [static]

Definition at line 428 of file blender.c.

Referenced by blender_test_break(), and set_blender_test_break_cb().

UndoElem* curundo = NULL [static]

Definition at line 461 of file blender.c.

Referenced by BKE_undo_save_quit().

Definition at line 93 of file blender.c.

Definition at line 94 of file blender.c.

Referenced by add_empty_text(), add_named_exec(), add_primitive_bone(), add_scene(), add_text(), ANIM_timecode_string_from_frame(), armature_bone_primitive_add_exec(), assign_material(), attach_ndof_data(), axis_set_view(), BIF_do_manipulator(), BIF_draw_manipulator(), blf_glyph_add(), BLF_translate_iface(), BLF_translate_tooltips(), button_activate_state(), button_tooltip_timer_reset(), clip_draw_curfra_label(), SubdAccBuilder::computeEdgeStencil(), console_scrollback_limit(), btGjkEpaSolver2::Distance(), do_history(), do_versions(), draw_depth(), draw_fcurve_curve(), draw_group_socket(), draw_image_seq(), draw_manipulator_rotate(), draw_manipulator_rotate_cyl(), draw_manipulator_scale(), draw_manipulator_translate(), draw_marker_texts(), draw_object(), draw_selected_name(), draw_view_axis(), drawcentercircle(), drawlamp(), duplicate_exec(), ED_fileselect_set_params(), ED_object_add_generic_get_opts(), ED_refresh_viewport_fps(), ED_screen_set_scene(), ED_spacetypes_init(), ED_undo_push(), ed_undo_step(), ED_undo_valid(), ED_view3d_camera_lock_sync(), gjkepa2_impl::GJK::EncloseOrigin(), GregoryTrianglePatch::eval(), GregoryQuadPatch::eval(), gjkepa2_impl::EPA::Evaluate(), gjkepa2_impl::GJK::Evaluate(), ewa_eval(), gjkepa2_impl::EPA::expand(), DocumentExporter::exportCurrentScene(), file_browse_invoke(), file_panel_recent(), flyApply_ndof(), free_old_images(), get_undo_system(), gp_stroke_simplify(), gp_stroke_smooth(), gpencil_draw_init(), GPU_buffer_legacy(), GPU_build_grid_buffers(), GPU_build_mesh_buffers(), GPU_default_lights(), gpu_set_alpha_blend(), MTRand::hash(), id_search_cb(), IDnames_to_dyn_pupstring(), image_open_invoke(), image_view_ndof_invoke(), IMB_isanim(), IMB_ispic(), ColorBlock::init(), init_userdef_do_versions(), initFlyInfo(), gjkepa2_impl::EPA::Initialize(), initTransInfo(), insert_vert_fcurve(), is_pow2_limit(), main(), DirectDrawSurface::mipmap(), ndof_orbit_invoke(), ndof_pan_invoke(), node_draw_group(), node_draw_hidden(), node_update_group(), object_add_generic_invoke_options(), open_invoke(), open_set_load_ui(), outliner_build_tree(), p_chart_convex_hull(), paint_draw_alpha_overlay(), PE_undo_push(), btGjkEpaSolver2::Penetration(), project_paint_end(), gjkepa2_impl::GJK::projectorigin(), pseudoinverse_m4_m4(), rna_ensure_property_description(), rna_ensure_property_name(), RNA_property_enum_items_gettexted(), save_set_compress(), screen_opengl_render_end(), screen_opengl_render_init(), screenshot_startjob(), set_3dcursor_invoke(), btGjkEpaSolver2::SignedDistance(), sk_stroke_filtermval(), smaller_pow2_limit(), smooth_view(), StartKetsjiShell(), KDL::svd_eigen_HH(), text_keymap(), text_scroll_exec(), texture_paint_toggle_exec(), ui_but_start_drag(), UI_GetStyle(), UI_GetTheme(), ui_is_a_warp_but(), ui_numedit_but_HSVCIRCLE(), UI_SetTheme(), ui_theme_init_default(), ui_tooltip_create(), UI_view2d_grid_calc(), UI_view2d_grid_draw(), uiBlockFlipOrder(), uiBlockPicker(), uifont_to_blfont(), uiStyleFontSet(), uiStyleInit(), undo_editmode_push(), undo_stack_push_begin(), undo_stack_push_end(), view3d_main_area_draw_info(), view3d_main_area_draw_objects(), view3d_new(), view_editmove(), view_zoom_inout_invoke(), view_zoom_mouseloc(), view_zoomdrag_apply(), view_zoomdrag_invoke(), view_zoomdrag_modal(), view_zoomin_invoke(), view_zoomout_invoke(), view_zoomstep_apply(), viewdolly_apply(), viewdolly_exec(), viewdolly_invoke(), viewdolly_modal(), viewops_data_create(), vieworbit_exec(), viewrotate_apply(), viewrotate_invoke(), viewzoom_apply(), viewzoom_invoke(), viewzoom_modal(), wm_autosave_delete(), WM_autosave_init(), wm_autosave_timer(), wm_block_create_splash(), WM_cursor_set(), wm_draw_update(), wm_eventemulation(), wm_gesture_evaluate(), wm_handlers_do(), WM_init(), WM_init_splash(), wm_init_userdef(), WM_keyconfig_active(), WM_keyconfig_remove(), WM_keyconfig_set_active(), WM_keyconfig_update(), WM_keymap_restore_to_default(), wm_macro_modal(), WM_modal_tweak_exit(), wm_ndof_sensitivity_exec(), wm_operator_invoke(), WM_read_history(), WM_read_homefile(), WM_userdef_event_map(), WM_write_file(), write_history(), write_previews(), and write_userdef().

ListBase undobase = {NULL, NULL} [static]

Definition at line 460 of file blender.c.

Referenced by undoCurve_to_editCurve().

char versionstr[48] = ""

Definition at line 97 of file blender.c.

Referenced by initglobals(), and stats_string().