Custom Player Background Widget

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.

Custom Player Background Widget // The Garage

1  2  |  

Post by trueBlue // Oct 25, 2006, 5:37pm

trueBlue
Total Posts: 1761
pic
Custom Player Background Widget and Loader

Added:
Middle Mouse button + Drag for 3D rotatation.
Right Mouse button + Drag to activate and move in 3D. (Player only)
Double click Middle Mouse button to reset default camera view. (Player only)

Installation Instructions:
Import the Custom Player Background Widget.RsLibObj into the Objects library.
Insert the Custom Player Background Widget Loader into the Link Editor.
Select the Load button to load the Wheel rotate.RsObj, Wheel ortho.RsObj, and the Walk.RsObj from the Objects/Custom Widget library.
Follow the recommended procedures for saving layouts and configurations.
Save current state.

IMPORTANT: Do not rename any of these files including the library or the script will not work.

Post by GraySho // Nov 1, 2006, 6:41am

GraySho
Total Posts: 695
pic
Excuse my ignorance, but how do I load your object. In the object Library I can only load RSobj files. If I choose "Any files" in the filetype dropdown and load it, I get a brick but no load button. I'm very interested in this, I haven't found out how to get the eye-rotate to work in player without using a widget.

Post by GraySho // Nov 1, 2006, 6:43am

GraySho
Total Posts: 695
pic
Sorry, obviously it's a library, figuered that out. The library system is quite confusing.


Edit: Allright, got it to work. Now I've modified everything to behave like in Silo (Alt + Mouse to navigate).


:banana:

Post by trueBlue // Nov 1, 2006, 7:11am

trueBlue
Total Posts: 1761
pic
:cool: Cool GraySho! I have never used Silo, what changes did you make that reflect Silo's UI?
You know that if you Reset the default context, you will have to install everything that you customized again, right? Unless you overwrite your Widgets and or Toolbars.

Post by GraySho // Nov 1, 2006, 7:43am

GraySho
Total Posts: 695
pic
I changed it to:


Alt+LMBdrag = rotate view

Alt+MMBdrag = move view

Alt+RMBdrag = zoom view

Alt+Mousewheel = zoom view


Also, I changed the select background widget, so "shift" adds to selection, "Ctrl" subtracts from selection (like in PSP). No need to reinvent the wheel.


I got Silo just recently, but found that navigation setup very intuitive for modeling, it's not necessary to move the cursor from the object when doing adjustments to an organic model. A real timesaver.


I found the Alt/Ctrl/Shift State objects while browsing the UI components library and thought that must be it. I was right :)

Post by parva // Nov 1, 2006, 8:09am

parva
Total Posts: 822
pic
you got Alt+RMB drag for zooming to work?
Have you spotted "Move"-locking?

Because this are the two problems I spotted on and just in the newer Betas the "move"-locking problem is solved. ;)

Post by GraySho // Nov 1, 2006, 8:16am

GraySho
Total Posts: 695
pic
Not sure what you mean Parva. Zooming with RMB works very well. I just have problems with "move view". I used trueBlue's walk node and exported the coordinates, linked them to screen coordinates and it behaves like in silo. The problem is, sometimes it works, sometimes it doesn't. I have to try a few times, and suddenly it's working again.

Post by parva // Nov 1, 2006, 8:23am

parva
Total Posts: 822
pic
I tried zooming with the linear move brick but it didn't work. I got it just to work with the constrained linear move brick but I have to enable X and Y before I can use it (deactivating Y again so that only X is enabled and zoomes the view) but Tomas told me that I have to use the axis swap brick previously but this didn't work also. Another problem is that the function becomes reset by program start.

I know the distortion zoom works but I don't like this type of zooming because you can't zoom far out without view distortion but I wanted a zoom like in SILO.

The move problem I know. Sometimes it locks and you have to use another key first, sometimes it works sometimes after some time (what a speech ^^).
Tomas has fixed this. Don't know what the problem was.

Post by trueBlue // Nov 1, 2006, 8:23am

trueBlue
Total Posts: 1761
pic
I have to select the middle mouse button to refocus the control sometimes. Sure would like to see what you created GraySho, hint... hint!

Post by parva // Nov 1, 2006, 8:27am

parva
Total Posts: 822
pic
btw. the cool thing with these self building controls it that you can control the speed of the view controls also! As far as I know no other program offers this ^^
and *ad on* try the widget course ;) *ad off*

Post by GraySho // Nov 1, 2006, 8:38am

GraySho
Total Posts: 695
pic
Here's what I have "edited". In Widgets>Tools> delete "Background" and drag mine into the LE. Do that on your own risk :D

Post by trueBlue // Nov 1, 2006, 9:50am

trueBlue
Total Posts: 1761
pic
The file that you posted is a Library item. I think that you will have to Export your whole library where you have your customized widgets stored. Right click and choose Export library from the title bar of that library. Or you can navigate to System/Widgets/Tools/ and select Background then Insert object into the Objects library. From there you can Export the Background to disk.

Post by GraySho // Nov 1, 2006, 10:27am

GraySho
Total Posts: 695
pic
Ah, right. I did not export the item, just uploaded the item from the folder. As I said, the library system is confusing me :rolleyes: Fixed that in my other post.

Post by trueBlue // Nov 1, 2006, 9:27pm

trueBlue
Total Posts: 1761
pic
Well my idea to export your Background and exchange it with mine would not work on my PC. Unless there is a way that I do not know of, replacing a customized Background does not activate it. There is a node "Active Widgets Layer2" that has the current Background widget that was used last. The only way that I have found that works instantly is to write a script that deletes the old components, loads the new components, connect the connections, and then use the command Space.Unselect(); at the end of the script.
After examining your widget that you posted, I noticed that the wheel zoom did not work in perspective view, there was no Alt + RMB zoom hooked up. So I took the liberty to fix it the way I think you had intended. With the exception of Alt + RMB zoom in which I did not even attempt. I added a node called "Synchronize widget with selection" which seems to improve your widget.
That said Graysho you created a great Background widget it works really good!

Post by stan // Nov 2, 2006, 4:26am

stan
Total Posts: 1240
pic
The problem is, sometimes it works, sometimes it doesn't. I have to try a few times, and suddenly it's working again.

something to note..the background widgets don't work when you have camera move, rotate or zoom active..not sure how to over-ride that..

Post by tomasb // Nov 2, 2006, 7:50am

tomasb
Total Posts: 261
something to note..the background widgets don't work when you have camera move, rotate or zoom active..not sure how to over-ride that..

these will be fixed in next version. the problem is, that camera Z vector when projected to screen is 0 length which causes the problem. you can try to use orientation input of background widget to rotate the coordinate system to move it away from degenerated case.

Post by GraySho // Nov 2, 2006, 9:08am

GraySho
Total Posts: 695
pic
I just investigated my widget and found out that it doesn't work anymore. Like trueBlue said, mwheel zoom doesn't work. The alt RMBdrag zoom was vanished. I added it again, exactly like before, but it doesn't work. I guess that's the issue Parva mentioned. It seems to me that it isn't as simple as I thought.


Like Stan said, if the buttons for camera move, rotate and zoom are used, background widgets are overridden. The only way to fix that was to switch to modeler and back to player. I'm quite frustrated what a struggle it is to make just basic things work. Why not using a simple dialogue box to change keyboard shortcuts and mouse setup?

Post by parva // Nov 2, 2006, 9:26am

parva
Total Posts: 822
pic
the prob with the camera and world move icons/tools is that there is no "deactivate" function. If you press the button you can't deselect it. In previous versions we have this arrow icon or just a hit at the space bar which resets this but in tS7 Player there is no such thing :rolleyes:
...really annoying.

I'm with GraySho. There is the focus on animation system and even the simplest "basic" features don't work!
A bit like bridle a horse from behind.

edit: I took a look at GraySho's background widget. There are some things which aren't needed - "one from three select" brick in rotate brick for example. The reason why zoom don't work is simple, it's connected to the ortho not to the perspective node ;)

Post by stan // Nov 2, 2006, 10:24am

stan
Total Posts: 1240
pic
if the buttons for camera move, rotate and zoom are used, background widgets are overridden. The only way to fix that was to switch to modeler and back to player. I'm quite frustrated what a struggle it is to make just basic things work.

just click on object move, rotate or scale to re-axtivate your background widget..actually if you get a good background widget setup you may never click on camera move, rotate and zoom icons again :D

Post by trueBlue // Nov 2, 2006, 10:36am

trueBlue
Total Posts: 1761
pic
I took a look at GraySho's background widget. There are some things which aren't needed - "one from three select" brick in rotate brick for example. The reason why zoom don't work is simple, it's connected to the ortho not to the perspective node ;)
:rolleyes: What I did was add another for the perspective view so that you can zoom in both views.

Post by trueBlue // Nov 2, 2006, 1:47pm

trueBlue
Total Posts: 1761
pic
@ GraySho: Here is a script that will create your Silo Style background widget. The only thing different from what you proposed is Alt+RMB+drag = Zoom is not included. I left the defaults as they were. Hope this helps!

Customized Background Widget - Silo Style

Alt + LMB drag = Rotate view
Alt + MMB drag = Pan view
Mousewheel = Zoom view
Double click MMB = Reset view
Optional
Shift + LMB = Adds to selection
Ctrl + LMB = Subtracts from selection

Installation Instructions:
Import the Background Widget Silo Style.RsLibCmp into the UI library.
Insert the Background Widget Silo Style Loader into the Link Editor.
Select the Load button.
Follow the recommended procedures for saving layouts and configurations.

Note: "Reset the default context" will remove this customized widget.

IMPORTANT: Do not rename any of these files including the library or the script will not work.

This script loads and connects all components from the UI library and it assumes that you are customizing the default Background widget that ships with trueSpace7.11. If you have any other nodes with different names other than what is in the picture below you should delete them. I personally Reset the default context before running this script, which is the one that ships with trueSpace7.11. That said use this at your own risk!

Post by Steinie // Nov 2, 2006, 2:00pm

Steinie
Total Posts: 3667
pic
Well we have "Stan the Man" and now I think I'll name trueBlue "Voodoo Doctor"!
Your always mixing up these great concoctions that are awesome! Thanks for all your work!!!!
Steinie

p.s.
Gord, (Stan the Man)
I didn't realize how gifted you are untill I read about you in the "Loyal Users".....how about some more great renderings?

Post by trueBlue // Nov 2, 2006, 2:16pm

trueBlue
Total Posts: 1761
pic
Thank you Steinie! But all credit goes to GraySho for his great idea for a backgound widget. Now if I can figure out a way to make a Deselect everything button.
:confused:

Post by GraySho // Nov 2, 2006, 2:21pm

GraySho
Total Posts: 695
pic
Gonna try that out. I can't really take credit, I have just modified stuff that was done by others.

Post by stan // Nov 2, 2006, 4:40pm

stan
Total Posts: 1240
pic
yes the elusive unselect..
this doesn't seem to work ..it should as is..:confused: :confused:
HRESULT IRiSpaceCommand::Unselect ( void ) Unselect everything.

Thanks Steinie..working on a widget kit at the moment..:D

Post by Alien // Nov 2, 2006, 9:28pm

Alien
Total Posts: 1231
pic
I realise it's a bit of a kludge, but 1 thing that ought to work [even in player, I just tried it manually] is to create [or insert from a library] a new object, then delete it. So you could have your widget/button/whatever just create a small cube & then immediately delete it - has the same effect as space bar in Model.

Post by trueBlue // Nov 3, 2006, 2:29pm

trueBlue
Total Posts: 1761
pic
yes the elusive unselect..
this doesn't seem to work ..it should as is..:confused: :confused:
HRESULT IRiSpaceCommand::Unselect ( void ) Unselect everything.

This seems to work:

function Execute(params)
{
Space.Select('');
}

Post by stan // Nov 3, 2006, 2:48pm

stan
Total Posts: 1240
pic
cool trueblue..that works..:banana: but not with icons like unslecting camera move..

Post by prodigy // Jan 16, 2007, 3:01am

prodigy
Total Posts: 3029
pic
Trueblue..


let me know if im doit something wrong...


1) load the Custom Widget.RsLibObj into the Object Library..

2) Drag the Custom Background Widget Loader to the Link Editor..

3) Press Load...


When i do this steps an error event happend..

Source Object:/ custom Background Widget Loader

Error: Execution time error Microsoft JScript

Description: Call or Argument to procedure not valid

Error Code: 0x800a0005 - Null

Line : 6, char: 1

Script Text: library.createDelegate("objects","Custom Widget","wheel rotate","/widgets/tools/background");



Thats all..


Thanks for any help

Post by trueBlue // Jan 16, 2007, 6:32am

trueBlue
Total Posts: 1761
pic
If you right click one of the Object Library's title bar select Import Library.
Should look like this.
Error means could not find the Wheel Rotate. You can not rename these file either.
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