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


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

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


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

示例1: storeObject

void TStageObjectDataElement::storeObject(const TStageObjectId &objId, TXsheet *xsh)
{
	// Search the object in the xsheet (false = don't create a new one)
	TStageObject *obj = xsh->getStageObjectTree()->getStageObject(objId, false);
	assert(obj);

	m_params = obj->getParams();
	m_dagPos = obj->getDagNodePos();
}
开发者ID:JosefMeixner,项目名称:opentoonz,代码行数:9,代码来源:stageobjectsdata.cpp

示例2: storeCamera

void TCameraDataElement::storeCamera(const TStageObjectId &selectedObj, TXsheet *xsh)
{
	TStageObject *obj = xsh->getStageObjectTree()->getStageObject(selectedObj, false);
	assert(obj);

	m_params = obj->getParams();
	m_camera = *(obj->getCamera());
	m_dagPos = obj->getDagNodePos();
}
开发者ID:JosefMeixner,项目名称:opentoonz,代码行数:9,代码来源:stageobjectsdata.cpp

示例3: updateScene

void StageSchematicScene::updateScene()
{
	clearAllItems();

	QPointF firstPos = sceneRect().center();
	m_nextNodePos = TPointD(firstPos.x(), firstPos.y());

	TStageObjectTree *pegTree = m_xshHandle->getXsheet()->getStageObjectTree();

	m_nodeTable.clear();
	m_GroupTable.clear();
	m_groupEditorTable.clear();
	m_gridDimension = pegTree->getDagGridDimension();

	QMap<int, QList<TStageObject *>> groupedObj;
	QMap<int, QList<SchematicNode *>> editedGroup;
	// in order to draw the position-specified nodes first
	QList<int> modifiedNodeIds;
	for (int i = 0; i < pegTree->getStageObjectCount(); i++) {
		TStageObject *pegbar = pegTree->getStageObject(i);
		if (pegbar->getDagNodePos() == TConst::nowhere)
			modifiedNodeIds.push_back(i);
		else
			modifiedNodeIds.push_front(i);
	}

	for (int i = 0; i < modifiedNodeIds.size(); i++) {
		TStageObject *pegbar = pegTree->getStageObject(modifiedNodeIds.at(i));
		if (pegbar->isGrouped() && !pegbar->isGroupEditing()) {
			groupedObj[pegbar->getGroupId()].push_back(pegbar);
			continue;
		}
		StageSchematicNode *node = addStageSchematicNode(pegbar);
		if (node != 0) {
			m_nodeTable[pegbar->getId()] = node;
			if (pegbar->isGrouped())
				editedGroup[pegbar->getEditingGroupId()].append(node);
		}
	}

	//Motion Path
	m_splineTable.clear();
	for (int i = 0; i < pegTree->getSplineCount(); i++) {
		TStageObjectSpline *spline = pegTree->getSpline(i);
		StageSchematicSplineNode *node = addSchematicSplineNode(spline);
		if (node != 0) {
			m_splineTable[spline] = node;
			connect(node, SIGNAL(currentObjectChanged(const TStageObjectId &, bool)), this,
					SLOT(onCurrentObjectChanged(const TStageObjectId &, bool)));
		}
	}
开发者ID:PsmithG,项目名称:opentoonz,代码行数:51,代码来源:stageschematicscene.cpp

示例4: if


//.........这里部分代码省略.........
		else
			xsh->getFxDag()->addOutputFx(outFx);

		if (m_terminalFxs.count(fxOrig) > 0)
			xsh->getFxDag()->getTerminalFxs()->addFx(fx);

		if (!doClone) {
			// Err.... don't remember. Inquire further? :|
			int fxTypeCount = xsh->getFxDag()->getFxTypeCount(fx);

			int maxFxTypeId = std::max(fxTypeCount, fx->getAttributes()->getId());
			xsh->getFxDag()->updateFxTypeTable(fx, maxFxTypeId);
			xsh->getFxDag()->updateFxIdTable(fx);
		}

		bool isLinked = (fxOrig->getLinkedFx() != fxOrig);
		if (isLinked) {
			if (m_fxs.find(fxOrig->getLinkedFx()) == m_fxs.end())
				fx->linkParams(fxOrig->getLinkedFx());
			else {
				TFx *linkedFx, *oldLinkedFx = fxOrig->getLinkedFx();
				if (doClone) {
					// Clone the linked fx too
					linkedFx = fx->clone(false);
					linkedFx->linkParams(fx);

					linkedFx->setName(oldLinkedFx->getName());
					linkedFx->getAttributes()->setId(oldLinkedFx->getAttributes()->getId());
					linkedFx->getAttributes()->passiveCacheDataIdx() = -1;

					if (resetFxDagPositions)
						linkedFx->getAttributes()->setDagNodePos(TConst::nowhere);
					else
						linkedFx->getAttributes()->setDagNodePos(oldLinkedFx->getAttributes()->getDagNodePos());

					xsh->getFxDag()->assignUniqueId(linkedFx);
				} else
					linkedFx = oldLinkedFx;

				fxTable[oldLinkedFx] = linkedFx;

				xsh->getFxDag()->getInternalFxs()->addFx(linkedFx);
				if (m_terminalFxs.count(oldLinkedFx) > 0)
					xsh->getFxDag()->getTerminalFxs()->addFx(linkedFx);

				if (!doClone) {
					int fxTypeCount = xsh->getFxDag()->getFxTypeCount(linkedFx);
					int maxFxTypeId = std::max(fxTypeCount, linkedFx->getAttributes()->getId());
					xsh->getFxDag()->updateFxTypeTable(linkedFx, maxFxTypeId);
					xsh->getFxDag()->updateFxIdTable(linkedFx);
				}
			}
		}
	}

	// Update the link, like in functions above
	if (!fxTable.empty() && doClone)
		updateFxLinks(fxTable);

	// Paste any associated spline (not stored im m_splines)
	std::map<TStageObjectSpline *, TStageObjectSpline *> splines;
	for (i = 0; i < (int)restoredIds.size(); ++i) {
		TStageObjectId id = restoredIds[i];
		TStageObject *obj = xsh->getStageObject(id);

		TStageObjectSpline *spline = obj->getSpline();
开发者ID:JosefMeixner,项目名称:opentoonz,代码行数:67,代码来源:stageobjectsdata.cpp


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