8#include <pxr/imaging/hio/imageRegistry.h>
31 std::string file_path;
36 if (!pxr::HioImageRegistry::GetInstance().IsSupportedImageFile(image->id.name)) {
42 SNPRINTF(file_name,
"img_%p%s", image, r_ext);
45 if (check_exist &&
BLI_exists(file_path.c_str())) {
67 std::string file_path;
68 bool do_check_extension =
false;
73 do_check_extension =
true;
77 SNPRINTF(subfolder,
"unpack_%p", image);
81 path,
sizeof(path), dir_path.c_str(), subfolder,
BLI_path_basename(ipf->filepath));
91 if (file_path.empty()) {
99 do_check_extension =
true;
104 if (do_check_extension && !pxr::HioImageRegistry::GetInstance().IsSupportedImageFile(file_path))
void BKE_image_user_file_path_ex(const Main *bmain, const ImageUser *iuser, const Image *ima, char *filepath, const bool resolve_udim, const bool resolve_multiview)
bool BKE_image_has_packedfile(const Image *image)
bool BKE_image_save(ReportList *reports, Main *bmain, Image *ima, ImageUser *iuser, const ImageSaveOptions *opts)
bool BKE_image_save_options_init(ImageSaveOptions *opts, Main *bmain, Scene *scene, Image *ima, ImageUser *iuser, const bool guess_path, const bool save_as_render)
void BKE_image_save_options_free(ImageSaveOptions *opts)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
char * BKE_packedfile_unpack_to_file(ReportList *reports, const char *ref_file_name, const char *abs_name, const char *local_name, PackedFile *pf, enum ePF_FileStatus how)
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
#define LISTBASE_FOREACH(type, var, list)
void void void const char * BLI_path_basename(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
#define BLI_path_join(...)
const char * BLI_path_extension_or_end(const char *filepath) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_INFO(clg_ref, level,...)
Contains defines and structs used throughout the imbuf module.
void MEM_freeN(void *vmemh)
struct CLG_LogRef * LOG_HYDRA_SCENE
std::string cache_or_get_image_file(Main *bmain, Scene *scene, Image *image, ImageUser *iuser)
static std::string cache_image_file(Main *bmain, Scene *scene, Image *image, ImageUser *iuser, bool check_exist)
std::string image_cache_file_path()
std::string get_image_cache_file(const std::string &file_name, bool mkdir)
static string cached_path
ImageFormatData im_format