Fixing build on MacOS #39

Merged
Bogdan Nagirniak merged 1 commits from macos-build-fix into hydra-render 2023-05-11 09:12:04 +02:00
6 changed files with 19 additions and 10 deletions

View File

@ -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:

View File

@ -3,6 +3,7 @@
#pragma once
#include <pxr/base/gf/vec2f.h>
#include <pxr/imaging/hd/sceneDelegate.h>
#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 */

View File

@ -5,7 +5,7 @@
#include <pxr/base/tf/token.h>
#include <pxr/base/vt/value.h>
#include <pxr/imaging/hd/sceneDelegate.h>
#include <pxr/usd/sdf/path.h>
#include "DNA_ID.h"
@ -39,7 +39,11 @@ template<class T> 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

View File

@ -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;
}

View File

@ -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

View File

@ -4,13 +4,13 @@
#pragma once
#include <pxr/base/tf/token.h>
#include <pxr/pxr.h>
#include <pxr/imaging/hd/material.h>
#include <string>
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