Find the center point in autodesk maya

How to find the center point in autodesk maya ... I know what to use the center, but I can not find the point. How to find the exact coordinate of a 3D object created with autodesk maya? thanks.

+4
source share
8 answers

Just go to the menu, Modify> Center Pivot. This will make your rod go to the center of your model.

+3
source

There are two possible answers to the question.

The "center" of an object may mean:

Center bounding object : you can get it like this (using python)

bbx = cmds.xform(object, q=True, bb=True, ws=True) # world space centerX = (bbx[0] + bbx[3]) / 2.0 centerY = (bbx[1] + bbx[4]) / 2.0 centerZ = (bbx[2] + bbx[5]) / 2.0 

pivot point location . This is not the same as the position of the object, since you can move the axis without changing the translation number, which may indicate maya. The location of a world point in the world can be obtained using:

 pivot = cmds.xform(object, q=True, rp=True, ws=True) 
+2
source

If you are happy with where the pivot center team places the pivot point, and you just want to know where it is in world space, you can do the following (assuming you have selected the object)

using PyMEL:

 import pymel.core as pm theObject = pm.ls(sl=1)[0] theObject.getRotatePivot() 

or using maya.cmds:

 import maya.cmds as mc mc.xform(query=True,rotatePivot=True) 

or using MEL

 xform -q -rotatePivot 
+1
source

Actually a command named objectCenter()

This will give you the true world space of a particular point or object.

import maya.cmds as cmds

 # create a simple hierarchy cmds.polyCube( name='a' ) cmds.polyCube( name='b' ) cmds.parent( 'b', 'a' ) cmds.move( 3, 0, 0, 'a', localSpace=True ) cmds.move( 2, 2, 2, 'b', localSpace=True ) X_COORD = cmds.objectCenter('b',x=True) # Result: 5 # # Get the center of the bounding box of b in local space XYZ = cmds.objectCenter('b', l=True) # Result: 2 2 2 # # Get the center of the bounding box of b in world space XYZ = cmds.objectCenter('b', gl=True) # Result: 5 2 2 # # Get the center of the bounding box of a in world space XYZ = cmds.objectCenter('a', gl=True) 

http://download.autodesk.com/global/docs/maya2013/en_us/CommandsPython/index.html

Shannon

+1
source

Select an object and select: Animation> Create Deformers> Cluster.

Now, in the exact center of your object, the cluster deformer will be displayed, denoted by the symbol "C", you can copy the vertex into the cluster, what you need to focus. The actual center point of the cluster will be just below "C".

+1
source

In the lane, select an object and look at the panel on the right.

0
source

Select the object and then run it in the script editor:

 string $sel[]; $sel = `ls -sl`; print `getAttr ($sel[0]+".translate")`; 

This will display the X, Y, and Z coordinates in the history panel.

0
source

Select the object, "Motive-Center-Center". In the absence of work, simply select the object and click "Insert Key" into your key board. then it will let you set the rotation .. just drag the place you want to set ...

If you have any doubts, feel free to share ...

0
source

All Articles