From f9086e31de021c93966f431406f9f93dc537c850 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 1 Mar 2018 10:08:50 +1300 Subject: [PATCH] Deprecate Entities.getMeshes() in favor of using the new Graphics API --- libraries/entities/src/EntityScriptingInterface.h | 4 +++- .../src/graphics-scripting/GraphicsScriptingInterface.h | 2 +- libraries/shared/src/RegisteredMetaTypes.h | 3 +++ tools/jsdoc/plugins/hifi.js | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index e5780fbad4..166b2130ef 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -1305,6 +1305,7 @@ public slots: * @function Entities.getMeshes * @param {Uuid} entityID - The ID of the Model or PolyVox entity to get the meshes of. * @param {Entities~getMeshesCallback} callback - The function to call upon completion. + * @deprecated Use the {@link Graphics} API instead. */ /**jsdoc * Called when {@link Entities.getMeshes} is complete. @@ -1313,7 +1314,8 @@ public slots: * Model or PolyVox entity; otherwise undefined. * @param {boolean} success - true if the {@link Entities.getMeshes} call was successful, false * otherwise. The call may be unsuccessful if the requested entity could not be found. - */ + * @deprecated Use the {@link Graphics} API instead. + */ // FIXME move to a renderable entity interface Q_INVOKABLE void getMeshes(QUuid entityID, QScriptValue callback); diff --git a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.h b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.h index 84c6cb6fa8..526352804b 100644 --- a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.h +++ b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.h @@ -38,7 +38,7 @@ public slots: * Returns a model reference object associated with the specified UUID ({@link EntityID}, {@link OverlayID}, or {@link AvatarID}). * * @function Graphics.getModel - * @param {UUID} The objectID of the model whose meshes are to be retrieved. + * @param {UUID} entityID - The objectID of the model whose meshes are to be retrieved. * @return {Graphics.Model} the resulting Model object */ scriptable::ScriptableModelPointer getModel(QUuid uuid); diff --git a/libraries/shared/src/RegisteredMetaTypes.h b/libraries/shared/src/RegisteredMetaTypes.h index 9080a59d98..4fee78a0db 100644 --- a/libraries/shared/src/RegisteredMetaTypes.h +++ b/libraries/shared/src/RegisteredMetaTypes.h @@ -345,6 +345,7 @@ using MeshPointer = std::shared_ptr; /**jsdoc * A handle for a mesh in an entity, such as returned by {@link Entities.getMeshes}. * @class MeshProxy + * @deprecated Use the {@link Graphics} API instead. */ class MeshProxy : public QObject { Q_OBJECT @@ -356,6 +357,7 @@ public: * Get the number of vertices in the mesh. * @function MeshProxy#getNumVertices * @returns {number} Integer number of vertices in the mesh. + * @deprecated Use the {@link Graphics} API instead. */ Q_INVOKABLE virtual int getNumVertices() const = 0; @@ -364,6 +366,7 @@ public: * @function MeshProxy#getPos3 * @param {number} index - Integer index of the mesh vertex. * @returns {Vec3} Local position of the vertex relative to the mesh. + * @deprecated Use the {@link Graphics} API instead. */ Q_INVOKABLE virtual glm::vec3 getPos3(int index) const = 0; }; diff --git a/tools/jsdoc/plugins/hifi.js b/tools/jsdoc/plugins/hifi.js index 1240e501da..1f73f14b2b 100644 --- a/tools/jsdoc/plugins/hifi.js +++ b/tools/jsdoc/plugins/hifi.js @@ -24,6 +24,7 @@ exports.handlers = { '../../libraries/animation/src', '../../libraries/avatars/src', '../../libraries/controllers/src/controllers/', + '../../libraries/graphics-scripting/src/graphics-scripting/', '../../libraries/entities/src', '../../libraries/model-networking/src/model-networking/', '../../libraries/octree/src',