Thanks Shawn! That worked. I feel dumb now, lol.

Cheers,

   -- Alan

On Tue, Jun 29, 2010 at 1:49 PM, shawnpatapoff <shawnpatap...@gmail.com> wrote:
> I believe you want the rotatePivot in your case:
>
> from pymel.core import *
> sel = ls(sl=1)
> for obj in sel:
>        globalPos = obj.getRotatePivot(rp='world')
>        newLoc = spaceLocator()
>        newLoc.setTranslation(globalPos, space='world')
> cheers,
> Shawn
>
> On Jun 29, 7:19 am, Alan Fregtman <alan.fregt...@gmail.com> wrote:
>> Hey guys,
>>
>> This is my first post. Hi everyone!
>>
>> I was wondering why this simple snippet doesn't work fully with
>> selected clusters but seems to work with everything else:
>> -------------------------
>> from pymel.core import *
>>
>> sel = ls(sl=1)
>>
>> for obj in sel:
>>         globalPos = obj.getTranslation(space="world")
>>         newLoc = spaceLocator()
>>         newLoc.setTranslation(globalPos)
>> -------------------------
>>
>> I'm trying to place locators at the position of some selected
>> clusters. If I select some other object type the script seems to work
>> but with clusters it doesn't set the translation at all, even though
>> globalPos does return values. Makes the locator though.
>>
>> I'm on Maya 2008 by the way.
>>
>> Any thoughts? I don't understand what I'm doing wrong, or is it a bug?
>>
>> Cheers,
>>
>>    -- Alan
>
> --
> http://groups.google.com/group/python_inside_maya

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to