SDK plugin findings

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

Re: SDK plugin findings

Post by clintonman »

VertexAndTriangleSelectionWidgets.jpg
Vertex and Triangle Selection - NOT in point edit mode

Finally got it working. :superbanana: The widget highlight for the triangles uses edges and a center point to indicate hover state and selected triangles. Selected and hover triangles are slightly smaller than the actual triangle so if one triangle in a group isn't selected it can be seen. The hover triangle is also slightly smaller than the selected triangle so they can both be seen on the same triangle. Solid highlighting isn't practical because the marker triangle only has one color, making it impossible to tell if a triangle is selected or in a hover state or both. Right now green is selected and yellow is hover for both the vertex and triangle selections. Both widgets write to the same script node. The name of the node and the vertex or triangle indices are passed to it in the Node string connector. The widget uses the trueSpace standard of ctrl to add to a selection and shift to remove from a selection.

Next up is to clean up the code and make something from it.
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: SDK plugin findings

Post by trueBlue »

Awesome! :worship:
Workspace's PE Snapping highlight color is light blue, if you wanted to match tS :mrgreen:
User avatar
clintonman
Captain
Posts: 5430
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: SDK plugin findings

Post by clintonman »

trueBlue wrote: 10 Oct 2020, 04:47 Awesome! :worship:
Workspace's PE Snapping highlight color is light blue, if you wanted to match tS :mrgreen:
My first thought was to match or read the pre-existing trueSpace options. I decided to add color choices and point size to the script node instead.
Clinton Reese

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

Re: SDK plugin findings

Post by clintonman »

nurbsToolbar.jpg
NURBS Toolbar with patch mesh
New buttons are for circle, expand selection, contract selection, NURBS primitive from mesh primitives and patch file scripts

The expand and contract were added from the original trueSpace release because of odd behavior of the patch control point mesh(only lines and points visible). Test shows it didn't solve the problem so they will be removed.

Found a tS crash bug. I saved a NURBS patch from model side as ascii format cob file. If tS display is wireframe and I read the file back in tS crashes. If the bridge is off there is no crash, but turn it on and it crashes. Thes bug shows in tS7.6 and 7.61. No crash in tS7 or 6.
Clinton Reese

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

Re: SDK plugin findings

Post by clintonman »

facetofaceNodesBeforeAfter.jpg

Got the face to face no point edit mode working as before.Image shows the before(below) and after(above) node networks. The new one has less than half as many nodes. Had to zoom out to make it fit.

Next I want to change the method so it doesn't depend on pivots and flattened mesh nodes.
One more thing it should work as is with lights and cameras now because no need for point edit.
Clinton Reese

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

Re: SDK plugin findings

Post by clintonman »

facetoface_v2.jpg

The face to face rewrite is working 100%! :superbanana: Image shows final code down to just 8 command nodes and easier to understand than before.
The snapping works with lights and cameras.
No point edit mode needed and it works with the pivot/axes.
I should have something published by tomorrow. :D
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: SDK plugin findings

Post by trueBlue »

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

Re: SDK plugin findings

Post by clintonman »

Notes for the new widget can be found at the bottom of this page:

http://clintons3d.com/plugins/truespace ... index.html
Clinton Reese

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

Re: SDK plugin findings

Post by clintonman »

unorderedSnappingToolbar01.jpg
New snapping toolbar, pre-release version
The triangles represent mesh triangles, the cubes represent objects, 3 green dots are for points on an object, ball and arm are for joints, orange square with green dots represents point edit selection and the axes are 3 rectangles

The first 6 buttons are already working.


This is meant as a replacement for the face to face snapping tools and the object vertex snapping tools. Several now use the point picking widget and a modified selection widget who's RMB action has been changed to confirm a selection instead of taking an item into point edit mode.
From left to right:
face to face - move one object so it's selected face aligns with another objects selected face
object to object - snapping the position of one object to another
object to points - snap object to the selected points of another object
axes to object - snap the axes of an object to the center of another object
joint to object - snap a joint to the object center
point edit to points - snap a point edit selection to points on another object
axes to pe selection - same as the unofficial update widget shortcut for snapping the axes to a point edit selection
joint to points - snap joint the the points of another object
axes to points - snap axes to points on another object
points to points - snap one object to another based on point selections
pe selection to object - move pe selection to the center of another object

My todo list includes making the last 5 buttons operational , changing the order of the buttons and the design of the buttons. I think one change I already have in mind is to replace the 3 dots with a cube with a dot to represent object point picking.
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: SDK plugin findings

Post by trueBlue »

:idea:
Break it down into toolbar tools (Which could have a learning curve what I icon does)

Object Snap
Face Snap.png
Face Snap.png (851 Bytes) Viewed 2269 times
object to object - snapping the position of one object to another
face to face - move one object so it's selected face aligns with another objects selected face

Vertex Snap
Vertex Snap.png
Vertex Snap.png (872 Bytes) Viewed 2269 times
object to points - snap object to the selected points of another object
point edit to points - snap a point edit selection to points on another object
points to points - snap one object to another based on point selections

Axis Snap
Axis Snap.png
Axis Snap.png (1.34 KiB) Viewed 2269 times
axes to object - snap the axes of an object to the center of another object
axes to pe selection - same as the unofficial update widget shortcut for snapping the axes to a point edit selection
axes to points - snap axes to points on another object

Joint Snap
Joint Snap.png
Joint Snap.png (1.14 KiB) Viewed 2269 times
joint to object - snap a joint to the object center
joint to points - snap joint the the points of another object

?
pe selection to object - move pe selection to the center of another object

Instead of toolbars use a Panel (Easier to understand what a button does)
Snapping panel.png
Snapping panel.png (6.08 KiB) Viewed 2269 times
And... really cool!
Using Stan's mouse icons with your widgets
Source
Source.png
Source.png (6.2 KiB) Viewed 2268 times
Target/Destination
Target.png
Target.png (5.7 KiB) Viewed 2268 times
Post Reply