Jump to content
Hash, Inc. - Animation:Master

How to Control a CP Movement by SEVERAL CPs Movement by Expression?


Ramón López

Recommended Posts

Hi, I'm treating to get an expression to be able to control a point with the movement of several other points, I mean a point that moves automatically the average of the distance the controller points move, you know, just like when you add several "Translate To" dynamic constraints to a one bone and it moves in the middle when any of that controllers bones is moved... I have tried to "concatenate" (cause it seems not possible to add several expressions to a same parameter) little expressions in this way "..|..|..|Spline #164|CP #169.Translate :excl: ..|..|..|Spline #165|CP #170.Translate" but it doesn't works and I have tried to join'em in all the ways I can imagine "&, |, /, ., etc..." with the same "Sintax error in the expression" message (except in the "&" case, but it neither works at last :(), so well... any help in this unknowed area to me it'd be very appreciated :), THANKS!

Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Ey, thank you for the quick answer!!! But for some reason I get the same "Sintax error in the expression" message when I try to control any axis separately, any "..|..|CP #1.Translate.X" or "..|..|CP #1.Translate.Y" results in the same message and, of course, with any effect over the controlled points, and... well, finally I 'm not totally sure about that "= (x1 + x2) / 2" part means in this case, oh! my maths... Any other possible way? :) THANKS!

Link to comment
Share on other sites

I get the same "Sintax error in the expression" message when I try to control any axis separately, any "..|..|CP #1.Translate.X" or "..|..|CP #1.Translate.Y" results in the same message and, of course, with any effect over the controlled points

 

BTW, do you think this could be something to be Reported? Cause it should works in the same way as in the bones case, is't? Or... am I missing something, that could be very probable... :rolleyes:

Link to comment
Share on other sites

Syntax error means that your expression is not ok.

 

try this on the translate.X expression: (..|..|..|Spline #164|CP #169.Translate.X + ..|..|..|Spline #164|CP #170.Translate.X) / 2

That should give the average X of CP 169 & 170

If this doesn't work I'll try it in A:M but I think this is correct.

Link to comment
Share on other sites

...YoO-HOoOoo!!! :D That "+" sign was the solution! The result is exactly this: "..|..|CP #1.Translate/2+..|..|CP #3.Translate/2" (without the ".X" part as I'll explain you below) And well, I don't know why I didn't realize it... Maybe cause I was thinking more in something like a special "concatenate" sign to join different "elements" into the same expresion, maybe I have no idea :rolleyes: ...Anyway, THANK YOU very much for the good & quick help!

 

Syntax error means that your expression is not ok

But in this case it shouldn't happen, isn't? I mean what could be wrong in a simple expression like this "..|..|CP #1.Translate.X"? That's cause I thought it could be a bug that should be Reported unless I be missing something...

 

Ah, and the main reason to use expressioin directly over points to me, is cause I think that in some situations this way offers certain facilities and possibilities working with animatable points into Distortion Boxes and in the more practice way, it's really difficult to explain to me here... but beliveme if I say you it's important and if not I'd use the other way, just cause it seems more the way A:M is intended to work... BYE & THANKS again! :D

Link to comment
Share on other sites

But in this case it shouldn't happen, isn't? I mean what could be wrong in a simple expression like this "..|..|CP #1.Translate.X"? That's cause I thought it could be a bug that should be Reported unless I be missing something...

The other expressions you showed had 3x "..|" That could be the problem. (Translate.X is a child of Translate so that's one step more) The best way to avoid mistakes is to select the variables with your mouse and not typing them.

Link to comment
Share on other sites

Hi again! :) Well I have been testing all the "..|" possibilities and nothing seems to work when a parameter like ".X" is present... I'd like to be wrong, but can you see something wrong in this simple example that should make jump that warning window?

 

post-8502-1194040541_thumb.jpg

 

I think I have probed too all the possibilities here but I thought too in the other issue and you had a solution, so I still have some hope :), THANKS!

Link to comment
Share on other sites

Ohhh... I can see it now... And it seems more like an Expression CP limitation than a bug, cause I can't see the way to acces to each axis separately, I mean, as opposed to bones there is no way (or I can't see it) to can use an expression called "Translate.X =" for CPs as you suggest :(, so if I decide to report it, finally it should be more like a Feature Request than a Bug Report and probably it'll never arrive...

 

Again I'd love to be wrong, but now I'm almost sure that actually there is no way to get it... Anyway, THANKS to make me know! And, of course (and again), for all the other invaluable help :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...