From 969f8c04f0482854065f93c6ab8654537705c7bb Mon Sep 17 00:00:00 2001 From: Pierre Tremblay Date: Fri, 17 Jan 2025 14:42:30 -0500 Subject: [PATCH] If not present initialize HdStormRendererPlugin__domeLightTexturesMaxResolution optionVar to 1024. --- lib/mayaHydra/mayaPlugin/plugin.cpp | 6 ++++++ lib/mayaHydra/mayaPlugin/pluginUtils.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/mayaHydra/mayaPlugin/plugin.cpp b/lib/mayaHydra/mayaPlugin/plugin.cpp index 5501506e41..be4b255e84 100644 --- a/lib/mayaHydra/mayaPlugin/plugin.cpp +++ b/lib/mayaHydra/mayaPlugin/plugin.cpp @@ -145,6 +145,12 @@ PLUGIN_EXPORT MStatus initializePlugin(MObject obj) // For now this is required for the HdSt backend to use lights. setEnv("USDIMAGING_ENABLE_SCENE_LIGHTS", "1"); + // Set dome light textures maximum resolution default to 1024. A proper + // solution with a Hydra preferences category in the Maya + // preferences UI is preferable, but at time of writing is not in + // scope. PPT, 17-Jan-2025. + MGlobal::executeCommand("if (!`optionVar -exists HdStormRendererPlugin__domeLightTexturesMaxResolution`) { optionVar -iv HdStormRendererPlugin__domeLightTexturesMaxResolution 1024; }"); + MFnPlugin plugin(obj, "Autodesk", PLUGIN_VERSION, "Any"); if (!plugin.registerCommand( diff --git a/lib/mayaHydra/mayaPlugin/pluginUtils.h b/lib/mayaHydra/mayaPlugin/pluginUtils.h index c86f1211ac..49ea5d3825 100644 --- a/lib/mayaHydra/mayaPlugin/pluginUtils.h +++ b/lib/mayaHydra/mayaPlugin/pluginUtils.h @@ -48,7 +48,7 @@ struct MtohRendererDescription using MtohRendererDescriptionVector = std::vector; -/// Map from MtohRendererDescription::rendererName to it's a HdRenderSettingDescriptorList +/// Map from MtohRendererDescription::rendererName to its HdRenderSettingDescriptorList using MtohRendererSettings = std::unordered_map;