Exemplo n.º 1
0
void ComboViewerPanel::onSceneChanged() {
  TFrameHandle *fh  = TApp::instance()->getCurrentFrame();
  int frameIndex    = fh->getFrameIndex();
  int maxFrameIndex = fh->getMaxFrameIndex();
  if (frameIndex > maxFrameIndex) maxFrameIndex = frameIndex;

  // set the FPS for new scene
  m_flipConsole->setFrameRate(TApp::instance()
                                  ->getCurrentScene()
                                  ->getScene()
                                  ->getProperties()
                                  ->getOutputProperties()
                                  ->getFrameRate());
  // update the frame slider's range with new frameHandle
  m_flipConsole->setFrameRange(1, maxFrameIndex + 1, 1, frameIndex + 1);

  // set the markers
  int fromIndex, toIndex, dummy;
  XsheetGUI::getPlayRange(fromIndex, toIndex, dummy);
  m_flipConsole->setMarkers(fromIndex, toIndex);

  // update the key frames
  if (m_keyFrameButton && (m_keyFrameButton->getCurrentFrame() != frameIndex))
    m_keyFrameButton->setCurrentFrame(frameIndex);
}
Exemplo n.º 2
0
/*! update the frame range according to the current frame type
*/
void ComboViewerPanel::updateFrameRange() {
  TFrameHandle *fh  = TApp::instance()->getCurrentFrame();
  int frameIndex    = fh->getFrameIndex();
  int maxFrameIndex = fh->getMaxFrameIndex();
  if (frameIndex > maxFrameIndex) frameIndex = maxFrameIndex;
  m_flipConsole->setFrameRange(1, maxFrameIndex + 1, 1, frameIndex + 1);
}