11#include <pxr/base/arch/fileSystem.h>
12#include <pxr/base/plug/plugin.h>
13#include <pxr/base/plug/thisPlugin.h>
14#include <pxr/base/tf/envSetting.h>
15#include <pxr/imaging/hd/rendererPluginRegistry.h>
17PXR_NAMESPACE_OPEN_SCOPE
19TF_DEFINE_ENV_SETTING(CYCLES_LOGGING,
false,
"Enable Cycles logging")
20TF_DEFINE_ENV_SETTING(CYCLES_LOGGING_LEVEL,
"warning",
"Cycles logging level")
24 const PlugPluginPtr plugin = PLUG_THIS_PLUGIN;
26 const std::string rootPath = PXR_NS::ArchAbsPath(plugin->GetResourcePath());
27 CCL_NS::path_init(std::move(rootPath));
29 if (TfGetEnvSetting(CYCLES_LOGGING)) {
30 CCL_NS::log_level_set(TfGetEnvSetting(CYCLES_LOGGING_LEVEL));
55 return new HD_CYCLES_NS::HdCyclesDelegate(settingsMap);
60 delete renderDelegate;
69 HdRendererPluginRegistry::Define<PXR_NS::HdCyclesPlugin>();
72PXR_NAMESPACE_CLOSE_SCOPE
bool IsSupported() const override
PXR_NS::HdRenderDelegate * CreateRenderDelegate() override
~HdCyclesPlugin() override
void DeleteRenderDelegate(PXR_NS::HdRenderDelegate *) override
TF_REGISTRY_FUNCTION(TfType)