コード例 #1
0
ファイル: SceneView.cpp プロジェクト: sonyomega/gaffer
void SceneView::transferSelectionToContext()
{
	/// \todo If RenderableGadget used PathMatcherData, then we might not need
	/// to copy data here.
	const RenderableGadget::Selection &selection = m_renderableGadget->getSelection();
	StringVectorDataPtr s = new StringVectorData();
	s->writable().insert( s->writable().end(), selection.begin(), selection.end() );
	getContext()->set( "ui:scene:selectedPaths", s.get() );
}
コード例 #2
0
ファイル: SceneView.cpp プロジェクト: Eryckz/gaffer
void SceneView::transferSelectionToContext()
{
	/// \todo Use PathMatcherData for the context variable so we don't need
	/// to do this copying into StringVectorData. See related comments
	/// in SceneHierarchy.__transferSelectionFromContext
	StringVectorDataPtr s = new StringVectorData();
	m_sceneGadget->getSelection()->readable().paths( s->writable() );
	getContext()->set( "ui:scene:selectedPaths", s.get() );
}
コード例 #3
0
ファイル: ContextAlgo.cpp プロジェクト: mattigruener/gaffer
void setSelectedPaths( Context *context, const GafferScene::PathMatcher &paths )
{
	/// \todo: Switch to storing PathMatcherData after some thorough
	/// testing and a major version break.
	StringVectorDataPtr s = new StringVectorData;
	paths.paths( s->writable() );

	context->set( g_selectedPathsName, s.get() );
}