Fix DomeLight warning in console for Storm delegate. #55

Merged
Bogdan Nagirniak merged 5 commits from BLEN-432 into hydra-render 2023-06-13 19:13:36 +02:00
Showing only changes of commit ce8c3c546c - Show all commits

View File

@ -93,11 +93,14 @@ std::string cache_image_color(float color[4])
char name[128]; char name[128];
snprintf(name, snprintf(name,
sizeof(name), sizeof(name),
"color_%02x%02x%02x.hdr", "color_%02x-%02x-%02x.hdr",
int(color[0] * 255), int(color[0] * 255),
int(color[1] * 255), int(color[1] * 255),
int(color[2] * 255)); int(color[2] * 255));
std::string file_path = get_cache_file(name); std::string file_path = get_cache_file(name);
if (BLI_exists(file_path.c_str())) {
return file_path;
}
ImBuf *ibuf = IMB_allocImBuf(4, 4, 32, IB_rectfloat); ImBuf *ibuf = IMB_allocImBuf(4, 4, 32, IB_rectfloat);
IMB_rectfill(ibuf, color); IMB_rectfill(ibuf, color);