forked from blender/blender
Fix review comments 2 #31
@ -72,17 +72,6 @@ void FinalEngine::render(Depsgraph *depsgraph)
|
||||
update_render_result();
|
||||
}
|
||||
|
||||
|
||||
pxr::GfVec4f FinalEngine::get_render_border(const Scene *scene)
|
||||
{
|
||||
const RenderData &r = scene->r;
|
||||
float border_w = 1.0, border_h = 1.0;
|
||||
if (r.mode & R_BORDER) {
|
||||
border_w = r.border.xmax - r.border.xmin;
|
||||
border_h = r.border.ymax - r.border.ymin;
|
||||
}
|
||||
return pxr::GfVec4f(r.border.xmin, r.border.ymin, border_w, border_h);
|
||||
}
|
||||
|
||||
void FinalEngine::update_render_result()
|
||||
{
|
||||
RenderResult *result = RE_engine_begin_result(
|
||||
@ -118,7 +107,13 @@ void FinalEngine::prepare_for_render(Depsgraph *depsgraph)
|
||||
layer_name_ = view_layer->name;
|
||||
|
||||
const RenderData &r = scene->r;
|
||||
pxr::GfVec4f border = get_render_border(scene);
|
||||
pxr::GfVec4f border(0, 0, 1, 1);
|
||||
if (r.mode & R_BORDER) {
|
||||
border.Set(r.border.xmin,
|
||||
r.border.ymin,
|
||||
r.border.xmax - r.border.xmin,
|
||||
r.border.ymax - r.border.ymin);
|
||||
}
|
||||
pxr::GfVec2i image_res(r.xsch * r.size / 100, r.ysch * r.size / 100);
|
||||
resolution_ = pxr::GfVec2i(int(image_res[0] * border[2]), int(image_res[1] * border[3]));
|
||||
pxr::GfCamera camera =
|
||||
|
@ -17,7 +17,6 @@ class FinalEngine : public Engine {
|
||||
virtual void render(Depsgraph *b_depsgraph) override;
|
||||
|
||||
protected:
|
||||
pxr::GfVec4f get_render_border(const Scene *scene);
|
||||
void update_render_result();
|
||||
void notify_status(float progress, const std::string &title, const std::string &info);
|
||||
void prepare_for_render(Depsgraph *depsgraph);
|
||||
|
Loading…
Reference in New Issue
Block a user
rename to
get_render_border