8#include <pxr/imaging/hio/imageRegistry.h>
28 std::string file_path;
33 if (!pxr::HioImageRegistry::GetInstance().IsSupportedImageFile(
image->id.name)) {
42 if (check_exist &&
BLI_exists(file_path.c_str())) {
64 std::string file_path;
65 bool do_check_extension =
false;
70 do_check_extension =
true;
87 if (cached_path !=
nullptr) {
88 if (file_path.empty()) {
89 file_path = cached_path;
91 MEM_delete(cached_path);
96 do_check_extension =
true;
101 if (do_check_extension && !pxr::HioImageRegistry::GetInstance().IsSupportedImageFile(file_path))
File and directory operations.
#define BLI_path_join(...)
#define SNPRINTF(dst, format,...)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_DEBUG(clg_ref,...)
CLG_LogRef * LOG_HYDRA_SCENE_INDEX
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)
const char * BLI_path_extension_or_end(const char *filepath) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
char * STRNCPY(char(&dst)[N], const char *src)
void BKE_image_format_set(ImageFormatData *imf, ID *owner_id, const char imtype)
bool BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BKE_image_save_options_init(ImageSaveOptions *opts, Main *bmain, Scene *scene, Image *ima, ImageUser *iuser, bool guess_path, bool save_as_render)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
void void void const char * BLI_path_basename(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
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)
void BKE_image_save_options_free(ImageSaveOptions *opts)
bool BKE_image_has_packedfile(const Image *image)
int BKE_image_path_ext_from_imformat(const ImageFormatData *im_format, const char *r_ext[BKE_IMAGE_PATH_EXT_MAX])
bool BKE_image_save(ReportList *reports, Main *bmain, Image *ima, ImageUser *iuser, const ImageSaveOptions *opts)
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)
struct PackedFile * packedfile
ImageFormatData im_format