View Full Version : Python object position of created object

10 October 2010, 07:49 PM
Hi everybody im new to maya and python,

So i have a newbie question,

When you create an object in maya through python scripting, how to do write the position for the object?..the default in 0,0,0 i know..

But if i try to make a nurbs sphere i can define the pivot position..but with polySphere i dont have to ability to control where it is placed?

So is it standard that to create the object in 0,0,0 and move it afterwards or is there way to define the position?



10 October 2010, 02:19 AM
generally, yeah, make it then move it.

10 October 2010, 05:21 PM
I have been doing it in PyMel like so

import pymel.core as pm
pm.polySphere()[0].translate.set( [4,5,6] )

not sure it is the right way to do it in Python, but it has been weoking like a charm so far.

CGTalk Moderation
10 October 2010, 05:21 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.