diff options
Diffstat (limited to 'intern/cycles/hydra/light.cpp')
-rw-r--r-- | intern/cycles/hydra/light.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/intern/cycles/hydra/light.cpp b/intern/cycles/hydra/light.cpp index b691da0d6a6..c0b4b3a3f38 100644 --- a/intern/cycles/hydra/light.cpp +++ b/intern/cycles/hydra/light.cpp @@ -54,11 +54,16 @@ void HdCyclesLight::Sync(HdSceneDelegate *sceneDelegate, const SdfPath &id = GetId(); if (*dirtyBits & DirtyBits::DirtyTransform) { + const float metersPerUnit = + static_cast<HdCyclesSession *>(renderParam)->GetStageMetersPerUnit(); + + const Transform tfm = transform_scale(make_float3(metersPerUnit)) * #if PXR_VERSION >= 2011 - const Transform tfm = convert_transform(sceneDelegate->GetTransform(id)); + convert_transform(sceneDelegate->GetTransform(id)); #else - const Transform tfm = convert_transform( - sceneDelegate->GetLightParamValue(id, HdTokens->transform).Get<GfMatrix4d>()); + convert_transform( + sceneDelegate->GetLightParamValue(id, HdTokens->transform) + .Get<GfMatrix4d>()); #endif _light->set_tfm(tfm); |