本文整理汇总了C++中TXsheet::getFxDag方法的典型用法代码示例。如果您正苦于以下问题:C++ TXsheet::getFxDag方法的具体用法?C++ TXsheet::getFxDag怎么用?C++ TXsheet::getFxDag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TXsheet
的用法示例。
在下文中一共展示了TXsheet::getFxDag方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
//!Build the scene fx for each node below the xsheet one.
//!Remember that left xsheet ports must not be expanded.
void MultimediaRenderer::Imp::scanSceneForLayers()
{
//Retrieve the terminal fxs (ie, fxs which are implicitly
//connected to the xsheet one)
TXsheet *xsh = m_scene->getXsheet();
TFxSet *fxs = xsh->getFxDag()->getTerminalFxs();
//Examine all of them and - eventually - expand left xsheet
//ports (ie fx nodes who allow implicit overlaying)
for (int i = 0; i < fxs->getFxCount(); ++i) {
TFx *fx = fxs->getFx(i);
TFxPort *leftXSheetPort;
retry:
if (!fx)
continue;
leftXSheetPort = fx->getXsheetPort();
if (!leftXSheetPort) {
m_fxsToRender.addFx(fx);
continue;
}
//If the leftXSheetPort is not connected, retry on port 0
if (leftXSheetPort->isConnected())
m_fxsToRender.addFx(fx);
else {
fx = fx->getInputPort(0)->getFx();
goto retry;
}
}
}
示例2: scanColsRecursive
//!Retrieve the first level of scene columns, climb their paths
//!along unary fxs, and then build the scene fxs.
void MultimediaRenderer::Imp::scanSceneForColumns()
{
//Retrieve the terminal fxs (ie, fxs which are implicitly
//connected to the xsheet one)
TXsheet *xsh = m_scene->getXsheet();
TFxSet *fxs = xsh->getFxDag()->getTerminalFxs();
//Launch the recursive column climber procedure for each
for (int i = 0; i < fxs->getFxCount(); ++i) {
TFx *fx = fxs->getFx(i);
if (!fx)
continue;
bool isItARenderFx = scanColsRecursive(fx);
if (isItARenderFx)
m_fxsToRender.addFx(fx);
}
}
示例3: isConnected
bool FxSelection::isConnected() {
if (m_selectedFxs.isEmpty()) return false;
QList<TFx *> visitedFxs;
visitFx(m_selectedFxs.at(0).getPointer(), visitedFxs);
bool connected = true;
QList<TFxP>::const_iterator it;
TXsheet *xsh = m_xshHandle->getXsheet();
TFxSet *internalFxs = xsh->getFxDag()->getInternalFxs();
for (it = m_selectedFxs.begin(); it != m_selectedFxs.end(); it++) {
TFx *selectedFx = it->getPointer();
TColumnFx *cfx = dynamic_cast<TColumnFx *>(selectedFx);
if (!cfx && !internalFxs->containsFx(selectedFx)) return false;
TZeraryColumnFx *zfx = dynamic_cast<TZeraryColumnFx *>(selectedFx);
if (zfx) selectedFx = zfx->getZeraryFx();
connected = connected && visitedFxs.contains(selectedFx);
}
return connected;
}
示例4: cloneChild
void ColumnCmd::cloneChild(int index) {
if (!canResequence(index)) return;
/*-- カラムを取得 --*/
TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet();
TXshColumn *column = xsh->getColumn(index);
assert(column);
// get the subxsheet to clone (childLevel, childXsh)
/*-- SubXsheetレベルを取得 --*/
TXshLevelColumn *lcolumn = column->getLevelColumn();
assert(lcolumn);
int r0 = 0, r1 = -1;
lcolumn->getRange(r0, r1);
assert(r0 <= r1);
/*-- SubXsheetの一番頭のセル --*/
TXshCell cell = lcolumn->getCell(r0);
assert(!cell.isEmpty());
/*- cell内に格納されているLevelを取得 -*/
TXshChildLevel *childLevel = cell.m_level->getChildLevel();
assert(childLevel);
/*- SubXsheetのXsheetを取得 -*/
TXsheet *childXsh = childLevel->getXsheet();
// insert a new empty column
/*- 隣に空きColumnをInsertしてCloneに備える -*/
int newColumnIndex = index + 1;
xsh->insertColumn(newColumnIndex);
// create a subxsheet (newChildLevel, newChildXsh)
ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene();
ChildStack *childStack = scene->getChildStack();
TXshChildLevel *newChildLevel = childStack->createChild(0, newColumnIndex);
TXsheet *newChildXsh = newChildLevel->getXsheet();
// copy columns.
std::set<int> indices;
for (int i = 0; i < childXsh->getColumnCount(); i++) indices.insert(i);
StageObjectsData *data = new StageObjectsData();
data->storeColumns(indices, childXsh, 0);
data->storeColumnFxs(indices, childXsh, 0);
std::list<int> restoredSplineIds;
data->restoreObjects(indices, restoredSplineIds, newChildXsh,
StageObjectsData::eDoClone);
delete data;
cloneNotColumnLinkedFxsAndOutputsFx(childXsh, newChildXsh);
cloneXsheetTStageObjectTree(childXsh, newChildXsh);
/*--以下は、Clone SubXsheet
するときに、SubXsheet内にある子SubXsheetをクローンする関数
クローンされた中にある子SubXsheetは、同じもので良いので、スキップする --*/
// cloneSubXsheets(newChildXsh);
/*-- XSheetノードのFxSchematicでのDagNodePosを再現
FxやColumnノードの位置の再現は上のsetColumnで行っている
--*/
newChildXsh->getFxDag()->getXsheetFx()->getAttributes()->setDagNodePos(
childXsh->getFxDag()->getXsheetFx()->getAttributes()->getDagNodePos());
newChildXsh->updateFrameCount();
/*-- TXshChildLevel作成時にsetCellした1つ目のセルを消去 --*/
xsh->removeCells(0, newColumnIndex);
/*-- CloneしたColumnのセル番号順を再現 --*/
for (int r = r0; r <= r1; r++) {
TXshCell cell = lcolumn->getCell(r);
if (cell.isEmpty()) continue;
cell.m_level = newChildLevel;
xsh->setCell(r, newColumnIndex, cell);
}
TStageObjectId currentObjectId =
TApp::instance()->getCurrentObject()->getObjectId();
xsh->getStageObject(TStageObjectId::ColumnId(newColumnIndex))
->setParent(xsh->getStageObjectParent(currentObjectId));
xsh->updateFrameCount();
TUndoManager::manager()->add(
new CloneChildUndo(newChildLevel, newColumnIndex));
// notify changes
TApp::instance()->getCurrentScene()->setDirtyFlag(true);
TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
}