本文整理汇总了C++中TXsheet::getScene方法的典型用法代码示例。如果您正苦于以下问题:C++ TXsheet::getScene方法的具体用法?C++ TXsheet::getScene怎么用?C++ TXsheet::getScene使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TXsheet
的用法示例。
在下文中一共展示了TXsheet::getScene方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateAllLinkedStyles
void StudioPaletteCmd::updateAllLinkedStyles(TPaletteHandle *paletteHandle,
TXsheetHandle *xsheetHandle) {
if (!xsheetHandle) return;
TXsheet *xsheet = xsheetHandle->getXsheet();
if (!xsheet) return;
ToonzScene *scene = xsheet->getScene();
if (!scene) return;
// emit signal only if something changed
bool somethingChanged = false;
StudioPalette *sp = StudioPalette::instance();
TLevelSet *levelSet = scene->getLevelSet();
for (int i = 0; i < levelSet->getLevelCount(); i++) {
TXshLevel *xl = levelSet->getLevel(i);
TXshSimpleLevel *sl = xl ? xl->getSimpleLevel() : 0;
if (!sl) continue;
TPalette *palette = sl->getPalette();
if (palette) {
somethingChanged = somethingChanged | sp->updateLinkedColors(palette);
if (sl->getType() == TZP_XSHLEVEL) {
std::vector<TFrameId> fids;
sl->getFids(fids);
std::vector<TFrameId>::iterator it;
for (it = fids.begin(); it != fids.end(); ++it) {
TFrameId fid = *it;
std::string id = sl->getImageId(fid);
}
}
}
}
if (!paletteHandle || !paletteHandle->getPalette()) return;
if (somethingChanged) paletteHandle->notifyColorStyleChanged();
}
示例2: refreshModel
void FunctionViewer::refreshModel() {
TXsheet *xsh = m_xshHandle ? m_xshHandle->getXsheet() : 0;
m_functionGraph->getModel()->refreshData(xsh);
if (xsh) {
int rowCount = xsh->getFrameCount();
m_numericalColumns->setRowCount(rowCount);
m_numericalColumns->updateAll();
ToonzScene *scene = xsh->getScene();
if (!scene) // This seems wrong. It should rather be
return; // asserted - though I'm not touching it now...
TFilePath scenePath = scene->getScenePath().getParentDir();
if (scene->isUntitled())
scenePath =
TProjectManager::instance()->getCurrentProject()->getScenesPath();
m_treeView->setCurrentScenePath(scenePath);
int distance, offset;
scene->getProperties()->getMarkers(distance, offset);
m_numericalColumns->setMarkRow(distance, offset);
}
m_treeView->updateAll();
m_toolbar->setCurve(0);
}