本文整理汇总了C++中sceneplug::ScenePath::pop_back方法的典型用法代码示例。如果您正苦于以下问题:C++ ScenePath::pop_back方法的具体用法?C++ ScenePath::pop_back怎么用?C++ ScenePath::pop_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sceneplug::ScenePath
的用法示例。
在下文中一共展示了ScenePath::pop_back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: collapseSelection
void SceneView::collapseSelection()
{
PathMatcher &selection = const_cast<GafferScene::PathMatcherData *>( m_sceneGadget->getSelection() )->writable();
std::vector<string> toCollapse;
selection.paths( toCollapse );
if( !toCollapse.size() )
{
return;
}
GafferScene::PathMatcherData *expandedData = expandedPaths();
PathMatcher &expanded = expandedData->writable();
for( vector<string>::const_iterator it = toCollapse.begin(), eIt = toCollapse.end(); it != eIt; ++it )
{
/// \todo It would be nice to be able to get ScenePaths out of
/// PathMatcher::paths() directly.
ScenePlug::ScenePath path;
ScenePlug::stringToPath( *it, path );
if( !expanded.removePath( path ) )
{
if( path.size() <= 1 )
{
continue;
}
selection.removePath( path );
path.pop_back(); // now the parent path
expanded.removePath( path );
selection.addPath( path );
}
}
// See comment in expandSelection().
getContext()->changedSignal()( getContext(), "ui:scene:expandedPaths" );
// See comment in expandSelection().
transferSelectionToContext();
}