Mesh Origin Script

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

Mesh Origin Script

Post by clintonman »

BeforeOrigin.jpg
Image shows 4 identical boxes that have been point edited to move the origin away from the center of the mesh vertices.
The vertices were moved back in the negative Y direction leaving the origin/center behind.
The widget shows the origin as an orange dot.

AfterOrigin.jpg
After the script is run. From left to right:
Box#1 no action taken
Box#2 Origin To Mesh
Box#3 Mesh To Origin
Box#4 Select Snap Point was run on the Torus and then Snap Origin was run on the box

The origin can only be seen with modified object navigation widgets.

http://clintons3d.com/plugins/truespace ... rigin.html
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: Mesh Origin Script

Post by clintonman »

July 15, 2020 Update

added multiple selection for Origin to Mesh, Mesh to Origin and Snap Origin
added point display for select snap point
fixed bug in select snap point when using point edit selections
installer clears the recent files lists
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: Mesh Origin Script

Post by clintonman »

July 16 2020

Fixed bad selection bug that has come up in several recent scripts where multi-selection was added.
If nothing selected would give bad result.
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: Mesh Origin Script

Post by clintonman »

January 2021

Update to work with NURBS, can use point selection widget and adds selection validation for the tS selection bug.

Also added a related installer for the pick select widgets and script.
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: Mesh Origin Script

Post by clintonman »

June 2021

added a point edit mode origin move
made code undo friendly so no need to clear history

The point edit mode Origin To Selection was added because I needed it to maintain the mesh rotation and scale(and shear) when moving the origin.
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: Mesh Origin Script

Post by clintonman »

June 26 2021

After the last release I realized that a limitation could be fixed using some of the math from the new Origin To Selection script. This release removes that limitation. The old version did not preserve orientation and scale when using Snap Origin.

Using the similar math 3 new functions were added to "Apply" the translation, rotation and scale. These Apply functions are similar to the Freeze Transform script but they don't use the axis/pivot and their effect on the origin is not the same.
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: Mesh Origin Script

Post by clintonman »

August 30 Update

added the UU show/hide origin button to the panel
requires installation of the origin widgets - http://clintons3d.com/plugins/truespace ... iginwidget

The new test updates of the Unofficial Updates has these widgets included. "Hide | Show Origin". I labelled the button "Toggle Origin Display" because I couldn't remember the name in the UU panel.
Attached here is a more general version of the show/hide script that will continue to work if more widgets are added or removed.
Attachments
ToggleOriginDisplay.RsObj
(7.4 KiB) Downloaded 121 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: Mesh Origin Script

Post by clintonman »

April 24, 2022 Update

Now works with simple group objects.
Does not work with groups within groups.
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: Mesh Origin Script

Post by clintonman »

April 25 :oops:

Oops,

actually uploaded the updated install files from yesterday.
Clinton Reese

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

Re: Mesh Origin Script

Post by trueBlue »

:idea:
Origin to Axis
Axis to Origin

Are these possible with your Mesh Origin scripts?
I am finding that the Axis moves when using these scripts
I do a see value transforming the object from the Origin or Axis though
Pivot moves and is offset from the Origin.png
Post Reply