Fix review comments #27

Merged
Bogdan Nagirniak merged 14 commits from BLEN-392 into hydra-render 2023-04-21 15:02:44 +02:00
Collaborator

Purpose

Refactoring to match Blender's team requirements and code style.

Technical steps

  • Replaced utils.h/format_duration with BLI_timecode_string_from_time_simple
  • Made material names unique
  • LOG_EN -> LOG_RENDER_HYDRA, rhd.en -> render.hydra
  • LOG_BSD -> LOG_RENDER_HYDRA_SCENE, rhd.bsd -> render.hydra.scene
  • Cached images now saved under BKE_tempdir_session()//hydra_image_cache folder
### Purpose Refactoring to match Blender's team requirements and code style. ### Technical steps * Replaced `utils.h/format_duration` with `BLI_timecode_string_from_time_simple` * Made material names unique * `LOG_EN` -> `LOG_RENDER_HYDRA`, `rhd.en` -> `render.hydra` * `LOG_BSD` -> `LOG_RENDER_HYDRA_SCENE`, `rhd.bsd` -> `render.hydra.scene` * Cached images now saved under `BKE_tempdir_session()//hydra_image_cache` folder
Georgiy Markelov self-assigned this 2023-04-19 14:56:31 +02:00
Brian Savery (AMD) was assigned by Georgiy Markelov 2023-04-19 14:56:31 +02:00
Bogdan Nagirniak was assigned by Georgiy Markelov 2023-04-19 14:56:31 +02:00
Georgiy Markelov added 6 commits 2023-04-19 14:56:42 +02:00
Georgiy Markelov requested review from Brian Savery (AMD) 2023-04-19 14:59:09 +02:00
Georgiy Markelov added 2 commits 2023-04-19 15:17:35 +02:00
Bogdan Nagirniak reviewed 2023-04-20 11:50:24 +02:00
@ -110,3 +110,3 @@
return ""
mtlx_file = mx_utils.get_temp_file(".mtlx", material.name)
mtlx_file = mx_utils.get_temp_file(".mtlx", str(material.as_pointer()))

Use hex format for mtlx name like:
f"mat_{material.as_pointer():016x}"

Use hex format for mtlx name like: `f"mat_{material.as_pointer():016x}"`
@ -84,3 +46,1 @@
image_name = std::filesystem::path(image_name).filename().replace_extension().string();
image_name = pxr::TfMakeValidIdentifier(image_name);
}
std::string image_name(std::to_string((uintptr_t)image));

Use hex format for image name like:

char str[32];
snprintf(str, 32, "img_%016llx", (uint64_t)image);
Use hex format for image name like: ``` char str[32]; snprintf(str, 32, "img_%016llx", (uint64_t)image); ```
Georgiy Markelov added 1 commit 2023-04-20 12:38:24 +02:00
Bogdan Nagirniak approved these changes 2023-04-20 14:33:12 +02:00
Brian Savery (AMD) approved these changes 2023-04-20 22:44:09 +02:00
Georgiy Markelov added 2 commits 2023-04-21 10:43:40 +02:00
Bogdan Nagirniak requested changes 2023-04-21 11:55:16 +02:00
@ -331,2 +331,4 @@
bool do_update_world = false;
unsigned int scene_recalc = scene->id.recalc;
if (scene_recalc) {

This block need to remove. It was moved below in earlier commit

This block need to remove. It was moved below in earlier commit
BogdanNagirniak marked this conversation as resolved
Georgiy Markelov added 2 commits 2023-04-21 12:53:25 +02:00
Bogdan Nagirniak added 1 commit 2023-04-21 13:37:09 +02:00
Bogdan Nagirniak approved these changes 2023-04-21 13:37:49 +02:00
Bogdan Nagirniak merged commit 3fba132714 into hydra-render 2023-04-21 15:02:44 +02:00
Sign in to join this conversation.
No Label
No Milestone
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: BogdanNagirniak/blender#27
No description provided.