Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_fileops.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_screen.h"
#include "ED_util.h"
#include "RNA_access.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "buttons_intern.h"
Go to the source code of this file.
Classes | |
struct | FileBrowseOp |
Typedefs | |
typedef struct FileBrowseOp | FileBrowseOp |
Functions | |
static int | toolbox_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event)) |
void | BUTTONS_OT_toolbox (wmOperatorType *ot) |
static int | file_browse_exec (bContext *C, wmOperator *op) |
static int | file_browse_cancel (bContext *UNUSED(C), wmOperator *op) |
static int | file_browse_invoke (bContext *C, wmOperator *op, wmEvent *event) |
void | BUTTONS_OT_file_browse (wmOperatorType *ot) |
void | BUTTONS_OT_directory_browse (wmOperatorType *ot) |
Definition in file buttons_ops.c.
typedef struct FileBrowseOp FileBrowseOp |
void BUTTONS_OT_directory_browse | ( | wmOperatorType * | ot | ) |
Definition at line 231 of file buttons_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, file_browse_cancel(), file_browse_exec(), file_browse_invoke(), FILE_OPENFILE, FILE_SPECIAL, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, WM_FILESEL_DIRECTORY, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by buttons_operatortypes().
void BUTTONS_OT_file_browse | ( | wmOperatorType * | ot | ) |
Definition at line 214 of file buttons_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, file_browse_cancel(), file_browse_exec(), file_browse_invoke(), FILE_OPENFILE, FILE_SPECIAL, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, WM_FILESEL_FILEPATH, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by buttons_operatortypes().
void BUTTONS_OT_toolbox | ( | wmOperatorType * | ot | ) |
Definition at line 80 of file buttons_ops.c.
References wmOperatorType::description, ED_operator_buttons_active(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, and toolbox_invoke().
Referenced by buttons_operatortypes().
static int file_browse_cancel | ( | bContext * | UNUSEDC, |
wmOperator * | op | ||
) | [static] |
Definition at line 148 of file buttons_ops.c.
References wmOperator::customdata, MEM_freeN(), NULL, and OPERATOR_CANCELLED.
Referenced by BUTTONS_OT_directory_browse(), and BUTTONS_OT_file_browse().
static int file_browse_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 99 of file buttons_ops.c.
References BLI_add_slash(), BLI_is_dir(), BLI_path_abs(), BLI_splitdirstring(), BLI_strncpy(), wmOperator::customdata, PointerRNA::data, ED_undo_operator_repeat(), FILE_MAX, G, PointerRNA::id, ID_BLEND_PATH, MEM_freeN(), MEM_reallocN(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, FileBrowseOp::prop, PROP_DIRPATH, FileBrowseOp::ptr, wmOperator::ptr, RNA_property_string_set(), RNA_property_subtype(), RNA_property_update(), RNA_string_get_alloc(), RNA_struct_find_property(), RNA_struct_property_is_set(), str, strlen(), and WM_operator_last_redo().
Referenced by BUTTONS_OT_directory_browse(), and BUTTONS_OT_file_browse().
static int file_browse_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 156 of file buttons_ops.c.
References wmEvent::alt, BLI_last_slash(), wmOperator::customdata, PointerRNA::data, UserDef::flag, MEM_callocN(), MEM_freeN(), NULL, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, FileBrowseOp::prop, FileBrowseOp::ptr, wmOperator::ptr, RNA_boolean_set(), RNA_property_string_get_alloc(), RNA_string_set(), RNA_struct_find_property(), RNA_struct_property_is_set(), wmEvent::shift, str, U, uiFileBrowseContextProperty(), USER_RELPATHS, WM_event_add_fileselect(), WM_OP_EXEC_DEFAULT, WM_operator_name_call(), WM_operator_properties_create(), and WM_operator_properties_free().
Referenced by BUTTONS_OT_directory_browse(), and BUTTONS_OT_file_browse().
static int toolbox_invoke | ( | bContext * | C, |
wmOperator * | UNUSEDop, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 62 of file buttons_ops.c.
References CTX_wm_screen(), CTX_wm_space_buts(), bScreen::id, OPERATOR_CANCELLED, RNA_pointer_create(), RNA_SpaceProperties, uiItemsEnumR(), uiPupMenuBegin(), uiPupMenuEnd(), and uiPupMenuLayout().
Referenced by BUTTONS_OT_toolbox().