# I am having issues with the clipping animation track KeyTime values?

**URL:** https://discourse.paraview.org/t/i-am-having-issues-with-the-clipping-animation-track-keytime-values/2787
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [October 16, 2019, 7:39pm UTC](https://discourse.paraview.org/t/i-am-having-issues-with-the-clipping-animation-track-keytime-values/2787 "2019-10-16T19:39:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Teresita\_Ramirez\_Agu](https://discourse.paraview.org/user_avatar/discourse.paraview.org/teresita_ramirez_agu/32/2234_2.png) [@Teresita\_Ramirez\_Agu](https://discourse.paraview.org/u/Teresita_Ramirez_Agu)
#### Post date: [October 16, 2019, 7:39pm UTC](https://discourse.paraview.org/t/i-am-having-issues-with-the-clipping-animation-track-keytime-values/2787/1 "2019-10-16T19:39:23Z")

</div>

I am trying to use the clipping tool with python and I feel like I have the correct set up for this, however every time I run my script the times for the animation track of the clip are off. this is what I want:

```
     # get animation scene
     animationScene1 = GetAnimationScene()

    # get animation track
   
    clip1ClipTypeOriginTrack = GetAnimationTrack('Origin', 0, proxy=clip1.ClipType)

    # create keyframes for this animation track

    # create a key frame
    keyframe1 = CompositeKeyFrame()
    keyframe1.Interpolation = 'Ramp'
    keyframe1.KeyTime = [-.62] #start time of clip 
    keyframe1.KeyValues = [0] # starting pt. of clip
    #renderView1.Update()
    # create a key frame
    keyframe2 = CompositeKeyFrame()
    keyframe2.Interpolation = 'Ramp'
    keyframe2.KeyTime = [0.0] #end time of clip in sec.
    keyframe2.KeyValues = [float(a[j-1][7])] 
    #renderView1.Update()

    # initialize the animation track
    clip1ClipTypeOriginTrack.KeyFrames = [keyframe1, keyframe2]
    # get display properties
    clip1Display = GetDisplayProperties(clip1, view=renderView1)

```

but when it loads on Paraview, I get this:

 ![37%20PM](https://discourse.paraview.org/uploads/default/original/2X/f/fc9759f7e41c651c2bc74c501bda962991dd9785.png)

It is not giving me the correct values that I assigned for the KeyTimes and when I change the start time to -.62, it assigns that value to the KeyValue of [float(a[j-1][7])] instead of 0 like I would like.

If anyone knows what might be going on, any help is greatly appreciated.  
The key times change to different values when I manually change the start time on the animation view.  
PLS& THANKYOU!!!

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [October 17, 2019, 7:39am UTC](https://discourse.paraview.org/t/i-am-having-issues-with-the-clipping-animation-track-keytime-values/2787/2 "2019-10-17T07:39:16Z")

</div>

the animation track by default is setup to use normalized time in the range [0, 1] where 0 is start of the animation and 1 is the end. `keyframe1.KeyTime = [0]` and `keyframe2.KeyTime = [1.0]`, I believe, should do the trick.

---

<div class="post-metadata">

### Author: ![Teresita\_Ramirez\_Agu](https://discourse.paraview.org/user_avatar/discourse.paraview.org/teresita_ramirez_agu/32/2234_2.png) [@Teresita\_Ramirez\_Agu](https://discourse.paraview.org/u/Teresita_Ramirez_Agu)
#### Post date: [October 18, 2019, 8:50pm UTC](https://discourse.paraview.org/t/i-am-having-issues-with-the-clipping-animation-track-keytime-values/2787/3 "2019-10-18T20:50:01Z")

</div>

Thank you, I guess I need to make the start time of the animation the same as the time of the clipping. I guess what I was trying to do is have a different start time in my animation and at a different time I wanted the clipping to start. Is this possible to do with python? I am able to set this up manually on Paraview but when I tried to do this with python I end up with the same issue.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [October 21, 2019, 11:58pm UTC](https://discourse.paraview.org/t/i-am-having-issues-with-the-clipping-animation-track-keytime-values/2787/4 "2019-10-21T23:58:27Z")

</div>

The `KeyTime` is specified as a normalized value where 0 is the start of the animation and 1 is the end of it. To start half way in, for example, set the KeyTime to 0.5.
