Has anyone experience with the tsx Mouse Tool functions?
I have some problems with that to get it to work or, to tell the truth, to understand the functionality.
Example:
I can setup the Callback routines by using the tsxMtoolInstall function and i get the tsxMTM_ACTIVATE and tsxMTM_CREATE messages etc.
No problems so far. But if i select a other object in the scene the MouseTool is deactivated (i get the message tsxMTM_DEACTIVATE) instead the tsxMTM_SELECT message - what i would expect in this situation.
I got also the deactivate message for other reasons like, choose the MOVE, SCALE or ROTATE TOOL, entering the edit mode etc.
On the other hand i have tried to register the Mouse Event functionality by the tsxRegisterEventCallback. Here the callback stays resistend but here i never get Messages like tsxMTM_OBJNAVMODE or tsxMTM_SELECTIONMODE etc. and also i get no "extra data" for the tsxMTM_NAVMODE message.
In conclusion - anything is wrong...or in other words... how the f**k can i get this to work properly???????
Thanks in advice.
BTW - we need urgently more experts to get more discussions here and to get more experience.
[TS6.6] tsx Mouse Tool
-
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] tsx Mouse Tool
I still use TrueSpace 6.6
Link: My Youtube Channel
Link: www.DesignDevil.de - Plugins, Tutorials and more about TrueSpace 6.6
Link: My Youtube Channel
Link: www.DesignDevil.de - Plugins, Tutorials and more about TrueSpace 6.6
-
stan
- Master Chief Petty Officer
- Posts: 584
- Joined: 21 May 2009, 17:20
Re: [TS6.6] tsx Mouse Tool
this is only mousetools I ever got to work, don't know if it helps..
BOOL SelectMtoolMsg(tsxMousetool *mt,short msg,short x,short y,short data)
{
return TRUE;
}
// Callback type for mouse events
BOOL SelectMtoolClick(tsxMousetool *mt,short x,short y,short flags)
{
tsxPOLYHEDRON* pPolyh = (tsxPOLYHEDRON*)tsxGetCurrentSelection();
// invoke the Lasso selection tool.
if ( (flags & tsxMTF_SHIFT) == tsxMTF_SHIFT)
tsxMtoolLassoSelection(mt, x, y, flags, tsxSELECT_FACE|tsxSELECT_ADD);
else
if ( (flags & tsxMTF_CTRL) == tsxMTF_CTRL)
tsxMtoolLassoSelection(mt, x, y, flags, tsxSELECT_FACE|tsxSELECT_SUBTRACT);
else
tsxMtoolLassoSelection(mt, x, y, flags, tsxSELECT_FACE|tsxSELECT_REPLACE);
tsxMtoolRemove(theApp.PluginID);
return TRUE;
}
void OnWiggle()
{
tsxMtoolInstall(theApp.PluginID, SelectMtoolMsg, SelectMtoolClick);
}
BOOL SelectMtoolMsg(tsxMousetool *mt,short msg,short x,short y,short data)
{
return TRUE;
}
// Callback type for mouse events
BOOL SelectMtoolClick(tsxMousetool *mt,short x,short y,short flags)
{
tsxPOLYHEDRON* pPolyh = (tsxPOLYHEDRON*)tsxGetCurrentSelection();
// invoke the Lasso selection tool.
if ( (flags & tsxMTF_SHIFT) == tsxMTF_SHIFT)
tsxMtoolLassoSelection(mt, x, y, flags, tsxSELECT_FACE|tsxSELECT_ADD);
else
if ( (flags & tsxMTF_CTRL) == tsxMTF_CTRL)
tsxMtoolLassoSelection(mt, x, y, flags, tsxSELECT_FACE|tsxSELECT_SUBTRACT);
else
tsxMtoolLassoSelection(mt, x, y, flags, tsxSELECT_FACE|tsxSELECT_REPLACE);
tsxMtoolRemove(theApp.PluginID);
return TRUE;
}
void OnWiggle()
{
tsxMtoolInstall(theApp.PluginID, SelectMtoolMsg, SelectMtoolClick);
}
-
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] tsx Mouse Tool
Well, this solves not the problem, but it helps and shows how i get the Lasso etc. to work.
THANKS A LOT.
THANKS A LOT.
I still use TrueSpace 6.6
Link: My Youtube Channel
Link: www.DesignDevil.de - Plugins, Tutorials and more about TrueSpace 6.6
Link: My Youtube Channel
Link: www.DesignDevil.de - Plugins, Tutorials and more about TrueSpace 6.6