Blender V5.3
BKE_appdir.hh File Reference
#include <cstddef>
#include <optional>
#include <string>
#include "BLI_compiler_attrs.hh"
#include "BLI_string_ref.hh"
#include "DNA_listBase.h"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define BLENDER_STARTUP_FILE   "startup.blend"
#define BLENDER_USERPREF_FILE   "userpref.blend"
#define BLENDER_QUIT_FILE   "quit.blend"
#define BLENDER_BOOKMARK_FILE   "bookmarks.txt"
#define BLENDER_HISTORY_FILE   "recent-files.txt"
#define BLENDER_RECENT_SEARCHES_FILE   "recent-searches.txt"
#define BLENDER_PLATFORM_SUPPORT_FILE   "platform_support.txt"
#define BLENDER_RECENTS_FILE   "recents.toml"

Enumerations

enum  {
  blender::BLENDER_DATAFILES = 2 , blender::BLENDER_USER_CONFIG = 31 , blender::BLENDER_USER_DATAFILES = 32 , blender::BLENDER_USER_SCRIPTS = 33 ,
  blender::BLENDER_USER_EXTENSIONS = 34 , blender::BLENDER_SYSTEM_DATAFILES = 52 , blender::BLENDER_SYSTEM_SCRIPTS = 53 , blender::BLENDER_SYSTEM_EXTENSIONS = 54 ,
  blender::BLENDER_SYSTEM_PYTHON = 55
}
enum  { blender::BLENDER_RESOURCE_PATH_USER = 0 , blender::BLENDER_RESOURCE_PATH_LOCAL = 1 , blender::BLENDER_RESOURCE_PATH_SYSTEM = 2 , blender::BLENDER_RESOURCE_PATH_SYSTEM_LIBS = 3 }

Functions

bool blender::BKE_appdir_app_template_any ()
Initialization
void blender::BKE_appdir_init ()
void blender::BKE_appdir_exit ()
Default Directories
const char * blender::BKE_appdir_folder_default () ATTR_WARN_UNUSED_RESULT
const char * blender::BKE_appdir_folder_root () ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
const char * blender::BKE_appdir_folder_default_or_root () ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
bool blender::BKE_appdir_folder_documents (char *dir) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void blender::BKE_appdir_folder_caches (char *path, size_t path_maxncpy) ATTR_NONNULL(1)
bool blender::BKE_appdir_font_folder_default (char *dir, size_t dir_maxncpy)
Path Presets API
bool blender::BKE_appdir_folder_id_ex (int folder_id, const char *subfolder, char *path, size_t path_maxncpy)
std::optional< std::string > blender::BKE_appdir_folder_id (int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
std::optional< std::string > blender::BKE_appdir_folder_id_create (int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
std::optional< std::string > blender::BKE_appdir_folder_id_user_notest (int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
std::optional< std::string > blender::BKE_appdir_resource_path_id_with_version (int folder_id, bool check_is_dir, int version)
std::optional< std::string > blender::BKE_appdir_resource_path_id (int folder_id, bool check_is_dir)
Application Templates
bool blender::BKE_appdir_app_template_id_search (const char *app_template, char *path, size_t path_maxncpy) ATTR_NONNULL(1)
bool blender::BKE_appdir_app_template_has_userpref (const char *app_template) ATTR_NONNULL(1)
void blender::BKE_appdir_app_templates (ListBaseT< LinkData > *templates) ATTR_NONNULL(1)
Program Path Queries

Access locations of Blender & Python.

void blender::BKE_appdir_program_path_init (const char *argv0) ATTR_NONNULL(1)
const char * blender::BKE_appdir_program_path () ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
const char * blender::BKE_appdir_program_dir () ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
bool blender::BKE_appdir_program_python_search (char *program_filepath, size_t program_filepath_maxncpy, int version_major, int version_minor) ATTR_NONNULL(1)
Temporary Directories
void blender::BKE_tempdir_init (const char *userdir)
const char * blender::BKE_tempdir_base () ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
const char * blender::BKE_tempdir_session () ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
void blender::BKE_tempdir_session_purge ()

Detailed Description

Note
on naming: typical _get() suffix is omitted here, since its the main purpose of the API.

Definition in file BKE_appdir.hh.

Macro Definition Documentation

◆ BLENDER_BOOKMARK_FILE

◆ BLENDER_HISTORY_FILE

#define BLENDER_HISTORY_FILE   "recent-files.txt"

Definition at line 200 of file BKE_appdir.hh.

Referenced by blender::wm_history_file_read(), and blender::wm_history_file_write().

◆ BLENDER_PLATFORM_SUPPORT_FILE

#define BLENDER_PLATFORM_SUPPORT_FILE   "platform_support.txt"

Definition at line 202 of file BKE_appdir.hh.

Referenced by blender::wm_platform_support_check_approval().

◆ BLENDER_QUIT_FILE

#define BLENDER_QUIT_FILE   "quit.blend"

◆ BLENDER_RECENT_SEARCHES_FILE

#define BLENDER_RECENT_SEARCHES_FILE   "recent-searches.txt"

◆ BLENDER_RECENTS_FILE

#define BLENDER_RECENTS_FILE   "recents.toml"

Definition at line 203 of file BKE_appdir.hh.

Referenced by blender::recents::recents_file_path().

◆ BLENDER_STARTUP_FILE

#define BLENDER_STARTUP_FILE   "startup.blend"

◆ BLENDER_USERPREF_FILE