// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // =========================================================================== // // agreement provided at the time of installation or download, or which // =========================================================================== // addVisorContentCallback to register MASH example content with Visor // // The callback signature should be: // global proc string visorContentCallback() // and should return the fully qualified path to the external content // global proc string MASHVisorContent() { string $MASH_LOCATION = getenv("MASH_LOCATION"); return $MASH_LOCATION + "MASH Examples"; } // contentBrowserCallback to register MASH example content with Content Browser // // The callback signature should be: // global proc string contentBrowserCallback(string $key) // $key = name // should return the name of the tab // $key = class // should return the name of the classification // $key = path // should return the fully qualified path to the external content // global proc string MASHContentBrowserCallback(string $key) { if ($key == "name") return "MASH Examples"; if ($key == "class") return "mash"; if ($key == "path") { string $MASH_LOCATION = getenv("MASH_LOCATION"); return $MASH_LOCATION + "MASH Examples"; } return ""; } // Helper function to register MASH example content with Maya global proc registerMASHContent() { // Register with Visor if (!`exists registerVisorContentCallback`) { source visorPanel; } // Register with Content Browser if (`exists registerVisorContentCallback`) { catchQuiet( registerVisorContentCallback("MASH Examples", "MASHVisorContent") ); } // Link Help content string $nodeTypes[] = `pluginInfo -query -dependNode "MASH"`; for ($nodeType in $nodeTypes) { string $nodeHelp = "showHelp \"" + $nodeType + "\""; addAttributeEditorNodeHelp($nodeType, $nodeHelp); } // Set up default opVars if they don't exist source "MASHcreateOptions.mel"; MASHsetOptionVars(0); }