#include <QDebug>
+#include "SPV3D_Prs.h"
+
+
//-----------------------------------------------------------------------------
SPV3D_CADSelection::SPV3D_CADSelection(QObject *parent,
// Retrieve the wanted information property
- vtkSMProperty* selectedIDProperty =
+ vtkSMProperty* PreselectedIDProperty =
proxyRepresentation->GetProperty("PreSelectedID");
- if (!selectedIDProperty)
+ if (!PreselectedIDProperty)
{
qWarning()<< "The representation named '" << proxyRepresentation->GetXMLName()<< "' didn't have a property named 'SelectedIDInfo'.";
return;
}
// Force to update the information property
- proxyRepresentation->UpdatePropertyInformation(selectedIDProperty);
+ proxyRepresentation->UpdatePropertyInformation(PreselectedIDProperty);
- //vtkIdType PreSelectedID =
- // vtkSMPropertyHelper(proxyRepresentation,"PreSelectedID").GetAsInt(0);
+ vtkIdType PreSelectedID =
+ vtkSMPropertyHelper(proxyRepresentation,"PreSelectedID").GetAsInt(0);
+ std::cout << "entry from client: "<< SPV3D_Prs::FromVtkIdToEntry(PreSelectedID)<< std::endl;
- //std::cout << "PreSelectedID: "<< PreSelectedID<< std::endl;
- //
}
//-----------------------------------------------------------------------------
{
std::cout<< "Can't update PV presentation pipeline"<< std::endl;
}
- /*
-
- if(const SPV3D_Prs* aPrs = dynamic_cast<const SPV3D_Prs*>( prs ))
- {
- if( !aPrs->GetRepresentation() )
- {
- pqObjectBuilder *builder(pqApplicationCore::instance()->getObjectBuilder());
- pqActiveObjects::instance().setActiveView(getView());
- pqPipelineSource *mySourceProducer = aPrs->GetSourceProducer();
- aPrs->SetSourceProducer( mySourceProducer );
- pqDataRepresentation* myRepr(builder->createDataRepresentation(mySourceProducer->getOutputPort(0),getView(),"CADRepresentation"));//"GeometryRepresentation"
- vtkSMViewProxy::RepresentationVisibilityChanged(myRepr->getViewProxy(), myRepr->getProxy(), true);
-
- aPrs->SetRepresentation(myRepr);
- }
- pqDataRepresentation* myRepr = aPrs->GetRepresentation();
-
- myRepr->setVisible(1);
- vtkSMPVRepresentationProxy* proxy(dynamic_cast<vtkSMPVRepresentationProxy*>(myRepr->getProxy()));
- if(proxy)
- {
- vtkSMPropertyHelper inputHelper(proxy, "Input");
- vtkSMSourceProxy* input = vtkSMSourceProxy::SafeDownCast(inputHelper.GetAsProxy());
- input->UpdatePipeline();
- }
- getView()->resetDisplay();
- getView()->render();
- }
- */
}
/*!
return;
aPrs->hide();
updatePVPrsPipeline(aPrs);
- ////aPrs->GetRepresentation()->setVisible(0);
- ////aPrs->GetRepresentation()->setVisible(1);
- ////
getView()->resetDisplay();
getView()->render();
- //pqObjectBuilder* builder = pqApplicationCore::instance()->getObjectBuilder();
- //pqServer* activeServer = pqActiveObjects::instance().activeServer();
- //builder->destroySources(activeServer);
}
}