forked from blender/blender
Fix review comments 2 #31
No reviewers
Labels
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: BogdanNagirniak/blender#31
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "BLEN-397"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose
Refactoring to match Blender's team requirements and code style.
Technical steps
Simplified
FinalEngine
,FinalEngineGL
andPreviewEngine
withFinalEngine::prepare_for_render
Added
render_delegate_name
toBlenderSceneDelegate
andEngine
@ -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
@ -106,3 +71,3 @@
}
pxr::GfVec2i FinalEngine::get_resolution(Scene *scene)
pxr::GfVec4f FinalEngine::get_resolution(const Scene *scene)
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@ -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()
Works fine