New NURBS tools

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

Re: New NURBS tools

Post by trueBlue »

I have another request :mrgreen:
primitivePatchScript
Add an option to paint the patch with the current Material Editor's material before creating it

Code: Select all

ScriptObject.RunCmd("mesh modifiers package/repaint material command", "Selection", "/Scripts/CustomCommands/NURBSScripts/polypatch/LODMesh", "Material index", 0)
The Freeze NURBS Question hides behind the tS Interface
Freeze NURBS Question.png
Freeze NURBS Question.png (7.68 KiB) Viewed 2193 times
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: New NURBS tools

Post by clintonman »

Everything so far attached below.

Added Select All Geometry to the utilities prep tab. I kept having problems until I realized I couldn't select because of back faces
Added paint current material to the patch creation scripts - a trueBlue request

Also included is a temporary installer for the "Guard" script meant to replace the DeSelectNURBS script which also deselected cameras and lights.
The difference is that it only deselects when creating polygon primitives that are not in factory mode of "Object". In all other cases it keeps the selection and does not run the tool. It replaces status message errors with alert boxes. The installer also replaces all button commands that use "DeSelectNURBS". It also corrects 3 errors in the buttons, but only inside the Toolbar Prototypes:
"/PointEditToolsBar2/targetWeldButton" and "/ClintonsPointEditToolbar/targetWeldButton" are setup to close a quad menu
"/ClintonsPointEditToolbar/normalMoveButton" normal move works with NURBS so deselect/protection isn't needed

Default context replaces the node inside the /Widgets/Edit

The "New Protection Test" installer for the Guard script and toolbar changes is not permanent. Any open toolbars need to be set aspect 1D then back to 2D to activate the changes.
Attachments
Default context.RsObj
(70.48 KiB) Downloaded 119 times
NURBSToolbar.RsObj
(219.1 KiB) Downloaded 123 times
NURBSScripts.RsObj
(2.74 MiB) Downloaded 120 times
Last edited by clintonman on 31 Jul 2021, 00:52, edited 1 time in total.
Clinton Reese

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

Re: New NURBS tools

Post by clintonman »

Bug fix:
New Protection test needed one of the lines of code removed. It would try to find a file that does not exist on your system.

edit: removed attachment
Last edited by clintonman on 03 Aug 2021, 17:17, edited 3 times in total.
Clinton Reese

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

Re: New NURBS tools

Post by clintonman »

Post for a list of "final" changes

toolbar buttons changed some help text
removed duplicate rmb command from utilities button
move origin button to the right of the sharp handles button

started cleaning the code and changes to use new Guard location in nurbs utilities
updated New Protection Test to use Guard in CustomCommands instead of Commands
started replacing trueSpace alerts with more reliable custom alerts

added trueBlue show curve name for the lodmesh
curve freezing now always shows the edges as visible to avoid confusion of "invisible" faces (polygon facing away)
fixed a crash bug in the grow selection
polygon2curve prevent run on nurbs objects (crash bug)
circle scripts all done, fixed 3 point circle to check for a selection that is in a line - can't make a circle from that
nurbs prep for modeling panel, Set Mesh Editor button added Rect and Lasso select uncheck connected option

everything done except loading and saving files and change the toggle uv indicators to work on multiple selections
Last edited by clintonman on 31 Jul 2021, 01:24, edited 6 times in total.
Clinton Reese

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

Re: New NURBS tools

Post by trueBlue »

I have updated the Material Inspect widget and added a script that will select a NURBS' LODMesh
I updated the polycurve & polypatch nodes so that when the LODMesh is selected it shows the LODMesh's owner name
LODMesh owners name.png
LODMesh owners name.png (8.86 KiB) Viewed 2170 times
polycurve & polypatch
Renamed nurbsNameDisplay to Owner and Exported the Default aspect

freezePatch2
Change
// Node.Delete(newmesh + "/nurbsNameDisplay")
Node.Delete(newmesh + "/Owner")

freezeCurve, 2
Change
// Node.Delete(newmesh + "/nurbsNameDisplay")
Node.Delete(newmesh + "/Owner")
Attachments
polypatch.RsObj
(78.31 KiB) Downloaded 119 times
polycurve.RsObj
(82.88 KiB) Downloaded 119 times
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: New NURBS tools

Post by clintonman »

trueBlue wrote: 29 Jul 2021, 14:54 I have updated the Material Inspect widget and added a script that will select a NURBS' LODMesh
I updated the polycurve & polypatch nodes so that when the LODMesh is selected it shows the LODMesh's owner name
LODMesh owners name.png

polycurve & polypatch
Renamed nurbsNameDisplay to Owner and Exported the Default aspect

freezePatch2
Change
// Node.Delete(newmesh + "/nurbsNameDisplay")
Node.Delete(newmesh + "/Owner")

freezeCurve, 2
Change
// Node.Delete(newmesh + "/nurbsNameDisplay")
Node.Delete(newmesh + "/Owner")
Works great.
Clinton Reese

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

Re: New NURBS tools

Post by trueBlue »

In the upcoming UU7, I setting the Mesh Origin 'Indicator' , Origin's Visible attribute = false
So I would recommend that you update the:
NURBSToolbar/setOriginButton

HelpText = Set - Mesh Origin to Control Point / Mesh Origin

RClickCommand = UserInterface.OpenToolPanelViewEx2("" , "" ,"Scripts/CustomCommands/MeshOrigin/Mesh Origin Scripts", 3, 1, 0);
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: New NURBS tools

Post by clintonman »

New post to keep track of nurbs import export changes:

patch import export is working
curve import - tS curves working, svg curves remove code that skips layer0 which I think was needed with earlier inkscape files, causes an error now

just realized forgot to go through all the utility buttons
TODO - svg polygon import auto flip should be possible?

freeze nurbs more undo friendly
copy - check valid selection, copy into containing node instead of just the scene, works with non-nurbs objects, connects ownermatrix when inside a group
set patch solid/transparent buttons work on all scene items and creation templates, not just selection

utility buttons all done except for curve import utility buttons, Fix Concave and Flip Face

curve import bug fixes - works better with random svg files from the internet, separate svg sub parts is mostly working and will turn it on by default, imported polygons mostly facing correct direction now so will remove the flip path option in the ui, found improved way to convert curve to polygon mesh

***

more bug fixes for svg curve import, removed flip curve option - replaced with automatic flip, added "Always Close Paths" to force conversion of open curves to polygons, Create Pivots optional so pivots not always created - not sure if pivots can be removed completely, option is off by default, will read a path stroke color to use in the edge display of a curve, if no stroke color will use the fill color
freeze curve scripts will operate on a group object member without removing it from the group and using improved conversion method of selecting the edges before converting to a face, separate svg subpaths is working fully now

TODO fixes for the curve importer - svg subpaths are created in reverse order, importer is making other curve creation tools make invisible objects and need to add fallback behavior for the plugin based curve generation. bugs in the svg importer can cause errors, so it needs a way to fallback to not use the plugin
The good news - the errors have stopped for all the test samples I got so it may be a rare issue now

***
fixed import making default curve creation invisible
fixed show polygon edges option for items imported as polygons
subpaths created in proper order now
- just noticed the new auto flip method is creating double sided polygons when flipping
wasn't autoflip was subpath logic
think bugs are done now
Last edited by clintonman on 03 Aug 2021, 01:31, edited 8 times in total.
Clinton Reese

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

Re: New NURBS tools

Post by clintonman »

This is a test of the NURBS copy changes, but it should also be a good replacement for the Unofficial Updates copy command.

works with nurbs
connects the transform when inside a group

typo in the code
re-uploaded

not selecting new nurbs instead of old nurbs
re-uploaded
Attachments
Copy.RsObj
(10.27 KiB) Downloaded 122 times
Clinton Reese

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

Re: New NURBS tools

Post by clintonman »

Attached is the final Copy command node

this produces only 1 or 2 undo steps for any size copy

Edit:
forgot to remove testing code, should be clean now :bananathumb:
Attachments
CopyFinal02.RsObj
(12.01 KiB) Downloaded 116 times
Clinton Reese

http://clintons3d.com
Post Reply