From 94baa15f40f6b15ee19c87ee3497ccaa81720694 Mon Sep 17 00:00:00 2001 From: "ADS\\derlerk" Date: Thu, 6 Feb 2025 14:47:46 -0500 Subject: [PATCH 1/7] ShaderWriter for the LookdevX MaterialXStack material. Test that validate an export of MaterialXStack with surfaceshader and displacement --- lib/usd/translators/shading/CMakeLists.txt | 1 + .../mtlxMaterialXSurfaceShaderWriter.cpp | 517 ++++++++++++++++++ .../MaterialXStackExport.ma | 240 ++++++++ .../testUsdExportMaterialXSurfaceShader.py | 105 ++++ 4 files changed, 863 insertions(+) create mode 100644 lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp create mode 100644 test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.ma create mode 100644 test/lib/usd/translators/testUsdExportMaterialXSurfaceShader.py diff --git a/lib/usd/translators/shading/CMakeLists.txt b/lib/usd/translators/shading/CMakeLists.txt index 741582771c..c410fd9bc0 100644 --- a/lib/usd/translators/shading/CMakeLists.txt +++ b/lib/usd/translators/shading/CMakeLists.txt @@ -65,6 +65,7 @@ if (MAYA_APP_VERSION VERSION_GREATER 2022) mtlxTranslationTableReader.cpp mtlxTranslationTableWriter.cpp mtlxFileTextureWriter.cpp + mtlxMaterialXSurfaceShaderWriter.cpp ) target_compile_definitions(${TARGET_NAME} PRIVATE diff --git a/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp new file mode 100644 index 0000000000..0b36ba5fab --- /dev/null +++ b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp @@ -0,0 +1,517 @@ +// +// Copyright 2024 Autodesk +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#include "shadingTokens.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +PXR_NAMESPACE_OPEN_SCOPE + +// Retrieves the standard library document for MaterialX. +MaterialX::ConstDocumentPtr _GetStandardLibraryDocument() +{ + static auto standardDoc = UsdMtlxGetDocument(""); + return standardDoc; +} + +// Gets the node definition string for a given node and UFE path. +// If the Node already has it's nodeDefString set, use that. +// Otherwise, get the nodeDef via UFE. +std::string _GetNodeDefString(const MaterialX::NodePtr& node, const Ufe::Path& ufePath) +{ + auto nodeDefString = node->getNodeDefString(); + if (!nodeDefString.empty()) { + return nodeDefString; + } + + auto nodeDefHandler = Ufe::RunTimeMgr::instance().nodeDefHandler(ufePath.runTimeId()); + auto sceneItem = Ufe::Hierarchy::createItem(ufePath); + auto nodeDef = nodeDefHandler->definition(sceneItem); + if (nodeDef) { + return nodeDef->type(); + } + TF_VERIFY("Could not find nodeDef for node %s", node->getName().c_str()); + return std::string(); +} + +// Retrieves the node definition for a given node and UFE path. +MaterialX::ConstNodeDefPtr _GetNodeDef(const MaterialX::NodePtr& node, const Ufe::Path& ufePath) +{ + auto nodeDefName = _GetNodeDefString(node, ufePath); + auto nodeDefPtr = node->getDocument()->getNodeDef(nodeDefName); + if (!nodeDefPtr) { + // Get the standard library document and check that. + nodeDefPtr = _GetStandardLibraryDocument()->getNodeDef(nodeDefName); + } + return nodeDefPtr; +} + +// Sets shader info:id attribute on a USD prim based on a MaterialX node. +void _SetShaderInfoAttributes( + const MaterialX::NodePtr& node, + UsdPrim& shaderPrim, + const Ufe::Path& ufePath) +{ + auto infoAttr = shaderPrim.CreateAttribute( + UsdShadeTokens->infoId, SdfValueTypeNames->Token, SdfVariabilityUniform); + + auto nodeDefString = _GetNodeDefString(node, ufePath); + infoAttr.Set(TfToken(nodeDefString)); +} + +// Checks if the input type supports color space. +bool _TypeSupportsColorSpace(const MaterialX::InputPtr& mxElem, const Ufe::Path& ufePath) +{ + // ColorSpaces are supported on + // - inputs of type color3 or color4 + // - filename inputs on image nodes with color3 or color4 outputs + const std::string& type = mxElem->getType(); + const bool colorInput = type == "color3" || type == "color4"; + + bool colorImageNode = false; + if (type == "filename") { + // verify the output is color3 or color4 + auto node = mxElem->getParent()->asA(); + if (auto parentNodeDef = _GetNodeDef(node, ufePath)) { + for (const MaterialX::OutputPtr& output : parentNodeDef->getOutputs()) { + const std::string& type = output->getType(); + colorImageNode |= type == "color3" || type == "color4"; + } + } + } + return colorInput || colorImageNode; +} + +// Sets UI attributes for a USD input based on a MaterialX input. +void _SetInputUIAttributes(const MaterialX::InputPtr mtlxInput, UsdShadeInput& usdInput) +{ + if (mtlxInput->hasAttribute(MaterialX::ValueElement::UI_NAME_ATTRIBUTE)) { + usdInput.GetAttr().SetDisplayName( + mtlxInput->getAttribute(MaterialX::ValueElement::UI_NAME_ATTRIBUTE)); + } + if (mtlxInput->hasAttribute(MaterialX::ValueElement::UI_FOLDER_ATTRIBUTE)) { + auto uiFolder = mtlxInput->getAttribute(MaterialX::ValueElement::UI_FOLDER_ATTRIBUTE); + std::replace(uiFolder.begin(), uiFolder.end(), '/', ':'); + usdInput.GetAttr().SetDisplayGroup(uiFolder); + } +} + +// Connects a USD input to a node output based on a MaterialX input. +void _ConnectToNode( + const MaterialX::InputPtr& input, + UsdShadeInput& usdInput, + const SdfPath& parentPath, + const UsdStagePtr& stage) +{ + auto connectedNode = input->getConnectedNode(); + auto nodeOutput = UsdShadeShader(stage->GetPrimAtPath( + parentPath.AppendPath(SdfPath(connectedNode->getName())))) + .GetOutput(UsdMtlxTokens->DefaultOutputName); + if (nodeOutput.IsDefined()) { + usdInput.ConnectToSource(nodeOutput); + } +} + +// Connect a USD input to a NodeGraph input based on a MaterialX input. +void _ConnectToInterfaceInput( + const MaterialX::InputPtr& interfaceInput, + UsdShadeInput& usdInput, + const SdfPath& parentPath, + const UsdStagePtr& stage) +{ + auto interfaceInputNode = interfaceInput->getParent(); + auto interfaceInputNodePrim = stage->GetPrimAtPath(parentPath); + if (interfaceInputNode->getName() == interfaceInputNodePrim.GetName()) { + auto interfaceInputNodeGraph = UsdShadeNodeGraph(interfaceInputNodePrim); + auto valType = UsdMtlxGetUsdType(interfaceInput->getType()); + auto interfaceInputNodeOutput = interfaceInputNodeGraph.CreateInput( + TfToken(interfaceInput->getName()), valType.valueTypeName); + if (interfaceInputNodeOutput.IsDefined()) { + usdInput.ConnectToSource(interfaceInputNodeOutput); + } + } +} + +// Connects a USD input to a node graph output based on a MaterialX input. +void _ConnectToNodeGraph( + const MaterialX::InputPtr& input, + UsdShadeInput& usdInput, + const SdfPath& parentPath, + const UsdStagePtr& stage) +{ + auto output = input->getConnectedOutput(); + auto nodeGraphName = output->getParent()->getName(); + auto nodeGraphPrim = stage->GetPrimAtPath(parentPath.AppendPath(SdfPath(nodeGraphName))); + if (nodeGraphPrim.IsDefined()) { + auto nodeGraph = UsdShadeNodeGraph(nodeGraphPrim); + auto usdOutput = nodeGraph.GetOutput(TfToken(output->getName())); + if (usdOutput.IsDefined()) { + usdInput.ConnectToSource(usdOutput); + } + } +} + +// Sets the value of a USD input based on a MaterialX input. +void _SetInputValue( + const MaterialX::InputPtr& input, + UsdShadeInput& usdInput, + const Ufe::Path& ufePath) +{ + usdInput.Set(UsdMtlxGetUsdValue(input)); + if (_TypeSupportsColorSpace(input, ufePath)) { + auto colorSpace = input->getActiveColorSpace(); + if (!colorSpace.empty()) { + usdInput.GetAttr().SetColorSpace(TfToken(colorSpace)); + } + } +} + +// Adds a USD input based on a MaterialX input. +void _AddInput( + const MaterialX::InputPtr& input, + UsdShadeInput& usdInput, + const SdfPath& parentPath, + const Ufe::Path& ufePath, + const UsdStagePtr& stage) +{ + if (!input->getNodeGraphString().empty() && input->getConnectedNode()) { + _ConnectToNodeGraph(input, usdInput, parentPath, stage); + } else if (input->getConnectedNode() != nullptr) { + _ConnectToNode(input, usdInput, parentPath, stage); + } else if (auto interfaceInput = input->getInterfaceInput()) { + _ConnectToInterfaceInput(interfaceInput, usdInput, parentPath, stage); + } else if (input->getConnectedOutput() == nullptr) { + _SetInputValue(input, usdInput, ufePath); + } +} + +// Adds a shader input to a USD shader based on a MaterialX input. +void _AddShaderInput( + const MaterialX::InputPtr& input, + UsdShadeShader& usdShader, + const SdfPath& parentPath, + const Ufe::Path& ufePath, + const UsdStagePtr& stage) +{ + auto typeStr = input->getType(); + auto valType = UsdMtlxGetUsdType(typeStr); + auto usdInput = usdShader.CreateInput(TfToken(input->getName()), valType.valueTypeName); + if (usdInput.IsDefined()) { + _AddInput(input, usdInput, parentPath, ufePath, stage); + } +} + +// Adds a node graph input to a USD node graph based on a MaterialX input. +void _AddNodeGraphInput( + const MaterialX::InputPtr& input, + UsdShadeNodeGraph& usdNodeGraph, + const SdfPath& parentPath, + const Ufe::Path& ufePath, + const UsdStagePtr& stage) +{ + auto typeStr = input->getType(); + auto valType = UsdMtlxGetUsdType(typeStr); + auto usdInput = usdNodeGraph.CreateInput(TfToken(input->getName()), valType.valueTypeName); + if (usdInput.IsDefined()) { + _AddInput(input, usdInput, parentPath, ufePath, stage); + _SetInputUIAttributes(input, usdInput); + } +} + +// Sets UI attributes for a prim based on a MaterialX node. +void _SetShaderUIAttribute(const MaterialX::InterfaceElementPtr& node, UsdPrim& prim) +{ + if (auto nodeGraphApi = UsdUINodeGraphNodeAPI(prim)) { + if (node->hasAttribute("ypos") && node->hasAttribute("xpos")) { + nodeGraphApi.CreatePosAttr(VtValue(GfVec2f( + std::stof(node->getAttribute("xpos")), std::stof(node->getAttribute("ypos"))))); + } + } +} + +// Retrieves the output of a USD prim. +UsdShadeOutput _GetPrimOutput(UsdPrim& prim, const TfToken& outputName) +{ + auto shader = UsdShadeShader(prim); + UsdShadeOutput output; + if (auto shader = UsdShadeShader(prim)) { + output = shader.GetOutput(outputName); + } else if (auto nodeGraph = UsdShadeNodeGraph(prim)) { + output = nodeGraph.GetOutput(outputName); + } + return output; +} + +// Adds a Shader prim to the USD stage based on a MaterialX node. +void _AddNode( + const MaterialX::NodePtr& node, + const UsdStagePtr& stage, + const SdfPath& parentPath, + const Ufe::Path& ufePath) +{ + // Don't do anything for NodeGraphs, they are handled separately. + if (node->getCategory() == "nodegraph") { + return; + } + + auto primPath = parentPath.AppendPath(SdfPath(node->getName())); + auto shader = UsdShadeShader::Define(stage, primPath); + + if (!TF_VERIFY(shader, "Could not define UsdShadeShader at path '%s'\n", primPath.GetText())) { + return; + } + + auto shaderPrim = shader.GetPrim(); + _SetShaderUIAttribute(node, shaderPrim); + auto shaderUfePath = ufePath + node->getName(); + _SetShaderInfoAttributes(node, shaderPrim, shaderUfePath); + shader.CreateOutput( + UsdMtlxTokens->DefaultOutputName, UsdMtlxGetUsdType(node->getType()).valueTypeName); + + for (auto input : node->getInputs()) { + _AddShaderInput(input, shader, parentPath, shaderUfePath, stage); + } +} + +// Adds a node and all its dependent nodes to the USD stage. +void _AddDependentNodes( + const MaterialX::InterfaceElementPtr& node, + std::set& collectedNodes, + const UsdStagePtr& stage, + const SdfPath& parentPath, + const Ufe::Path& ufePath) +{ + if (!node || collectedNodes.find(node) != collectedNodes.end()) { + return; + } + collectedNodes.insert(node); + + SdfPath targetPath = parentPath; + Ufe::Path targetUfePath = ufePath; + bool isNodeGraph = node->getCategory() == "nodegraph"; + UsdShadeNodeGraph usdNodeGraph; + if (isNodeGraph) { + // Define the NodeGraph + targetPath = parentPath.AppendPath(SdfPath(node->getName())); + targetUfePath = ufePath + node->getName(); + auto nodeGraphPrim = stage->DefinePrim(targetPath, TfToken("NodeGraph")); + if (!TF_VERIFY( + nodeGraphPrim, "Could not define NodeGraph at path '%s'\n", targetPath.GetText())) { + return; + } + usdNodeGraph = UsdShadeNodeGraph(nodeGraphPrim); + _SetShaderUIAttribute(node, nodeGraphPrim); + + auto nodeGraph = node->asA(); + for (auto graphNode : nodeGraph->getNodes()) { + _AddDependentNodes(graphNode, collectedNodes, stage, targetPath, targetUfePath); + _AddNode(graphNode, stage, targetPath, targetUfePath); + } + for (auto output : nodeGraph->getOutputs()) { + auto usdOutput = usdNodeGraph.CreateOutput( + TfToken(output->getName()), UsdMtlxGetUsdType(output->getType()).valueTypeName); + if (auto targetOutput = output->getConnectedOutput()) { + auto targetPrim = stage->GetPrimAtPath( + targetPath.AppendPath(SdfPath(targetOutput->getParent()->getName()))); + usdOutput.ConnectToSource( + _GetPrimOutput(targetPrim, TfToken(targetOutput->getName()))); + } else if (auto targetNode = output->getConnectedNode()) { + auto targetPrim + = stage->GetPrimAtPath(targetPath.AppendPath(SdfPath(targetNode->getName()))); + usdOutput.ConnectToSource( + _GetPrimOutput(targetPrim, UsdMtlxTokens->DefaultOutputName)); + } + } + } + + for (auto input : node->getInputs()) { + // if it's connected to a NodeGraph, collect all the nodes in the NodeGraph + if (!input->getNodeGraphString().empty()) { + _AddDependentNodes( + node->getDocument()->getNodeGraph(input->getNodeGraphString()), + collectedNodes, + stage, + parentPath, + ufePath); + } + // If it's connected to an "independent" node, add that node and its dependencies + else if (MaterialX::NodePtr connectedNode = input->getConnectedNode()) { + if (collectedNodes.find(connectedNode) == collectedNodes.end()) { + _AddDependentNodes(connectedNode, collectedNodes, stage, targetPath, targetUfePath); + _AddNode(connectedNode, stage, parentPath, ufePath); + } + } + if (isNodeGraph) { + _AddNodeGraphInput(input, usdNodeGraph, parentPath, targetUfePath, stage); + } + } +} + +class MtlxMaterialXSurfaceShaderWriter : public UsdMayaShaderWriter +{ +public: + MtlxMaterialXSurfaceShaderWriter( + const MFnDependencyNode& depNodeFn, + const SdfPath& usdPath, + UsdMayaWriteJobContext& jobCtx); + + static ContextSupport CanExport(const UsdMayaJobExportArgs&); + void Write(const UsdTimeCode& usdTime) override; +}; + +PXRUSDMAYA_REGISTER_SHADER_WRITER(MaterialXSurfaceShader, MtlxMaterialXSurfaceShaderWriter); + +UsdMayaShaderWriter::ContextSupport +MtlxMaterialXSurfaceShaderWriter::CanExport(const UsdMayaJobExportArgs& exportArgs) +{ + if (!exportArgs.exportMaterials) { + return ContextSupport::Unsupported; + } + + return exportArgs.convertMaterialsTo == TrMtlxTokens->conversionName + ? ContextSupport::Supported + : ContextSupport::Unsupported; +} + +MtlxMaterialXSurfaceShaderWriter::MtlxMaterialXSurfaceShaderWriter( + const MFnDependencyNode& depNodeFn, + const SdfPath& usdPath, + UsdMayaWriteJobContext& jobCtx) + : UsdMayaShaderWriter(depNodeFn, usdPath, jobCtx) +{ + // The shader writer is being called twice, once for the surface and once for the + // displacement, but there is only one material + // Skip the second call + if (GetUsdStage()->GetPrimAtPath(GetUsdPath())) { + return; + } + + UsdShadeShader shaderSchema = UsdShadeShader::Define(GetUsdStage(), GetUsdPath()); + if (!TF_VERIFY( + shaderSchema, + "Could not define UsdShadeShader at path '%s'\n", + GetUsdPath().GetText())) { + return; + } + + _usdPrim = shaderSchema.GetPrim(); + if (!TF_VERIFY( + _usdPrim, + "Could not get UsdPrim for UsdShadeShader at path '%s'\n", + shaderSchema.GetPath().GetText())) { + return; + } + auto parentPath = GetUsdPrim().GetParent().GetPath(); + + MStatus status; + MPlug childPlug = depNodeFn.findPlug("ufePath", true, &status); + MString ufePathString; + childPlug.getValue(ufePathString); + + // This is the material node + auto ufePath = Ufe::PathString::path(ufePathString.asChar()); + // This is the document node + auto ufeParentPath = ufePath.pop(); + Ufe::SceneItem::Ptr sceneItem = Ufe::Hierarchy::createItem(ufeParentPath); + + // Render Document is the MaterialX document + childPlug = depNodeFn.findPlug("renderDocument", true, &status); + MString renderDocumentString; + childPlug.getValue(renderDocumentString); + + auto mtlxDoc = MaterialX::createDocument(); + readFromXmlString(mtlxDoc, renderDocumentString.asChar()); + + // surfaceMaterialNode + auto MaterialNode = mtlxDoc->getNode(depNodeFn.name().asChar()); + if (MaterialNode == nullptr) { + MGlobal::displayError( + "Material Node " + depNodeFn.name() + " not found in the MaterialX Document"); + return; + } + // Collection of the MaterialX nodes already processed, to avoid processing them again. + std::set collectedNodes; + + // Handle the displacement shader output connection. + // Usually this is done by the shadingModeUseRegistry, but since we are doing both surface and + // displacement in one go, we need to handle it here. + if (auto displacementNode = MaterialNode->getConnectedNode("displacementshader")) { + UsdShadeOutput _mtlDisplacementOutput; + if (jobCtx.GetArgs().allMaterialConversions.size() > 1) { + _mtlDisplacementOutput + = UsdShadeMaterial(GetUsdPrim().GetParent()).CreateDisplacementOutput(); + auto output = UsdShadeMaterial(GetUsdPrim().GetParent().GetParent()) + .CreateDisplacementOutput(TfToken("mtlx")); + output.ConnectToSource(_mtlDisplacementOutput); + } else { + _mtlDisplacementOutput = UsdShadeMaterial(GetUsdPrim().GetParent()) + .CreateDisplacementOutput(TfToken("mtlx")); + } + UsdShadeShader displacementShader; + displacementShader = UsdShadeShader::Define( + GetUsdStage(), parentPath.AppendPath(SdfPath(displacementNode->getName()))); + auto _ShaderDisplacementOutput = displacementShader.CreateOutput( + UsdMtlxTokens->DefaultOutputName, _mtlDisplacementOutput.GetTypeName()); + _mtlDisplacementOutput.ConnectToSource(_ShaderDisplacementOutput); + auto displacementPrim = displacementShader.GetPrim(); + auto& dispNodeName = displacementNode->getName(); + Ufe::Path ufeDispPath = ufeParentPath + dispNodeName; + _SetShaderInfoAttributes(displacementNode, displacementPrim, ufeDispPath); + _AddDependentNodes( + displacementNode, collectedNodes, GetUsdStage(), parentPath, ufeParentPath); + for (auto input : displacementNode->getInputs()) { + _AddShaderInput(input, displacementShader, parentPath, ufeDispPath, GetUsdStage()); + } + } + + auto shaderNode = MaterialNode->getConnectedNode("surfaceshader"); + if (shaderNode == nullptr) { + MGlobal::displayError( + "Surface Shader Node not found in the MaterialX Document, for Shader at path : " + + MString(_usdPrim.GetPrimPath().GetText())); + return; + } + _SetShaderInfoAttributes(shaderNode, _usdPrim, ufeParentPath + shaderNode->getName()); + _AddDependentNodes(shaderNode, collectedNodes, GetUsdStage(), parentPath, ufeParentPath); + + for (auto input : shaderNode->getInputs()) { + _AddShaderInput( + input, shaderSchema, parentPath, ufeParentPath + shaderNode->getName(), GetUsdStage()); + } +} + +void MtlxMaterialXSurfaceShaderWriter::Write(const UsdTimeCode& usdTime) +{ + // Really nothing to do here +} + +PXR_NAMESPACE_CLOSE_SCOPE \ No newline at end of file diff --git a/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.ma b/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.ma new file mode 100644 index 0000000000..0459d6d83a --- /dev/null +++ b/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.ma @@ -0,0 +1,240 @@ +//Maya ASCII 2025ff03 scene +//Name: MaterialXStackExport.ma +//Last modified: Tue, Feb 04, 2025 03:46:45 PM +//Codeset: 1252 +requires maya "2025ff03"; +requires -nodeType "materialxStack" -nodeType "MaterialXSurfaceShader" -dataType "MxDocumentStackData" + "LookdevXMaya" "1.6.0"; +requires -dataType "pxrUsdStageData" "mayaUsdPlugin" "0.31.0"; +currentUnit -l centimeter -a degree -t film; +fileInfo "application" "maya"; +fileInfo "product" "Maya 2025"; +fileInfo "version" "2025"; +fileInfo "cutIdentifier" "202411120828-e511411c49"; +fileInfo "osv" "Windows 10 Pro v2009 (Build: 19045)"; +fileInfo "UUID" "51A85A81-41A5-01E5-87DA-BAA738BF5351"; +createNode transform -s -n "persp"; + rename -uid "BF52A1FF-44B3-54B9-872A-28A9B6D68162"; + setAttr ".v" no; + setAttr ".t" -type "double3" 8.2462349679098921 6.1846762259323871 8.2462349679098956 ; + setAttr ".r" -type "double3" -27.938352729602379 44.999999999999972 -5.172681101354183e-14 ; +createNode camera -s -n "perspShape" -p "persp"; + rename -uid "A874FAF5-4C77-36C6-A78E-5A89BF1C5B8B"; + setAttr -k off ".v" no; + setAttr ".fl" 34.999999999999993; + setAttr ".coi" 13.200416747647454; + setAttr ".imn" -type "string" "persp"; + setAttr ".den" -type "string" "persp_depth"; + setAttr ".man" -type "string" "persp_mask"; + setAttr ".hc" -type "string" "viewSet -p %camera"; +createNode transform -s -n "top"; + rename -uid "662042E5-498E-EE20-97DA-6FBEE3918293"; + setAttr ".v" no; + setAttr ".t" -type "double3" 0 1000.1 0 ; + setAttr ".r" -type "double3" -90 0 0 ; +createNode camera -s -n "topShape" -p "top"; + rename -uid "1F06D4D7-42E3-768D-FBF8-F2BF6F723FE0"; + setAttr -k off ".v" no; + setAttr ".rnd" no; + setAttr ".coi" 1000.1; + setAttr ".ow" 30; + setAttr ".imn" -type "string" "top"; + setAttr ".den" -type "string" "top_depth"; + setAttr ".man" -type "string" "top_mask"; + setAttr ".hc" -type "string" "viewSet -t %camera"; + setAttr ".o" yes; +createNode transform -s -n "front"; + rename -uid "F2160F98-45AB-7589-9243-65BE533D446C"; + setAttr ".v" no; + setAttr ".t" -type "double3" 0 0 1000.1 ; +createNode camera -s -n "frontShape" -p "front"; + rename -uid "2F1E3D31-4727-CE94-7CCA-A889C47CC222"; + setAttr -k off ".v" no; + setAttr ".rnd" no; + setAttr ".coi" 1000.1; + setAttr ".ow" 30; + setAttr ".imn" -type "string" "front"; + setAttr ".den" -type "string" "front_depth"; + setAttr ".man" -type "string" "front_mask"; + setAttr ".hc" -type "string" "viewSet -f %camera"; + setAttr ".o" yes; +createNode transform -s -n "side"; + rename -uid "5AD75D91-40D1-E9D2-4A64-D28C1F32CFF7"; + setAttr ".v" no; + setAttr ".t" -type "double3" 1000.1 0 0 ; + setAttr ".r" -type "double3" 0 90 0 ; +createNode camera -s -n "sideShape" -p "side"; + rename -uid "D4B34B92-4951-E723-0413-FFA97AE53762"; + setAttr -k off ".v" no; + setAttr ".rnd" no; + setAttr ".coi" 1000.1; + setAttr ".ow" 30; + setAttr ".imn" -type "string" "side"; + setAttr ".den" -type "string" "side_depth"; + setAttr ".man" -type "string" "side_mask"; + setAttr ".hc" -type "string" "viewSet -s %camera"; + setAttr ".o" yes; +createNode transform -n "materialXStack1"; + rename -uid "F905B06A-46B4-5B87-045F-1CB20049DF5A"; +createNode materialxStack -n "materialXStackShape1" -p "materialXStack1"; + rename -uid "70F22C0A-407A-97D2-04C2-CEAFE486C7F4"; + setAttr -k off ".v"; + setAttr ".docs" -type "string" "[\n {\n \"document\": \"AAAFEHichVTLkoMgELznKyjua8S3VTG57Hkv+QCLKInWqlioKfP3iwqCxNR60WGame4e5HQZ6wo8CetK2iQQWTa8nA+nGveElbga9ZQbQTC2tEvgF7JCN7JDCF5LbFt+GHiOA88HAE5dj5scszztBnbHGQENrkkCzWUEQf9qp8QSdwXOCYOgoTnJyT2BP9+puSc1sAsf27JDHznBSsi2UMSfeObDGZVNO/SCxg13JM1oRZnsPwcuBHToOSyB/L2weDDcFlO+bunQ5JzwcRZ4NGktspdv6Z1od5XQq6Fa4gzB2yJSITfcV+Jsf3qCPXWGPx8N/jiS407RvOzaamJFmn5beS+jyutZzbytxHlxdVt01Cxfj5yHAqQ88OLY554ItsvoxOZ5ftvRKk5ZQbJfwm6Uy9bk6stgF/leUM5MB6YSoGg7MdJmh+LYi5QZq/A51A3b8R79Z7tkpOfTe0Vxr34VZHvI9SQhx/JcN3L3jpJeRDYWtZSdBRnxgzZKkL5rXhEIYOLfCkryArLlzY10UBRGircfhCjc481wXg6d0eCJq4FHiqfowi+743rbnQ9/3w6oEA==\",\n \"name\": \"document1\"\n }\n]\n"; +createNode transform -n "pSphere1"; + rename -uid "AD6EA71B-47A3-1AE7-6D64-DBB27C2C0CD0"; + setAttr ".t" -type "double3" 0 0 3.5205651051243447 ; +createNode mesh -n "pSphereShape1" -p "pSphere1"; + rename -uid "0661EE9E-4C19-93A5-FC95-8CB98FD9FBE5"; + setAttr -k off ".v"; + setAttr ".vir" yes; + setAttr ".vif" yes; + setAttr ".uvst[0].uvsn" -type "string" "map1"; + setAttr ".cuvs" -type "string" "map1"; + setAttr ".dcc" -type "string" "Ambient+Diffuse"; + setAttr ".covm[0]" 0 1 1; + setAttr ".cdvm[0]" 0 1 1; + setAttr ".dr" 2; + setAttr ".dsm" 1; +createNode lightLinker -s -n "lightLinker1"; + rename -uid "9F20516F-4813-7B4F-D26E-B1BB6048FFF4"; + setAttr -s 3 ".lnk"; + setAttr -s 3 ".slnk"; +createNode shapeEditorManager -n "shapeEditorManager"; + rename -uid "6F7DC43B-46C0-F9E6-1CA1-B2968D1248EF"; +createNode poseInterpolatorManager -n "poseInterpolatorManager"; + rename -uid "6F96539F-40E6-1675-E854-CBB49BD437CA"; +createNode displayLayerManager -n "layerManager"; + rename -uid "CD049D42-4FDF-544A-0CAF-20AE3A3C8AE0"; +createNode displayLayer -n "defaultLayer"; + rename -uid "19A1C678-4057-B3C2-6095-7BA4790AC245"; + setAttr ".ufem" -type "stringArray" 0 ; +createNode renderLayerManager -n "renderLayerManager"; + rename -uid "03085A70-4243-0F2C-961E-1389EA9C6F35"; +createNode renderLayer -n "defaultRenderLayer"; + rename -uid "EDDC6454-455A-7BFF-5240-0C882F3D01A4"; + setAttr ".g" yes; +createNode polySphere -n "polySphere1"; + rename -uid "14E0D5F3-4168-EA0F-E1CD-E988A6D5A0F0"; +createNode MaterialXSurfaceShader -n "Standard_Surface1"; + rename -uid "637FACDF-491E-F6C6-8122-BFA6775908CD"; + setAttr ".up" -type "string" "|materialXStack1|materialXStackShape1,%document1%Standard_Surface1"; +createNode shadingEngine -n "Standard_Surface1SG"; + rename -uid "54210DF4-4D91-69E2-EB0C-FF839FB1F6F6"; + setAttr ".ihi" 0; + setAttr ".ro" yes; +createNode materialInfo -n "materialInfo1"; + rename -uid "31E2376E-4494-4BAC-2E22-D28B6616B1AD"; +createNode script -n "LookdevXUIConfigurationScriptNode"; + rename -uid "84AD7A45-4510-3CFB-E9E1-46BBB1E81773"; + setAttr ".b" -type "string" "# LookdevX UI Configuration File.\n#\n# This script is machine generated. Edit at your own risk.\n#\nimport functools\nfrom maya import cmds\nif not cmds.pluginInfo(\"LookdevXMaya\", query=True, loaded=True):\n cmds.loadPlugin(\"LookdevXMaya\")\nif cmds.pluginInfo(\"LookdevXMaya\", query=True, loaded=True):\n import LookdevX_reloadUI\n d = LookdevX_reloadUI.Data()\n d.addTab('Untitled 3')\n if hasattr(d, 'setRuntimeName'): d.setRuntimeName('MaterialX')\n d.addObject('|materialXStack1|materialXStackShape1,%document1')\n d.setCurrentCompound('/|materialXStack1|materialXStackShape1,%document1')\n f=functools.partial(LookdevX_reloadUI.restoreWindow, d)\n cmds.evalDeferred(f, lowestPriority=True)\n"; + setAttr ".st" 2; + setAttr ".stp" 1; +createNode script -n "uiConfigurationScriptNode"; + rename -uid "2FCFD911-4C8D-72FE-CAC2-138EC073DFE6"; + setAttr ".b" -type "string" ( + "// Maya Mel UI Configuration File.\n//\n// This script is machine generated. Edit at your own risk.\n//\n//\n\nglobal string $gMainPane;\nif (`paneLayout -exists $gMainPane`) {\n\n\tglobal int $gUseScenePanelConfig;\n\tint $useSceneConfig = $gUseScenePanelConfig;\n\tint $nodeEditorPanelVisible = stringArrayContains(\"nodeEditorPanel1\", `getPanel -vis`);\n\tint $nodeEditorWorkspaceControlOpen = (`workspaceControl -exists nodeEditorPanel1Window` && `workspaceControl -q -visible nodeEditorPanel1Window`);\n\tint $menusOkayInPanels = `optionVar -q allowMenusInPanels`;\n\tint $nVisPanes = `paneLayout -q -nvp $gMainPane`;\n\tint $nPanes = 0;\n\tstring $editorName;\n\tstring $panelName;\n\tstring $itemFilterName;\n\tstring $panelConfig;\n\n\t//\n\t// get current state of the UI\n\t//\n\tsceneUIReplacement -update $gMainPane;\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Top View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Top View\")) -mbv $menusOkayInPanels $panelName;\n" + + "\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"|top\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n" + + " -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n" + + " -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -bluePencil 1\n -greasePencils 0\n -excludeObjectPreset \"All\" \n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n" + + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Side View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Side View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"|side\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n" + + " -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n" + + " -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -bluePencil 1\n -greasePencils 0\n -excludeObjectPreset \"All\" \n" + + " -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Front View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Front View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"|front\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n" + + " -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n" + + " -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n" + + " -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -bluePencil 1\n -greasePencils 0\n -excludeObjectPreset \"All\" \n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Persp View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Persp View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n" + + " -camera \"|persp\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 1\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n" + + " -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n" + + " -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -bluePencil 1\n -greasePencils 0\n -excludeObjectPreset \"All\" \n -shadows 0\n -captureSequenceNumber -1\n -width 277\n -height 1654\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n" + + "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"ToggledOutliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"ToggledOutliner\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 1\n -showReferenceMembers 1\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n" + + " -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -isSet 0\n -isSetMember 0\n -showUfeItems 1\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n" + + " -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n -renderFilterIndex 0\n -selectionOrder \"chronological\" \n -expandAttribute 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"Outliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"Outliner\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n" + + " -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -showUfeItems 1\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n" + + " -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"graphEditor\" (localizedPanelLabel(\"Graph Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Graph Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n" + + " -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 1\n -showDagOnly 0\n -showAssets 1\n -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 1\n -doNotSelectNewObjects 0\n" + + " -dropIsParent 1\n -transmitFilters 1\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -showUfeItems 1\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 1\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n" + + "\n\t\t\t$editorName = ($panelName+\"GraphEd\");\n animCurveEditor -e \n -displayValues 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -showPlayRangeShades \"on\" \n -lockPlayRangeShades \"off\" \n -smoothness \"fine\" \n -resultSamples 1\n -resultScreenSamples 0\n -resultUpdate \"delayed\" \n -showUpstreamCurves 1\n -tangentScale 1\n -tangentLineThickness 1\n -keyMinScale 1\n -stackedCurvesMin -1\n -stackedCurvesMax 1\n -stackedCurvesSpace 0.2\n -preSelectionHighlight 0\n -limitToSelectedCurves 0\n -constrainDrag 0\n -valueLinesToggle 0\n -highlightAffectedCurves 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dopeSheetPanel\" (localizedPanelLabel(\"Dope Sheet\")) `;\n" + + "\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dope Sheet\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 1\n -showDagOnly 0\n -showAssets 1\n -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n" + + " -showUpstreamCurves 1\n -showUnitlessCurves 0\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 1\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -showUfeItems 1\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n" + + " -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"DopeSheetEd\");\n dopeSheetEditor -e \n -displayValues 0\n -snapTime \"none\" \n -snapValue \"none\" \n -outliner \"dopeSheetPanel1OutlineEd\" \n -hierarchyBelow 0\n -selectionWindow 0 0 0 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"timeEditorPanel\" (localizedPanelLabel(\"Time Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Time Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n" + + "\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"clipEditorPanel\" (localizedPanelLabel(\"Trax Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Trax Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = clipEditorNameFromPanel($panelName);\n clipEditor -e \n -displayValues 0\n -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"sequenceEditorPanel\" (localizedPanelLabel(\"Camera Sequencer\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Camera Sequencer\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = sequenceEditorNameFromPanel($panelName);\n clipEditor -e \n -displayValues 0\n" + + " -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperGraphPanel\" (localizedPanelLabel(\"Hypergraph Hierarchy\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypergraph Hierarchy\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"HyperGraphEd\");\n hyperGraph -e \n -graphLayoutStyle \"hierarchicalLayout\" \n -orientation \"horiz\" \n -mergeConnections 0\n -zoom 1\n -animateTransition 0\n -showRelationships 1\n -showShapes 0\n -showDeformers 0\n -showExpressions 0\n -showConstraints 0\n -showConnectionFromSelected 0\n -showConnectionToSelected 0\n" + + " -showConstraintLabels 0\n -showUnderworld 0\n -showInvisible 0\n -transitionFrames 1\n -opaqueContainers 0\n -freeform 0\n -imagePosition 0 0 \n -imageScale 1\n -imageEnabled 0\n -graphType \"DAG\" \n -heatMapDisplay 0\n -updateSelection 1\n -updateNodeAdded 1\n -useDrawOverrideColor 0\n -limitGraphTraversal -1\n -range 0 0 \n -iconSize \"smallIcons\" \n -showCachedConnections 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperShadePanel\" (localizedPanelLabel(\"Hypershade\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypershade\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n" + + "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"visorPanel\" (localizedPanelLabel(\"Visor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Visor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"nodeEditorPanel\" (localizedPanelLabel(\"Node Editor\")) `;\n\tif ($nodeEditorPanelVisible || $nodeEditorWorkspaceControlOpen) {\n\t\tif (\"\" == $panelName) {\n\t\t\tif ($useSceneConfig) {\n\t\t\t\t$panelName = `scriptedPanel -unParent -type \"nodeEditorPanel\" -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n" + + " -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -connectedGraphingMode 1\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n -popupMenuScript \"nodeEdBuildPanelMenus\" \n -showNamespace 1\n -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -showUnitConversions 0\n -editorMode \"default\" \n -hasWatchpoint 0\n $editorName;\n\t\t\t}\n\t\t} else {\n\t\t\t$label = `panel -q -label $panelName`;\n" + + "\t\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -connectedGraphingMode 1\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n -popupMenuScript \"nodeEdBuildPanelMenus\" \n -showNamespace 1\n" + + " -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -showUnitConversions 0\n -editorMode \"default\" \n -hasWatchpoint 0\n $editorName;\n\t\t\tif (!$useSceneConfig) {\n\t\t\t\tpanel -e -l $label $panelName;\n\t\t\t}\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"createNodePanel\" (localizedPanelLabel(\"Create Node\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Create Node\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"polyTexturePlacementPanel\" (localizedPanelLabel(\"UV Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"UV Editor\")) -mbv $menusOkayInPanels $panelName;\n" + + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"renderWindowPanel\" (localizedPanelLabel(\"Render View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Render View\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"shapePanel\" (localizedPanelLabel(\"Shape Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tshapePanel -edit -l (localizedPanelLabel(\"Shape Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"posePanel\" (localizedPanelLabel(\"Pose Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tposePanel -edit -l (localizedPanelLabel(\"Pose Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n" + + "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynRelEdPanel\" (localizedPanelLabel(\"Dynamic Relationships\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dynamic Relationships\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"relationshipPanel\" (localizedPanelLabel(\"Relationship Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Relationship Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"referenceEditorPanel\" (localizedPanelLabel(\"Reference Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Reference Editor\")) -mbv $menusOkayInPanels $panelName;\n" + + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynPaintScriptedPanelType\" (localizedPanelLabel(\"Paint Effects\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Paint Effects\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"scriptEditorPanel\" (localizedPanelLabel(\"Script Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Script Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"profilerPanel\" (localizedPanelLabel(\"Profiler Tool\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Profiler Tool\")) -mbv $menusOkayInPanels $panelName;\n" + + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"contentBrowserPanel\" (localizedPanelLabel(\"Content Browser\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Content Browser\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\tif ($useSceneConfig) {\n string $configName = `getPanel -cwl (localizedPanelLabel(\"Current Layout\"))`;\n if (\"\" != $configName) {\n\t\t\tpanelConfiguration -edit -label (localizedPanelLabel(\"Current Layout\")) \n\t\t\t\t-userCreated false\n\t\t\t\t-defaultImage \"\"\n\t\t\t\t-image \"\"\n\t\t\t\t-sc false\n\t\t\t\t-configString \"global string $gMainPane; paneLayout -e -cn \\\"single\\\" -ps 1 100 100 $gMainPane;\"\n\t\t\t\t-removeAllPanels\n\t\t\t\t-ap false\n\t\t\t\t\t(localizedPanelLabel(\"Persp View\")) \n\t\t\t\t\t\"modelPanel\"\n" + + "\t\t\t\t\t\"$panelName = `modelPanel -unParent -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels `;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 1\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 32768\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -bluePencil 1\\n -greasePencils 0\\n -excludeObjectPreset \\\"All\\\" \\n -shadows 0\\n -captureSequenceNumber -1\\n -width 277\\n -height 1654\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName;\\nmodelEditor -e \\n -pluginObjects \\\"gpuCacheDisplayFilter\\\" 1 \\n $editorName\"\n" + + "\t\t\t\t\t\"modelPanel -edit -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels $panelName;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 1\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 32768\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -bluePencil 1\\n -greasePencils 0\\n -excludeObjectPreset \\\"All\\\" \\n -shadows 0\\n -captureSequenceNumber -1\\n -width 277\\n -height 1654\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName;\\nmodelEditor -e \\n -pluginObjects \\\"gpuCacheDisplayFilter\\\" 1 \\n $editorName\"\n" + + "\t\t\t\t$configName;\n\n setNamedPanelLayout (localizedPanelLabel(\"Current Layout\"));\n }\n\n panelHistory -e -clear mainPanelHistory;\n sceneUIReplacement -clear;\n\t}\n\n\ngrid -spacing 5 -size 12 -divisions 5 -displayAxes yes -displayGridLines yes -displayDivisionLines yes -displayPerspectiveLabels no -displayOrthographicLabels no -displayAxesBold yes -perspectiveLabelPosition axis -orthographicLabelPosition edge;\nviewManip -drawCompass 0 -compassAngle 0 -frontParameters \"\" -homeParameters \"\" -selectionLockParameters \"\";\n}\n"); + setAttr ".st" 3; +createNode script -n "sceneConfigurationScriptNode"; + rename -uid "F7B1E633-4856-D58B-0F9C-5C80A7FDFDE3"; + setAttr ".b" -type "string" "playbackOptions -min 1 -max 120 -ast 1 -aet 200 "; + setAttr ".st" 6; +select -ne :time1; + setAttr ".o" 1; + setAttr ".unw" 1; +select -ne :hardwareRenderingGlobals; + setAttr ".otfna" -type "stringArray" 22 "NURBS Curves" "NURBS Surfaces" "Polygons" "Subdiv Surface" "Particles" "Particle Instance" "Fluids" "Strokes" "Image Planes" "UI" "Lights" "Cameras" "Locators" "Joints" "IK Handles" "Deformers" "Motion Trails" "Components" "Hair Systems" "Follicles" "Misc. UI" "Ornaments" ; + setAttr ".otfva" -type "Int32Array" 22 0 1 1 1 1 1 + 1 1 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 ; + setAttr ".fprt" yes; + setAttr ".rtfm" 1; +select -ne :renderPartition; + setAttr -s 3 ".st"; +select -ne :renderGlobalsList1; +select -ne :defaultShaderList1; + setAttr -s 6 ".s"; +select -ne :postProcessList1; + setAttr -s 2 ".p"; +select -ne :defaultRenderingList1; +select -ne :standardSurface1; + setAttr ".bc" -type "float3" 0.40000001 0.40000001 0.40000001 ; + setAttr ".sr" 0.5; +select -ne :initialShadingGroup; + setAttr ".ro" yes; +select -ne :initialParticleSE; + setAttr ".ro" yes; +select -ne :defaultRenderGlobals; + addAttr -ci true -h true -sn "dss" -ln "defaultSurfaceShader" -dt "string"; + setAttr ".dss" -type "string" "standardSurface1"; +select -ne :defaultResolution; + setAttr ".pa" 1; +select -ne :defaultColorMgtGlobals; + setAttr ".cfe" yes; + setAttr ".cfp" -type "string" "/OCIO-configs/Maya2022-default/config.ocio"; + setAttr ".vtn" -type "string" "ACES 1.0 SDR-video (sRGB)"; + setAttr ".vn" -type "string" "ACES 1.0 SDR-video"; + setAttr ".dn" -type "string" "sRGB"; + setAttr ".wsn" -type "string" "ACEScg"; + setAttr ".otn" -type "string" "ACES 1.0 SDR-video (sRGB)"; + setAttr ".potn" -type "string" "ACES 1.0 SDR-video (sRGB)"; +select -ne :hardwareRenderGlobals; + setAttr ".ctrs" 256; + setAttr ".btrs" 512; +connectAttr "polySphere1.out" "pSphereShape1.i"; +relationship "link" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message"; +relationship "link" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message"; +relationship "link" ":lightLinker1" "Standard_Surface1SG.message" ":defaultLightSet.message"; +relationship "shadowLink" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message"; +relationship "shadowLink" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message"; +relationship "shadowLink" ":lightLinker1" "Standard_Surface1SG.message" ":defaultLightSet.message"; +connectAttr "layerManager.dli[0]" "defaultLayer.id"; +connectAttr "renderLayerManager.rlmi[0]" "defaultRenderLayer.rlid"; +connectAttr "materialXStackShape1.sk" "Standard_Surface1.sk"; +connectAttr "Standard_Surface1.oc" "Standard_Surface1SG.ss"; +connectAttr "pSphereShape1.iog" "Standard_Surface1SG.dsm" -na; +connectAttr "Standard_Surface1.d" "Standard_Surface1SG.ds"; +connectAttr "Standard_Surface1SG.msg" "materialInfo1.sg"; +connectAttr "Standard_Surface1.msg" "materialInfo1.m"; +connectAttr "Standard_Surface1.msg" "materialInfo1.t" -na; +connectAttr "Standard_Surface1SG.pa" ":renderPartition.st" -na; +connectAttr "Standard_Surface1.msg" ":defaultShaderList1.s" -na; +connectAttr "defaultRenderLayer.msg" ":defaultRenderingList1.r" -na; +// End of MaterialXStackExport.ma diff --git a/test/lib/usd/translators/testUsdExportMaterialXSurfaceShader.py b/test/lib/usd/translators/testUsdExportMaterialXSurfaceShader.py new file mode 100644 index 0000000000..ba70c4450d --- /dev/null +++ b/test/lib/usd/translators/testUsdExportMaterialXSurfaceShader.py @@ -0,0 +1,105 @@ +#!/usr/bin/env mayapy +# +# Copyright 2021 Autodesk +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +from pxr import Usd +from pxr import Sdf +from pxr import Sdr +from pxr import UsdShade + +from maya import cmds +from maya import standalone + +import mayaUsd.lib as mayaUsdLib + +import maya.api.OpenMaya as om + +import os +import unittest + +import fixturesUtils + +class testUsdExportMaterialXSurfaceShader(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls._inputPath = fixturesUtils.setUpClass(__file__) + + @classmethod + def tearDownClass(cls): + standalone.uninitialize() + + def testExportMaterialXStack(self): + + cmds.file(f=True, new=True) + + mayaFile = os.path.join(self._inputPath, 'UsdExportMaterialXSurfaceShader', + 'MaterialXStackExport.ma') + cmds.file(mayaFile, force=True, open=True) + + # Export to USD. + usdFilePath = os.path.abspath('MaterialXStackExport.usda') + cmds.mayaUSDExport(mergeTransformAndShape=True, file=usdFilePath, + shadingMode='useRegistry', convertMaterialsTo=['MaterialX'], + materialsScopeName='Materials', defaultPrim='None') + + stage = Usd.Stage.Open(usdFilePath) + self.assertTrue(stage) + + prim = stage.GetPrimAtPath("/Materials/Standard_Surface1SG") + self.assertTrue(prim) + material = UsdShade.Material(prim) + self.assertTrue(material) + + # Validate the displacement shader + dispOutput = material.GetDisplacementOutput("mtlx") + self.assertTrue(dispOutput) + dispSource = dispOutput.GetConnectedSources()[0] + dispPrim = dispSource[0].source.GetPrim() + self.assertEqual(dispPrim.GetName(), "displacement1") + id = dispPrim.GetAttribute('info:id') + self.assertEqual(id.Get(), 'ND_displacement_float') + dispShader = UsdShade.Shader(dispPrim) + dispIn = dispShader.GetInput('displacement') + # Validate the hexagon shader, connected to the displacement + hexPrim = dispIn.GetConnectedSources()[0][0].source.GetPrim() + self.assertEqual(hexPrim.GetName(), 'hexagon1') + self.assertEqual(hexPrim.GetAttribute('info:id').Get(), 'ND_hexagon_float') + hexShader = UsdShade.Shader(hexPrim) + self.assertEqual(hexShader.GetInput('radius').Get(), 1) + + # Validate the Surface shader + surfOutput = material.GetSurfaceOutput("mtlx") + self.assertTrue(surfOutput) + surfSource = surfOutput.GetConnectedSources()[0] + surfPrim = surfSource[0].source.GetPrim() + self.assertEqual(surfPrim.GetName(), "Standard_Surface1") + id = surfPrim.GetAttribute('info:id') + self.assertEqual(id.Get(), 'ND_standard_surface_surfaceshader') + surfShader = UsdShade.Shader(surfPrim) + colorIn = surfShader.GetInput('base_color') + # Validate the Node Graph + nodeGraphPrim = colorIn.GetConnectedSources()[0][0].source.GetPrim() + self.assertEqual(nodeGraphPrim.GetName(), 'compound1') + nodeGraph = UsdShade.NodeGraph(nodeGraphPrim) + # Validate the Checkerboard Shader + checkboardPrim = nodeGraph.GetOutput('out').GetConnectedSources()[0][0].source.GetPrim() + self.assertEqual(checkboardPrim.GetName(), 'checkboard1') + self.assertEqual(checkboardPrim.GetAttribute('info:id').Get(), 'ND_checkerboard_color3') + + +if __name__ == '__main__': + unittest.main(verbosity=2) From b83bcf9c4a0922524ee12751bdaf2f7ce64a4274 Mon Sep 17 00:00:00 2001 From: "ADS\\derlerk" Date: Fri, 7 Feb 2025 11:38:31 -0500 Subject: [PATCH 2/7] Fix CMakeLists --- lib/usd/translators/shading/CMakeLists.txt | 8 +++++++- test/lib/usd/translators/CMakeLists.txt | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/usd/translators/shading/CMakeLists.txt b/lib/usd/translators/shading/CMakeLists.txt index c410fd9bc0..3881d08539 100644 --- a/lib/usd/translators/shading/CMakeLists.txt +++ b/lib/usd/translators/shading/CMakeLists.txt @@ -65,7 +65,6 @@ if (MAYA_APP_VERSION VERSION_GREATER 2022) mtlxTranslationTableReader.cpp mtlxTranslationTableWriter.cpp mtlxFileTextureWriter.cpp - mtlxMaterialXSurfaceShaderWriter.cpp ) target_compile_definitions(${TARGET_NAME} PRIVATE @@ -78,5 +77,12 @@ if (MAYA_APP_VERSION VERSION_GREATER 2022) mtlxOpenPBRSurfaceWriter.cpp ) endif() + + if (MAYA_APP_VERSION VERSION_GREATER_EQUAL 2025) + target_sources(${TARGET_NAME} + PRIVATE + mtlxMaterialXSurfaceShaderWriter.cpp + ) + endif() endif() diff --git a/test/lib/usd/translators/CMakeLists.txt b/test/lib/usd/translators/CMakeLists.txt index 62f9608a21..d20b717a8c 100644 --- a/test/lib/usd/translators/CMakeLists.txt +++ b/test/lib/usd/translators/CMakeLists.txt @@ -100,6 +100,12 @@ set(TEST_SCRIPT_FILES testUsdMayaAdaptorUndoRedo.py ) +if(MAYA_APP_VERSION VERSION_GREATER_EQUAL 2025) + list(APPEND TEST_SCRIPT_FILES + testUsdExportMaterialXSurfaceShader.py + ) +endif() + if(BUILD_PXR_PLUGIN) # This test uses the file "UsdExportUVTransforms.ma" which # requires the plugin "pxrUsdPreviewSurface" that is built by the From f043d4476aac4fd04954338b04b5f6e6343a4a8e Mon Sep 17 00:00:00 2001 From: "ADS\\derlerk" Date: Mon, 10 Feb 2025 14:43:41 -0500 Subject: [PATCH 3/7] Disabling the test for now --- test/lib/usd/translators/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/lib/usd/translators/CMakeLists.txt b/test/lib/usd/translators/CMakeLists.txt index d20b717a8c..62f9608a21 100644 --- a/test/lib/usd/translators/CMakeLists.txt +++ b/test/lib/usd/translators/CMakeLists.txt @@ -100,12 +100,6 @@ set(TEST_SCRIPT_FILES testUsdMayaAdaptorUndoRedo.py ) -if(MAYA_APP_VERSION VERSION_GREATER_EQUAL 2025) - list(APPEND TEST_SCRIPT_FILES - testUsdExportMaterialXSurfaceShader.py - ) -endif() - if(BUILD_PXR_PLUGIN) # This test uses the file "UsdExportUVTransforms.ma" which # requires the plugin "pxrUsdPreviewSurface" that is built by the From 861c35d143fdb40f5bfcddc40318295dced1e9dd Mon Sep 17 00:00:00 2001 From: "ADS\\derlerk" Date: Mon, 10 Feb 2025 16:42:50 -0500 Subject: [PATCH 4/7] Update faulty warning messages. --- .../shading/mtlxMaterialXSurfaceShaderWriter.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp index 0b36ba5fab..a0d0b34e60 100644 --- a/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp +++ b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -59,7 +58,7 @@ std::string _GetNodeDefString(const MaterialX::NodePtr& node, const Ufe::Path& u if (nodeDef) { return nodeDef->type(); } - TF_VERIFY("Could not find nodeDef for node %s", node->getName().c_str()); + TF_WARN("Could not find nodeDef for node '%s'", node->getName().c_str()); return std::string(); } @@ -454,8 +453,8 @@ MtlxMaterialXSurfaceShaderWriter::MtlxMaterialXSurfaceShaderWriter( // surfaceMaterialNode auto MaterialNode = mtlxDoc->getNode(depNodeFn.name().asChar()); if (MaterialNode == nullptr) { - MGlobal::displayError( - "Material Node " + depNodeFn.name() + " not found in the MaterialX Document"); + TF_WARN( + "Material Node '%s' not found in the MaterialX Document", depNodeFn.name().asChar()); return; } // Collection of the MaterialX nodes already processed, to avoid processing them again. @@ -495,9 +494,8 @@ MtlxMaterialXSurfaceShaderWriter::MtlxMaterialXSurfaceShaderWriter( auto shaderNode = MaterialNode->getConnectedNode("surfaceshader"); if (shaderNode == nullptr) { - MGlobal::displayError( - "Surface Shader Node not found in the MaterialX Document, for Shader at path : " - + MString(_usdPrim.GetPrimPath().GetText())); + TF_WARN( + "Surface Shader Node not found in the MaterialX Document, for Shader at path '%s'", _usdPrim.GetPrimPath().GetText()); return; } _SetShaderInfoAttributes(shaderNode, _usdPrim, ufeParentPath + shaderNode->getName()); From 3edb0a8c578a8154a0840a3d1636850735127d84 Mon Sep 17 00:00:00 2001 From: "ADS\\derlerk" Date: Mon, 10 Feb 2025 16:51:44 -0500 Subject: [PATCH 5/7] format --- .../translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp index a0d0b34e60..1389c53e66 100644 --- a/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp +++ b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp @@ -495,7 +495,8 @@ MtlxMaterialXSurfaceShaderWriter::MtlxMaterialXSurfaceShaderWriter( auto shaderNode = MaterialNode->getConnectedNode("surfaceshader"); if (shaderNode == nullptr) { TF_WARN( - "Surface Shader Node not found in the MaterialX Document, for Shader at path '%s'", _usdPrim.GetPrimPath().GetText()); + "Surface Shader Node not found in the MaterialX Document, for Shader at path '%s'", + _usdPrim.GetPrimPath().GetText()); return; } _SetShaderInfoAttributes(shaderNode, _usdPrim, ufeParentPath + shaderNode->getName()); From 1524d43650f14238ff1105376eebe186d49990ed Mon Sep 17 00:00:00 2001 From: "ADS\\derlerk" Date: Fri, 21 Feb 2025 15:27:41 -0500 Subject: [PATCH 6/7] Address comment from review : Generalize output name handling to accomodate the special cases. Handle more input meta data. Add test case for artistic_ior (multi output node) Rework test structure to use mtlx files instead of a maya file. --- .../mtlxMaterialXSurfaceShaderWriter.cpp | 121 ++++++--- .../MaterialXStackExport.ma | 240 ------------------ .../MaterialXStackExport.mtlx | 20 ++ .../Multioutput.mtlx | 24 ++ .../testUsdExportMaterialXSurfaceShader.py | 92 ++++++- 5 files changed, 224 insertions(+), 273 deletions(-) delete mode 100644 test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.ma create mode 100644 test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.mtlx create mode 100644 test/lib/usd/translators/UsdExportMaterialXSurfaceShader/Multioutput.mtlx diff --git a/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp index 1389c53e66..fb204b796a 100644 --- a/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp +++ b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -74,17 +75,14 @@ MaterialX::ConstNodeDefPtr _GetNodeDef(const MaterialX::NodePtr& node, const Ufe return nodeDefPtr; } -// Sets shader info:id attribute on a USD prim based on a MaterialX node. +// Sets shader info:id attribute on a USD ShadeShader based on a MaterialX node. void _SetShaderInfoAttributes( const MaterialX::NodePtr& node, - UsdPrim& shaderPrim, + UsdShadeShader& usdShader, const Ufe::Path& ufePath) { - auto infoAttr = shaderPrim.CreateAttribute( - UsdShadeTokens->infoId, SdfValueTypeNames->Token, SdfVariabilityUniform); - auto nodeDefString = _GetNodeDefString(node, ufePath); - infoAttr.Set(TfToken(nodeDefString)); + usdShader.CreateIdAttr(VtValue(TfToken(nodeDefString))); } // Checks if the input type supports color space. @@ -113,15 +111,56 @@ bool _TypeSupportsColorSpace(const MaterialX::InputPtr& mxElem, const Ufe::Path& // Sets UI attributes for a USD input based on a MaterialX input. void _SetInputUIAttributes(const MaterialX::InputPtr mtlxInput, UsdShadeInput& usdInput) { - if (mtlxInput->hasAttribute(MaterialX::ValueElement::UI_NAME_ATTRIBUTE)) { - usdInput.GetAttr().SetDisplayName( - mtlxInput->getAttribute(MaterialX::ValueElement::UI_NAME_ATTRIBUTE)); + auto attr = usdInput.GetAttr(); + for (const auto& key : UsdUfe::MetadataTokens->allTokens) { + if (mtlxInput->hasAttribute(key.GetString())) { + auto value = mtlxInput->getAttribute(key); + if (key == UsdUfe::MetadataTokens->UIDoc) { + attr.SetDocumentation(value); + } else if (key == UsdUfe::MetadataTokens->UIEnumLabels) { + const auto enumStrings = UsdUfe::splitString(value, ","); + VtTokenArray allowedTokens; + allowedTokens.reserve(enumStrings.size()); + for (const auto& tokenString : enumStrings) { + allowedTokens.push_back(TfToken(TfStringTrim(tokenString, " "))); + } + attr.SetMetadata(SdfFieldKeys->AllowedTokens, allowedTokens); + } else if (key == UsdUfe::MetadataTokens->UIFolder) { + std::replace(value.begin(), value.end(), '/', ':'); + attr.SetDisplayGroup(value); + } else if (key == UsdUfe::MetadataTokens->UIName) { + attr.SetDisplayName(value); + } else if (SdfSchema::GetInstance().IsRegistered(key)) { + attr.SetMetadata(key, VtValue(value)); + } else { + attr.SetCustomDataByKey(key, VtValue(value)); + } + } + } +} + +// Gets the output name of the mxNode connected to a portElement +// If the portElement has an outputString, use that. +// Otherwise, look for the output name in the NodeDef +// If that fails, use the default output name. +std::string _GetOutputName( + const MaterialX::PortElementPtr& portElement, + const MaterialX::NodePtr& mxNode, + const Ufe::Path& ufePath) +{ + std::string outputName; + if (portElement->hasOutputString()) { + outputName = portElement->getOutputString(); + } else if (auto nodeDef = _GetNodeDef(mxNode, ufePath)) { + auto outVec = nodeDef->getOutputs(); + if (!outVec.empty()) { + outputName = outVec[0]->getName(); + } } - if (mtlxInput->hasAttribute(MaterialX::ValueElement::UI_FOLDER_ATTRIBUTE)) { - auto uiFolder = mtlxInput->getAttribute(MaterialX::ValueElement::UI_FOLDER_ATTRIBUTE); - std::replace(uiFolder.begin(), uiFolder.end(), '/', ':'); - usdInput.GetAttr().SetDisplayGroup(uiFolder); + if (outputName.empty()) { + outputName = UsdMtlxTokens->DefaultOutputName.GetString(); } + return outputName; } // Connects a USD input to a node output based on a MaterialX input. @@ -129,12 +168,15 @@ void _ConnectToNode( const MaterialX::InputPtr& input, UsdShadeInput& usdInput, const SdfPath& parentPath, + const Ufe::Path& ufePath, const UsdStagePtr& stage) { auto connectedNode = input->getConnectedNode(); - auto nodeOutput = UsdShadeShader(stage->GetPrimAtPath( + + std::string outputName = _GetOutputName(input, connectedNode, ufePath); + auto nodeOutput = UsdShadeShader(stage->GetPrimAtPath( parentPath.AppendPath(SdfPath(connectedNode->getName())))) - .GetOutput(UsdMtlxTokens->DefaultOutputName); + .GetOutput(TfToken(outputName)); if (nodeOutput.IsDefined()) { usdInput.ConnectToSource(nodeOutput); } @@ -202,13 +244,14 @@ void _AddInput( const Ufe::Path& ufePath, const UsdStagePtr& stage) { - if (!input->getNodeGraphString().empty() && input->getConnectedNode()) { + if (input->hasNodeGraphString()) { _ConnectToNodeGraph(input, usdInput, parentPath, stage); - } else if (input->getConnectedNode() != nullptr) { - _ConnectToNode(input, usdInput, parentPath, stage); - } else if (auto interfaceInput = input->getInterfaceInput()) { + } else if (input->hasNodeName()) { + _ConnectToNode(input, usdInput, parentPath, ufePath, stage); + } else if (input->hasInterfaceName()) { + auto interfaceInput = input->getInterfaceInput(); _ConnectToInterfaceInput(interfaceInput, usdInput, parentPath, stage); - } else if (input->getConnectedOutput() == nullptr) { + } else if (!input->hasOutputString()) { _SetInputValue(input, usdInput, ufePath); } } @@ -249,6 +292,10 @@ void _AddNodeGraphInput( // Sets UI attributes for a prim based on a MaterialX node. void _SetShaderUIAttribute(const MaterialX::InterfaceElementPtr& node, UsdPrim& prim) { + if (!prim.HasAPI()) { + UsdUINodeGraphNodeAPI::Apply(prim); + } + if (auto nodeGraphApi = UsdUINodeGraphNodeAPI(prim)) { if (node->hasAttribute("ypos") && node->hasAttribute("xpos")) { nodeGraphApi.CreatePosAttr(VtValue(GfVec2f( @@ -292,9 +339,16 @@ void _AddNode( auto shaderPrim = shader.GetPrim(); _SetShaderUIAttribute(node, shaderPrim); auto shaderUfePath = ufePath + node->getName(); - _SetShaderInfoAttributes(node, shaderPrim, shaderUfePath); - shader.CreateOutput( - UsdMtlxTokens->DefaultOutputName, UsdMtlxGetUsdType(node->getType()).valueTypeName); + _SetShaderInfoAttributes(node, shader, shaderUfePath); + + if (auto nodeDef = _GetNodeDef(node, shaderUfePath)) { + for (auto output : nodeDef->getOutputs()) { + auto outName + = output->getName().empty() ? UsdMtlxTokens->DefaultOutputName : output->getName(); + shader.CreateOutput( + TfToken(outName), UsdMtlxGetUsdType(output->getType()).valueTypeName); + } + } for (auto input : node->getInputs()) { _AddShaderInput(input, shader, parentPath, shaderUfePath, stage); @@ -344,10 +398,17 @@ void _AddDependentNodes( usdOutput.ConnectToSource( _GetPrimOutput(targetPrim, TfToken(targetOutput->getName()))); } else if (auto targetNode = output->getConnectedNode()) { + if (targetNode->getParent() != node) { + TF_WARN( + "NodeGraph output '%s' is connected to a node outside the NodeGraph", + output->getName().c_str()); + continue; + } + auto targetOutputName + = _GetOutputName(output, targetNode, targetUfePath + targetNode->getName()); auto targetPrim = stage->GetPrimAtPath(targetPath.AppendPath(SdfPath(targetNode->getName()))); - usdOutput.ConnectToSource( - _GetPrimOutput(targetPrim, UsdMtlxTokens->DefaultOutputName)); + usdOutput.ConnectToSource(_GetPrimOutput(targetPrim, TfToken(targetOutputName))); } } } @@ -451,10 +512,11 @@ MtlxMaterialXSurfaceShaderWriter::MtlxMaterialXSurfaceShaderWriter( readFromXmlString(mtlxDoc, renderDocumentString.asChar()); // surfaceMaterialNode - auto MaterialNode = mtlxDoc->getNode(depNodeFn.name().asChar()); + auto MaterialNode = mtlxDoc->getNode(ufePath.back().string()); if (MaterialNode == nullptr) { TF_WARN( - "Material Node '%s' not found in the MaterialX Document", depNodeFn.name().asChar()); + "Material Node '%s' not found in the MaterialX Document", + ufePath.back().string().c_str()); return; } // Collection of the MaterialX nodes already processed, to avoid processing them again. @@ -481,10 +543,9 @@ MtlxMaterialXSurfaceShaderWriter::MtlxMaterialXSurfaceShaderWriter( auto _ShaderDisplacementOutput = displacementShader.CreateOutput( UsdMtlxTokens->DefaultOutputName, _mtlDisplacementOutput.GetTypeName()); _mtlDisplacementOutput.ConnectToSource(_ShaderDisplacementOutput); - auto displacementPrim = displacementShader.GetPrim(); auto& dispNodeName = displacementNode->getName(); Ufe::Path ufeDispPath = ufeParentPath + dispNodeName; - _SetShaderInfoAttributes(displacementNode, displacementPrim, ufeDispPath); + _SetShaderInfoAttributes(displacementNode, displacementShader, ufeDispPath); _AddDependentNodes( displacementNode, collectedNodes, GetUsdStage(), parentPath, ufeParentPath); for (auto input : displacementNode->getInputs()) { @@ -499,7 +560,7 @@ MtlxMaterialXSurfaceShaderWriter::MtlxMaterialXSurfaceShaderWriter( _usdPrim.GetPrimPath().GetText()); return; } - _SetShaderInfoAttributes(shaderNode, _usdPrim, ufeParentPath + shaderNode->getName()); + _SetShaderInfoAttributes(shaderNode, shaderSchema, ufeParentPath + shaderNode->getName()); _AddDependentNodes(shaderNode, collectedNodes, GetUsdStage(), parentPath, ufeParentPath); for (auto input : shaderNode->getInputs()) { diff --git a/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.ma b/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.ma deleted file mode 100644 index 0459d6d83a..0000000000 --- a/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.ma +++ /dev/null @@ -1,240 +0,0 @@ -//Maya ASCII 2025ff03 scene -//Name: MaterialXStackExport.ma -//Last modified: Tue, Feb 04, 2025 03:46:45 PM -//Codeset: 1252 -requires maya "2025ff03"; -requires -nodeType "materialxStack" -nodeType "MaterialXSurfaceShader" -dataType "MxDocumentStackData" - "LookdevXMaya" "1.6.0"; -requires -dataType "pxrUsdStageData" "mayaUsdPlugin" "0.31.0"; -currentUnit -l centimeter -a degree -t film; -fileInfo "application" "maya"; -fileInfo "product" "Maya 2025"; -fileInfo "version" "2025"; -fileInfo "cutIdentifier" "202411120828-e511411c49"; -fileInfo "osv" "Windows 10 Pro v2009 (Build: 19045)"; -fileInfo "UUID" "51A85A81-41A5-01E5-87DA-BAA738BF5351"; -createNode transform -s -n "persp"; - rename -uid "BF52A1FF-44B3-54B9-872A-28A9B6D68162"; - setAttr ".v" no; - setAttr ".t" -type "double3" 8.2462349679098921 6.1846762259323871 8.2462349679098956 ; - setAttr ".r" -type "double3" -27.938352729602379 44.999999999999972 -5.172681101354183e-14 ; -createNode camera -s -n "perspShape" -p "persp"; - rename -uid "A874FAF5-4C77-36C6-A78E-5A89BF1C5B8B"; - setAttr -k off ".v" no; - setAttr ".fl" 34.999999999999993; - setAttr ".coi" 13.200416747647454; - setAttr ".imn" -type "string" "persp"; - setAttr ".den" -type "string" "persp_depth"; - setAttr ".man" -type "string" "persp_mask"; - setAttr ".hc" -type "string" "viewSet -p %camera"; -createNode transform -s -n "top"; - rename -uid "662042E5-498E-EE20-97DA-6FBEE3918293"; - setAttr ".v" no; - setAttr ".t" -type "double3" 0 1000.1 0 ; - setAttr ".r" -type "double3" -90 0 0 ; -createNode camera -s -n "topShape" -p "top"; - rename -uid "1F06D4D7-42E3-768D-FBF8-F2BF6F723FE0"; - setAttr -k off ".v" no; - setAttr ".rnd" no; - setAttr ".coi" 1000.1; - setAttr ".ow" 30; - setAttr ".imn" -type "string" "top"; - setAttr ".den" -type "string" "top_depth"; - setAttr ".man" -type "string" "top_mask"; - setAttr ".hc" -type "string" "viewSet -t %camera"; - setAttr ".o" yes; -createNode transform -s -n "front"; - rename -uid "F2160F98-45AB-7589-9243-65BE533D446C"; - setAttr ".v" no; - setAttr ".t" -type "double3" 0 0 1000.1 ; -createNode camera -s -n "frontShape" -p "front"; - rename -uid "2F1E3D31-4727-CE94-7CCA-A889C47CC222"; - setAttr -k off ".v" no; - setAttr ".rnd" no; - setAttr ".coi" 1000.1; - setAttr ".ow" 30; - setAttr ".imn" -type "string" "front"; - setAttr ".den" -type "string" "front_depth"; - setAttr ".man" -type "string" "front_mask"; - setAttr ".hc" -type "string" "viewSet -f %camera"; - setAttr ".o" yes; -createNode transform -s -n "side"; - rename -uid "5AD75D91-40D1-E9D2-4A64-D28C1F32CFF7"; - setAttr ".v" no; - setAttr ".t" -type "double3" 1000.1 0 0 ; - setAttr ".r" -type "double3" 0 90 0 ; -createNode camera -s -n "sideShape" -p "side"; - rename -uid "D4B34B92-4951-E723-0413-FFA97AE53762"; - setAttr -k off ".v" no; - setAttr ".rnd" no; - setAttr ".coi" 1000.1; - setAttr ".ow" 30; - setAttr ".imn" -type "string" "side"; - setAttr ".den" -type "string" "side_depth"; - setAttr ".man" -type "string" "side_mask"; - setAttr ".hc" -type "string" "viewSet -s %camera"; - setAttr ".o" yes; -createNode transform -n "materialXStack1"; - rename -uid "F905B06A-46B4-5B87-045F-1CB20049DF5A"; -createNode materialxStack -n "materialXStackShape1" -p "materialXStack1"; - rename -uid "70F22C0A-407A-97D2-04C2-CEAFE486C7F4"; - setAttr -k off ".v"; - setAttr ".docs" -type "string" "[\n {\n \"document\": \"AAAFEHichVTLkoMgELznKyjua8S3VTG57Hkv+QCLKInWqlioKfP3iwqCxNR60WGame4e5HQZ6wo8CetK2iQQWTa8nA+nGveElbga9ZQbQTC2tEvgF7JCN7JDCF5LbFt+GHiOA88HAE5dj5scszztBnbHGQENrkkCzWUEQf9qp8QSdwXOCYOgoTnJyT2BP9+puSc1sAsf27JDHznBSsi2UMSfeObDGZVNO/SCxg13JM1oRZnsPwcuBHToOSyB/L2weDDcFlO+bunQ5JzwcRZ4NGktspdv6Z1od5XQq6Fa4gzB2yJSITfcV+Jsf3qCPXWGPx8N/jiS407RvOzaamJFmn5beS+jyutZzbytxHlxdVt01Cxfj5yHAqQ88OLY554ItsvoxOZ5ftvRKk5ZQbJfwm6Uy9bk6stgF/leUM5MB6YSoGg7MdJmh+LYi5QZq/A51A3b8R79Z7tkpOfTe0Vxr34VZHvI9SQhx/JcN3L3jpJeRDYWtZSdBRnxgzZKkL5rXhEIYOLfCkryArLlzY10UBRGircfhCjc481wXg6d0eCJq4FHiqfowi+743rbnQ9/3w6oEA==\",\n \"name\": \"document1\"\n }\n]\n"; -createNode transform -n "pSphere1"; - rename -uid "AD6EA71B-47A3-1AE7-6D64-DBB27C2C0CD0"; - setAttr ".t" -type "double3" 0 0 3.5205651051243447 ; -createNode mesh -n "pSphereShape1" -p "pSphere1"; - rename -uid "0661EE9E-4C19-93A5-FC95-8CB98FD9FBE5"; - setAttr -k off ".v"; - setAttr ".vir" yes; - setAttr ".vif" yes; - setAttr ".uvst[0].uvsn" -type "string" "map1"; - setAttr ".cuvs" -type "string" "map1"; - setAttr ".dcc" -type "string" "Ambient+Diffuse"; - setAttr ".covm[0]" 0 1 1; - setAttr ".cdvm[0]" 0 1 1; - setAttr ".dr" 2; - setAttr ".dsm" 1; -createNode lightLinker -s -n "lightLinker1"; - rename -uid "9F20516F-4813-7B4F-D26E-B1BB6048FFF4"; - setAttr -s 3 ".lnk"; - setAttr -s 3 ".slnk"; -createNode shapeEditorManager -n "shapeEditorManager"; - rename -uid "6F7DC43B-46C0-F9E6-1CA1-B2968D1248EF"; -createNode poseInterpolatorManager -n "poseInterpolatorManager"; - rename -uid "6F96539F-40E6-1675-E854-CBB49BD437CA"; -createNode displayLayerManager -n "layerManager"; - rename -uid "CD049D42-4FDF-544A-0CAF-20AE3A3C8AE0"; -createNode displayLayer -n "defaultLayer"; - rename -uid "19A1C678-4057-B3C2-6095-7BA4790AC245"; - setAttr ".ufem" -type "stringArray" 0 ; -createNode renderLayerManager -n "renderLayerManager"; - rename -uid "03085A70-4243-0F2C-961E-1389EA9C6F35"; -createNode renderLayer -n "defaultRenderLayer"; - rename -uid "EDDC6454-455A-7BFF-5240-0C882F3D01A4"; - setAttr ".g" yes; -createNode polySphere -n "polySphere1"; - rename -uid "14E0D5F3-4168-EA0F-E1CD-E988A6D5A0F0"; -createNode MaterialXSurfaceShader -n "Standard_Surface1"; - rename -uid "637FACDF-491E-F6C6-8122-BFA6775908CD"; - setAttr ".up" -type "string" "|materialXStack1|materialXStackShape1,%document1%Standard_Surface1"; -createNode shadingEngine -n "Standard_Surface1SG"; - rename -uid "54210DF4-4D91-69E2-EB0C-FF839FB1F6F6"; - setAttr ".ihi" 0; - setAttr ".ro" yes; -createNode materialInfo -n "materialInfo1"; - rename -uid "31E2376E-4494-4BAC-2E22-D28B6616B1AD"; -createNode script -n "LookdevXUIConfigurationScriptNode"; - rename -uid "84AD7A45-4510-3CFB-E9E1-46BBB1E81773"; - setAttr ".b" -type "string" "# LookdevX UI Configuration File.\n#\n# This script is machine generated. Edit at your own risk.\n#\nimport functools\nfrom maya import cmds\nif not cmds.pluginInfo(\"LookdevXMaya\", query=True, loaded=True):\n cmds.loadPlugin(\"LookdevXMaya\")\nif cmds.pluginInfo(\"LookdevXMaya\", query=True, loaded=True):\n import LookdevX_reloadUI\n d = LookdevX_reloadUI.Data()\n d.addTab('Untitled 3')\n if hasattr(d, 'setRuntimeName'): d.setRuntimeName('MaterialX')\n d.addObject('|materialXStack1|materialXStackShape1,%document1')\n d.setCurrentCompound('/|materialXStack1|materialXStackShape1,%document1')\n f=functools.partial(LookdevX_reloadUI.restoreWindow, d)\n cmds.evalDeferred(f, lowestPriority=True)\n"; - setAttr ".st" 2; - setAttr ".stp" 1; -createNode script -n "uiConfigurationScriptNode"; - rename -uid "2FCFD911-4C8D-72FE-CAC2-138EC073DFE6"; - setAttr ".b" -type "string" ( - "// Maya Mel UI Configuration File.\n//\n// This script is machine generated. Edit at your own risk.\n//\n//\n\nglobal string $gMainPane;\nif (`paneLayout -exists $gMainPane`) {\n\n\tglobal int $gUseScenePanelConfig;\n\tint $useSceneConfig = $gUseScenePanelConfig;\n\tint $nodeEditorPanelVisible = stringArrayContains(\"nodeEditorPanel1\", `getPanel -vis`);\n\tint $nodeEditorWorkspaceControlOpen = (`workspaceControl -exists nodeEditorPanel1Window` && `workspaceControl -q -visible nodeEditorPanel1Window`);\n\tint $menusOkayInPanels = `optionVar -q allowMenusInPanels`;\n\tint $nVisPanes = `paneLayout -q -nvp $gMainPane`;\n\tint $nPanes = 0;\n\tstring $editorName;\n\tstring $panelName;\n\tstring $itemFilterName;\n\tstring $panelConfig;\n\n\t//\n\t// get current state of the UI\n\t//\n\tsceneUIReplacement -update $gMainPane;\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Top View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Top View\")) -mbv $menusOkayInPanels $panelName;\n" - + "\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"|top\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n" - + " -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n" - + " -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -bluePencil 1\n -greasePencils 0\n -excludeObjectPreset \"All\" \n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n" - + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Side View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Side View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"|side\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n" - + " -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n" - + " -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -bluePencil 1\n -greasePencils 0\n -excludeObjectPreset \"All\" \n" - + " -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Front View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Front View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"|front\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n" - + " -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n" - + " -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n" - + " -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -bluePencil 1\n -greasePencils 0\n -excludeObjectPreset \"All\" \n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Persp View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Persp View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n" - + " -camera \"|persp\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 1\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n" - + " -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n" - + " -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -bluePencil 1\n -greasePencils 0\n -excludeObjectPreset \"All\" \n -shadows 0\n -captureSequenceNumber -1\n -width 277\n -height 1654\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n" - + "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"ToggledOutliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"ToggledOutliner\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 1\n -showReferenceMembers 1\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n" - + " -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -isSet 0\n -isSetMember 0\n -showUfeItems 1\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n" - + " -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n -renderFilterIndex 0\n -selectionOrder \"chronological\" \n -expandAttribute 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"Outliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"Outliner\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n" - + " -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -showUfeItems 1\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n" - + " -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"graphEditor\" (localizedPanelLabel(\"Graph Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Graph Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n" - + " -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 1\n -showDagOnly 0\n -showAssets 1\n -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 1\n -doNotSelectNewObjects 0\n" - + " -dropIsParent 1\n -transmitFilters 1\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -showUfeItems 1\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 1\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n" - + "\n\t\t\t$editorName = ($panelName+\"GraphEd\");\n animCurveEditor -e \n -displayValues 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -showPlayRangeShades \"on\" \n -lockPlayRangeShades \"off\" \n -smoothness \"fine\" \n -resultSamples 1\n -resultScreenSamples 0\n -resultUpdate \"delayed\" \n -showUpstreamCurves 1\n -tangentScale 1\n -tangentLineThickness 1\n -keyMinScale 1\n -stackedCurvesMin -1\n -stackedCurvesMax 1\n -stackedCurvesSpace 0.2\n -preSelectionHighlight 0\n -limitToSelectedCurves 0\n -constrainDrag 0\n -valueLinesToggle 0\n -highlightAffectedCurves 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dopeSheetPanel\" (localizedPanelLabel(\"Dope Sheet\")) `;\n" - + "\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dope Sheet\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 1\n -showDagOnly 0\n -showAssets 1\n -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n" - + " -showUpstreamCurves 1\n -showUnitlessCurves 0\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 1\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -showUfeItems 1\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n" - + " -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"DopeSheetEd\");\n dopeSheetEditor -e \n -displayValues 0\n -snapTime \"none\" \n -snapValue \"none\" \n -outliner \"dopeSheetPanel1OutlineEd\" \n -hierarchyBelow 0\n -selectionWindow 0 0 0 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"timeEditorPanel\" (localizedPanelLabel(\"Time Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Time Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n" - + "\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"clipEditorPanel\" (localizedPanelLabel(\"Trax Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Trax Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = clipEditorNameFromPanel($panelName);\n clipEditor -e \n -displayValues 0\n -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"sequenceEditorPanel\" (localizedPanelLabel(\"Camera Sequencer\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Camera Sequencer\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = sequenceEditorNameFromPanel($panelName);\n clipEditor -e \n -displayValues 0\n" - + " -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperGraphPanel\" (localizedPanelLabel(\"Hypergraph Hierarchy\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypergraph Hierarchy\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"HyperGraphEd\");\n hyperGraph -e \n -graphLayoutStyle \"hierarchicalLayout\" \n -orientation \"horiz\" \n -mergeConnections 0\n -zoom 1\n -animateTransition 0\n -showRelationships 1\n -showShapes 0\n -showDeformers 0\n -showExpressions 0\n -showConstraints 0\n -showConnectionFromSelected 0\n -showConnectionToSelected 0\n" - + " -showConstraintLabels 0\n -showUnderworld 0\n -showInvisible 0\n -transitionFrames 1\n -opaqueContainers 0\n -freeform 0\n -imagePosition 0 0 \n -imageScale 1\n -imageEnabled 0\n -graphType \"DAG\" \n -heatMapDisplay 0\n -updateSelection 1\n -updateNodeAdded 1\n -useDrawOverrideColor 0\n -limitGraphTraversal -1\n -range 0 0 \n -iconSize \"smallIcons\" \n -showCachedConnections 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperShadePanel\" (localizedPanelLabel(\"Hypershade\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypershade\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n" - + "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"visorPanel\" (localizedPanelLabel(\"Visor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Visor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"nodeEditorPanel\" (localizedPanelLabel(\"Node Editor\")) `;\n\tif ($nodeEditorPanelVisible || $nodeEditorWorkspaceControlOpen) {\n\t\tif (\"\" == $panelName) {\n\t\t\tif ($useSceneConfig) {\n\t\t\t\t$panelName = `scriptedPanel -unParent -type \"nodeEditorPanel\" -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n" - + " -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -connectedGraphingMode 1\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n -popupMenuScript \"nodeEdBuildPanelMenus\" \n -showNamespace 1\n -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -showUnitConversions 0\n -editorMode \"default\" \n -hasWatchpoint 0\n $editorName;\n\t\t\t}\n\t\t} else {\n\t\t\t$label = `panel -q -label $panelName`;\n" - + "\t\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -connectedGraphingMode 1\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n -popupMenuScript \"nodeEdBuildPanelMenus\" \n -showNamespace 1\n" - + " -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -showUnitConversions 0\n -editorMode \"default\" \n -hasWatchpoint 0\n $editorName;\n\t\t\tif (!$useSceneConfig) {\n\t\t\t\tpanel -e -l $label $panelName;\n\t\t\t}\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"createNodePanel\" (localizedPanelLabel(\"Create Node\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Create Node\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"polyTexturePlacementPanel\" (localizedPanelLabel(\"UV Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"UV Editor\")) -mbv $menusOkayInPanels $panelName;\n" - + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"renderWindowPanel\" (localizedPanelLabel(\"Render View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Render View\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"shapePanel\" (localizedPanelLabel(\"Shape Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tshapePanel -edit -l (localizedPanelLabel(\"Shape Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"posePanel\" (localizedPanelLabel(\"Pose Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tposePanel -edit -l (localizedPanelLabel(\"Pose Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n" - + "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynRelEdPanel\" (localizedPanelLabel(\"Dynamic Relationships\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dynamic Relationships\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"relationshipPanel\" (localizedPanelLabel(\"Relationship Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Relationship Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"referenceEditorPanel\" (localizedPanelLabel(\"Reference Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Reference Editor\")) -mbv $menusOkayInPanels $panelName;\n" - + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynPaintScriptedPanelType\" (localizedPanelLabel(\"Paint Effects\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Paint Effects\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"scriptEditorPanel\" (localizedPanelLabel(\"Script Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Script Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"profilerPanel\" (localizedPanelLabel(\"Profiler Tool\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Profiler Tool\")) -mbv $menusOkayInPanels $panelName;\n" - + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"contentBrowserPanel\" (localizedPanelLabel(\"Content Browser\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Content Browser\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\tif ($useSceneConfig) {\n string $configName = `getPanel -cwl (localizedPanelLabel(\"Current Layout\"))`;\n if (\"\" != $configName) {\n\t\t\tpanelConfiguration -edit -label (localizedPanelLabel(\"Current Layout\")) \n\t\t\t\t-userCreated false\n\t\t\t\t-defaultImage \"\"\n\t\t\t\t-image \"\"\n\t\t\t\t-sc false\n\t\t\t\t-configString \"global string $gMainPane; paneLayout -e -cn \\\"single\\\" -ps 1 100 100 $gMainPane;\"\n\t\t\t\t-removeAllPanels\n\t\t\t\t-ap false\n\t\t\t\t\t(localizedPanelLabel(\"Persp View\")) \n\t\t\t\t\t\"modelPanel\"\n" - + "\t\t\t\t\t\"$panelName = `modelPanel -unParent -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels `;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 1\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 32768\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -bluePencil 1\\n -greasePencils 0\\n -excludeObjectPreset \\\"All\\\" \\n -shadows 0\\n -captureSequenceNumber -1\\n -width 277\\n -height 1654\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName;\\nmodelEditor -e \\n -pluginObjects \\\"gpuCacheDisplayFilter\\\" 1 \\n $editorName\"\n" - + "\t\t\t\t\t\"modelPanel -edit -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels $panelName;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 1\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 32768\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -bluePencil 1\\n -greasePencils 0\\n -excludeObjectPreset \\\"All\\\" \\n -shadows 0\\n -captureSequenceNumber -1\\n -width 277\\n -height 1654\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName;\\nmodelEditor -e \\n -pluginObjects \\\"gpuCacheDisplayFilter\\\" 1 \\n $editorName\"\n" - + "\t\t\t\t$configName;\n\n setNamedPanelLayout (localizedPanelLabel(\"Current Layout\"));\n }\n\n panelHistory -e -clear mainPanelHistory;\n sceneUIReplacement -clear;\n\t}\n\n\ngrid -spacing 5 -size 12 -divisions 5 -displayAxes yes -displayGridLines yes -displayDivisionLines yes -displayPerspectiveLabels no -displayOrthographicLabels no -displayAxesBold yes -perspectiveLabelPosition axis -orthographicLabelPosition edge;\nviewManip -drawCompass 0 -compassAngle 0 -frontParameters \"\" -homeParameters \"\" -selectionLockParameters \"\";\n}\n"); - setAttr ".st" 3; -createNode script -n "sceneConfigurationScriptNode"; - rename -uid "F7B1E633-4856-D58B-0F9C-5C80A7FDFDE3"; - setAttr ".b" -type "string" "playbackOptions -min 1 -max 120 -ast 1 -aet 200 "; - setAttr ".st" 6; -select -ne :time1; - setAttr ".o" 1; - setAttr ".unw" 1; -select -ne :hardwareRenderingGlobals; - setAttr ".otfna" -type "stringArray" 22 "NURBS Curves" "NURBS Surfaces" "Polygons" "Subdiv Surface" "Particles" "Particle Instance" "Fluids" "Strokes" "Image Planes" "UI" "Lights" "Cameras" "Locators" "Joints" "IK Handles" "Deformers" "Motion Trails" "Components" "Hair Systems" "Follicles" "Misc. UI" "Ornaments" ; - setAttr ".otfva" -type "Int32Array" 22 0 1 1 1 1 1 - 1 1 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 ; - setAttr ".fprt" yes; - setAttr ".rtfm" 1; -select -ne :renderPartition; - setAttr -s 3 ".st"; -select -ne :renderGlobalsList1; -select -ne :defaultShaderList1; - setAttr -s 6 ".s"; -select -ne :postProcessList1; - setAttr -s 2 ".p"; -select -ne :defaultRenderingList1; -select -ne :standardSurface1; - setAttr ".bc" -type "float3" 0.40000001 0.40000001 0.40000001 ; - setAttr ".sr" 0.5; -select -ne :initialShadingGroup; - setAttr ".ro" yes; -select -ne :initialParticleSE; - setAttr ".ro" yes; -select -ne :defaultRenderGlobals; - addAttr -ci true -h true -sn "dss" -ln "defaultSurfaceShader" -dt "string"; - setAttr ".dss" -type "string" "standardSurface1"; -select -ne :defaultResolution; - setAttr ".pa" 1; -select -ne :defaultColorMgtGlobals; - setAttr ".cfe" yes; - setAttr ".cfp" -type "string" "/OCIO-configs/Maya2022-default/config.ocio"; - setAttr ".vtn" -type "string" "ACES 1.0 SDR-video (sRGB)"; - setAttr ".vn" -type "string" "ACES 1.0 SDR-video"; - setAttr ".dn" -type "string" "sRGB"; - setAttr ".wsn" -type "string" "ACEScg"; - setAttr ".otn" -type "string" "ACES 1.0 SDR-video (sRGB)"; - setAttr ".potn" -type "string" "ACES 1.0 SDR-video (sRGB)"; -select -ne :hardwareRenderGlobals; - setAttr ".ctrs" 256; - setAttr ".btrs" 512; -connectAttr "polySphere1.out" "pSphereShape1.i"; -relationship "link" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message"; -relationship "link" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message"; -relationship "link" ":lightLinker1" "Standard_Surface1SG.message" ":defaultLightSet.message"; -relationship "shadowLink" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message"; -relationship "shadowLink" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message"; -relationship "shadowLink" ":lightLinker1" "Standard_Surface1SG.message" ":defaultLightSet.message"; -connectAttr "layerManager.dli[0]" "defaultLayer.id"; -connectAttr "renderLayerManager.rlmi[0]" "defaultRenderLayer.rlid"; -connectAttr "materialXStackShape1.sk" "Standard_Surface1.sk"; -connectAttr "Standard_Surface1.oc" "Standard_Surface1SG.ss"; -connectAttr "pSphereShape1.iog" "Standard_Surface1SG.dsm" -na; -connectAttr "Standard_Surface1.d" "Standard_Surface1SG.ds"; -connectAttr "Standard_Surface1SG.msg" "materialInfo1.sg"; -connectAttr "Standard_Surface1.msg" "materialInfo1.m"; -connectAttr "Standard_Surface1.msg" "materialInfo1.t" -na; -connectAttr "Standard_Surface1SG.pa" ":renderPartition.st" -na; -connectAttr "Standard_Surface1.msg" ":defaultShaderList1.s" -na; -connectAttr "defaultRenderLayer.msg" ":defaultRenderingList1.r" -na; -// End of MaterialXStackExport.ma diff --git a/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.mtlx b/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.mtlx new file mode 100644 index 0000000000..d0b95b6d04 --- /dev/null +++ b/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/MaterialXStackExport.mtlx @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/Multioutput.mtlx b/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/Multioutput.mtlx new file mode 100644 index 0000000000..cb2eada1e6 --- /dev/null +++ b/test/lib/usd/translators/UsdExportMaterialXSurfaceShader/Multioutput.mtlx @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/lib/usd/translators/testUsdExportMaterialXSurfaceShader.py b/test/lib/usd/translators/testUsdExportMaterialXSurfaceShader.py index ba70c4450d..f803bfa697 100644 --- a/test/lib/usd/translators/testUsdExportMaterialXSurfaceShader.py +++ b/test/lib/usd/translators/testUsdExportMaterialXSurfaceShader.py @@ -23,6 +23,10 @@ from maya import cmds from maya import standalone +import maya.cmds as cmds +import maya.mel as mel +import ufe + import mayaUsd.lib as mayaUsdLib import maya.api.OpenMaya as om @@ -46,9 +50,21 @@ def testExportMaterialXStack(self): cmds.file(f=True, new=True) - mayaFile = os.path.join(self._inputPath, 'UsdExportMaterialXSurfaceShader', - 'MaterialXStackExport.ma') - cmds.file(mayaFile, force=True, open=True) + mtlxFile = os.path.join(self._inputPath, 'UsdExportMaterialXSurfaceShader', + 'MaterialXStackExport.mtlx') + + stackName = mel.eval("createNode materialxStack") + stackPathString = mel.eval("ls -l " + stackName)[0] + stackItem = ufe.Hierarchy.createItem(ufe.PathString.path(stackPathString)) + stackHierarchy = ufe.Hierarchy.hierarchy(stackItem) + stackContextOps = ufe.ContextOps.contextOps(stackItem) + stackContextOps.doOp(['MxImportDocument', mtlxFile]) + documentItem = stackHierarchy.children()[-1] + sphere = cmds.polySphere() + surfPathString = ufe.PathString.string(documentItem.path()) + "%Standard_Surface1" + cmds.select(sphere) + materialContextOps = ufe.ContextOps.contextOps(ufe.Hierarchy.createItem(ufe.PathString.path(surfPathString))) + materialContextOps.doOp(['Assign Material to Selection']) # Export to USD. usdFilePath = os.path.abspath('MaterialXStackExport.usda') @@ -100,6 +116,76 @@ def testExportMaterialXStack(self): self.assertEqual(checkboardPrim.GetName(), 'checkboard1') self.assertEqual(checkboardPrim.GetAttribute('info:id').Get(), 'ND_checkerboard_color3') + def testExportMultiOutput(self): + + cmds.file(f=True, new=True) + + mtlxFile = os.path.join(self._inputPath, 'Multioutput.mtlx', + 'MaterialXStackExport.mtlx') + + stackName = mel.eval("createNode materialxStack") + stackPathString = mel.eval("ls -l " + stackName)[0] + stackItem = ufe.Hierarchy.createItem(ufe.PathString.path(stackPathString)) + stackHierarchy = ufe.Hierarchy.hierarchy(stackItem) + stackContextOps = ufe.ContextOps.contextOps(stackItem) + stackContextOps.doOp(['MxImportDocument', mtlxFile]) + documentItem = stackHierarchy.children()[-1] + sphere = cmds.polySphere() + surfPathString = ufe.PathString.string(documentItem.path()) + "%test_multi_out_mat" + cmds.select(sphere) + materialContextOps = ufe.ContextOps.contextOps(ufe.Hierarchy.createItem(ufe.PathString.path(surfPathString))) + materialContextOps.doOp(['Assign Material to Selection']) + + # Export to USD. + usdFilePath = os.path.abspath('Multioutput.usda') + cmds.mayaUSDExport(mergeTransformAndShape=True, file=usdFilePath, + shadingMode='useRegistry', convertMaterialsTo=['MaterialX'], + materialsScopeName='Materials', defaultPrim='None') + + stage = Usd.Stage.Open(usdFilePath) + self.assertTrue(stage) + + prim = stage.GetPrimAtPath("/Materials/test_multi_out_matSG") + self.assertTrue(prim) + material = UsdShade.Material(prim) + self.assertTrue(material) + + # Validate that the artistic_ior output were properly exported and connected + surfOutput = material.GetSurfaceOutput("mtlx") + self.assertTrue(surfOutput) + surfSource = surfOutput.GetConnectedSources()[0] + surfPrim = surfSource[0].source.GetPrim() + self.assertEqual(surfPrim.GetName(), "test_multi_out_mat") + id = surfPrim.GetAttribute('info:id') + self.assertEqual(id.Get(), 'ND_standard_surface_surfaceshader') + surfShader = UsdShade.Shader(surfPrim) + specular = surfShader.GetInput('specular') + # Validate the Node Graph + nodeGraphPrim = specular.GetConnectedSources()[0][0].source.GetPrim() + self.assertEqual(nodeGraphPrim.GetName(), 'compound1') + nodeGraph = UsdShade.NodeGraph(nodeGraphPrim) + # Validate the ior output + iorExtractPrim = nodeGraph.GetOutput('specular_ior_output').GetConnectedSources()[0][0].source.GetPrim() + self.assertEqual(iorExtractPrim.GetName(), 'ior') + self.assertEqual(iorExtractPrim.GetAttribute('info:id').Get(), 'ND_extract_color3') + iorExtractShader = UsdShade.Shader(iorExtractPrim) + artisticiorPrim = iorExtractShader.GetInput('in').GetConnectedSources()[0][0].source.GetPrim() + self.assertEqual(artisticiorPrim.GetName(), 'artistic_ior') + self.assertEqual(iorExtractPrim.GetAttribute('info:id').Get(), 'ND_artistic_ior') + + # Validate the extinction output + specularExtractPrim = nodeGraph.GetOutput('specular_output').GetConnectedSources()[0][0].source.GetPrim() + self.assertEqual(specularExtractPrim.GetName(), 'specular') + self.assertEqual(specularExtractPrim.GetAttribute('info:id').Get(), 'ND_extract_color3') + specularExtractShader = UsdShade.Shader(specularExtractPrim) + artisticiorPrim = specularExtractShader.GetInput('in').GetConnectedSources()[0][0].source.GetPrim() + self.assertEqual(artisticiorPrim.GetName(), 'artistic_ior') + + artisticiorShader = UsdShade.Shader(artisticiorPrim) + outs = artisticiorShader.GetOutputs() + self.assertEqual(outs[0].GetBaseName(), 'extinction') + self.assertEqual(outs[1].GetBaseName(), 'ior') + if __name__ == '__main__': unittest.main(verbosity=2) From fb890c9b0c7290445a9494b9cb06c3602f7aae93 Mon Sep 17 00:00:00 2001 From: "ADS\\derlerk" Date: Mon, 24 Feb 2025 14:35:13 -0500 Subject: [PATCH 7/7] clang format fix. --- lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp index fb204b796a..dab6f7d3b9 100644 --- a/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp +++ b/lib/usd/translators/shading/mtlxMaterialXSurfaceShaderWriter.cpp @@ -17,6 +17,7 @@ #include #include + #include #include