Body: <p>i have a question base on this video.</p>
  <p><div class="youtube-embed"><div>
                  <iframe width="640px" height="395px" src="https://www.youtube.com/embed/WPXltoSu3pM?start=0"></iframe>
              </div></div></p>
  <p>i have a problem with this code ! please help me it work's but ! for example i made a shape to use it as a controller for controlling my character head movement ! so i limit it from 0 to 20 and now when i select that shape and i move it with mouse it just moves in 0 to 20 in x but if accidentally i move the mouse a little more (it show me 20 in x ) but when i click on it (in position property that let you to put a value,) it show me a higher number (depends on how much i moved my mouse) ! so when again i want come back to 0 in x by moving my shape there is a problem because first i should comeback from that high number to 20 then i can move to 0 !</p>
  <p>you can see in video if i select that yellow head control shape and i move it more than 20 steps in (+) direction and more than 0 in (-) direction in facts behind the code it changes the number more than 20 or 0 so it making a problem ! so if i want back from 20 to 10 or 0 or 7 or ... if behind the code (when you click on number it show you the real number) its like 400 you have back from 400 to 20 then back to 0 or 10 or 7 and ..i send video in my next answer because of limitation  - in all the video just look at the x position number when i move the yellow control</p>
  <p><div class="youtube-embed"><div>
                  <iframe width="640px" height="395px" src="https://www.youtube.com/embed/-5ZwkUgqHpA?start=3"></iframe>
              </div></div></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-28T08:17:27.723Z
Comments.Text: Can you clarify? The code works for me, and if I click and track on the position value it immediately limits the position to 20. The video's code works with y-dimension. You want to use it on x. Make sure you adapt the code accordingly. You should edit the question and post your code and a screenshot.
Comments.UserDisplayName: Matt
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-28T14:50:31.180Z
Comments.Text: hi - my qustion is completly right  i made a video to make it more clear ! i told you it works ..yes ! but as you can see in video if i select that yellow head control shape and i move it more than 20 steps in (+) direction and more than 0 in (-) direction in facts behind the code it changes the number more than 20 or 0 so it making a problem ! so if i want back from 20 to 10 or 0 or 7 or ... if behind the code (when you click on number it show you the real number) its like 400 you have back from 400 to 20 then back to 0 or 10 or 7 and ..i send video in my next answer because  of limitation
Comments.UserDisplayName: Dude
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-28T14:50:57.350Z
Comments.Text: https://www.youtube.com/watch?v=-5ZwkUgqHpA      in all the video just  look at the x position number when i move the yellow control
Comments.UserDisplayName: Dude
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-28T18:18:50.853Z
Comments.Text: Okay, now I understand, the problem is that After Effects keeps remembering the blue value which can be larger than 20 or generally speaking larger than the red value. I'm not sure this can be solved. But I don't know that much about expression. Maybe somebody else has an idea. In the meantime you could edit your question and place the YouTube link in the question text, so it's easier for people to find.
Comments.UserDisplayName: Matt
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-28T19:41:04.233Z
Comments.Text: sure thank you :)
Comments.UserDisplayName: Dude
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T00:39:58.297Z
Comments.Text: @Matt is correct. The keyframed value of a property is always stored, even if an expression sets the actual value to something else.
Comments.UserDisplayName: stib
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-04T02:34:07.627Z
Comments.Text: blackout_duration=14
  transition_time=2
  dur=$(ffprobe -loglevel error -show_entries format=duration -of default=nk=1:nw=1 "$1.mp3")
  echo "Duration $dur"
  offset=$(bc -l <<< "$dur"-"$blackout_duration")
  ffmpeg -hide_banner -loop 1 -i $1.png -i $1.mp3 -c:v libx264 -preset ultrafast -tune stillimage -pix_fmt yuv420p -shortest -filter_complex "[0:v]fade=type=out:duration=$transition_time:start_time='$offset'[v]" -map "[v]" -map "1:a" $1.mkv
Comments.UserDisplayName: Ashiq
Tags: <after-effects><animation><after-effects-expressions><motion-graphics>
Title: after effects question about clamp
UserDisplayName: Dude
ThreadText: # after effects question about clamp
  
  (Asked by: username_0 on 2021-01-27)
  
  i have a question base on this video.
  
  i have a problem with this code ! please help me it work's but ! for example i made a shape to use it as a controller for controlling my character head movement ! so i limit it from 0 to 20 and now when i select that shape and i move it with mouse it just moves in 0 to 20 in x but if accidentally i move the mouse a little more (it show me 20 in x ) but when i click on it (in position property that let you to put a value,) it show me a higher number (depends on how much i moved my mouse) ! so when again i want come back to 0 in x by moving my shape there is a problem because first i should comeback from that high number to 20 then i can move to 0 !
  
  you can see in video if i select that yellow head control shape and i move it more than 20 steps in (+) direction and more than 0 in (-) direction in facts behind the code it changes the number more than 20 or 0 so it making a problem ! so if i want back from 20 to 10 or 0 or 7 or ... if behind the code (when you click on number it show you the real number) its like 400 you have back from 400 to 20 then back to 0 or 10 or 7 and ..i send video in my next answer because of limitation - in all the video just look at the x position number when i move the yellow control
  
  **Tags:** after-effects, animation, after-effects-expressions, motion-graphics
  
  > **Comments:**
  > **username_1**: Can you clarify? The code works for me, and if I click and track on the position value it immediately limits the position to 20. The video's code works with y-dimension. You want to use it on x. Make sure you adapt the code accordingly. You should edit the question and post your code and a screenshot.  
  > **username_0**: hi - my qustion is completly right  i made a video to make it more clear ! i told you it works ..yes ! but as you can see in video if i select that yellow head control shape and i move it more than 20 steps in (+) direction and more than 0 in (-) direction in facts behind the code it changes the number more than 20 or 0 so it making a problem ! so if i want back from 20 to 10 or 0 or 7 or ... if behind the code (when you click on number it show you the real number) its like 400 you have back from 400 to 20 then back to 0 or 10 or 7 and ..i send video in my next answer because  of limitation  
  > **username_0**: https://www.youtube.com/watch?v=-5ZwkUgqHpA      in all the video just  look at the x position number when i move the yellow control  
  > **username_1**: Okay, now I understand, the problem is that After Effects keeps remembering the blue value which can be larger than 20 or generally speaking larger than the red value. I'm not sure this can be solved. But I don't know that much about expression. Maybe somebody else has an idea. In the meantime you could edit your question and place the YouTube link in the question text, so it's easier for people to find.  
  > **username_0**: sure thank you :)  
  > **username_2**: @username_1 is correct. The keyframed value of a property is always stored, even if an expression sets the actual value to something else.  
  > **username_3**: blackout_duration=14 transition_time=2 dur=$(ffprobe -loglevel error -show_entries format=duration -of default=nk=1:nw=1 "$1.mp3") echo "Duration $dur" offset=$(bc -l <<< "$dur"-"$blackout_duration") ffmpeg -hide_banner -loop 1 -i $1.png -i $1.mp3 -c:v libx264 -preset ultrafast -tune stillimage -pix_fmt yuv420p -shortest -filter_complex "[0:v]fade=type=out:duration=$transition_time:start_time='$offset'[v]" -map "[v]" -map "1:a" $1.mkv  
  
  ---
  
  ## 0 answers
  
  