当前位置: 首页>>代码示例>>C++>>正文


C++ TStageObject::getKeyframe方法代码示例

本文整理汇总了C++中TStageObject::getKeyframe方法的典型用法代码示例。如果您正苦于以下问题:C++ TStageObject::getKeyframe方法的具体用法?C++ TStageObject::getKeyframe怎么用?C++ TStageObject::getKeyframe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TStageObject的用法示例。


在下文中一共展示了TStageObject::getKeyframe方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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);
}
开发者ID:walkerka,项目名称:opentoonz,代码行数:28,代码来源:keyframeselection.cpp

示例2: 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;
		}
	}
}
开发者ID:JosefMeixner,项目名称:opentoonz,代码行数:30,代码来源:keyframedata.cpp

示例3: addBoneId

	void addBoneId(const TStageObjectId &id)
	{
		TStageObject *stageObject = getXsheet()->getStageObject(id);
		if (stageObject) {
			TStageObject::Keyframe k = stageObject->getKeyframe(m_frame);
			m_keyframes.push_back(std::make_pair(id, k));
		}
	}
开发者ID:titer1,项目名称:opentoonz,代码行数:8,代码来源:skeletontool.cpp

示例4: toggle

void ViewerKeyframeNavigator::toggle()
{
	TStageObject *pegbar = getStageObject();
	if (!pegbar)
		return;
	int frame = getCurrentFrame();

	if (pegbar->isFullKeyframe(frame)) {
		TStageObject::Keyframe key = pegbar->getKeyframe(frame);
		pegbar->removeKeyframeWithoutUndo(frame);
		UndoRemoveKeyFrame *undo = new UndoRemoveKeyFrame(pegbar->getId(), frame, key, m_xsheetHandle);
		undo->setObjectHandle(m_objectHandle);
		TUndoManager::manager()->add(undo);
	} else {
		UndoSetKeyFrame *undo = new UndoSetKeyFrame(pegbar->getId(), frame, m_xsheetHandle);
		pegbar->setKeyframeWithoutUndo(frame);
		undo->setObjectHandle(m_objectHandle);
		TUndoManager::manager()->add(undo);
	}
	m_objectHandle->notifyObjectIdChanged(false);
}
开发者ID:CroW-CZ,项目名称:opentoonz,代码行数:21,代码来源:keyframenavigator.cpp


注:本文中的TStageObject::getKeyframe方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。