26#define BLENDER_PROJECT_CONFIG_DIR ".blender_project"
27#define BLENDER_PROJECT_CONFIG_FILE "project.toml"
153 std::string root_path_;
158 std::string ocio_config_path_;
163 std::string splash_image_path_;
365template<std::invocable<const bke::BlenderProject *> Fn>
368 using T = std::invoke_result_t<Fn, const bke::BlenderProject *>;
369 if constexpr (std::is_void_v<T>) {
382 return std::move(*
result);
400template<std::invocable<bke::BlenderProject *> Fn>
403 using T = std::invoke_result_t<Fn, bke::BlenderProject *>;
404 if constexpr (std::is_void_v<T>) {
417 return std::move(*
result);
454 bool path_is_template,
ID and Library types, which are fundamental for SDNA.
void set_root_path(StringRef root_path)
void rename_variable(int variable_index, StringRef name)
StringRefNull get_splash_image_path() const
void set_splash_image_path(StringRef splash_image_path)
Vector< std::unique_ptr< ProjectVariable > > variables
StringRefNull get_root_path() const
int find_variable_index(ProjectVariable *var)
StringRefNull get_ocio_config_path() const
int active_variable_index
void move_variable(int from_index, int to_index)
bool ocio_config_use_path
void set_ocio_config_path(StringRef ocio_config_path)
StringRefNull get_name() const
ProjectVariable * new_variable(StringRef name, ProjectVariableType type)
void set_name(StringRef name)
int active_asset_library_index
int remove_variable(ProjectVariable *var)
void string_subtype_set(ProjectVariableStringSubtype type)
ProjectVariable & operator=(const ProjectVariable &other)=delete
void description_set(StringRef description)
ProjectVariable(StringRef name, ProjectVariableType type)
StringRefNull description_get() const
float value_float_get() const
ProjectVariable(const ProjectVariable &other)=delete
void value_set(StringRefNull value)
StringRefNull value_string_get() const
ProjectVariableStringSubtype string_subtype_get() const
ProjectVariableType type_get() const
const IDProperty & prop() const
StringRefNull name_get() const
int value_int_get() const
void with_blender_project_write_lock(FunctionRef< void()> lambda)
std::string ensure_is_valid_project_variable_name(StringRef name)
void with_blender_project_read_lock(FunctionRef< void()> lambda)
bool is_valid_project_variable_name(StringRef name)
ProjectVariableStringSubtype
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
std::string BKE_blender_project_path_resolve(StringRef path, const bke::BlenderProject &project)
Vector< RecentProject > BKE_blender_project_recent_get()
void BKE_blender_project_recent_clear(bool only_missing)
void BKE_blender_project_config_autosave(Main *bmain)
bke::BlenderProject * BKE_blender_project_get(const Main *bmain)
void BKE_blender_project_refresh(Main *bmain, const char *filepath)
auto BKE_blender_project_read_callback(const Main *bmain, Fn lambda)
void BKE_blender_project_clear()
void BKE_blender_project_recent_update(const Main *bmain)
bool BKE_blender_project_config_file_write(Main *bmain)
std::string BKE_is_path_inside_blender_project(const char *path)
bool BKE_blender_project_init(blender::StringRef name, blender::StringRef root_path)
bool BKE_blender_project_dir_is_project(StringRef path)
bool BKE_blender_project_init_from_root_path(Main *bmain, std::string project_root_path)
auto BKE_blender_project_write_callback(const Main *bmain, Fn lambda)
std::string BKE_blender_project_path_make_relative(StringRef path, bool path_is_template, const bke::BlenderProject &project)