Fix review comments #27

Merged
Bogdan Nagirniak merged 14 commits from BLEN-392 into hydra-render 2023-04-21 15:02:44 +02:00
6 changed files with 29 additions and 13 deletions
Showing only changes of commit 1ae87e0061 - Show all commits

View File

@ -2,11 +2,11 @@
* Copyright 2011-2022 Blender Foundation */ * Copyright 2011-2022 Blender Foundation */
#include "BKE_lib_id.h" #include "BKE_lib_id.h"
#include "BLI_timecode.h"
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"
#include "GPU_framebuffer.h" #include "GPU_framebuffer.h"
#include "GPU_texture.h" #include "GPU_texture.h"
#include "PIL_time.h" #include "PIL_time.h"
#include "BLI_timecode.h"
#include "camera.h" #include "camera.h"
#include "final_engine.h" #include "final_engine.h"

View File

@ -73,8 +73,11 @@ void BlenderSceneDelegate::populate(Depsgraph *deps, bContext *cont)
ITER_BEGIN ( ITER_BEGIN (
DEG_iterator_ids_begin, DEG_iterator_ids_next, DEG_iterator_ids_end, &data, ID *, id) { DEG_iterator_ids_begin, DEG_iterator_ids_next, DEG_iterator_ids_end, &data, ID *, id) {
CLOG_INFO( CLOG_INFO(LOG_RENDER_HYDRA_SCENE,
LOG_RENDER_HYDRA_SCENE, 2, "Update: %s [%s]", id->name, std::bitset<32>(id->recalc).to_string().c_str()); 2,
"Update: %s [%s]",
id->name,
std::bitset<32>(id->recalc).to_string().c_str());
switch (GS(id->name)) { switch (GS(id->name)) {
case ID_OB: { case ID_OB: {

View File

@ -15,7 +15,11 @@ InstancerData::InstancerData(BlenderSceneDelegate *scene_delegate, Object *objec
id_ = nullptr; id_ = nullptr;
p_id_ = prim_id(scene_delegate, object); p_id_ = prim_id(scene_delegate, object);
instancer_id = p_id_.AppendElementString("Instancer"); 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) bool InstancerData::is_supported(Object *object)
@ -184,8 +188,12 @@ bool InstancerData::set_instances()
continue; continue;
} }
transforms_.push_back(gf_matrix_from_transform(dupli->mat)); transforms_.push_back(gf_matrix_from_transform(dupli->mat));
CLOG_INFO( CLOG_INFO(LOG_RENDER_HYDRA_SCENE,
LOG_RENDER_HYDRA_SCENE, 2, "Instance %s (%s) %d", id_->name, ((ID *)dupli->ob)->name, dupli->random_id); 2,
"Instance %s (%s) %d",
id_->name,
((ID *)dupli->ob)->name,
dupli->random_id);
} }
free_object_duplilist(lb); free_object_duplilist(lb);

View File

@ -84,7 +84,11 @@ void MaterialData::init()
PyGILState_Release(gstate); PyGILState_Release(gstate);
mtlx_path_ = pxr::SdfAssetPath(path, path); 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() void MaterialData::insert()

View File

@ -47,7 +47,8 @@ std::string cache_image(Main *bmain,
image_name.append(default_format); 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); STRNCPY(opts->filepath, tempfile);
if (!BKE_image_save(reports, bmain, image, iuser, opts)) { if (!BKE_image_save(reports, bmain, image, iuser, opts)) {

View File

@ -11,8 +11,8 @@
#include "BKE_camera.h" #include "BKE_camera.h"
#include "BLI_timecode.h"
#include "BLI_math_matrix.h" #include "BLI_math_matrix.h"
#include "BLI_timecode.h"
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"