本文整理汇总了C++中TStageObject::isKeyframe方法的典型用法代码示例。如果您正苦于以下问题:C++ TStageObject::isKeyframe方法的具体用法?C++ TStageObject::isKeyframe怎么用?C++ TStageObject::isKeyframe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStageObject
的用法示例。
在下文中一共展示了TStageObject::isKeyframe方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setKeyframes
//-----------------------------------------------------------------------------
// data <- xsheet
void TKeyframeData::setKeyframes(std::set<Position> positions, TXsheet *xsh)
{
if (positions.empty())
return;
TStageObjectId cameraId = xsh->getStageObjectTree()->getCurrentCameraId();
std::set<Position>::iterator it = positions.begin();
int r0 = it->first;
int c0 = it->second;
for (++it; it != positions.end(); ++it) {
r0 = std::min(r0, it->first);
c0 = std::min(c0, it->second);
}
for (it = positions.begin(); it != positions.end(); ++it) {
int row = it->first;
int col = it->second;
TStageObject *pegbar = xsh->getStageObject(col >= 0 ? TStageObjectId::ColumnId(col) : cameraId);
assert(pegbar);
m_isPegbarsCycleEnabled[col] = pegbar->isCycleEnabled();
if (pegbar->isKeyframe(row)) {
Position p(row - r0, col - c0);
TStageObject::Keyframe k = pegbar->getKeyframe(row);
m_keyData[p] = k;
}
}
}
示例2: setKeyframes
void TKeyframeSelection::setKeyframes() {
TApp *app = TApp::instance();
TXsheetHandle *xsheetHandle = app->getCurrentXsheet();
TXsheet *xsh = xsheetHandle->getXsheet();
TStageObjectId cameraId = xsh->getStageObjectTree()->getCurrentCameraId();
if (isEmpty()) return;
Position pos = *m_positions.begin();
int row = pos.first;
int col = pos.second;
TStageObjectId id = col < 0 ? cameraId : TStageObjectId::ColumnId(col);
TStageObject *pegbar = xsh->getStageObject(id);
if (!pegbar) return;
if (pegbar->isKeyframe(row)) {
TStageObject::Keyframe key = pegbar->getKeyframe(row);
pegbar->removeKeyframeWithoutUndo(row);
UndoRemoveKeyFrame *undo =
new UndoRemoveKeyFrame(id, row, key, xsheetHandle);
undo->setObjectHandle(app->getCurrentObject());
TUndoManager::manager()->add(undo);
} else {
pegbar->setKeyframeWithoutUndo(row);
UndoSetKeyFrame *undo = new UndoSetKeyFrame(id, row, xsheetHandle);
undo->setObjectHandle(app->getCurrentObject());
TUndoManager::manager()->add(undo);
}
TApp::instance()->getCurrentScene()->setDirtyFlag(true);
TApp::instance()->getCurrentObject()->notifyObjectIdChanged(false);
}
示例3: isKeyframe
bool ViewerKeyframeNavigator::isKeyframe() const
{
TStageObject *pegbar = getStageObject();
if (!pegbar)
return false;
return pegbar->isKeyframe(getCurrentFrame());
}
示例4: selectCellKeyframe
void TCellKeyframeSelection::selectCellKeyframe(int row, int col) {
m_cellSelection->selectCell(row, col);
TXsheet *xsh = m_xsheetHandle->getXsheet();
TStageObjectId id =
col < 0 ? TStageObjectId::CameraId(0) : TStageObjectId::ColumnId(col);
TStageObject *stObj = xsh->getStageObject(id);
m_keyframeSelection->clear();
if (stObj->isKeyframe(row)) m_keyframeSelection->select(row, col);
}
示例5: selectCellsKeyframes
void TCellKeyframeSelection::selectCellsKeyframes(int r0, int c0, int r1,
int c1) {
m_cellSelection->selectCells(r0, c0, r1, c1);
TXsheet *xsh = m_xsheetHandle->getXsheet();
m_xsheetHandle->getXsheet();
if (r1 < r0) std::swap(r0, r1);
if (c1 < c0) std::swap(c0, c1);
m_keyframeSelection->clear();
int r, c;
for (c = c0; c <= c1; c++)
for (r = r0; r <= r1; r++) {
TStageObjectId id =
c < 0 ? TStageObjectId::CameraId(0) : TStageObjectId::ColumnId(c);
TStageObject *stObj = xsh->getStageObject(id);
if (stObj->isKeyframe(r)) m_keyframeSelection->select(r, c);
}
}