Final trueSpace 7.61 Beta 8 Unofficial Update

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Great!
Thank you for your help! :bananathumb:

Do you remember what and where the Scripts/Commands/FlattenVertices is used for?
Edit: I found this:
viewtopic.php?p=59946#p59946

FlattenVertices.xml
Toolbars/UVEditor/Flatten vertices
LMB = Activity.Run('/Scripts/Commands/FlattenVertices');

I'll assume this is the only place it is used, unless you know of something else
User avatar
clintonman
Captain
Posts: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 13 Aug 2022, 22:23 Great!
Thank you for your help! :bananathumb:

Do you remember what and where the Scripts/Commands/FlattenVertices is used for?
Edit: I found this:
viewtopic.php?p=59946#p59946

FlattenVertices.xml
Toolbars/UVEditor/Flatten vertices
LMB = Activity.Run('/Scripts/Commands/FlattenVertices');

I'll assume this is the only place it is used, unless you know of something else
Only used in the UV editor. Have no idea why it's called "flatten vertices" instead of "flatten uvs" or something like that.
It exists to stop tS from crashing when run on triangulated meshes.
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Thanks, I change it to Flatten UVs
User avatar
clintonman
Captain
Posts: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

I missed an unglue in the WebServer. Fixed for new UUCommands location.
Attachments
WebServer.RsObj
(352.45 KiB) Downloaded 43 times
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

clintonman wrote: 13 Aug 2022, 23:17
trueBlue wrote: 13 Aug 2022, 22:23 Great!
Thank you for your help! :bananathumb:

Do you remember what and where the Scripts/Commands/FlattenVertices is used for?
Edit: I found this:
viewtopic.php?p=59946#p59946

FlattenVertices.xml
Toolbars/UVEditor/Flatten vertices
LMB = Activity.Run('/Scripts/Commands/FlattenVertices');

I'll assume this is the only place it is used, unless you know of something else
Only used in the UV editor. Have no idea why it's called "flatten vertices" instead of "flatten uvs" or something like that.
It exists to stop tS from crashing when run on triangulated meshes.
Can you give me an example on how to use this?
Trying to test if it is working from a function
You have:

Code: Select all

	var firstSel = Node.FirstSelected();

	if(!firstSel) return;
	if(!Node.ConExists(firstSel,"Mesh")) return;
I am using Binky from the Characters library
It is a group with 3 objects
So, if I PE all 3 objects selecting all Elements and run Flatten UVs, it will only work on the first select object?
Does this work when selecting elements in UV Editor?
The way I read your code; it looks like you do not need to be in PE mode, just select an object that has a Mesh
User avatar
clintonman
Captain
Posts: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 14 Aug 2022, 18:37
clintonman wrote: 13 Aug 2022, 23:17
trueBlue wrote: 13 Aug 2022, 22:23 Great!
Thank you for your help! :bananathumb:

Do you remember what and where the Scripts/Commands/FlattenVertices is used for?
Edit: I found this:
viewtopic.php?p=59946#p59946

FlattenVertices.xml
Toolbars/UVEditor/Flatten vertices
LMB = Activity.Run('/Scripts/Commands/FlattenVertices');

I'll assume this is the only place it is used, unless you know of something else
Only used in the UV editor. Have no idea why it's called "flatten vertices" instead of "flatten uvs" or something like that.
It exists to stop tS from crashing when run on triangulated meshes.
Can you give me an example on how to use this?
Trying to test if it is working from a function
You have:

Code: Select all

	var firstSel = Node.FirstSelected();

	if(!firstSel) return;
	if(!Node.ConExists(firstSel,"Mesh")) return;
I am using Binky from the Characters library
It is a group with 3 objects
So, if I PE all 3 objects selecting all Elements and run Flatten UVs, it will only work on the first select object?
Does this work when selecting elements in UV Editor?
The way I read your code; it looks like you do not need to be in PE mode, just select an object that has a Mesh
I never thought about having more than 1 mesh in the UV Editor. The script will need to be updated. If any of the meshes is a triangulated mesh tS will crash when flattening the uvs.

I'm surprised binky didn't crash tS... just tried it and crash on virgin tS. Binky is triangles so the tool should ignore it to prevent the crash. I'll add a message box saying do.

None of the UV tools requires PE mode, but can be used with PE mode.
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

I never thought about having more than 1 mesh in the UV Editor. The script will need to be updated.
I am not suggesting that it should work with more than one object
If you think it should be limited to the first selected object, it would be good to give an Alert, if more than one object is selected before the script runs
Edit:

Code: Select all

	var selCount = Node.SelectedCount()
	if(selCount > 1) {
		System.Alert("Select one object at a time")
		return
	}
User avatar
clintonman
Captain
Posts: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 14 Aug 2022, 19:51
I never thought about having more than 1 mesh in the UV Editor. The script will need to be updated.
I am not suggesting that it should work with more than one object
If you think it should be limited to the first selected object, it would be good to give an Alert, if more than one object is selected before the script runs
Edit:

Code: Select all

	var selCount = Node.SelectedCount()
	if(selCount > 1) {
		System.Alert("Select one object at a time")
		return
	}
The original isn't restricted to a single object, so I don't want to make it less capable.

I just found a problem with the way I've been using Node.SelectionGetAt
I thought it didn't need a clean selection with the spaces removed, but it does, so I need to find the scripts where I used it and fix it if needed.

Edit: Scared myself for a minute. Node.SelectionGetAt does not need to have the selection cleaned of extra spaces. I just made a stupid mistake while working on the flatten. :roll:
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

Fixed flatten to work with multiple selections. If any of the meshes are triangulated it will give an error. Also works with group objects, like the original does.
Attachments
FlattenVertices.RsObj
(5.19 KiB) Downloaded 46 times
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Thanks!
It's final resting place:
UUFS = Node.AccessFnSet("Scripts/UUCommands/UUFunctionSet");UUFS.UVFlatten();

I tried it on several Characters from the library
Can tell if it is working and not seeing the modal error
Post Reply