tS6.6 (Modeler) - recognizing active tool

Smart people ~ Great Scripts
User avatar
DesignDevil
Master Chief Petty Officer
Posts: 500
Joined: 22 May 2009, 08:52
Type the number ten into the box: 0
Location: Neuruppin, Germany, Earth.

tS6.6 (Modeler) - recognizing active tool

Post by DesignDevil »

Hi together,

today i found out a very interesting thing. On my way to find out which tool is active in the modeler (i.e. MOVE | SCALE | ROTATE ) i played a bit around with the Icon Helper and the Hotkeys for this.

My idea was to define hotkeys so that my plugin can activate this functions. Problem: I never know if the user has changed his hotkeys for this functions and the plugin doesn't should overwrite the user defined keys.

The next idea was to readout the truespace.key file and to find out which keys are defined for this. Problem: The file is just refreshed on the end of a trueSpace session. This means if the user changed the hotkeys until my plugin runs - i can not recognize the new keys.

Then i inspect the truespace.key file a bit more and played around and found the following interesting thing:

A few keys, or better functions, in trueSpace have always the same hotkeys - no matter if the user defines new keys for it !!!!!!!!

As example: The MOVE OBJECT tool has predefined the key "Z". If you open the Hotkey Editor and define 3 new keys for this function, let's say: "3","4" and "5". Then this keys will work. BUT, also the predefined key "Z" will work - very interesting !!!! You never can change this - it's a DEFAULT.

And this is THE solution to switch on one of these tools from within your plugin. It is easy to simulate a keystroke from within your plugin to choose the function you need ;)

BUT and here comes the "lame" thingy. The resisting problem is: how can i recoginze which function is still active? Well, if the user uses his hotkey(s) (or the standard hotkey) i could intercept all keystrokes sended to the trueSpace main window. After interpreting the truespace.keys file i could recognize which function the user has choosen.

The problem is: What if the user choose the function thrue the mouse (which are the most users will do)? In this case no flag, or whatever, is active to tells me (my plugin) what tool are active - and this is BAD - and i need a solution for this.

So please help me - give me ideas for this - thanks for reading - DD
I still use TrueSpace 6.6
Link: My Youtube Channel
Link: www.DesignDevil.de - Plugins, Tutorials and more about TrueSpace 6.6
User avatar
Emmanuel
Chief Warrant Officer
Posts: 670
Joined: 14 Jun 2009, 06:47

Re: tS6.6 (Modeler) - recognizing active tool

Post by Emmanuel »

Maybe you could start a poll to see who changed the default keys for MOVE/ROTATE/SCALE.
I guess this is a non-problem (unless you want to make the top-bug-free-plugin-of-the-year of course :D )

Personally, I didn't changed these hotkeys. Probably because I started 3D with tS :)
I only added keys for a few commands (4 or 5 max) that were icon-only.
User avatar
DesignDevil
Master Chief Petty Officer
Posts: 500
Joined: 22 May 2009, 08:52
Type the number ten into the box: 0
Location: Neuruppin, Germany, Earth.

Re: tS6.6 (Modeler) - recognizing active tool

Post by DesignDevil »

I believe you missunderstud what i want to say.

Again: it is NO longer a problem to set the functions MOVE | ROTATE | SCALE from within your plugin if you use the default hotkeys !!! Because the default hotkeys are always active. Also if the user set 3 new keys for every function, the default is still active !!! That's what i want to say.

In other words: You can, with this methode, activate the tool "MOVE" from within your plugin. But you can not recognize what tool is active in the moment if the user uses the mouse to activate the tool.

btw. Now that i found out this i still work on a methode to recognize also this - so stay here and wait until i got the solution - i'm on the best way :)
I still use TrueSpace 6.6
Link: My Youtube Channel
Link: www.DesignDevil.de - Plugins, Tutorials and more about TrueSpace 6.6
v3rd3
Lieutenant Commander
Posts: 1191
Joined: 21 May 2009, 20:04

Re: tS6.6 (Modeler) - recognizing active tool

Post by v3rd3 »

DD... the logic of the mouse problem to me would be the same for web sites.... somewhere there are functions for an object that has the mouse focus and the user clicking on the mouse... just like web sites.

Most likely this would require exploration of the windows api because it does not make logical sense that Cali would write their own tool.

hth
User avatar
DesignDevil
Master Chief Petty Officer
Posts: 500
Joined: 22 May 2009, 08:52
Type the number ten into the box: 0
Location: Neuruppin, Germany, Earth.

Re: tS6.6 (Modeler) - recognizing active tool

Post by DesignDevil »

PLEASE take a look here: vi ... f=4&t=1667
I still use TrueSpace 6.6
Link: My Youtube Channel
Link: www.DesignDevil.de - Plugins, Tutorials and more about TrueSpace 6.6
v3rd3
Lieutenant Commander
Posts: 1191
Joined: 21 May 2009, 20:04

Re: tS6.6 (Modeler) - recognizing active tool

Post by v3rd3 »

Har! Already did. Tested and responded......
User avatar
DesignDevil
Master Chief Petty Officer
Posts: 500
Joined: 22 May 2009, 08:52
Type the number ten into the box: 0
Location: Neuruppin, Germany, Earth.

Re: tS6.6 (Modeler) - recognizing active tool

Post by DesignDevil »

Ok, so finaly i would say thank you to all who try'd to help me.

I give up. Create new Widgets to control the Move, Rotation and Scaling in tS6.6 is impossible :(

But hey :) there are other stuff to do ... take a look -> here
I still use TrueSpace 6.6
Link: My Youtube Channel
Link: www.DesignDevil.de - Plugins, Tutorials and more about TrueSpace 6.6

Return to “Scripts and SDK”