how to write an expression 1<$TY>0

   5698   6   2
User Avatar
Member
104 posts
Joined: March 2008
Offline
i wanna write a expression that set $TX = ?? , and greater than 1 and smaller than 5

$TX = N
N = ?
1<$TX>5

how should i write in the box ?

Attachments:
expression question .png (106.6 KB)

User Avatar
Member
345 posts
Joined:
Offline
$TY < 1 && $TY > 0

You can use “or” || operator as well.
Cheers.
User Avatar
Member
104 posts
Joined: March 2008
Offline
thanks kuda , cheers !!! thank you very much
User Avatar
Member
104 posts
Joined: March 2008
Offline
hi kuda , it doesnt work

what i want is

ch(“ty”) + ch(“tz”)
$TX > 1
10 > $TX

how should i write the expression ?
User Avatar
Member
22 posts
Joined: March 2007
Offline
Hi!

I guess you meant 1<$TX<5 (because 1<$TX>5 doesn't make sense, it would be just $TX>5 then…)

what i want is

ch(“ty”) + ch(“tz”)
$TX > 1
10 > $TX

I think you can try with an “if()” statement: however you need a “default” value to assign to $TX when it is <1 && >10, check code suggestion as you type… There should be a better way to do it but here it is a draft:

if($TX>1 && $TX<10, ch(“ty”)+ch(“tz”), 0)

with 0 value when false
User Avatar
Member
696 posts
Joined: March 2006
Offline
I'm not sure what the actual effect is that you're trying for.

If the point's position along the X axis is greater than 1 or less then 5 you want the new X position to be equal to the value of the Y and Z transformation? Otherwise stay where it is?

In that case:
if(1<$TX || $TX<5, $TY+$TZ, $TX)


As jeff explained in your other thread, $TX, $TY, $TZ are equal to the incoming point's positions in space. ch(“tx”), ch(“ty”), ch(“tz”) are equal to whatever values you place in the parameters for x y and z transformations. If it is truly a channel reference you want and not the points' positions, then the above expression will not work for you.
Stephen Tucker
VFXTD
User Avatar
Member
104 posts
Joined: March 2008
Offline
thanks , i found out some hope from both of your advice , i will adjust the if($,$,$) function


cheers!!!
  • Quick Links