[Paraview] created representation is invisible in view
Peter Debuchev
peterdebuchev at gmail.com
Wed Jun 15 11:26:23 EDT 2016
Hello,
short question, probably with an easy answer:
Why is the vtkSMRepresentationProxy, created for a vtkSMSourceProxy of a
SphereSource not rendered in the attached c++ code?
I guess I am missing a step which adds the representation to the view. But
how?
Peter
#include "vtkSMSession.h"
#include "vtkSMSessionClient.h"
#include "vtkProcessModule.h"
#include "vtkPVOptions.h"
#include "vtkInitializationHelper.h"
#include "vtkSMProxy.h"
#include "vtkSMProxyManager.h"
#include "vtkSMSessionProxyManager.h"
#include "vtkSMProxy.h"
#include "vtkSMPropertyHelper.h"
#include "vtkSMParaViewPipelineController.h"
#include "vtkSMProxy.h"
#include "vtkSMRepresentationProxy.h"
#include "vtkSMRenderViewProxy.h"
#include "vtkRenderWindowInteractor.h"
using namespace std;
int main(int argc, char* argv[]){
vtkPVOptions *options=vtkPVOptions::New();
vtkInitializationHelper::Initialize(argc,argv,vtkProcessModule::PROCESS_CLIENT,options);
vtkSMSessionClient *session=vtkSMSessionClient::New();
session->Connect("cs://localhost:11111");
vtkSMParaViewPipelineController*
smcontroller=vtkSMParaViewPipelineController::New();
smcontroller->InitializeSession(session);
vtkSMSessionProxyManager* pxm = session->GetSessionProxyManager();
vtkSMRenderViewProxy
*view=vtkSMRenderViewProxy::SafeDownCast(pxm->NewProxy("views","RenderView"));
vtkSMSourceProxy
*sphere=vtkSMSourceProxy::SafeDownCast(pxm->NewProxy("sources","SphereSource"));
sphere->UpdatePipeline();
vtkSMRepresentationProxy
*repr=view->CreateDefaultRepresentation(sphere,0);
repr->UpdateVTKObjects();
view->MakeRenderWindowInteractor(true);
vtkRenderWindowInteractor *iren=view->GetInteractor();
iren->Initialize();
view->GetInteractor()->Start();
session->CloseSession();
vtkInitializationHelper::Finalize();
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160615/a09f2de6/attachment.html>
More information about the ParaView
mailing list