CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 04-27-2013, 02:40 AM   #1
New Member
Join Date: Apr 2013
Posts: 10
Get position relative to locator coordinate system

Hello all,

I have a quick question:

I have a locator which is animated over several frames, is it possible to create other locators or points in space based off of the original locator's coordinate system?

For example, at frame 25 the locator is in some position. Can I easily (in python, btw) get the coordinates of, or create a point in space at, let's say 10 units in the locator's +X direction? (Not in world coordinate system)

I'm not sure if that is possible or if that information is even built into the locator properties, but I thought I should ask!


Old 04-28-2013, 09:37 AM   #2
Dresden, Germany
Join Date: Dec 2010
Posts: 321
The animated locators "original" coordinate system is always present if you use its local space. As long as you do not scale the locator or parent him under transforms with different scaling all distances in its own space are identical compared to the distances in world space. Now if you create an additional locator and want them to be +10 grids in X relative to your animated locator orientation at a certain frame, you just create the locator and parent him under your animated locator, then set its translate attribute to 10,0,0 and reparent it under world space again.
If you buried your animated locator deep inside a transform hirarchy with different scalings this wouldnt work. The easiest way here would be to do some preparations and first create an empty group and constrain its translation and rotation to your animated locator using a parent constraint (make sure that the option "maintain offset" is disabled at constraint creation), and then proceed as described above but use the empty groups local space instead.
Old 04-29-2013, 10:03 AM   #3
New Member
Join Date: Apr 2013
Posts: 10

That helped a lot.

Now I just have one other issue in my workflow.

I have a locator (which is not the shape layer but the parent or container) which has existing connections (translate and rotate attributes). How can I reset or break these at the beginning of the script?

I've been looking into CBdeleteConnections but I guess that is a brute force way of going about it. I've also been looking at disconnectAttr but to me it sounds like that is more about dissasociating multiple objects which previously shared attributes.

I'm just looking to basically un-key all translation and rotation attributes for a given object.

Is there a simple way of doing this?

Thanks again,

Old 04-29-2013, 10:03 AM   #4
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 07:33 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.