Re: New Script installers ERROR
Posted: 18 Feb 2018, 02:36
Made new autoload that recovers from non-compliant installer found in the autoload library.
Why? Is this related to not installing pre-existing toolbars you mentioned earlier?
The Same People, the Same Great Community.
https://www.united3dartists.com/forum/
Made new autoload that recovers from non-compliant installer found in the autoload library.
Why? Is this related to not installing pre-existing toolbars you mentioned earlier?
A huge part of programming is trying to anticipate what people will do. What you did makes perfect sense from someone who didn't write the thing. It autoloads scripts from the library so... yeah. Write the way you hope people will use it then rewrite to account for the 100 different ways people actually use it.
Code: Select all
// Called to Reset the Toolbars and load the default_layout
function Execute(params)
{
Node.Delete("/Toolbar Prototypes Encapsulator")
RsFileIO.LoadObject(System.GetMainDir() + '\\scripts\\preObjects\\Toolbars.rsobj', '/');
if ( !WindowsManager.LoadLayout('\\default_layout.rsl'))
{
}
LE.DefaultPlacement();
WindowsManager.Activate();
}
And do what with it? Do we use it to restore the users layout after installing scripts?
Yes I was thinking that would be possible to reload the present layout if needed. Just showing where that info was. But then again you do not really know where the user's layouts reside. They could possible setup a different location. I tried different variants with deleting/reloading the Toolbars, even with the WindowsManager.Activate() command, but nothing reset the toolbars. For whatever reason, loading the default_layout as shown worked. Every time you Reset the Default Context, that is the layout being used when tS7 reboots. I have tried to use LE.DefaultPlacement() but I could not get it to work. I am guessing it is similar to the Arrange command. Anyway just sharing what I discovered. Could be useful with your project though, given if you run it prior to installing your toolbars, first and only once.clintonman wrote: ↑22 Feb 2018, 03:16And do what with it? Do we use it to restore the users layout after installing scripts?
And what is the purpose of loading the default layout? I'm guessing it's to load the toolbars into the actual windows or does the "WindowsManager.Activate()" do that? Or maybe they work together?
What does "LE.DefaultPlacement() do?"
Please tell me what you know without assuming I already know, because I don't. You can probably tell by the questions.
OK, got it. It's more of a "here are some experiments I've tried" as opposed to "found a better way, you should do this instead" thing.trueBlue wrote: ↑22 Feb 2018, 04:35Yes I was thinking that would be possible to reload the present layout if needed. Just showing where that info was. But then again you do not really know where the user's layouts reside. They could possible setup a different location. I tried different variants with deleting/reloading the Toolbars, even with the WindowsManager.Activate() command, but nothing reset the toolbars. For whatever reason, loading the default_layout as shown worked. Every time you Reset the Default Context, that is the layout being used when tS7 reboots. I have tried to use LE.DefaultPlacement() but I could not get it to work. I am guessing it is similar to the Arrange command. Anyway just sharing what I discovered. Could be useful with your project though, given if you run it prior to installing your toolbars, first and only once.clintonman wrote: ↑22 Feb 2018, 03:16And do what with it? Do we use it to restore the users layout after installing scripts?
And what is the purpose of loading the default layout? I'm guessing it's to load the toolbars into the actual windows or does the "WindowsManager.Activate()" do that? Or maybe they work together?
What does "LE.DefaultPlacement() do?"
Please tell me what you know without assuming I already know, because I don't. You can probably tell by the questions.
Good timing. I plan to start the installers this weekend and release when they are all done. That is that the persistent installers v1 have all been replaced with the new v2 installer.trueBlue wrote: ↑23 Feb 2018, 20:38 Hey Clinton,
Nearing the end of the Final Update. Here is all of the prototypes listed in your Reset Toolbars and the Red, Blue, and Gold buttons. Please add the buttons to your C3D installer.
The Red commands have changed, the Gold is from your latest C3D toolbar, and then the addition of the Blue button.
Thanks!
With the Final Update I have included your C3D toolbar, if that is okay with you. I figured users could install your other toolbars that they want.
I copied all your new items for the Reset Toolbars script.trueBlue wrote: ↑23 Feb 2018, 20:38 Hey Clinton,
Nearing the end of the Final Update. Here is all of the prototypes listed in your Reset Toolbars and the Red, Blue, and Gold buttons. Please add the buttons to your C3D installer.
The Red commands have changed, the Gold is from your latest C3D toolbar, and then the addition of the Blue button.
Thanks!
With the Final Update I have included your C3D toolbar, if that is okay with you. I figured users could install your other toolbars that they want.
Code: Select all
syncPrototype["UVEditor"] = 1;//???
syncPrototype["NavigationToolbar"] = 1;//???
syncPrototype["LENavigatorBar"] = 1;//???