Mesh Origin Script

free scripts, plugins, models, textures
User avatar
clintonman
Captain
Posts: 5432
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: 24 Oct 2023, 16:49 :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
I did some tests and it looks feasible. Get back to you later.
Clinton Reese

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

Re: Mesh Origin Script

Post by trueBlue »

clintonman wrote: 24 Oct 2023, 18:04
trueBlue wrote: 24 Oct 2023, 16:49 :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
I did some tests and it looks feasible. Get back to you later.
Thanks!
Personally, I would like to see the Origin's X Y Z values
The Status message does not seem very valuable, except for a quick peak
If there is an Error, these values would change to no values
GetSnapPoint script

Code: Select all

	//if not in point edit mode  and no world matrix found then return
	if(!selPointsF && !selMatrixF) {
		globalFS.Error("Not a valid selection.  Must be object or vertices.");
		params.ConValue("X") = ""
		params.ConValue("Y") = ""
		params.ConValue("Z") = ""
		return;
	}
Get Snap Point.png
Get Snap Point.png (7.23 KiB) Viewed 295 times
.
Mesh Origin X Y Z panel.png
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Mesh Origin Script

Post by clintonman »

From what I can tell to move the origin to the pivot run the Flatten Axis
MeshModifiers.FlattenAxes('');

to move the pivot to the origin

Code: Select all

	var pivotMatrix = System.CreateDO('Math Package/Matrix Float Data');
	var firstSel = Node.FirstSelected();
	pivotMatrix.LoadIdentity();
	Node.Value(firstSel + "/Pivot", "Matrix") = pivotMatrix;
or reset the Pivot node Matrix connector
Clinton Reese

http://clintons3d.com
Post Reply