Mesh Origin Script

free scripts, plugins, models, textures
User avatar
clintonman
Captain
Posts: 5570
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Mesh Origin Script

Post by clintonman »

"Origin To Snap Point oddity"

Followed the steps, not seeing it.
Maybe you can share a scene or add any missing steps. If you made changes to the code or buttons share that too.
Clinton Reese

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

Re: Mesh Origin Script

Post by trueBlue »

The scene is nothing unusual, just primitive cube and planes
No code change except what was suggested
Origin To Snap Point is unchanged

Simply pressing the Origin To Snap Point panel button moves the Origin
User avatar
clintonman
Captain
Posts: 5570
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Mesh Origin Script

Post by clintonman »

trueBlue wrote: 06 Sep 2024, 19:15 The scene is nothing unusual, just primitive cube and planes
No code change except what was suggested
Origin To Snap Point is unchanged

Simply pressing the Origin To Snap Point panel button moves the Origin
I found a set of steps that shows the problem:

origin to object
set snap point
move the object
origin to snap point
Clinton Reese

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

Re: Mesh Origin Script

Post by trueBlue »

I just Reset to Default Context
Created a Cube
Opened the Mesh Origin Scripts
Did your steps
Origin did not move, so that did not produce the issue

Next
Use the Set Origin Widget or Widget Set Snap Point
Press the Origin To Snap Point several times
Origin moves to a different location each time
User avatar
clintonman
Captain
Posts: 5570
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Mesh Origin Script

Post by clintonman »

clintonman wrote: 06 Sep 2024, 03:05
trueBlue wrote: 06 Sep 2024, 02:06
Dialog settings don't work the same in the Full Beta and Rosetta versions of trueSpace
What are the differences?
I was just about to PM you.

This will 1) disable the tS dialog that asks if it's ok to flatten, 2) runs the FlattenNodes and 3) re-enables the tS dialog
This works for Rosetta, but it will not disable the dialog for the full tS version.

Code: Select all

Node.Value("/Preferences/Dialog settings", "Flatten objects") = false;
MeshModifiers.FlattenNodes(firstsel);
Node.Value("/Preferences/Dialog settings", "Flatten objects") = true;
This is the workaround I just found. Does the same thing except if toggles the dialog option twice after setting it to false.
Setting to true at the end works without the extra toggle steps, so it's only a problem when setting to false.

Code: Select all

Node.Value("/Preferences/Dialog settings", "Flatten objects") = false;
RsTool.ToggleValue("/Preferences/Dialog settings/Flatten objects");
RsTool.ToggleValue("/Preferences/Dialog settings/Flatten objects");
MeshModifiers.FlattenNodes(firstsel);
Node.Value("/Preferences/Dialog settings", "Flatten objects") = true;
There was just one other bug, so it looks like it will release on time after all.
Quoting myself.

Still issue with the flatten dialog.
I found that the tS flatten dialog question has to be answered "yes" plus the checkbox has to be checked before script will control whether or not the tS dialog will show.
Clinton Reese

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

Re: Mesh Origin Script

Post by clintonman »

trueBlue wrote: 07 Sep 2024, 00:20 I just Reset to Default Context
Created a Cube
Opened the Mesh Origin Scripts
Did your steps
Origin did not move, so that did not produce the issue

Next
Use the Set Origin Widget or Widget Set Snap Point
Press the Origin To Snap Point several times
Origin moves to a different location each time
Too bad.

In any case here's the latest that fixes the issue I found.
It also includes:
Origin to PE Selection and Set Snap Point while in PE mode will both restore the pe selection mode
fix Set Origin Widget so only run on renderable objects or simple 3d groups.
Attachments
MeshOrigin.RsObj
(142.3 KiB) Downloaded 7 times
Clinton Reese

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

Re: Mesh Origin Script

Post by trueBlue »

Just to be clear, I am using UU 10 Standalone to test your latest version
Edit: Crossed post
Latest version looks like you fixed the Origin To Snap Point oddity
I will test the Mesh Origin Scripts more thoroughly tomorrow
Thanks!
User avatar
clintonman
Captain
Posts: 5570
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Mesh Origin Script

Post by clintonman »

Update Sept 7 2024
Edit: Second Update Sept 7 to fix bug

Previews are done
the main purpose of this update was to bring the website version up to par with the Unofficial Updates version and to add support for Shape nodes

full change list from previous website version

works with Shape nodes, not just Editable shape nodes
flatten nodes questions instead of conversion to editable meshes
added pivot tools aspect
snap location inputs/display
bug restore pe selection mode
new widget tool sets origin on exit - new button "Set Origin Widget"
3d groups only allow simple 3d groups
new check to not run on parent objects - WldMatrix connected to the OwnerMatrix of another object
fix bug change group test to 3dgroup test
added checks for actors, mesh simplifier, dimensions, nurbs


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

http://clintons3d.com
Post Reply