From 85a3f6b1ec34aa31705400c713f54b3f41fd931a Mon Sep 17 00:00:00 2001 From: Vasyl-Pidhirskyi Date: Thu, 1 Jun 2023 16:59:32 +0300 Subject: [PATCH 1/5] Initial commit Adjusted levels --- source/blender/render/hydra/python.cc | 10 +++++----- .../hydra/scene_delegate/blender_scene_delegate.cc | 4 ++-- .../blender/render/hydra/scene_delegate/curves.cc | 6 +++--- .../blender/render/hydra/scene_delegate/image.cc | 4 ++-- .../render/hydra/scene_delegate/instancer.cc | 1 + .../blender/render/hydra/scene_delegate/light.cc | 10 ++++++---- .../render/hydra/scene_delegate/material.cc | 12 ++++++------ source/blender/render/hydra/scene_delegate/mesh.cc | 14 +++++++------- .../blender/render/hydra/scene_delegate/object.cc | 2 +- .../blender/render/hydra/scene_delegate/world.cc | 9 +++++---- 10 files changed, 38 insertions(+), 34 deletions(-) diff --git a/source/blender/render/hydra/python.cc b/source/blender/render/hydra/python.cc index 9ef8f00b3478..d0ce070831d3 100644 --- a/source/blender/render/hydra/python.cc +++ b/source/blender/render/hydra/python.cc @@ -19,7 +19,7 @@ namespace blender::render::hydra { static PyObject *init_func(PyObject * /*self*/, PyObject *args) { - CLOG_INFO(LOG_RENDER_HYDRA, 1, "Init"); + CLOG_INFO(LOG_RENDER_HYDRA, 0, "Init"); pxr::PlugRegistry::GetInstance().RegisterPlugins(std::string(BKE_appdir_program_dir()) + "/blender.shared/usd"); @@ -56,7 +56,7 @@ static PyObject *register_plugins_func(PyObject * /*self*/, PyObject *args) ss << s << ", "; } ss << "]"; - CLOG_INFO(LOG_RENDER_HYDRA, 1, "Register %s", ss.str().c_str()); + CLOG_INFO(LOG_RENDER_HYDRA, 0, "Register %s", ss.str().c_str()); Py_RETURN_NONE; } @@ -122,7 +122,7 @@ static PyObject *engine_create_func(PyObject * /*self*/, PyObject *args) } } - CLOG_INFO(LOG_RENDER_HYDRA, 2, "Engine %016llx %s", engine, engine_type); + CLOG_INFO(LOG_RENDER_HYDRA, 0, "Engine %016llx %s", engine, engine_type); return PyLong_FromVoidPtr(engine); } @@ -173,7 +173,7 @@ static PyObject *engine_render_func(PyObject * /*self*/, PyObject *args) engine->render(depsgraph); Py_END_ALLOW_THREADS; - CLOG_INFO(LOG_RENDER_HYDRA, 2, "Engine %016llx", engine); + CLOG_INFO(LOG_RENDER_HYDRA, 0, "Engine %016llx", engine); Py_RETURN_NONE; } @@ -193,7 +193,7 @@ static PyObject *engine_view_draw_func(PyObject * /*self*/, PyObject *args) engine->render(depsgraph, context); Py_END_ALLOW_THREADS; - CLOG_INFO(LOG_RENDER_HYDRA, 3, "Engine %016llx", engine); + CLOG_INFO(LOG_RENDER_HYDRA, 0, "Engine %016llx", engine); Py_RETURN_NONE; } diff --git a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc index dedab58950f0..ee531f4b8230 100644 --- a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc +++ b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc @@ -427,7 +427,7 @@ void BlenderSceneDelegate::check_updates() ITER_BEGIN (DEG_iterator_ids_begin, DEG_iterator_ids_next, DEG_iterator_ids_end, &data, ID *, id) { CLOG_INFO(LOG_RENDER_HYDRA_SCENE, - 2, + 0, "Update: %s [%s]", id->name, std::bitset<32>(id->recalc).to_string().c_str()); @@ -511,7 +511,7 @@ void BlenderSceneDelegate::add_new_objects() object) { CLOG_INFO(LOG_RENDER_HYDRA_SCENE, - 2, + 0, "Visibility: %s [%s]", object->id.name, std::bitset<3>(BKE_object_visibility(object, deg_mode)).to_string().c_str()); diff --git a/source/blender/render/hydra/scene_delegate/curves.cc b/source/blender/render/hydra/scene_delegate/curves.cc index 983a58c133e1..0b0014e7c25b 100644 --- a/source/blender/render/hydra/scene_delegate/curves.cc +++ b/source/blender/render/hydra/scene_delegate/curves.cc @@ -21,7 +21,7 @@ CurvesData::CurvesData(BlenderSceneDelegate *scene_delegate, void CurvesData::init() { - ID_LOG(2, ""); + ID_LOG(1, ""); Object *object = (Object *)id; write_curves((Curves *)object->data); @@ -31,7 +31,7 @@ void CurvesData::init() void CurvesData::insert() { - ID_LOG(2, ""); + ID_LOG(1, ""); scene_delegate_->GetRenderIndex().InsertRprim( pxr::HdPrimTypeTokens->basisCurves, scene_delegate_, prim_id); } @@ -64,7 +64,7 @@ void CurvesData::update() } scene_delegate_->GetRenderIndex().GetChangeTracker().MarkRprimDirty(prim_id, bits); - ID_LOG(2, ""); + ID_LOG(1, ""); } pxr::VtValue CurvesData::get_data(pxr::SdfPath const &id, pxr::TfToken const &key) const diff --git a/source/blender/render/hydra/scene_delegate/image.cc b/source/blender/render/hydra/scene_delegate/image.cc index 02f88d66ae84..d858520d7c88 100644 --- a/source/blender/render/hydra/scene_delegate/image.cc +++ b/source/blender/render/hydra/scene_delegate/image.cc @@ -47,7 +47,7 @@ static std::string cache_image_file(Image *image, } BKE_image_save_options_free(&opts); - CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s -> %s", image->id.name, file_path.c_str()); + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 3, "%s -> %s", image->id.name, file_path.c_str()); return file_path; } @@ -71,7 +71,7 @@ std::string cache_or_get_image_file(Image *image, } } - CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s -> %s", image->id.name, file_path.c_str()); + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 3, "%s -> %s", image->id.name, file_path.c_str()); return file_path; } diff --git a/source/blender/render/hydra/scene_delegate/instancer.cc b/source/blender/render/hydra/scene_delegate/instancer.cc index 6f0177b4299e..c708c44923fa 100644 --- a/source/blender/render/hydra/scene_delegate/instancer.cc +++ b/source/blender/render/hydra/scene_delegate/instancer.cc @@ -133,6 +133,7 @@ bool InstancerData::update_visibility() } } } + ID_LOG(2, ""); return ret; } diff --git a/source/blender/render/hydra/scene_delegate/light.cc b/source/blender/render/hydra/scene_delegate/light.cc index df8a83567c27..667e9d9b30ad 100644 --- a/source/blender/render/hydra/scene_delegate/light.cc +++ b/source/blender/render/hydra/scene_delegate/light.cc @@ -24,7 +24,7 @@ LightData::LightData(BlenderSceneDelegate *scene_delegate, void LightData::init() { - ID_LOG(2, ""); + ID_LOG(1, ""); Light *light = (Light *)((Object *)id)->data; data_.clear(); @@ -99,19 +99,19 @@ void LightData::init() void LightData::insert() { - ID_LOG(2, ""); + ID_LOG(1, ""); scene_delegate_->GetRenderIndex().InsertSprim(prim_type_, scene_delegate_, prim_id); } void LightData::remove() { - CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s", prim_id.GetText()); + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s", prim_id.GetText()); scene_delegate_->GetRenderIndex().RemoveSprim(prim_type_, prim_id); } void LightData::update() { - ID_LOG(2, ""); + ID_LOG(1, ""); Object *object = (Object *)id; Light *light = (Light *)object->data; @@ -138,6 +138,7 @@ void LightData::update() pxr::VtValue LightData::get_data(pxr::TfToken const &key) const { + ID_LOG(3, "%s", key.GetText()); pxr::VtValue ret; auto it = data_.find(key); if (it != data_.end()) { @@ -163,6 +164,7 @@ bool LightData::update_visibility() if (ret) { scene_delegate_->GetRenderIndex().GetChangeTracker().MarkSprimDirty(prim_id, pxr::HdLight::DirtyParams); + ID_LOG(2, ""); } return ret; } diff --git a/source/blender/render/hydra/scene_delegate/material.cc b/source/blender/render/hydra/scene_delegate/material.cc index cd832a4f1816..4db477655357 100644 --- a/source/blender/render/hydra/scene_delegate/material.cc +++ b/source/blender/render/hydra/scene_delegate/material.cc @@ -30,7 +30,7 @@ MaterialData::MaterialData(BlenderSceneDelegate *scene_delegate, void MaterialData::init() { - ID_LOG(2, ""); + ID_LOG(1, ""); double_sided = (((Material *)id)->blend_flag & MA_BL_CULL_BACKFACE) == 0; export_mtlx(); @@ -41,20 +41,20 @@ void MaterialData::init() void MaterialData::insert() { - ID_LOG(2, ""); + ID_LOG(1, ""); scene_delegate_->GetRenderIndex().InsertSprim( pxr::HdPrimTypeTokens->material, scene_delegate_, prim_id); } void MaterialData::remove() { - CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s", prim_id.GetText()); + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s", prim_id.GetText()); scene_delegate_->GetRenderIndex().RemoveSprim(pxr::HdPrimTypeTokens->material, prim_id); } void MaterialData::update() { - ID_LOG(2, ""); + ID_LOG(1, ""); bool prev_double_sided = double_sided; init(); scene_delegate_->GetRenderIndex().GetChangeTracker().MarkSprimDirty(prim_id, @@ -144,12 +144,12 @@ void MaterialData::export_mtlx() PyGILState_Release(gstate); mtlx_path_ = pxr::SdfAssetPath(path, path); - ID_LOG(2, "mtlx=%s", mtlx_path_.GetResolvedPath().c_str()); + ID_LOG(1, "mtlx=%s", mtlx_path_.GetResolvedPath().c_str()); } void MaterialData::write_material_network_map() { - ID_LOG(2, ""); + ID_LOG(1, ""); if (mtlx_path_.GetResolvedPath().empty()) { material_network_map_ = pxr::VtValue(); return; diff --git a/source/blender/render/hydra/scene_delegate/mesh.cc b/source/blender/render/hydra/scene_delegate/mesh.cc index 8c8ef8bb86f5..d7f1ab831f66 100644 --- a/source/blender/render/hydra/scene_delegate/mesh.cc +++ b/source/blender/render/hydra/scene_delegate/mesh.cc @@ -23,7 +23,7 @@ MeshData::MeshData(BlenderSceneDelegate *scene_delegate, void MeshData::init() { - ID_LOG(2, ""); + ID_LOG(1, ""); Object *object = (Object *)id; if (object->type == OB_MESH && object->mode == OB_MODE_OBJECT && @@ -52,7 +52,7 @@ void MeshData::remove() { for (int i = 0; i < submeshes_.size(); ++i) { scene_delegate_->GetRenderIndex().RemoveRprim(submesh_prim_id(i)); - CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s: %d", prim_id.GetText(), i); + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s: %d", prim_id.GetText(), i); } } @@ -80,7 +80,7 @@ void MeshData::update() for (int i = 0; i < submeshes_.size(); ++i) { scene_delegate_->GetRenderIndex().GetChangeTracker().MarkRprimDirty(submesh_prim_id(i), bits); - ID_LOG(2, "%d", i); + ID_LOG(1, "%d", i); } } @@ -168,7 +168,7 @@ void MeshData::update_double_sided(MaterialData *mat_data) if (submeshes_[i].mat_data == mat_data) { scene_delegate_->GetRenderIndex().GetChangeTracker().MarkRprimDirty( submesh_prim_id(i), pxr::HdChangeTracker::DirtyDoubleSided); - ID_LOG(2, "%d", i); + ID_LOG(1, "%d", i); } } } @@ -278,16 +278,16 @@ void MeshData::write_submeshes(Mesh *mesh) pxr::SdfPath p = submesh_prim_id(i); if (i < sub_meshes_prev_count) { render_index.GetChangeTracker().MarkRprimDirty(p, pxr::HdChangeTracker::AllDirty); - ID_LOG(2, "Update %d", i); + ID_LOG(1, "Update %d", i); } else { render_index.InsertRprim(pxr::HdPrimTypeTokens->mesh, scene_delegate_, p); - ID_LOG(2, "Insert %d", i); + ID_LOG(1, "Insert %d", i); } } for (; i < sub_meshes_prev_count; ++i) { render_index.RemoveRprim(submesh_prim_id(i)); - ID_LOG(2, "Remove %d", i); + ID_LOG(1, "Remove %d", i); } } diff --git a/source/blender/render/hydra/scene_delegate/object.cc b/source/blender/render/hydra/scene_delegate/object.cc index ec36c2546d94..48d0865eb730 100644 --- a/source/blender/render/hydra/scene_delegate/object.cc +++ b/source/blender/render/hydra/scene_delegate/object.cc @@ -98,7 +98,7 @@ void ObjectData::update_parent() { Object *object = (Object *)id; if (parent_ != object->parent) { - ID_LOG(2, ""); + ID_LOG(1, ""); parent_ = object->parent; /* Looking for corresponded instancer and update it as parent */ diff --git a/source/blender/render/hydra/scene_delegate/world.cc b/source/blender/render/hydra/scene_delegate/world.cc index 7b70f8697e4a..e151b0f67f80 100644 --- a/source/blender/render/hydra/scene_delegate/world.cc +++ b/source/blender/render/hydra/scene_delegate/world.cc @@ -37,7 +37,7 @@ WorldData::WorldData(BlenderSceneDelegate *scene_delegate, void WorldData::init() { - ID_LOG(2, ""); + ID_LOG(1, ""); write_transform(); @@ -104,20 +104,20 @@ void WorldData::init() void WorldData::insert() { - ID_LOG(2, ""); + ID_LOG(1, ""); scene_delegate_->GetRenderIndex().InsertSprim( pxr::HdPrimTypeTokens->domeLight, scene_delegate_, prim_id); } void WorldData::remove() { - CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s", prim_id.GetText()); + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s", prim_id.GetText()); scene_delegate_->GetRenderIndex().RemoveSprim(pxr::HdPrimTypeTokens->domeLight, prim_id); } void WorldData::update() { - ID_LOG(2, ""); + ID_LOG(1, ""); init(); scene_delegate_->GetRenderIndex().GetChangeTracker().MarkSprimDirty(prim_id, pxr::HdLight::AllDirty); @@ -135,6 +135,7 @@ pxr::VtValue WorldData::get_data(pxr::TfToken const &key) const auto it = data_.find(key); if (it != data_.end()) { ret = it->second; + ID_LOG(3, "%s", key.GetText()); } return ret; } -- 2.30.2 From fc95eb94cc1abe86e71e477083994e2151d1d7e2 Mon Sep 17 00:00:00 2001 From: Vasyl-Pidhirskyi Date: Fri, 2 Jun 2023 10:58:07 +0300 Subject: [PATCH 2/5] Fixed according to comment. --- source/blender/render/hydra/scene_delegate/instancer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/render/hydra/scene_delegate/instancer.cc b/source/blender/render/hydra/scene_delegate/instancer.cc index c708c44923fa..13477556345c 100644 --- a/source/blender/render/hydra/scene_delegate/instancer.cc +++ b/source/blender/render/hydra/scene_delegate/instancer.cc @@ -116,6 +116,7 @@ bool InstancerData::update_visibility() bool ret = visible != prev_visible; if (ret) { + ID_LOG(2, ""); auto &change_tracker = scene_delegate_->GetRenderIndex().GetChangeTracker(); change_tracker.MarkInstancerDirty(prim_id, pxr::HdChangeTracker::DirtyVisibility); for (auto &it : mesh_instances_) { @@ -133,7 +134,6 @@ bool InstancerData::update_visibility() } } } - ID_LOG(2, ""); return ret; } -- 2.30.2 From 55786b3d55c03a546bb544d6450257f2558da3be Mon Sep 17 00:00:00 2001 From: Vasyl-Pidhirskyi Date: Mon, 5 Jun 2023 13:08:54 +0300 Subject: [PATCH 3/5] Fixed according to comments. --- source/blender/render/hydra/python.cc | 8 ++++---- .../hydra/scene_delegate/blender_scene_delegate.cc | 2 +- source/blender/render/hydra/scene_delegate/curves.cc | 2 +- source/blender/render/hydra/scene_delegate/image.cc | 6 ++++-- .../blender/render/hydra/scene_delegate/instancer.cc | 10 +++++----- source/blender/render/hydra/scene_delegate/light.cc | 2 +- source/blender/render/hydra/scene_delegate/mesh.cc | 2 +- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/source/blender/render/hydra/python.cc b/source/blender/render/hydra/python.cc index 5a3740fc6e78..d6362d03725f 100644 --- a/source/blender/render/hydra/python.cc +++ b/source/blender/render/hydra/python.cc @@ -125,7 +125,7 @@ static PyObject *engine_create_func(PyObject * /*self*/, PyObject *args) } } - CLOG_INFO(LOG_RENDER_HYDRA, 0, "Engine %016llx %s", engine, engine_type); + CLOG_INFO(LOG_RENDER_HYDRA, 1, "Engine %016llx %s", engine, engine_type); return PyLong_FromVoidPtr(engine); } @@ -139,7 +139,7 @@ static PyObject *engine_free_func(PyObject * /*self*/, PyObject *args) Engine *engine = (Engine *)PyLong_AsVoidPtr(pyengine); delete engine; - CLOG_INFO(LOG_RENDER_HYDRA, 2, "Engine %016llx", engine); + CLOG_INFO(LOG_RENDER_HYDRA, 1, "Engine %016llx", engine); Py_RETURN_NONE; } @@ -194,7 +194,7 @@ static PyObject *engine_render_func(PyObject * /*self*/, PyObject *args) engine->render(depsgraph); Py_END_ALLOW_THREADS; - CLOG_INFO(LOG_RENDER_HYDRA, 0, "Engine %016llx", engine); + CLOG_INFO(LOG_RENDER_HYDRA, 3, "Engine %016llx", engine); Py_RETURN_NONE; } @@ -214,7 +214,7 @@ static PyObject *engine_view_draw_func(PyObject * /*self*/, PyObject *args) engine->render(depsgraph, context); Py_END_ALLOW_THREADS; - CLOG_INFO(LOG_RENDER_HYDRA, 0, "Engine %016llx", engine); + CLOG_INFO(LOG_RENDER_HYDRA, 3, "Engine %016llx", engine); Py_RETURN_NONE; } diff --git a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc index edcaa3932bac..e1a6f0326707 100644 --- a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc +++ b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.cc @@ -510,7 +510,7 @@ void BlenderSceneDelegate::add_new_objects() object) { CLOG_INFO(LOG_RENDER_HYDRA_SCENE, - 0, + 2, "Visibility: %s [%s]", object->id.name, std::bitset<3>(BKE_object_visibility(object, deg_mode)).to_string().c_str()); diff --git a/source/blender/render/hydra/scene_delegate/curves.cc b/source/blender/render/hydra/scene_delegate/curves.cc index a0535aabcc3d..31888a1a814a 100644 --- a/source/blender/render/hydra/scene_delegate/curves.cc +++ b/source/blender/render/hydra/scene_delegate/curves.cc @@ -88,7 +88,7 @@ bool CurvesData::update_visibility() if (ret) { scene_delegate_->GetRenderIndex().GetChangeTracker().MarkRprimDirty( prim_id, pxr::HdChangeTracker::DirtyVisibility); - ID_LOG(2, ""); + ID_LOG(1, ""); } return ret; } diff --git a/source/blender/render/hydra/scene_delegate/image.cc b/source/blender/render/hydra/scene_delegate/image.cc index d858520d7c88..12186ca5c029 100644 --- a/source/blender/render/hydra/scene_delegate/image.cc +++ b/source/blender/render/hydra/scene_delegate/image.cc @@ -44,10 +44,12 @@ static std::string cache_image_file(Image *image, if (!BKE_image_save(&reports, main, image, iuser, &opts)) { file_path = ""; }; + else{ + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s -> %s", image->id.name, file_path.c_str()); + }; } BKE_image_save_options_free(&opts); - CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 3, "%s -> %s", image->id.name, file_path.c_str()); return file_path; } @@ -71,7 +73,7 @@ std::string cache_or_get_image_file(Image *image, } } - CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 3, "%s -> %s", image->id.name, file_path.c_str()); + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s -> %s", image->id.name, file_path.c_str()); return file_path; } diff --git a/source/blender/render/hydra/scene_delegate/instancer.cc b/source/blender/render/hydra/scene_delegate/instancer.cc index d1f3389392cd..2ba8a8651dff 100644 --- a/source/blender/render/hydra/scene_delegate/instancer.cc +++ b/source/blender/render/hydra/scene_delegate/instancer.cc @@ -61,19 +61,19 @@ bool InstancerData::is_visible(BlenderSceneDelegate *scene_delegate, Object *obj void InstancerData::init() { - ID_LOG(2, ""); + ID_LOG(1, ""); write_instances(); } void InstancerData::insert() { - ID_LOG(2, ""); + ID_LOG(1, ""); scene_delegate_->GetRenderIndex().InsertInstancer(scene_delegate_, prim_id); } void InstancerData::remove() { - CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s", prim_id.GetText()); + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s", prim_id.GetText()); for (auto &m_inst : mesh_instances_.values()) { m_inst.data->remove(); } @@ -87,7 +87,7 @@ void InstancerData::remove() void InstancerData::update() { - ID_LOG(2, ""); + ID_LOG(1, ""); Object *object = (Object *)id; if (id->recalc & ID_RECALC_GEOMETRY || (object->data && ((ID *)object->data)->recalc & ID_RECALC_GEOMETRY) || @@ -116,7 +116,7 @@ bool InstancerData::update_visibility() bool ret = visible != prev_visible; if (ret) { - ID_LOG(2, ""); + ID_LOG(1, ""); auto &change_tracker = scene_delegate_->GetRenderIndex().GetChangeTracker(); change_tracker.MarkInstancerDirty(prim_id, pxr::HdChangeTracker::DirtyVisibility); for (auto &m_inst : mesh_instances_.values()) { diff --git a/source/blender/render/hydra/scene_delegate/light.cc b/source/blender/render/hydra/scene_delegate/light.cc index 667e9d9b30ad..5078ebcbe31e 100644 --- a/source/blender/render/hydra/scene_delegate/light.cc +++ b/source/blender/render/hydra/scene_delegate/light.cc @@ -164,7 +164,7 @@ bool LightData::update_visibility() if (ret) { scene_delegate_->GetRenderIndex().GetChangeTracker().MarkSprimDirty(prim_id, pxr::HdLight::DirtyParams); - ID_LOG(2, ""); + ID_LOG(1, ""); } return ret; } diff --git a/source/blender/render/hydra/scene_delegate/mesh.cc b/source/blender/render/hydra/scene_delegate/mesh.cc index be434723d72f..11e9157d08de 100644 --- a/source/blender/render/hydra/scene_delegate/mesh.cc +++ b/source/blender/render/hydra/scene_delegate/mesh.cc @@ -106,7 +106,7 @@ bool MeshData::update_visibility() for (int i = 0; i < submeshes_.size(); ++i) { scene_delegate_->GetRenderIndex().GetChangeTracker().MarkRprimDirty( submesh_prim_id(i), pxr::HdChangeTracker::DirtyVisibility); - ID_LOG(2, "%d", i); + ID_LOG(1, "%d", i); } } return ret; -- 2.30.2 From 78ad1a17ee6e6084195ec7879f10e1c87e45f486 Mon Sep 17 00:00:00 2001 From: Vasyl-Pidhirskyi Date: Mon, 5 Jun 2023 13:13:22 +0300 Subject: [PATCH 4/5] Make format --- source/blender/render/hydra/scene_delegate/image.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/render/hydra/scene_delegate/image.cc b/source/blender/render/hydra/scene_delegate/image.cc index 12186ca5c029..e6d1df9b38c9 100644 --- a/source/blender/render/hydra/scene_delegate/image.cc +++ b/source/blender/render/hydra/scene_delegate/image.cc @@ -44,7 +44,7 @@ static std::string cache_image_file(Image *image, if (!BKE_image_save(&reports, main, image, iuser, &opts)) { file_path = ""; }; - else{ + else { CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s -> %s", image->id.name, file_path.c_str()); }; } -- 2.30.2 From c973614c082c49b45ea666ad458ec3ca1ecf402c Mon Sep 17 00:00:00 2001 From: Vasyl-Pidhirskyi Date: Mon, 5 Jun 2023 13:18:13 +0300 Subject: [PATCH 5/5] Code improvement. --- source/blender/render/hydra/scene_delegate/image.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/render/hydra/scene_delegate/image.cc b/source/blender/render/hydra/scene_delegate/image.cc index e6d1df9b38c9..356043b5f9a2 100644 --- a/source/blender/render/hydra/scene_delegate/image.cc +++ b/source/blender/render/hydra/scene_delegate/image.cc @@ -41,12 +41,12 @@ static std::string cache_image_file(Image *image, if (BKE_image_save_options_init(&opts, main, scene_delegate->scene, image, iuser, true, false)) { STRNCPY(opts.filepath, file_path.c_str()); ReportList reports; - if (!BKE_image_save(&reports, main, image, iuser, &opts)) { - file_path = ""; - }; - else { + if (BKE_image_save(&reports, main, image, iuser, &opts)) { CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 1, "%s -> %s", image->id.name, file_path.c_str()); - }; + } + else { + file_path = ""; + } } BKE_image_save_options_free(&opts); -- 2.30.2