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() ); }
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() ); }
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() ); }