Blender V4.3
userpref_ops.cc File Reference
#include <cstring>
#include <fmt/format.h>
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BLI_listbase.h"
#include "BLI_fileops.h"
#include "BLI_path_utils.hh"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BKE_callbacks.hh"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_main.hh"
#include "BKE_preferences.h"
#include "BKE_report.hh"
#include "BLT_translation.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_prototypes.hh"
#include "RNA_types.hh"
#include "UI_interface.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_asset.hh"
#include "ED_userpref.hh"
#include "MEM_guardedalloc.h"

Go to the source code of this file.

Functions

static void ED_dropbox_drop_extension ()
 
void ED_operatortypes_userpref ()
 
Reset Default Theme Operator
static int preferences_reset_default_theme_exec (bContext *C, wmOperator *)
 
static void PREFERENCES_OT_reset_default_theme (wmOperatorType *ot)
 
Add Auto-Execution Path Operator
static int preferences_autoexec_add_exec (bContext *, wmOperator *)
 
static void PREFERENCES_OT_autoexec_path_add (wmOperatorType *ot)
 
Remove Auto-Execution Path Operator
static int preferences_autoexec_remove_exec (bContext *, wmOperator *op)
 
static void PREFERENCES_OT_autoexec_path_remove (wmOperatorType *ot)
 
Add Asset Library Operator
static int preferences_asset_library_add_exec (bContext *C, wmOperator *op)
 
static int preferences_asset_library_add_invoke (bContext *C, wmOperator *op, const wmEvent *)
 
static void PREFERENCES_OT_asset_library_add (wmOperatorType *ot)
 
Remove Asset Library Operator
static bool preferences_asset_library_remove_poll (bContext *C)
 
static int preferences_asset_library_remove_exec (bContext *C, wmOperator *op)
 
static void PREFERENCES_OT_asset_library_remove (wmOperatorType *ot)
 
Remove Extension Repository Operator
static bool preferences_extension_repo_remove_poll (bContext *C)
 
static int preferences_extension_repo_remove_invoke (bContext *C, wmOperator *op, const wmEvent *)
 
static int preferences_extension_repo_remove_exec (bContext *C, wmOperator *op)
 
static void PREFERENCES_OT_extension_repo_remove (wmOperatorType *ot)
 
Drop Extension Operator
static int preferences_extension_url_drop_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static void PREFERENCES_OT_extension_url_drop (wmOperatorType *ot)
 
Associate File Type Operator (Windows only)
static bool associate_blend_poll (bContext *C)
 
static bool associate_blend (bool do_register, bool all_users, char **r_error_msg)
 
static int associate_blend_exec (bContext *, wmOperator *op)
 
static void PREFERENCES_OT_associate_blend (wmOperatorType *ot)
 
static int unassociate_blend_exec (bContext *, wmOperator *op)
 
static void PREFERENCES_OT_unassociate_blend (wmOperatorType *ot)
 
Drag & Drop URL
static bool drop_extension_url_poll (bContext *, wmDrag *drag, const wmEvent *)
 
static void drop_extension_url_copy (bContext *, wmDrag *drag, wmDropBox *drop)
 
Drag & Drop Paths
static bool drop_extension_path_poll (bContext *, wmDrag *drag, const wmEvent *)
 
static void drop_extension_path_copy (bContext *, wmDrag *drag, wmDropBox *drop)
 

Add Extension Repository Operator

enum class  bUserExtensionRepoAddType { Remote = 0 , Local = 1 }
 
static const char * preferences_extension_repo_default_name_from_type (const bUserExtensionRepoAddType repo_type)
 
static int preferences_extension_repo_add_exec (bContext *C, wmOperator *op)
 
static int preferences_extension_repo_add_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static void preferences_extension_repo_add_ui (bContext *, wmOperator *op)
 
static void PREFERENCES_OT_extension_repo_add (wmOperatorType *ot)
 

Enumeration Type Documentation

◆ bUserExtensionRepoAddType

enum class bUserExtensionRepoAddType
strong
Enumerator
Remote 
Local 

Definition at line 252 of file userpref_ops.cc.

Function Documentation

◆ associate_blend()

static bool associate_blend ( bool do_register,
bool all_users,
char ** r_error_msg )
static

Definition at line 855 of file userpref_ops.cc.

References result, and WM_platform_associate_set().

Referenced by associate_blend_exec(), and unassociate_blend_exec().

◆ associate_blend_exec()

◆ associate_blend_poll()

static bool associate_blend_poll ( bContext * C)
static

◆ drop_extension_path_copy()

static void drop_extension_path_copy ( bContext * ,
wmDrag * drag,
wmDropBox * drop )
static

Definition at line 1057 of file userpref_ops.cc.

References wmDropBox::ptr, RNA_string_set(), and WM_drag_get_single_path().

Referenced by ED_dropbox_drop_extension().

◆ drop_extension_path_poll()

static bool drop_extension_path_poll ( bContext * ,
wmDrag * drag,
const wmEvent *  )
static

◆ drop_extension_url_copy()

static void drop_extension_url_copy ( bContext * ,
wmDrag * drag,
wmDropBox * drop )
static

Definition at line 1029 of file userpref_ops.cc.

References wmDropBox::ptr, RNA_string_set(), str, and WM_drag_get_string().

Referenced by ED_dropbox_drop_extension().

◆ drop_extension_url_poll()

◆ ED_dropbox_drop_extension()

◆ ED_operatortypes_userpref()

◆ preferences_asset_library_add_exec()

◆ preferences_asset_library_add_invoke()

static int preferences_asset_library_add_invoke ( bContext * C,
wmOperator * op,
const wmEvent *  )
static

◆ preferences_asset_library_remove_exec()

◆ preferences_asset_library_remove_poll()

static bool preferences_asset_library_remove_poll ( bContext * C)
static

◆ preferences_autoexec_add_exec()

static int preferences_autoexec_add_exec ( bContext * ,
wmOperator *  )
static

Definition at line 84 of file userpref_ops.cc.

References BLI_addtail(), MEM_callocN, and OPERATOR_FINISHED.

Referenced by PREFERENCES_OT_autoexec_path_add().

◆ preferences_autoexec_remove_exec()

static int preferences_autoexec_remove_exec ( bContext * ,
wmOperator * op )
static

◆ preferences_extension_repo_add_exec()

◆ preferences_extension_repo_add_invoke()

◆ preferences_extension_repo_add_ui()

◆ preferences_extension_repo_default_name_from_type()

static const char * preferences_extension_repo_default_name_from_type ( const bUserExtensionRepoAddType repo_type)
static

◆ preferences_extension_repo_remove_exec()

◆ preferences_extension_repo_remove_invoke()

◆ preferences_extension_repo_remove_poll()

static bool preferences_extension_repo_remove_poll ( bContext * C)
static

◆ preferences_extension_url_drop_invoke()

◆ PREFERENCES_OT_asset_library_add()

◆ PREFERENCES_OT_asset_library_remove()

◆ PREFERENCES_OT_associate_blend()

◆ PREFERENCES_OT_autoexec_path_add()

◆ PREFERENCES_OT_autoexec_path_remove()

◆ PREFERENCES_OT_extension_repo_add()

◆ PREFERENCES_OT_extension_repo_remove()

◆ PREFERENCES_OT_extension_url_drop()

◆ PREFERENCES_OT_reset_default_theme()

◆ PREFERENCES_OT_unassociate_blend()

◆ preferences_reset_default_theme_exec()

static int preferences_reset_default_theme_exec ( bContext * C,
wmOperator *  )
static

◆ unassociate_blend_exec()