SDK plugin findings

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

Re: SDK plugin findings

Post by clintonman »

All the snapping buttons work now, with the first 3 working at 100%... Nearly 100%, no work has been done yet to address random rotations around the normal direction when using face to face snapping.

threeCursors.jpg
threeCursors.jpg (22.02 KiB) Viewed 82 times
These are the cursors for object picking, triangle/face picking and point picking widgets. The images for cursors are interesting. They are 32bit files 24x24 pixels with a white alpha channel. The transparent parts are defined by the purple/pink background color (255,0,255), but it still has to have the alpha to work.

The object picking widget was tricky. I had to make a modified object nav widget and make temporary changes to the background widget that does selections. Had to try a few things before finally getting something that worked without any problems or glitches. It's kind of a 2 state widget in that when it starts nothing is selected so it needs the selection widget setup with the proper behavior and cursor and then after something is selected the object nav widget takes over keeping the same cursor. Both have custom RMB mouse click for cancelling the process.

testbutton.jpg
testbutton.jpg (18.97 KiB) Viewed 82 times
The buttons will likely look something like this. It's an ordinary toolbar button that's been stretched out to make room for text. I tried using the built-in text form of the buttons but they are limited in the number of characters they can display. Also thinking of having swap-able images so can also use standard buttons.
Clinton Reese

http://clintons3d.com

User avatar
trueBlue
Captain
Posts: 2986
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: SDK plugin findings

Post by trueBlue »

I tried using the built-in text form of the buttons but they are limited in the number of characters they can display.
If you want to use text only with no bitmaps...
With the first button, make sure there is no LMB command. RMB command is okay.
Then all of the buttons inside the above button can be as long as the entered text in the Name attribute
Nested text button.png
The toolbar needs to be in 2D
Look at the Link Editor toolbar
LENtB.png
LENtB.png (10.11 KiB) Viewed 73 times
I really like this setup because, when you click on the first button, the flyout stays open

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

Re: SDK plugin findings

Post by clintonman »

Awesome, thanks for the tip!
Clinton Reese

http://clintons3d.com

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

Re: SDK plugin findings

Post by clintonman »

Getting closer to release :D
I added multiple selection to most of the functions.

Multiple source objects will snap several objects with the option to maintain their spacing or just snap all to the destination point.
Multiple destination object will snap the source to the center of the selection.

The face to face, pe to points, and points to points snapping don't have the multiple selections. The face and vertex picking widgets only work with a single object at a time and pe selections are just the 1 pe selection.

I also started testing the toolbar customization. I can set horizontal or vertical and 2d image or basic text with script and a plugin function. The only test left for the toolbar is setting the button images on the fly. If it works out there will be options for standard icon buttons, full text buttons as described by trueBlue above and the icon + text buttons I mentioned earlier.
Clinton Reese

http://clintons3d.com

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

Re: SDK plugin findings

Post by clintonman »

WideIcon.jpg
image shows toolbar buttons in order:
left to right is the face and point, object, axis, point edit and joint snapping groups
the icons are not the latest versions

In the home stretch now. All the snapping functions are tested and working. Finalized the toolbar button designs and created the icon plus text button images.

The short todo list is to make a custom toolbar switcher, investigate an up axis for face to face snapping consistency, add a cleanup script for the custom picking widget and button states. Cleanup is needed because... I think I just thought of a way around that, so cleanup script may not be needed after all. No, cleanup will be needed for extreme cases anyway. Need to take into account the possibility of a user doing something like closing truespace, truespace crashing, doing something random like starting a hair tool in the middle of the snap process.
Clinton Reese

http://clintons3d.com

Post Reply