Fix review comments 2 #31

Merged
Bogdan Nagirniak merged 8 commits from BLEN-397 into hydra-render 2023-04-27 09:05:38 +02:00
Collaborator

Purpose

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

Technical steps

Simplified FinalEngine, FinalEngineGL and PreviewEngine with FinalEngine::prepare_for_render
Added render_delegate_name to BlenderSceneDelegate and Engine

### Purpose Refactoring to match Blender's team requirements and code style. ### Technical steps Simplified `FinalEngine`, `FinalEngineGL` and `PreviewEngine` with `FinalEngine::prepare_for_render` Added `render_delegate_name` to `BlenderSceneDelegate` and `Engine`
Georgiy Markelov added 6 commits 2023-04-25 17:24:22 +02:00
Georgiy Markelov requested review from Brian Savery (AMD) 2023-04-25 17:24:32 +02:00
Brian Savery (AMD) was assigned by Georgiy Markelov 2023-04-25 17:24:36 +02:00
Georgiy Markelov self-assigned this 2023-04-25 17:24:36 +02:00
Bogdan Nagirniak was assigned by Georgiy Markelov 2023-04-25 17:24:37 +02:00
Bogdan Nagirniak requested changes 2023-04-26 10:21:28 +02:00
@ -33,6 +33,8 @@ class Engine {
pxr::HdRenderSettingsMap &render_settings) = 0;
virtual void render(Depsgraph *depsgraph) = 0;
std::string render_delegate_name;

move to protected

move to protected
@ -106,3 +71,3 @@
}
pxr::GfVec2i FinalEngine::get_resolution(Scene *scene)
pxr::GfVec4f FinalEngine::get_resolution(const Scene *scene)

rename to get_render_border

rename to `get_render_border`
@ -244,2 +201,3 @@
memcpy(pixels_->data(), data, pixels_->size() * sizeof(float));
MEM_freeN(data);
update_render_result(render_images, layer_name, res[0], res[1]);
update_render_result(render_images_, layer_name_, resolution_[0], resolution_[1]);

Simplify update_render_result - no need to provide parameters

Simplify `update_render_result` - no need to provide parameters
@ -28,0 +31,4 @@
std::string layer_name_;
std::map<std::string, std::vector<float>> render_images_;
pxr::GfVec2i resolution_;
std::vector<float> *pixels_ = nullptr;

move pixels as local variable to render()

move pixels as local variable to render()
Georgiy Markelov added 1 commit 2023-04-26 11:13:35 +02:00
Bogdan Nagirniak added 1 commit 2023-04-26 13:24:27 +02:00
Bogdan Nagirniak approved these changes 2023-04-26 13:25:17 +02:00
Author
Collaborator

Works fine

Works fine
Brian Savery (AMD) approved these changes 2023-04-27 00:45:55 +02:00
Bogdan Nagirniak merged commit e9a52298f1 into hydra-render 2023-04-27 09:05:38 +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#31
No description provided.