forked from blender/blender
Fix review comments #27
@ -2,11 +2,11 @@
|
||||
* Copyright 2011-2022 Blender Foundation */
|
||||
|
||||
#include "BKE_lib_id.h"
|
||||
#include "BLI_timecode.h"
|
||||
#include "DEG_depsgraph_query.h"
|
||||
#include "GPU_framebuffer.h"
|
||||
#include "GPU_texture.h"
|
||||
#include "PIL_time.h"
|
||||
#include "BLI_timecode.h"
|
||||
|
||||
#include "camera.h"
|
||||
#include "final_engine.h"
|
||||
@ -83,8 +83,8 @@ void FinalEngine::render(Depsgraph *depsgraph)
|
||||
break;
|
||||
}
|
||||
|
||||
percent_done = renderer_percent_done();
|
||||
|
||||
percent_done = renderer_percent_done();
|
||||
|
||||
BLI_timecode_string_from_time_simple(
|
||||
elapsed_time, sizeof(elapsed_time), PIL_check_seconds_timer() - time_begin);
|
||||
|
||||
|
@ -73,8 +73,11 @@ void BlenderSceneDelegate::populate(Depsgraph *deps, bContext *cont)
|
||||
ITER_BEGIN (
|
||||
DEG_iterator_ids_begin, DEG_iterator_ids_next, DEG_iterator_ids_end, &data, ID *, id) {
|
||||
|
||||
CLOG_INFO(
|
||||
LOG_RENDER_HYDRA_SCENE, 2, "Update: %s [%s]", id->name, std::bitset<32>(id->recalc).to_string().c_str());
|
||||
CLOG_INFO(LOG_RENDER_HYDRA_SCENE,
|
||||
2,
|
||||
"Update: %s [%s]",
|
||||
id->name,
|
||||
std::bitset<32>(id->recalc).to_string().c_str());
|
||||
|
||||
switch (GS(id->name)) {
|
||||
case ID_OB: {
|
||||
|
@ -15,7 +15,11 @@ InstancerData::InstancerData(BlenderSceneDelegate *scene_delegate, Object *objec
|
||||
id_ = nullptr;
|
||||
p_id_ = prim_id(scene_delegate, object);
|
||||
instancer_id = p_id_.AppendElementString("Instancer");
|
||||
CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s, instancer_id=%s", ((ID *)parent_obj_)->name, instancer_id.GetText());
|
||||
CLOG_INFO(LOG_RENDER_HYDRA_SCENE,
|
||||
2,
|
||||
"%s, instancer_id=%s",
|
||||
((ID *)parent_obj_)->name,
|
||||
instancer_id.GetText());
|
||||
}
|
||||
|
||||
bool InstancerData::is_supported(Object *object)
|
||||
@ -184,8 +188,12 @@ bool InstancerData::set_instances()
|
||||
continue;
|
||||
}
|
||||
transforms_.push_back(gf_matrix_from_transform(dupli->mat));
|
||||
CLOG_INFO(
|
||||
LOG_RENDER_HYDRA_SCENE, 2, "Instance %s (%s) %d", id_->name, ((ID *)dupli->ob)->name, dupli->random_id);
|
||||
CLOG_INFO(LOG_RENDER_HYDRA_SCENE,
|
||||
2,
|
||||
"Instance %s (%s) %d",
|
||||
id_->name,
|
||||
((ID *)dupli->ob)->name,
|
||||
dupli->random_id);
|
||||
}
|
||||
free_object_duplilist(lb);
|
||||
|
||||
|
@ -84,7 +84,11 @@ void MaterialData::init()
|
||||
PyGILState_Release(gstate);
|
||||
|
||||
mtlx_path_ = pxr::SdfAssetPath(path, path);
|
||||
CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "Export: %s, mtlx=%s", id_->name, mtlx_path_.GetResolvedPath().c_str());
|
||||
CLOG_INFO(LOG_RENDER_HYDRA_SCENE,
|
||||
2,
|
||||
"Export: %s, mtlx=%s",
|
||||
id_->name,
|
||||
mtlx_path_.GetResolvedPath().c_str());
|
||||
}
|
||||
|
||||
void MaterialData::insert()
|
||||
|
@ -47,7 +47,8 @@ std::string cache_image(Main *bmain,
|
||||
|
||||
image_name.append(default_format);
|
||||
|
||||
BLI_path_join(tempfile, sizeof(tempfile), BKE_tempdir_session(), "hydra_image_cache", image_name.c_str());
|
||||
BLI_path_join(
|
||||
tempfile, sizeof(tempfile), BKE_tempdir_session(), "hydra_image_cache", image_name.c_str());
|
||||
STRNCPY(opts->filepath, tempfile);
|
||||
|
||||
if (!BKE_image_save(reports, bmain, image, iuser, opts)) {
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
#include "BKE_camera.h"
|
||||
|
||||
#include "BLI_timecode.h"
|
||||
#include "BLI_math_matrix.h"
|
||||
#include "BLI_timecode.h"
|
||||
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
@ -290,11 +290,11 @@ void ViewportEngine::render(Depsgraph *depsgraph, bContext *context)
|
||||
char elapsed_time[32];
|
||||
|
||||
BLI_timecode_string_from_time_simple(
|
||||
elapsed_time, sizeof(elapsed_time), PIL_check_seconds_timer() - time_begin_);
|
||||
elapsed_time, sizeof(elapsed_time), PIL_check_seconds_timer() - time_begin_);
|
||||
|
||||
if (!render_task_delegate_->is_converged()) {
|
||||
notify_status(std::string("Time: ") + elapsed_time +
|
||||
" | Done: " + std::to_string(int(renderer_percent_done())) + "%",
|
||||
" | Done: " + std::to_string(int(renderer_percent_done())) + "%",
|
||||
"Render");
|
||||
bl_engine_->flag |= RE_ENGINE_DO_DRAW;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user