General Category > ASL Scripts

Is there a script to move the axes to the center of the object itself?

<< < (2/2)

Yes that would be nice nice.

I've been missing those functions as well, would be nice to have them natively in Anim8or.

Yeap, a "reset object pivot" whould be a good addition. But should be carefully implemented, like the pivot should have the same orientation ( has the same rotation values ) as the object and not being only set to the center of the object with zero orientation as it does with the join solids command. Also maybe more than one options would be good to have, like set the pivot to the center of world pivot and set the pivot to the upper/lower/left/right corner of the object. That would help in further manipulations on the object like specific rotation and such.
While it is not available yet, the trick somebody can do to simply reset the object pivot to the object's center is to use the " Join Solids" command from the Build Menu as mentioned above, to only that object, since there is no restruction on the number of solids can be joined ( so you can join a single mesh...well to itself ). The only " problem" is that you loose the name of the mesh(es) from that you gave it to the standard  "mesh#" that Anim8or gives it when using the Join Solids command. Other restruction is that you can apply it to one mesh per time ( else, you simply will join several meshes to one with its pivot somewhere in the middle between meshes ) , which wont happen if Steve will implement it so you can reset multiple meshes at once. And the last thing is that after the command, the object pivot gets reset according world pivot, so if you rotate the mesh you may get a result different of what you realy want. See the picture. A cube with a name " little red Cube " ( mesh) ( A ): move its axis in Object/Axis Editor and get the mesh (B), simply rotate the pivot and get the mesh (C) and move and rotate the axis so you get mesh (D). With the Join Solids command ( 3 times , one mesh per time ) you get 3 cubes with names "mesh01", "mesh02","mesh03" e.t.c. BUT, if you have a mesh with orientation different than 0,0,0 like the cube (E) with move pivot or without (G) when you will use the Join Solids command they become as cube (F). Though if Steve will add the "reset pivot possibility" it should go from cubes forms (E) and (F) to final result of cube (G). Don't know actualy if it's possible to implement something like that since the object's orientation relies on the orientation of object axis and not the opposite. ::)

It's not just the orientation of an object that would make "correcting" the pivot point, but the symmetry of the object!  For instance, a cube is a symmetrical object, and you could locate the center of the object based on the planes defined by the faces.  But the same can't be said for more complex, non-symmetrical objects.  It's anybody's guess where the "correct" pivot point should be.

Well, that, exactly. But I guess you are referring more about user defined object pivot possition in general, rather than center of an object. And for that matter there's the Object/Axis Editor, though an addition to that in Edit Locate menu for exact location of the object axis would be great. As for the center of an object, and particulary quick "reset" of pivot after its random shift ( since I guess that's what most want ), it's not the user who will defind the center of an object, no matter it's a symmetrical or a complex asymmetrical one, but Anim8or itself and doing it always on exact and the only way, by finding actually realy the center of an object by dividing it in half, from the upper ( highest ) to the lower ( bottom ) ( Y - axis ), nearest to the furthest ( Z - axis ) and from one side to the other ( X - axis ), as it actualy did always. The real solution to the problem, I guess, is just to figure out finaly what's going on with that shifting of object pivot position after some non uniform scaling and other scaling manipulations in general.


[0] Message Index

[*] Previous page

Go to full version