Implement Viewport render with material preview #56

Merged
Bogdan Nagirniak merged 22 commits from BLEN-421 into hydra-render 2023-06-30 09:03:28 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit f94cdd9e0b - Show all commits

View File

@ -75,8 +75,8 @@ std::string cache_or_get_image_file(Image *image, bContext *context, ImageUser *
file_path = cache_image_file(image, context, iuser, true);
}
else {
char str[FILE_MAX];
Main *main = CTX_data_main(context);
char str[FILE_MAX];
BogdanNagirniak marked this conversation as resolved Outdated

Revert changes in this function and add

char str[FILE_MAX];
BKE_image_user_file_path_ex(main, iuser, image, str, false, true);
file_path = str;
Revert changes in this function and add ``` char str[FILE_MAX]; BKE_image_user_file_path_ex(main, iuser, image, str, false, true); file_path = str; ```
BKE_image_user_file_path_ex(main, iuser, image, str, false, true);
file_path = str;
@ -85,7 +85,7 @@ std::string cache_or_get_image_file(Image *image, bContext *context, ImageUser *
}
}
CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s -> %s", image->id.name, file_path);
CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s -> %s", image->id.name, file_path.c_str());
return file_path;
}

View File

@ -45,7 +45,7 @@ void WorldData::init()
data_[pxr::UsdLuxTokens->orientToStageUpAxis] = true;
float intensity = 1.0f;
float exposure = 0.0f;
float exposure = 1.0f;
pxr::GfVec3f color(1.0f, 1.0f, 1.0f);
pxr::SdfAssetPath texture_file;