diff --git a/source/blender/render/hydra/engine.h b/source/blender/render/hydra/engine.h index 72e42589ceff..318db173f169 100644 --- a/source/blender/render/hydra/engine.h +++ b/source/blender/render/hydra/engine.h @@ -21,7 +21,7 @@ namespace blender::render::hydra { -extern struct CLG_LogRef *LOG_RENDER_HYDRA; /* EN - Engine */ +extern struct CLG_LogRef *LOG_RENDER_HYDRA; class Engine { public: diff --git a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.h b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.h index 1ad18348564e..38b4763860a0 100644 --- a/source/blender/render/hydra/scene_delegate/blender_scene_delegate.h +++ b/source/blender/render/hydra/scene_delegate/blender_scene_delegate.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include "BKE_context.h" @@ -18,7 +19,7 @@ namespace blender::render::hydra { -extern struct CLG_LogRef *LOG_RENDER_HYDRA_SCENE; /* BSD - Blender Scene Delegate */ +extern struct CLG_LogRef *LOG_RENDER_HYDRA_SCENE; class BlenderSceneDelegate : public pxr::HdSceneDelegate { friend ObjectData; /* has access to instances */ diff --git a/source/blender/render/hydra/scene_delegate/id.h b/source/blender/render/hydra/scene_delegate/id.h index 425933c2258b..cdb5a6a7f232 100644 --- a/source/blender/render/hydra/scene_delegate/id.h +++ b/source/blender/render/hydra/scene_delegate/id.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include "DNA_ID.h" @@ -39,7 +39,11 @@ template const T IdData::get_data(pxr::TfToken const &key) const } #define ID_LOG(level, msg, ...) \ - CLOG_INFO( \ - LOG_RENDER_HYDRA_SCENE, level, "%s (%s): " msg, prim_id.GetText(), id->name, __VA_ARGS__); + CLOG_INFO(LOG_RENDER_HYDRA_SCENE, \ + level, \ + "%s (%s): " msg, \ + prim_id.GetText(), \ + id->name, \ + ##__VA_ARGS__); } // namespace blender::render::hydra diff --git a/source/blender/render/hydra/scene_delegate/instancer.cc b/source/blender/render/hydra/scene_delegate/instancer.cc index 9ed24aa6f6f0..f06b64408915 100644 --- a/source/blender/render/hydra/scene_delegate/instancer.cc +++ b/source/blender/render/hydra/scene_delegate/instancer.cc @@ -246,7 +246,7 @@ pxr::SdfPath InstancerData::light_prim_id(LightInstance const &inst, int index) int InstancerData::light_prim_id_index(pxr::SdfPath const &id) const { int index; - sscanf_s(id.GetName().c_str(), "L_%x", &index); + sscanf(id.GetName().c_str(), "L_%x", &index); return index; } diff --git a/source/blender/render/hydra/scene_delegate/mtlx_hydra_adapter.cc b/source/blender/render/hydra/scene_delegate/mtlx_hydra_adapter.cc index 58836be947cc..072d222bab4c 100644 --- a/source/blender/render/hydra/scene_delegate/mtlx_hydra_adapter.cc +++ b/source/blender/render/hydra/scene_delegate/mtlx_hydra_adapter.cc @@ -22,6 +22,8 @@ namespace mx = MaterialX; +namespace blender::render::hydra { + void hdmtlx_convert_to_materialnetworkmap(std::string const &mtlx_path, pxr::TfTokenVector const &shader_source_types, pxr::TfTokenVector const &render_contexts, @@ -77,3 +79,5 @@ void hdmtlx_convert_to_materialnetworkmap(std::string const &mtlx_path, } } } + +} // namespace blender::render::hydra diff --git a/source/blender/render/hydra/scene_delegate/mtlx_hydra_adapter.h b/source/blender/render/hydra/scene_delegate/mtlx_hydra_adapter.h index 741f288ffb66..c77661492551 100644 --- a/source/blender/render/hydra/scene_delegate/mtlx_hydra_adapter.h +++ b/source/blender/render/hydra/scene_delegate/mtlx_hydra_adapter.h @@ -4,13 +4,13 @@ #pragma once #include -#include +#include -#include - -struct pxr::HdMaterialNetworkMap; +namespace blender::render::hydra { void hdmtlx_convert_to_materialnetworkmap(std::string const &mtlx_path, pxr::TfTokenVector const &shader_source_types, pxr::TfTokenVector const &render_contexts, pxr::HdMaterialNetworkMap *out); + +} // namespace blender::render::hydra