Link Editor Navigator buttons

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Link Editor Navigator buttons // Scriptorium

1  2  |  

Post by trueBlue // Oct 14, 2006, 10:01pm

trueBlue
Total Posts: 1761
pic
stan: I updated the New File Menu buttons download to give more options for installing them anyway you like. I tried one last time to make an installer for this version but could not find a way. There seems to be two versions of the original File/Help menu. One is hard coded and one is a toolbar (tSFileMenu).

http://forums1.caligari.com/truespace/showpost.php?p=16139&postcount=1 (http://forums1.caligari.com/truespace/showpost.php?p=16139&postcount=1)

The reason that the buttons were being overwritten was because I Reset the default context. This will destroy either version regardless which one you use.

Post by stan // Oct 17, 2006, 8:58am

stan
Total Posts: 1240
pic
hi trueBlue..
here is a way to install your new toolbar into the file help one..only minor flaw is the original 'file help' needs to be reset on the toolbar after reinstalling from loader..

there is also a shortcut button to the location of the file help TB in Windows Manager Space
once installed you must save your layout or it will reset on layout changes :)

Post by trueBlue // Oct 17, 2006, 9:00am

trueBlue
Total Posts: 1761
pic
With regards to the Link Editor Navigator. I have noticed that entering the ID# from the SnappedTo into the OwenedBy does infact hide the toolbar when another window is open. I have also noticed that the toolbar shows in other layouts as well but the the OwenedBy needs to be re entered and then saved to that layout. I was trying to correct this for other users by way of a script. I was successfull in changing the values in my Default layout, but I am not sure on how to release this information because the node that encaps my toolbar is named Windows Frame, 3. I am afraid that it may not be the same on somebody elses PC.
I also made this into a toolbar with its own name, ID, and prototype. I am trying to make a script that loads this toolbar into the Toolbar Prototypes Encapsulator which works, but it does not load into Windows Manager Space. I have been studing the Output Console and using this information in my script but still does not work.
I was hoping the developers could share some information on the correct way to make a custom toolbar.

Post by stan // Oct 17, 2006, 9:29am

stan
Total Posts: 1240
pic
I tried that with a plugin toolbar..set it up in the 'toolbars' icon group..it didn't load.
but if you put a copy in both places Toolbar Prototypes Encapsulator , Windows Manager Space. then close truespace and reopen the toolbar should showup. your Windows Manager Space version of toolbar must be in a 'Frame Window' already ..I may have to double check this, it was awhile ago :confused:

if we compare the WinID of the LE's 'Frame Window' on our systems in default layout..if it's the same then you should be able to setup the LE toolbar for default layout ..setting the 'OwnedBy' and 'SnappedTo'.on the toolbar's 'Frame Window' .mine works great, but I doubt the WinID is the same as in default

UPDATE: there is now an default layout installer for my version of the LE nav toolbar plus what I call LEquickclick toolbar

Post by stan // Oct 17, 2006, 9:51am

stan
Total Posts: 1240
pic
trueBlue, if you don't mind I'll post that new file help + toolbar loader in your file help menu thread [it's back a few posts in this thread ] :D wanted you to take a look at it first :)

Post by trueBlue // Oct 17, 2006, 4:40pm

trueBlue
Total Posts: 1761
pic
Hello stan: Well thanks to you I understand now how to create and load a custom toolbar. A couple things I would suggest that you do to your loader is first delete both nodes so there is no duplication and second (Can I have a drum roll?) add WindowsManager.Activate() at the end of your script. This activates the toolbar saving you from closing down trueSpace7. Below is my script to load my version of the Link Editor Navigator.


function Execute(params)
{
Node.Delete("/Toolbar Prototypes Encapsulator/LENavigatorBar")
Node.Delete("/Project/Windows Manager Space/LE Navigator Toolbar Frame")
Library.CreateDelegate("Objects", "Toolbars", "LENavigatorBar", "/Toolbar Prototypes Encapsulator");
Library.CreateDelegate("Objects", "Toolbars", "LE Navigator Toolbar Frame", "/Project/Windows Manager Space");
WindowsManager.Activate()
Node.Delete(Space.CurrentScene() + "/LE Navigator Loader")
}

Post by stan // Oct 17, 2006, 4:48pm

stan
Total Posts: 1240
pic
that's great trueBlue..maybe I should update my installer..:banana:

did you check out the file/help toolbar installer a few posts back?

yes this works great
WindowsManager.Activate()

Post by trueBlue // Oct 18, 2006, 6:15am

trueBlue
Total Posts: 1761
pic
hi trueBlue..
here is a way to install your new toolbar into the file help one..only minor flaw is the original 'file help' needs to be reset on the toolbar after reinstalling from loader..

there is also a shortcut button to the location of the file help TB in Windows Manager Space
once installed you must save your layout or it will reset on layout changes :)
Stan: I tried this and both produce errors. Then there is an empty toolbar showing where the original File/Help menu was. Reset did nothing. Looking at your script you are loading from the Objects library, but no sub library. Also I think that the names used in the script are not the same as the ones that are imported. I had to Reset to default context to remove the empty toolbar.

Post by stan // Oct 18, 2006, 6:31am

stan
Total Posts: 1240
pic
hi trueblue..this is for default layout..put loader in space 3d in LE..did you import the library into 'objects' library using import library? did you click 'load new toolbar' button?
sounds like you only tried 'replace original'
here is the install script
Node.Delete("/Project/Windows Manager Space/Frame Window/Split Docking Place/Frame Window/Split Docking Place/Frame Window, 2/Border Docking Place/Frame Window, 2/Frame Window, 1/Toolbar");
Library.CreateDelegate("Objects", "file help TB", "New Toolbar", "/Project/Windows Manager Space/Frame Window/Split Docking Place/Frame Window/Split Docking Place/Frame Window, 2/Border Docking Place/Frame Window, 2/Frame Window, 1");

VERY ODD IT WORKS FINE HERE

Post by stan // Oct 18, 2006, 6:48am

stan
Total Posts: 1240
pic
trueblue, try this one..it has WindowsManager.Activate()
so it does a better job [also I downloaded this zip and tried it, it works fine]

while in default layout import file_help_TB library into 'objects' library. load 'new file help loader' into your 'space 3d'

also added a safety if you click 'load new toolbar' twice..

oh if you have any problem..change layouts go back and it will be as it was, no need to reset truespace..sorry should have mentioned that..you must save layout to keep it

Post by trueBlue // Oct 18, 2006, 8:15am

trueBlue
Total Posts: 1761
pic
Hello stan: This version works good loading and unloading. I like this version with the icons it looks better. However if you want to refine it a little better, here is what I noticed. You need to add the original AgentID to the X, Y, and Z buttons. Also as was suggested by Stienie, move the Render and Draw buttons out from the File button.
Then on a final note since you are combining both toolbars into one, add to your script a command that closes the other toolbar on load and opens it on reset.

Note: When you select the 3 dot icon to change Horizontal/Vertical is not working right. Not sure what to do there. Not sure on how to add the Reset function either.

Post by stan // Oct 18, 2006, 8:36am

stan
Total Posts: 1240
pic
Not sure on how to add the Reset function either.
easy you need a name and prototype..but it created problems so I removed it..it also made the toolbar handle tools show, like the three dots. the 'x' is there but doesn't work....

You need to add the original AgentID to the X, Y, and Z buttons
I changed them because they made my large icon version of toolbar reset..oops..just noticed it removed the boolean feature on those buttons

maybe you can take it from here trueBlue..;)

one version just improved file/help bridge etc. for the users of the large or standard topbar :D

the other your combined toolbar..:)

Post by trueBlue // Oct 18, 2006, 9:39am

trueBlue
Total Posts: 1761
pic
I forgot to mention you discovered you can load an object from the main library without using the sub library name. :cool:

Post by trueBlue // Oct 18, 2006, 5:13pm

trueBlue
Total Posts: 1761
pic
Caligari Developers: Could you please share with us the correct way to make a customized toolbar that would with stand "Resetting the default context", and be available globally in all layouts?

You could use this Link Editor Navigator as an example:
http://forums1.caligari.com/truespace/showpost.php?p=16095&postcount=1 (http://forums1.caligari.com/truespace/showpost.php?p=16095&postcount=1)

Post by Norm // Oct 21, 2006, 11:03am

Norm
Total Posts: 862
pic
Caligari Developers: Could you please share with us the correct way to make a customized toolbar that would with stand "Resetting the default context", and be available globally in all layouts?



You could use this Link Editor Navigator as an example:

http://forums1.caligari.com/truespace/showpost.php?p=16095&postcount=1 (http://forums1.caligari.com/truespace/showpost.php?p=16095&postcount=1)


I asked about this one:


toolbars prototypes are defined in toolbars.rsobj file

it is located in /preobjects folder

each time you press 'reset to default' button

toolbars prototypes stored in default.ctx are replaced by this file

so if you customize toolbar you will haveto save your result to toolbars.rsobj file to make changes persistant

this is the way how we customize toolbars according to design.


you can browse toolbars prototypes in graph

it is located in main root


to save changes on fly:

change any bitmap or command attached to toolbar button

I do not remember syntax of RsFIleIO.SaveObject command



but you have to save changes to separate file, do not overwrite existing one.

So in script, save to a similar name, shut down ts, swap the rsobj files, delete the default.ctx file and restart ts.


... that is the jist of conversation. Hope is helpful.

Post by trueBlue // Oct 21, 2006, 4:31pm

trueBlue
Total Posts: 1761
pic
Thank you Norm for getting this information. I successfully saved my toolbar to my harddrive. The size of my Toolbar.rsobj file is 33KB. The original is 3,682KB. So I would think swapping them out is not going to work here. Unless I am missing something.
Important note: When saving your toolbar and it is active you can not save any other way except from the Toolbar Prototypes Encapsulator.

function Execute(params)
{
RsFileIO.SaveObject('C:\\trueSpace7\\tS\\Scripts\\ MyPreobjects\\Toolbars.rsobj', '/Toolbar Prototypes Encapsulator/LENavigatorBar')
}

On another note I have a toolbar that is in two parts, one is the toolbar that is saved to the Toolbar Prototypes Encapsulator and the other is the toolbar's Window Frame that is saved to the Windows Manager Space.

Post by stan // Oct 21, 2006, 4:43pm

stan
Total Posts: 1240
pic
this is from the old forum..this was about the large icon toptoolbar

Or the way to do it as recommended by developer;

I have checked and there are two easy methods:

1) just go to LE and locate /Toolbar prototypes encapsulator. There you
can find your toolbar (you know probably the name when you found it in
windows manager space).
Just drag that node and put it to library & export.

then users : delete the node inside toolbar prototypes encapsulator and
place new from library. type
WindowsManager.RecreateToolBarPrototypesEncapsulat or();
it may be also possible not to use script command - but you cannot have
active the toolbar you are changing or after switching to another layout
the toolbar changes will be overridden back.

RDC will reset also toolbars and will revert changes.

2) save whole toolbar prototypes encapsulator: select toolbar prototypes
node and type rsfileio.saveobject('c:\toolbars.rsobj',''); to console).

then copy c:\toolbars.rsobj to
trueSpace\ts\script\spreobjects\toolbars.rsobj and reset to default
context. this should load new toolbars.

Changing to original set of buttons requires old toolbars.rsobj, so it
may be good idea to backup it.

it was never clear in the old forum as to where to put rsfileio.saveobject('c:\toolbars.rsobj',''); guess it was supposed to be done in the command prompt

Post by trueBlue // Oct 21, 2006, 7:59pm

trueBlue
Total Posts: 1761
pic
All right stan! This is how you do it, this was executed with the below script from the Link Editor.

//IMPORTANT: Backup your original Toolbars.rsobj file in the following folder:
// c:\trueSpace7\tS\Scripts\preobjects\
// This script assumes that this is where you installed trueSpace7.
// This script will overwrite this file without warning.
function Execute(params)
{
Node.Select("/Toolbar Prototypes Encapsulator");
RsFileIO.SaveObject('c:\\trueSpace7\\tS\\Scripts\\ preobjects\\Toolbars.rsobj', '');
System.Alert("Toolbars have been saved.");
System.Alert("trueSpace7 will now shutdown and restart to save changes.");
RsApp.Reset();
}

Post by trueBlue // Oct 22, 2006, 7:25pm

trueBlue
Total Posts: 1761
pic
:( I just discovered that Widget aspect of the script did not work out to well. So I removed that portion of the script.
:confused: I discovered that I had four Active View Widgets. I tested this by reseting the default context after restoring the original file and deleting the old.
:) This corrected the problem.
I then tested saving my custom widget and problem reappeared this time with two Active View Widgets. I repeated this over and over with the same results.
:mad:

Post by Norm // Oct 23, 2006, 7:25am

Norm
Total Posts: 862
pic
:( I just discovered that Widget aspect of the script did not work out to well. So I removed that portion of the script.

:confused: I discovered that I had four Active View Widgets. I tested this by reseting the default context after restoring the original file and deleting the old.

:) This corrected the problem.

I then tested saving my custom widget and problem reappeared this time with two Active View Widgets. I repeated this over and over with the same results.

:mad:


Are you checking for existence of the widget in script? If not, you may be looping the creation, saving and recreating again. I would want to test first and even if it exists, delete / remove it first, then create. Seems to be loop activity happening.

Post by trueBlue // Oct 23, 2006, 7:52am

trueBlue
Total Posts: 1761
pic
No I did not. The only thing that I did was select the Widgets node and saved to disk and then Reset to default context to save changes. This was after I made changes to the Background node. There is no duplication going on here.

Further discovery in the Widgets/Active Widgets Layer2 node there were Active Widgets, 1 and Active Widgets, 2 etc... this is where the duplication was happening. I tested after restoring original Widgets.rsobj and there were no duplicated Active Widgets. So with confirming this saved again. Results confirmed that there was duplication again within the Active Widgets Layer2. I tested this several times and with different results. IE: One time there was 4 duplications and second attempt 2 duplications.
I have been Somehow? successfull saving my custom Toolbars and Widgets with no duplicates, I Think? as far as I can tell.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn