Ok gotcha.trueBlue wrote: 09 Jun 2018, 21:43Another issue is the toolbars. Need to Reset the toolbar prototypes.clintonman wrote: 09 Jun 2018, 21:37 Thanks for the heads up. Need to make it survive context reset.
If you decide to include your reset toolbars script, please addCode: Select all
syncPrototype["WinGUID_Bar"] = 1;
Along with the change you mention above the plan for Reset survival uses this:
At the end of reset.js:
Code: Select all
// Execute
// Called to execute the command
function Execute(params)
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
//
//Restore Yafaray toolbar
//
var name=WindowsManager.GetWindowsManagerNodeName();
if(Node.Exists("Toolbar Prototypes Encapsulator/YafaRayBar"))
WindowsManager.OpenToolbarFromPrototype("YafaRayBar",32,32,0,0);
Node.Rename(name+"/"+Node.SubObject(name,Node.SubObjectCount(name)-1),"YafaRayBar");
WindowsManager.SnapFrameToFrameEx(WindowsManager.GetWorkWindow(),name+"/YafaRayBar",19,10,310,-120);
WindowsManager.SetFrameOwnerFrame(name+"/YafaRayBar",WindowsManager.GetWorkWindow());
//
//Restore Yafaray Scripts
//
if(fso.FileExists(System.GetMainDir()+ "\\Scripts\\clintonobjects\\CustomScriptsStore\\YafarayScripts.RsObj"))
RsFileIO.LoadObject(System.GetMainDir()+ "\\Scripts\\clintonobjects\\CustomScriptsStore\\YafarayScripts.RsObj", "/Scripts/CustomCommands");
if(fso.FileExists(System.GetMainDir()+ "\\Scripts\\preobjects\\Yafaray Folder.RsObj"))
RsFileIO.LoadObject(System.GetMainDir()+ "\\Scripts\\preobjects\\Yafaray Folder.RsObj", "/");
//
//Add Yafaray to offline renderers
//
try {
Node.Create("Clintons3D Package/Yafaray", "/Offline renderers");
} catch (err) {
System.Trace("Error: Clintons3D Package plugin should be installed first");
}
//
//Restore Clintons Scripts
//
if(fso.FileExists(System.GetMainDir()+ "\\Scripts\\clintonobjects\\ReloadCustomScripts.RsObj")) {
RsFileIO.LoadObject(System.GetMainDir() + '\\Scripts\\clintonobjects\\ReloadCustomScripts.RsObj', "Scripts");
Activity.Run("Scripts/ReloadCustomScripts");
}
//
//Restore Clintons toolbar
//
if(Node.Exists("Toolbar Prototypes Encapsulator/ClintonToolbar"))
if(!Node.SubObjectCount("Toolbar Prototypes Encapsulator/ClintonToolbar") ==0){
var name=WindowsManager.GetWindowsManagerNodeName();
WindowsManager.CloseToolbar("ClintonToolbar");
WindowsManager.OpenToolbarFromPrototype("ClintonToolbar",32,32,0,0);
Node.Rename(name+"/"+Node.SubObject(name,Node.SubObjectCount(name)-1),"ClintonToolbarFrame");
WindowsManager.SnapFrameToFrameEx(WindowsManager.GetWorkWindow(),name+"/ClintonToolbarFrame",19,10,310,-60);
WindowsManager.SetFrameOwnerFrame(name+"/ClintonToolbarFrame",WindowsManager.GetWorkWindow());
}
}






































