[SOLVED]About animation

I have a .egg file:

<CoordinateSystem> { Z-up }

<Comment> { "gedit" }


<Texture> Wasser_Tex {
  "water05.jpg"
  <Scalar> minfilter { linear_mipmap_linear }
  <Scalar> magfilter { linear }
  <Scalar> envtype { MODULATE }
}


<VertexPool> Wasser {
  <Vertex> 1 {
    -1.0 -1.0 0.0
    <UV>  {
      0.0 0.0
      <DUV> 1 { 0.0 1.0 }
    }
  }
  <Vertex> 2 {
    1.0 -1.0 0.0
    <UV>  {
      8.0 0.0
      <DUV> 1 { 0.0 1.0 }
    }
  }
  <Vertex> 3 {
    1.0 1.0 0.0
    <UV>  {
      8.0 8.0
      <DUV> 1 { 0.0 1.0 }
    }
  }
  <Vertex> 4 {
    -1.0 1.0 0.0
    <UV>  {
      0.0 8.0
      <DUV> 1 { 0.0 1.0 }
    }
  }
}

<Group> Wasser {
  <Dart> { 1 }
  <Polygon> {
    <TRef> { Wasser_Tex }
    <Normal> { 0.0 0.0 1.0 }
    <VertexRef> { 1 2 3 4 <Ref> { Wasser } }
  }
}
<Table> animation {
  <Bundle> Wasser {
    <Table> morph {
      <S$Anim> 1 {
        <Scalar> fps { 24 }
        <V> { 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 }
      }
    }
  }
}

When I open it with pview, I can see a animation playing.

But when I use

water = Actor("water")
water.setZ(-2)
water.setScale(60)
water.loop("Wasser")
water.reparentTo(render)

It don’t work.

It looks as though your animation may actually be named “1” - have you tried ‘water.loop(“1”)’?

self.water = Actor("water")
self.water.setZ(-2)
self.water.setScale(60)
self.water.loop("Wasser")
self.water.reparentTo(render)