New Script installers ERROR

free scripts, plugins, models, textures
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: New Script installers ERROR

Post by clintonman »

trueBlue wrote: 18 Feb 2018, 02:18 Okay I found out the problem, user error!
I had the AutoLoad and a Script in your library.
Deleted them and it runs as expected.
Made new autoload that recovers from non-compliant installer found in the autoload library.
trueBlue wrote: 18 Feb 2018, 02:18 ...
Maybe you should create and put the toolbar installers in a clintontoolbars folder?
Why? Is this related to not installing pre-existing toolbars you mentioned earlier?
Attachments
Autoload.RsObj
(86.01 KiB) Downloaded 205 times
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: New Script installers ERROR

Post by trueBlue »

No, I was thinking it would be more safe if they were not in a library.
As you can see from what happened with me, it is possible to screw up. Ooooops!
I'll check out your new AutoLoad.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: New Script installers ERROR

Post by clintonman »

trueBlue wrote: 18 Feb 2018, 03:02 No, I was thinking it would be more safe if they were not in a library.
As you can see from what happened with me, it is possible to screw up. Ooooops!
I'll check out your new AutoLoad.
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.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: New Script installers ERROR

Post by trueBlue »

Found a different, less complicated, way of resetting toolbars in the reset.js file.

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();
}
Could find the user's present layout in Project/Windows Manager Space's LayoutName attribute string.
Attachments
WMS.PNG
WMS.PNG (5.12 KiB) Viewed 5015 times
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: New Script installers ERROR

Post by clintonman »

trueBlue wrote: 21 Feb 2018, 17:36 Could find the user's present layout in Project/Windows Manager Space's LayoutName attribute string.
And 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. ;)
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: New Script installers ERROR

Post by trueBlue »

clintonman wrote: 22 Feb 2018, 03:16
trueBlue wrote: 21 Feb 2018, 17:36 Could find the user's present layout in Project/Windows Manager Space's LayoutName attribute string.
And 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. ;)
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.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: New Script installers ERROR

Post by clintonman »

trueBlue wrote: 22 Feb 2018, 04:35
clintonman wrote: 22 Feb 2018, 03:16
trueBlue wrote: 21 Feb 2018, 17:36 Could find the user's present layout in Project/Windows Manager Space's LayoutName attribute string.
And 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. ;)
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.
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.
So the final goal is to get all the toolbars to a "new" untouched state before making changes. That way if the user has made some toolbar changes we get a predictable outcome when adding new items.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: New Script installers ERROR

Post by trueBlue »

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.
Attachments
Final toolbar prototypes and Red Blue Gold buttons.zip
(11.37 KiB) Downloaded 207 times
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: New Script installers ERROR

Post by clintonman »

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.
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.
Thanks for your help.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: New Script installers ERROR

Post by clintonman »

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.
You're Reset Toolbars doesn't have 3 items I have in mine.

Code: Select all

	syncPrototype["UVEditor"] = 1;//???
	syncPrototype["NavigationToolbar"] = 1;//???
	syncPrototype["LENavigatorBar"] = 1;//???
Clinton Reese

http://clintons3d.com
Post Reply