diff --git a/MovePlugin.hh b/MovePlugin.hh index de0626ddd09e4c1eea6b2ec15e224c2794362e53..909c7ff63986ce31b8171b8b5a2c0ab466ca8a1d 100644 --- a/MovePlugin.hh +++ b/MovePlugin.hh @@ -57,6 +57,7 @@ #include <OpenFlipper/BasePlugin/ToolbarInterface.hh> #include <OpenFlipper/BasePlugin/ContextMenuInterface.hh> #include <OpenFlipper/BasePlugin/LoadSaveInterface.hh> +#include <OpenFlipper/BasePlugin/RPCInterface.hh> #include <OpenFlipper/common/Types.hh> #include <ObjectTypes/PolyMesh/PolyMesh.hh> #include <ObjectTypes/Plane/Plane.hh> @@ -74,7 +75,7 @@ enum SelectionType {VERTEX, EDGE, FACE }; /** Plugin for moving objects and selections */ -class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface, PickingInterface, ToolboxInterface, BackupInterface, LoggingInterface, ScriptInterface,ToolbarInterface, ContextMenuInterface, LoadSaveInterface +class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface, PickingInterface, ToolboxInterface, BackupInterface, LoggingInterface, ScriptInterface,ToolbarInterface, ContextMenuInterface, LoadSaveInterface, RPCInterface { Q_OBJECT Q_INTERFACES(BaseInterface) @@ -88,6 +89,7 @@ class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface, Q_INTERFACES(ScriptInterface) Q_INTERFACES(ToolbarInterface) Q_INTERFACES(LoadSaveInterface) + Q_INTERFACES(RPCInterface) signals: // BaseInterface @@ -124,7 +126,11 @@ class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface, void registerKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse = false); // ToolboxInterface - void addToolbox( QString _name , QWidget* _widget ); + void addToolbox( QString _name , QWidget* _widget ); + + // RPCInterface + void pluginExists(QString _pluginName, bool &_exists); + void functionExists(QString _pluginName, QString _functionName, bool &_exists); private slots : diff --git a/MovePluginScript.cc b/MovePluginScript.cc index 4f5e53960e7e1656c9ecab57d1951d4c5bbccecc..7bfd194ff89122da2ece73b375d05b68fab06760 100644 --- a/MovePluginScript.cc +++ b/MovePluginScript.cc @@ -900,6 +900,14 @@ void MovePlugin::transformSkeletonJoint( int _objectId , Matrix4x4 _matrix ){ Matrix4x4 newMatrix = transform * pose->getLocal( joint->getID() ); pose->setLocal( joint->getID(), newMatrix, !recursiveJointTransformation_); + + //tell segmenation plugin to update the segmentation + bool exists = false; + + emit functionExists("segmentationplugin", "updateSegmentation()", exists); + + if (exists) + RPC::callFunction("segmentationplugin", "updateSegmentation"); } emit updatedObject(_objectId, UPDATE_GEOMETRY);