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();
}
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to