Help - Search - Members - Calendar
Full Version: Expressions: How do you translate a null to the tip of a bone?
Hash, Inc. Forums > Forum Archives > A:M Forums Archive > (2008) > A:M 2008
HomeSlice
I'm finally getting around to playing with expressions. I have read/watched all the tuts and videos I can find, but I'm still um ... blink.gif

Say, I have a Null and a Bone.
I want to translate the Null to the *tip* of the bone. (The end of the bone, not the base.)
----
I create an ON/OFF pose.

I right-click on the Translate property (in the Properties Panel) for the Null and choose "Edit Expression".

I get an expression that says:
"Transform.Translate = "

In the PWS, I scroll up to the Model's Bones folder (the cache) and click on the "Translate" property for Bone1.

The expression window in my pose now says "..|..|..|..|..|..|..|Objects|Model1|Bones|Bone1.Transform.Translate"

But the Null just sits there. It doesn't translate to Bone1, much less to the *tip* of Bone1.

I want my Null to snap to the the tip(end) of Bone1 when I turn the pose ON.
Can someone please show me how to do that?

Any help would be much appreciated.
itsjustme
I wouldn't use an Expression for that, I would just use a "translate to" constraint with a null at the tip of the bone to be translated to. Here's a quick model example.

Hope that helps, Holmes.


mtpeak2
As far as I know, you can't do this with expressions. Expressions on translate properties work like a 'translate like", not a "translate to". Your best bet is a constraint, with an offset.

Plus, expressions can not be turned ON/OFF like constraints. They are always ON, unless you set the pose to "not set", which can't be animated.
HomeSlice
Thanks David and Mark. The "Translate To" constraint was my Plan B.

I have a bunch of bones that have "Aim At" constraints to a bunch of nulls, which can be dragged around to control each bone's rotation. So right now I manually translate each null to the tip of the appropriate bone in the Model window. I was just looking for an elegant way to automate the process somewhat.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.