Beispiel #1
0
//печать анимации
void dump (const Timeline& timeline, int level)
{
  print_space (level++);
  printf      ("Timeline '%s'\n", timeline.Name ());

  dump ("layers", timeline.Layers (), level);
}
Beispiel #2
0
bool XflParser::CheckTimeline (Timeline& timeline)
{
  bool timeline_valid = true;

  for (Timeline::LayerList::Iterator layer_iter = timeline.Layers ().CreateIterator (); layer_iter; ++layer_iter)
    for (Layer::FrameList::Iterator frame_iter = layer_iter->Frames ().CreateIterator (); frame_iter; ++frame_iter)
    {
      ICollection<FrameElement>& elements = frame_iter->Elements ();

      for (size_t i = 0; i < elements.Size ();)
      {
        if (!CheckFrameElement (elements [i]))
        {
          log.Printf ("Removing invalid frame element '%s'", elements [i].Name ());
          elements.Remove (i);
          timeline_valid = false;
        }
        else
          i++;
      }
    }

  return timeline_valid;
}