diff --git a/src/common/scriptinterface.cpp b/src/common/scriptinterface.cpp index 9f445e0a8..f007cd492 100644 --- a/src/common/scriptinterface.cpp +++ b/src/common/scriptinterface.cpp @@ -398,7 +398,7 @@ Q_INVOKABLE VCGVertexScriptInterface* MeshModelScriptInterface::v( const int ind return NULL; } -Q_INVOKABLE QVector VCGVertexScriptInterface::p() +Q_INVOKABLE QVector VCGVertexScriptInterface::getP() { QVector vfl(3); for (int ii = 0;ii < 3;++ii) @@ -406,6 +406,11 @@ Q_INVOKABLE QVector VCGVertexScriptInterface::p() return vfl; } +Q_INVOKABLE void VCGVertexScriptInterface::setP( const float x,const float y,const float z ) +{ + vv.P() = vcg::Point3f(x,y,z); +} + QScriptValue MeshModelScriptInterfaceToScriptValue(QScriptEngine* eng,MeshModelScriptInterface* const& in) { return eng->newQObject(in); diff --git a/src/common/scriptinterface.h b/src/common/scriptinterface.h index 239fec77f..c4e1645ee 100644 --- a/src/common/scriptinterface.h +++ b/src/common/scriptinterface.h @@ -81,7 +81,8 @@ public: VCGVertexScriptInterface(CMeshO::VertexType& v); //Q_INVOKABLE vcg::Point3f* p(); - Q_INVOKABLE QVector p(); + Q_INVOKABLE QVector getP(); + Q_INVOKABLE void setP(const float x,const float y,const float z); CMeshO::VertexType& vv; };