Code: Select all
function Execute(params)
{
var Yes = System.Question("Would you like to install the customized Material Editor?")
if (Yes)
{
WindowsManager.CloseWindow("/Project/Windows Manager Space/MyLibraryFrame")
if (Node.Exists("/Material Editor/Material Editor/Vray Material Editor"))
Node.Delete("/Material Editor")
Node.Copy(System.ThisOwner() + "/ME_V/Material Editor", "/")
RsFileIO.SaveObject(System.GetMainDir() + '\\Scripts\\preobjects\\MaterialEditor.RsObj', System.ThisOwner() + "/ME_V/Material Editor")
MeshModifiers.OpenMaterialEditor()
System.Alert("The D3D Material Editor and Vray Material Editor have been installed.")
if (!Node.Exists("/Material Editor/Material Editor/Vray Material Editor"))
Node.Delete("/Material Editor")
Node.Copy(System.ThisOwner() + "/Material Editor", "/")
RsFileIO.SaveObject(System.GetMainDir() + '\\Scripts\\preobjects\\MaterialEditor.RsObj', System.ThisOwner() + "/Material Editor")
MeshModifiers.OpenMaterialEditor()
System.Alert("The Material Editor has been installed.")
}
}I've tried brackets inbetween the commands and also if else statements.
