41 project.get_root_path().c_str(),
70 if (splash_filepath.empty()) {
84 if (ibuf ==
nullptr) {
114 if (!splash_filepath.empty() &&
BLI_is_file(splash_filepath.c_str())) {
124 ot->
name =
"Create Splash Artwork";
126 "Set the project splash artwork from an image file.\n"
127 "The image will be cropped, scaled and saved as \".blender_project/splash.jpg\".\n"
128 "For optimal results use a 2:1 aspect ratio";
129 ot->
idname =
"PROJECT_OT_splash_image_create";
164 project->set_splash_image_path(
"");
174 ot->
name =
"Clear Splash Artwork";
176 "Clear the project custom splash artwork.\n"
177 "The image file is not deleted from disk";
178 ot->
idname =
"PROJECT_OT_splash_image_clear";
#define BLENDER_PROJECT_CONFIG_DIR
File and directory operations.
#define BLI_path_join(...)
void WM_main_add_notifier(uint type, void *reference)
void PROJECT_OT_splash_image_create(wmOperatorType *ot)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
static bool project_poll(bContext *C)
auto BKE_blender_project_read_callback(const Main *bmain, Fn lambda)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
bool IMB_save_image(ImBuf *ibuf, const char *filepath, ImBufFlags flags)
void IMB_freeImBuf(ImBuf *ibuf)
int BLI_path_cmp_normalized(const char *p1, const char *p2) ATTR_NONNULL(1
static void splash_image_path_set(Main *bmain, const StringRef filepath)
static wmOperatorStatus project_splash_image_clear_exec(bContext *C, wmOperator *)
static bool project_splash_image_clear_poll(bContext *C)
static wmOperatorStatus project_splash_image_create_exec(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
ImBuf * WM_project_splash_image_load(const StringRefNull filepath, const int width, const bool add_logo)
static wmOperatorStatus project_splash_image_create_invoke(bContext *C, wmOperator *op, const wmEvent *)
void PROJECT_OT_splash_image_clear(wmOperatorType *ot)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
Main * CTX_data_main(const bContext *C)
static std::string splash_image_default_filepath(const bke::BlenderProject &project)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
bool BLI_is_file(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_file_ensure_parent_dir_exists(const char *filepath) ATTR_NONNULL(1)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
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)
ImbFormatOptions foptions
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports