Commit 17313c13 authored by Jan Möbius's avatar Jan Möbius

MeshCompare: Remove the nodes if the corresponding object got updated. refs #360

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13599 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b3c52bf1
......@@ -160,6 +160,20 @@ void MeshComparePlugin::compareButton() {
}
void MeshComparePlugin::slotObjectUpdated( int _identifier, const UpdateType& _type ) {
// Get source and target objects
BaseObjectData* object = 0;
PluginFunctions::getObject(_identifier,object);
if ( object ) {
ACG::SceneGraph::MaterialNode *pMatNode = 0;
if ( object->getAdditionalNode(pMatNode,name(), "MeshCompareDistanceMaterial" ) )
object->removeAdditionalNode(pMatNode,name(),"MeshCompareDistanceMaterial");
}
}
void MeshComparePlugin::slotClear() {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
......
......@@ -108,6 +108,9 @@ class MeshComparePlugin : public QObject, BaseInterface, ToolboxInterface, Loggi
/// Clears the visualization
void slotClear();
/// Called when an object gets updated
void slotObjectUpdated( int _identifier, const UpdateType& _type );
// Scriptable functions
public slots:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment