selectionbox widget issue

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.

selectionbox widget issue // Scriptorium

1  |  

Post by stan // Oct 18, 2006, 7:26am

stan
Total Posts: 1240
pic
how do I get this selectionbox widget to properly follow the object :D

it was added to my custom widget

also how do you get it to run independently. I couldn't figure out how to activate it on it's own

Post by Asem // Oct 18, 2006, 9:00am

Asem
Total Posts: 255
how do I get this selectionbox widget to properly follow the object :D

it was added to my custom widget

also how do you get it to run independently. I couldn't figure out how to activate it on it's own




When you say follow do you mean when you rotate the view the widget should also rotate as if your looking at it from behind? and are you using screen coord or perspective coord? if you mean just follow you might want to just use perspective coords without a docking widget. a world the screen coord converter then input the values for x,y on the dock offset(x,y). A script that finds the current mesh selected then attaching its position(matrix) to the position(matrix) of the widget as a whole(I'm thinking the object is kinda on a hierarchy).

To make it run independantly(I'm thinking you mean run without the other move widget down next to the object) why not try to script and deactivate the node? or find the area in the LE where the move tool is and do the same for your current widget and take the original out(move widget) that way its supposed to activate with whatever widget that you specified.

activate on its own?

hope that makes since and trying to give suggestions(hope I'm not confusing myself :rolleyes:)

Post by stan // Oct 18, 2006, 9:16am

stan
Total Posts: 1240
pic
by foillow I mean like it does in model..the widget follows minbounds and maxbounds of the bounding box..

sofar it reacts to the different coord systems properly..

Post by Asem // Oct 18, 2006, 6:17pm

Asem
Total Posts: 255
Stan I found a way so that the cage surrounds the object. Below is th result. I took all the eulers of all the cage widgets objects and hooked all together that controlls them all. so by simply increasing the sx,sy,sz of the newly hooked up euler you can increase the size correctly. At this point it was the only thing I could think of.:)

The newly enlarged cage and the euler that controlls the size of the cage is "Overall Size of Cage".

"Overall Size of Cage" scales are set to 2.

edit:
I didn't realize that when you scale the object itself the cage does not scale with which means the "Overall Size of Cage" needs to be hooked up to the
currents objects xyz scale.

Post by Asem // Oct 18, 2006, 9:12pm

Asem
Total Posts: 255
I ran into wht might be another problem (because I really think it should have worked). I grabbed the Scene Object Inspecter so that when it is started it would find the current selected object and give its sx,sy,sz (and others) to be able to link it. I then use the binary operations to give the scale an increased offset of 1 that way the cage would be bigger than the object. Now here's the weird thing... It won't take the data in(I think for some reason its because part of the scene inspector was done because of a script?). It makes the object completely disappear when I link the correspong sx,sy,sz's and when I unlink them it appears again that doesn't make sense. I hope the developers check this out (could it be for some reason the euler node won't take te data correctly or something)?

Well this was the only solution I could think, technically I could shorten it to make sure the script just grabbed the sx, sy, sx of the current object but probably won't be of much use unless this works. The "Overall Size of Cage" node updates correctly but for some reason makes the cage disappear. maybe a another bug?

It should be like the picture in my previous post and actually work when the user scales the object but because of "Object information"(which is active) node it won't work?

Don't forget to click on the object so it knows what is selected.

Post by stan // Oct 19, 2006, 3:44am

stan
Total Posts: 1240
pic
thanks Asem.. I had tried using parts of the object info panel too, but with no sucess.. :)

Post by Asem // Oct 20, 2006, 10:55pm

Asem
Total Posts: 255
Stan, after a lot of trial and error I found out how to fix your widget and work independant of itself. The upload has a file called Custom Widgets.zip which has a folder of the 3 Widgets (I also made the original default widget aprt of the groups of widgets :)). This took some time to figure out as it really bothered me that it was working correctly :D. ts7 also crashed a few times and for some weird reason deleted my objects when I drag and droped them but I backed them up and ts7 works the way it's supposed now lol. It's pretty neat and I'm actually using these object navigation widgets.

If you want to know how I got it to switch the way it does look at the middle LE part of picture 2. also I wasn't necessarily sure if that sphere for the cage was supposed to do anything (which It doesn't for what I can see) and I didn't really properly try to find a way for to anchor/set itself correctly in the corner of the cage.

The 3 types of widgets are activated by Left-Click (Upper Left), Middle-Click (Upper Right), and Crtrl+Middle-Click (Bottom).

The top picture shows you the different widgets.
The bottom picture shows the where the node needed to create them go (the top portion of the picture shows were the put the imported widget objects the rest is for info). There is also the history to show that it does work!

Files:
- TRS_Navi.RsObj (TRS = Translate, Rotate, Scale)
- Cage_Navi.RsObj
- Default Widget.RsObj

edit:
- Though the cage works well when scaling, moving, rotating by itself, it doesn't get the objects true scale when you go into point edit mode and use the sweep tool or anything that moves the objects original position of vertices and then go out of point edit mode. (oh man is there no end now this is going to bug me :D )

Post by stan // Oct 21, 2006, 7:52am

stan
Total Posts: 1240
pic
Asem, thanks so much.:banana:

learned alot looking at your examples..in minutes I had my custom widget working with the selection cage..all I did was link the 'Enter cage navi mode' up in my widget , put "Cage_Navi" into Widgets/Select and it works..no crashing or problems..not sure why it won't follow the bounding box properly thought ..but it's better that before..haven't hooked it up in my edit widget yet..

one thing when exporting widgets do it from the 'Widgets Library' section of 'UI' library ,it saves them as ".RsCmp" [the proper widget extension] otherwise it causes problems when trying to swap widgets that were loaded as '.RsObj'..

also I wasn't necessarily sure if that sphere for the cage was supposed to do anything (which It doesn't for what I can see) and I didn't really properly try to find a way for to anchor/set itself correctly in the corner of the cage.

right clicking the sphere closes widget..
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