Get position relative to locator coordinate system

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  04 April 2013
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!


  04 April 2013
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.
  04 April 2013

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,

  04 April 2013
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

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 02:13 PM.

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