forked from blender/blender
Fixing build on MacOS #39
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
namespace blender::render::hydra {
|
namespace blender::render::hydra {
|
||||||
|
|
||||||
extern struct CLG_LogRef *LOG_RENDER_HYDRA; /* EN - Engine */
|
extern struct CLG_LogRef *LOG_RENDER_HYDRA;
|
||||||
|
|
||||||
class Engine {
|
class Engine {
|
||||||
public:
|
public:
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <pxr/base/gf/vec2f.h>
|
||||||
#include <pxr/imaging/hd/sceneDelegate.h>
|
#include <pxr/imaging/hd/sceneDelegate.h>
|
||||||
|
|
||||||
#include "BKE_context.h"
|
#include "BKE_context.h"
|
||||||
@ -18,7 +19,7 @@
|
|||||||
|
|
||||||
namespace blender::render::hydra {
|
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 {
|
class BlenderSceneDelegate : public pxr::HdSceneDelegate {
|
||||||
friend ObjectData; /* has access to instances */
|
friend ObjectData; /* has access to instances */
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include <pxr/base/tf/token.h>
|
#include <pxr/base/tf/token.h>
|
||||||
#include <pxr/base/vt/value.h>
|
#include <pxr/base/vt/value.h>
|
||||||
#include <pxr/imaging/hd/sceneDelegate.h>
|
#include <pxr/usd/sdf/path.h>
|
||||||
|
|
||||||
#include "DNA_ID.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, ...) \
|
#define ID_LOG(level, msg, ...) \
|
||||||
CLOG_INFO( \
|
CLOG_INFO(LOG_RENDER_HYDRA_SCENE, \
|
||||||
LOG_RENDER_HYDRA_SCENE, level, "%s (%s): " msg, prim_id.GetText(), id->name, __VA_ARGS__);
|
level, \
|
||||||
|
"%s (%s): " msg, \
|
||||||
|
prim_id.GetText(), \
|
||||||
|
id->name, \
|
||||||
|
##__VA_ARGS__);
|
||||||
|
|
||||||
} // namespace blender::render::hydra
|
} // namespace blender::render::hydra
|
||||||
|
@ -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 InstancerData::light_prim_id_index(pxr::SdfPath const &id) const
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
sscanf_s(id.GetName().c_str(), "L_%x", &index);
|
sscanf(id.GetName().c_str(), "L_%x", &index);
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
namespace mx = MaterialX;
|
namespace mx = MaterialX;
|
||||||
|
|
||||||
|
namespace blender::render::hydra {
|
||||||
|
|
||||||
void hdmtlx_convert_to_materialnetworkmap(std::string const &mtlx_path,
|
void hdmtlx_convert_to_materialnetworkmap(std::string const &mtlx_path,
|
||||||
pxr::TfTokenVector const &shader_source_types,
|
pxr::TfTokenVector const &shader_source_types,
|
||||||
pxr::TfTokenVector const &render_contexts,
|
pxr::TfTokenVector const &render_contexts,
|
||||||
@ -77,3 +79,5 @@ void hdmtlx_convert_to_materialnetworkmap(std::string const &mtlx_path,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace blender::render::hydra
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <pxr/base/tf/token.h>
|
#include <pxr/base/tf/token.h>
|
||||||
#include <pxr/pxr.h>
|
#include <pxr/imaging/hd/material.h>
|
||||||
|
|
||||||
#include <string>
|
namespace blender::render::hydra {
|
||||||
|
|
||||||
struct pxr::HdMaterialNetworkMap;
|
|
||||||
|
|
||||||
void hdmtlx_convert_to_materialnetworkmap(std::string const &mtlx_path,
|
void hdmtlx_convert_to_materialnetworkmap(std::string const &mtlx_path,
|
||||||
pxr::TfTokenVector const &shader_source_types,
|
pxr::TfTokenVector const &shader_source_types,
|
||||||
pxr::TfTokenVector const &render_contexts,
|
pxr::TfTokenVector const &render_contexts,
|
||||||
pxr::HdMaterialNetworkMap *out);
|
pxr::HdMaterialNetworkMap *out);
|
||||||
|
|
||||||
|
} // namespace blender::render::hydra
|
||||||
|
Loading…
Reference in New Issue
Block a user