Quad Menu Preview

User avatar
clintonman
Captain
Posts: 5430
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Quad Menu Preview

Post by clintonman »

QuadToolbars03.jpg
Changed the name from "Quad Menu" to "Quad Toolbar"
Deactivated the code that modifies the toolbar buttons on the fly , adding the automatic closing action. This was eating up all the undos. Now the commands are baked into the buttons to begin with. Opening the 4 toolbars seems to eat up about 8 undos, closing them doesn't take any undos. The combination of open and immediately closing still seems to eat all the undos. Can't find the reason for that. Might have to give up on the auto closing or make it optional somehow.
Removed the close toolbars commands from the button right click. This was confusing since couldn't tell the difference between buttons with pre-existing right click from those with the added right click that only closed the toolbars.
Added a simple "pivot to selection" button in the snapping menu. It's the same as holding P + LMB on the PE widget.
Might remove the lathe tool in the future since it doesn't really qualify in my mind as a point edit tool, more like a utility function.

Edit: Removed the attachment.
I found out why the undos disappeared. There is a move window command that places the toolbars in the quad configuration. When the toolbars are closed truespace cant undo the move so it gets stuck. Found the same thing while trying to use toolbar prototypes. After opening the toolbar it is renamed. After closing the toolbar the undo tries to undo the rename, but the toolbar doesn't exist anymore so the undo just gets stuck. I found it by watching the command history window. The best solution seems to be use toolbar prototypes which seem to have positioning built in and don't rename any nodes in the process. The close toolbar commands can be written to the toolbar buttons on the fly without effecting the undos.
Will try again tomorrow.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Quad Menu Preview

Post by trueBlue »

I am having some success using this

Code: Select all

WindowsManager.CloseToolbar('PEElementToolbar')
WindowsManager.CloseToolbar('PESelectionToolbar')
WindowsManager.CloseToolbar('PEModelingToolbar')
WindowsManager.CloseToolbar('PESnappingToolbar')

WindowsManager.OpenToolbarFromPrototype("PEElementToolbar",MouseX+186,MouseY-145,-1,-1)
WindowsManager.OpenToolbarFromPrototype("PESnappingToolbar",MouseX+255,MouseY-145,-1,-1)
WindowsManager.OpenToolbarFromPrototype("PESelectionToolbar",MouseX+100,MouseY,-1,-1)
WindowsManager.OpenToolbarFromPrototype("PEModelingToolbar",MouseX+255,MouseY,-1,-1)
I just do not understand how to process the button commands
User avatar
spacekdet
Captain
Posts: 1799
Joined: 27 May 2009, 15:00
Type the number ten into the box: 10
Location: On the day shift at the Utility Muffin Research Kitchen
Contact:

Re: Quad Menu Preview

Post by spacekdet »

"I just do not understand how to process the button commands"
This is the zeitgeist.
User avatar
clintonman
Captain
Posts: 5430
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Quad Menu Preview

Post by clintonman »

Changed to use toolbar prototypes to fix the undo problems.

Notes:
Found that modifying the button commands on the fly also made permanent changes to the prototypes, so it kept building on top of itself getting longer and longer.
The ID property of a toolbar has to be set before the close toolbar command works.
Saving a toolbar to disk or even copying a toolbar can cause all the buttons inside to disappear. I made a copy of the Toolbar Prototypes Encapsulator, emptied it out and stored my modified toolbars inside of it. This seems to help, but still a bit iffy. Like they say, "more research is needed", unless trueBlue has already cracked it.
The old way positioned the toolbars based on the size of the frame that contains them. The open toolbar command can set the size, but the frame doesn't exist before the command, so the sizes were hard coded. If the sizes change then the code will have to change to match it.
Attachments
Quad Toolbar Install.RsObj
(377.83 KiB) Downloaded 183 times
Clinton Reese

http://clintons3d.com
Post Reply