diff --git a/interface/src/scripting/Audio.h b/interface/src/scripting/Audio.h index 509d5a8fa7..a8778fcc2d 100644 --- a/interface/src/scripting/Audio.h +++ b/interface/src/scripting/Audio.h @@ -298,9 +298,9 @@ public: * Audio is recorded to snapshots directory specified in settings. * @function Audio.startRecording * @returns {Uuid} A valid Uuid if the specified file could be opened and audio recording has started, otherwise - * Uuid.NULL. + * Uuid.NONE. * @example Make a 10 second audio recording. - * if (Audio.startRecording() !== Uuid.NULL) { + * if (Audio.startRecording() !== Uuid.NONE) { * Script.setTimeout(function () { * Audio.stopRecording(); * print("Audio recording finished."); diff --git a/interface/src/ui/overlays/Overlays.h b/interface/src/ui/overlays/Overlays.h index fcf0c71bc9..c62cb11649 100644 --- a/interface/src/ui/overlays/Overlays.h +++ b/interface/src/ui/overlays/Overlays.h @@ -85,7 +85,7 @@ public: * * @property {Uuid} keyboardFocusOverlay - The {@link Overlays.OverlayProperties-Web3D|"web3d"} overlay * ({@link Entities.EntityProperties-Web|Web} entity) that has keyboard focus. If no overlay (entity) has keyboard focus, - * returns null; set to null or {@link Uuid(0)|Uuid.NULL} to clear keyboard focus. + * returns null; set to null or {@link Uuid(0)|Uuid.NONE} to clear keyboard focus. */ class Overlays : public QObject { @@ -125,7 +125,7 @@ public slots: * @function Overlays.addOverlay * @param {Overlays.OverlayType} type - The type of the overlay to add. * @param {Overlays.OverlayProperties} properties - The properties of the overlay to add. - * @returns {Uuid} The ID of the newly created overlay if successful, otherwise {@link Uuid(0)|Uuid.NULL}. + * @returns {Uuid} The ID of the newly created overlay if successful, otherwise {@link Uuid(0)|Uuid.NONE}. * @example Add a cube overlay in front of your avatar. * var overlay = Overlays.addOverlay("cube", { * position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })), @@ -141,7 +141,7 @@ public slots: *

Note: For cloning behavior of 3D overlays and entities, see {@link Entities.cloneEntity}.

* @function Overlays.cloneOverlay * @param {Uuid} id - The ID of the overlay (or entity) to clone. - * @returns {Uuid} The ID of the new overlay (or entity) if successful, otherwise {@link Uuid(0)|Uuid.NULL}. + * @returns {Uuid} The ID of the new overlay (or entity) if successful, otherwise {@link Uuid(0)|Uuid.NONE}. */ QUuid cloneOverlay(const QUuid& id); @@ -535,7 +535,7 @@ public slots: * @function Overlays.setKeyboardFocusOverlay * @param {Uuid} id - The ID of the {@link Overlays.OverlayProperties-Web3D|"web3d"} overlay * ({@link Entities.EntityProperties-Web|Web} entity) to set keyboard focus to. Use null or - * {@link Uuid(0)|Uuid.NULL} to unset keyboard focus from an overlay (entity). + * {@link Uuid(0)|Uuid.NONE} to unset keyboard focus from an overlay (entity). */ void setKeyboardFocusOverlay(const QUuid& id) { DependencyManager::get()->setKeyboardFocusEntity(id); } diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h index 2e618350a4..c3b6f9b92d 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h @@ -443,7 +443,7 @@ public: /*@jsdoc * Gets the ID of the entity or avatar that the avatar is parented to. * @function MyAvatar.getParentID - * @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NULL} if not parented. + * @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NONE} if not parented. */ // This calls through to the SpatiallyNestable versions, but is here to expose these to JavaScript. Q_INVOKABLE virtual const QUuid getParentID() const override { return SpatiallyNestable::getParentID(); } @@ -452,7 +452,7 @@ public: * Sets the ID of the entity or avatar that the avatar is parented to. * @function MyAvatar.setParentID * @param {Uuid} parentID - The ID of the entity or avatar that the avatar should be parented to. Set to - * {@link Uuid(0)|Uuid.NULL} to unparent. + * {@link Uuid(0)|Uuid.NONE} to unparent. */ // This calls through to the SpatiallyNestable versions, but is here to expose these to JavaScript. Q_INVOKABLE virtual void setParentID(const QUuid& parentID) override; diff --git a/libraries/avatars-renderer/src/avatars-renderer/ScriptAvatar.h b/libraries/avatars-renderer/src/avatars-renderer/ScriptAvatar.h index bffd0561ab..906d3d438d 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/ScriptAvatar.h +++ b/libraries/avatars-renderer/src/avatars-renderer/ScriptAvatar.h @@ -153,7 +153,7 @@ public slots: /*@jsdoc * Gets the ID of the entity or avatar that the avatar is parented to. * @function ScriptAvatar.getParentID - * @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NULL} if not parented + * @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NONE} if not parented * or avatar data aren't available. */ QUuid getParentID() const; diff --git a/libraries/entities/src/EntityItemPropertiesDocs.cpp b/libraries/entities/src/EntityItemPropertiesDocs.cpp index 2e1c0013e3..8bd4c07da3 100644 --- a/libraries/entities/src/EntityItemPropertiesDocs.cpp +++ b/libraries/entities/src/EntityItemPropertiesDocs.cpp @@ -31,8 +31,8 @@ * false if it isn't. The value is per the entityHostType property value, set at entity creation * by one of the {@link Entities.addEntity} methods. Read-only. * - * @property {Uuid} owningAvatarID=Uuid.NULL - The session ID of the owning avatar if avatarEntity is - * true, otherwise {@link Uuid(0)|Uuid.NULL}. Read-only. + * @property {Uuid} owningAvatarID=Uuid.NONE - The session ID of the owning avatar if avatarEntity is + * true, otherwise {@link Uuid(0)|Uuid.NONE}. Read-only. * * @property {number} created - When the entity was created, expressed as the number of microseconds since * 1970-01-01T00:00:00 UTC. Read-only. @@ -131,8 +131,8 @@ * button beside the "script URL" field in properties tab of the Create app works. * @property {string} serverScripts="" - The URL of the server entity script, if any, that is attached to the entity. * - * @property {Uuid} parentID=Uuid.NULL - The ID of the entity or avatar that the entity is parented to. A value of - * {@link Uuid(0)|Uuid.NULL} is used if the entity is not parented. + * @property {Uuid} parentID=Uuid.NONE - The ID of the entity or avatar that the entity is parented to. A value of + * {@link Uuid(0)|Uuid.NONE} is used if the entity is not parented. * @property {number} parentJointIndex=65535 - The joint of the entity or avatar that the entity is parented to. Use * 65535 or -1 to parent to the entity or avatar's position and orientation rather than a joint. * @property {Vec3} localPosition=0,0,0 - The position of the entity relative to its parent if the entity is parented, @@ -184,7 +184,7 @@ * * @property {MirrorMode} mirrorMode="none" - If this entity should render as a mirror (reflecting the view of the camera), * a portal (reflecting the view through its portalExitID), or normally. - * @property {Uuid} portalExitID=Uuid.NULL - The ID of the entity that should act as the portal exit if the mirrorMode + * @property {Uuid} portalExitID=Uuid.NONE - The ID of the entity that should act as the portal exit if the mirrorMode * is set to portal. * * @comment The different entity types have additional properties as follows: @@ -612,18 +612,18 @@ * JPG or PNG format. If no texture is specified the surfaces display white. * @property {string} zTextureURL="" - The URL of the texture to map to surfaces perpendicular to the entity's local z-axis. * JPG or PNG format. If no texture is specified the surfaces display white. - * @property {Uuid} xNNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's -ve local x-axis - * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. - * @property {Uuid} yNNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's -ve local y-axis - * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. - * @property {Uuid} zNNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's -ve local z-axis - * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. - * @property {Uuid} xPNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's +ve local x-axis - * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. - * @property {Uuid} yPNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's +ve local y-axis - * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. - * @property {Uuid} zPNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's +ve local z-axis - * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. + * @property {Uuid} xNNeighborID=Uuid.NONE - The ID of the neighboring PolyVox entity in the entity's -ve local x-axis + * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NONE} if there is none or you don't want to join them. + * @property {Uuid} yNNeighborID=Uuid.NONE - The ID of the neighboring PolyVox entity in the entity's -ve local y-axis + * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NONE} if there is none or you don't want to join them. + * @property {Uuid} zNNeighborID=Uuid.NONE - The ID of the neighboring PolyVox entity in the entity's -ve local z-axis + * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NONE} if there is none or you don't want to join them. + * @property {Uuid} xPNeighborID=Uuid.NONE - The ID of the neighboring PolyVox entity in the entity's +ve local x-axis + * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NONE} if there is none or you don't want to join them. + * @property {Uuid} yPNeighborID=Uuid.NONE - The ID of the neighboring PolyVox entity in the entity's +ve local y-axis + * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NONE} if there is none or you don't want to join them. + * @property {Uuid} zPNeighborID=Uuid.NONE - The ID of the neighboring PolyVox entity in the entity's +ve local z-axis + * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NONE} if there is none or you don't want to join them. * @example Create a textured PolyVox sphere. * var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 })); * var texture = "http://public.highfidelity.com/cozza13/tuscany/Concrete2.jpg"; diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index 6fe4a96d75..f916b97367 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -164,7 +164,7 @@ public: * @hifi-assignment-client * * @property {Uuid} keyboardFocusEntity - The {@link Entities.EntityProperties-Web|Web} entity that has keyboard focus. If no - * Web entity has keyboard focus, returns null; set to null or {@link Uuid(0)|Uuid.NULL} to clear + * Web entity has keyboard focus, returns null; set to null or {@link Uuid(0)|Uuid.NONE} to clear * keyboard focus. */ /// handles scripting of Entity commands from JS passed to assigned clients @@ -323,7 +323,7 @@ public slots: * @param {Entities.EntityProperties} properties - The properties of the entity to create. * @param {Entities.EntityHostType} [entityHostType="domain"] - The type of entity to create. - * @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NULL}. + * @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NONE}. * @example Create a box domain entity in front of your avatar. * var entityID = Entities.addEntity({ * type: "Box", @@ -354,7 +354,7 @@ public slots: * @param {Entities.EntityProperties} properties - The properties of the entity to create. * @param {boolean} [avatarEntity=false] - true to create an avatar entity, false to create a * domain entity. - * @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NULL}. + * @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NONE}. */ Q_INVOKABLE QUuid addEntity(const EntityItemProperties& properties, bool avatarEntity = false) { entity::HostType entityHostType = avatarEntity ? entity::HostType::AVATAR : entity::HostType::DOMAIN; @@ -378,7 +378,7 @@ public slots: * true in order to be cloned.

* @function Entities.cloneEntity * @param {Uuid} entityID - The ID of the entity to clone. - * @returns {Uuid} The ID of the new entity if successfully cloned, otherwise {@link Uuid(0)|Uuid.NULL}. + * @returns {Uuid} The ID of the new entity if successfully cloned, otherwise {@link Uuid(0)|Uuid.NONE}. */ Q_INVOKABLE QUuid cloneEntity(const QUuid& entityID); @@ -429,7 +429,7 @@ public slots: * @function Entities.editEntity * @param {Uuid} entityID - The ID of the entity to edit. * @param {Entities.EntityProperties} properties - The new property values. - * @returns {Uuid} The ID of the entity if the edit was successful, otherwise null or {@link Uuid|Uuid.NULL}. + * @returns {Uuid} The ID of the entity if the edit was successful, otherwise null or {@link Uuid|Uuid.NONE}. * @example Change the color of an entity. * var entityID = Entities.addEntity({ * type: "Box", @@ -1681,7 +1681,7 @@ public slots: * } * * var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 })); - * var root = createEntity("Root", position, Uuid.NULL); + * var root = createEntity("Root", position, Uuid.NONE); * var child = createEntity("Child", Vec3.sum(position, { x: 0, y: -1, z: 0 }), root); * var grandChild = createEntity("Grandchild", Vec3.sum(position, { x: 0, y: -2, z: 0 }), child); * @@ -1713,7 +1713,7 @@ public slots: * } * * var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 })); - * var root = createEntity("Root", position, Uuid.NULL); + * var root = createEntity("Root", position, Uuid.NONE); * var child = createEntity("Child", Vec3.sum(position, { x: 0, y: -1, z: 0 }), root); * * Script.setTimeout(function () { // Wait for the entity to be created before editing. @@ -1749,7 +1749,7 @@ public slots: * } * * var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 })); - * var root = createEntity("Root", position, Uuid.NULL); + * var root = createEntity("Root", position, Uuid.NONE); * var child = createEntity("Child", Vec3.sum(position, { x: 0, y: -1, z: 0 }), root); * var grandChild = createEntity("Grandchild", Vec3.sum(position, { x: 0, y: -2, z: 0 }), child); * @@ -1785,7 +1785,7 @@ public slots: * Sets the {@link Entities.EntityProperties-Web|Web} entity that has keyboard focus. * @function Entities.setKeyboardFocusEntity * @param {Uuid} id - The ID of the {@link Entities.EntityProperties-Web|Web} entity to set keyboard focus to. Use - * null or {@link Uuid(0)|Uuid.NULL} to unset keyboard focus from an entity. + * null or {@link Uuid(0)|Uuid.NONE} to unset keyboard focus from an entity. */ Q_INVOKABLE void setKeyboardFocusEntity(const QUuid& id); @@ -2017,7 +2017,7 @@ public slots: * * var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 })); * - * var parent = createEntity(position, MyAvatar.orientation, Uuid.NULL); + * var parent = createEntity(position, MyAvatar.orientation, Uuid.NONE); * * var childTranslation = { x: 0, y: -1.5, z: 0 }; * var childRotation = Quat.fromPitchYawRollDegrees(0, 45, 0); diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index bbf78157bf..a78f9d7d73 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -49,7 +49,7 @@ const QString GET_PLACE = "/api/v1/places/%1"; * @hifi-avatar * @hifi-assignment-client * - * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NULL} if you're not + * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NONE} if you're not * connected to the domain or are in a serverless domain. * Read-only. * @property {string} hostname - The name of the domain for your current directory services address (e.g., "DomainName", @@ -83,7 +83,7 @@ const QString GET_PLACE = "/api/v1/places/%1"; * @deprecated This API is deprecated and will be removed. Use the {@link location} or {@link Window|Window.location} APIs * instead. * - * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NULL} if you're not + * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NONE} if you're not * connected to the domain or are in a serverless domain. * Read-only. * @property {string} hostname - The name of the domain for your current directory services address (e.g., "DomainName", @@ -397,7 +397,7 @@ signals: * Triggered when a request is made to go to a URL or IP address. * @function location.possibleDomainChangeRequired * @param {string} domainURL - The URL of the domain. - * @param {Uuid} domainID - The UUID of the domain to go to. May be {@link Uuid|Uuid.NULL} if not yet known. + * @param {Uuid} domainID - The UUID of the domain to go to. May be {@link Uuid|Uuid.NONE} if not yet known. * @returns {Signal} */ // No example because this function isn't typically used in scripts. diff --git a/libraries/script-engine/src/ScriptManagerScriptingInterface.h b/libraries/script-engine/src/ScriptManagerScriptingInterface.h index d319cd30ae..9fc23de283 100644 --- a/libraries/script-engine/src/ScriptManagerScriptingInterface.h +++ b/libraries/script-engine/src/ScriptManagerScriptingInterface.h @@ -435,7 +435,7 @@ public: * @param {Uuid} entityID - The ID of the entity running the entity script. * @param {string} methodName - The name of the method to call. * @param {string[]} [parameters=[]] - The parameters to call the specified method with. - * @param {Uuid} [remoteCallerID=Uuid.NULL] - An ID that identifies the caller. + * @param {Uuid} [remoteCallerID=Uuid.NONE] - An ID that identifies the caller. */ Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName, const QStringList& params = QStringList(), @@ -740,7 +740,7 @@ public: * @returns {Signal} * @example Get the ID of the entity that a client entity script is running in. * var entityScript = function () { - * this.entityID = Uuid.NULL; + * this.entityID = Uuid.NONE; * }; * * Script.entityScriptPreloadFinished.connect(function (entityID) { diff --git a/libraries/script-engine/src/ScriptUUID.h b/libraries/script-engine/src/ScriptUUID.h index 921c61428b..b32d3b11a1 100644 --- a/libraries/script-engine/src/ScriptUUID.h +++ b/libraries/script-engine/src/ScriptUUID.h @@ -41,7 +41,7 @@ /// Provides the Uuid scripting interface class ScriptUUID : public QObject, protected Scriptable { Q_OBJECT - Q_PROPERTY(QString NULL READ NULL_UUID CONSTANT) // String for use in scripts. + Q_PROPERTY(QString NONE READ getNullUuid CONSTANT) // String for use in scripts. public slots: /*@jsdoc @@ -100,14 +100,14 @@ public slots: * Tests whether a UUID is null. * @function Uuid(0).isNull * @param {Uuid} id - The UUID to test. - * @returns {boolean} true if the UUID equals Uuid.NULL or is null, otherwise + * @returns {boolean} true if the UUID equals Uuid.NONE or is null, otherwise * false. * @example Demonstrate true and false cases. * var uuid; // undefined * print(Uuid.isNull(uuid)); // false * uuid = Uuid.generate(); * print(Uuid.isNull(uuid)); // false - * uuid = Uuid.NULL; + * uuid = Uuid.NONE; * print(Uuid.isNull(uuid)); // true * uuid = null; * print(Uuid.isNull(uuid)); // true @@ -125,9 +125,9 @@ public slots: * print("Generated UUID: " + uuid); // Generated UUID: {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn} */ void print(const QString& label, const QUuid& id); + QString getNullUuid() const { return NULL_ID; } private: - const QString NULL_UUID() { return NULL_ID; } const QString NULL_ID { "{00000000-0000-0000-0000-000000000000}" }; }; diff --git a/libraries/script-engine/src/UsersScriptingInterface.h b/libraries/script-engine/src/UsersScriptingInterface.h index 76055253ab..026441f5fe 100644 --- a/libraries/script-engine/src/UsersScriptingInterface.h +++ b/libraries/script-engine/src/UsersScriptingInterface.h @@ -235,7 +235,7 @@ signals: * @param {string} userName - The user name of the client, if the requesting client is an administrator in the domain or * the sessionID is that of the client, otherwise "". * @param {Uuid} machineFingerprint - The machine fingerprint of the client, if the requesting client is an administrator - * in the domain or the sessionID is that of the client, otherwise {@link Uuid|Uuid.NULL}. + * in the domain or the sessionID is that of the client, otherwise {@link Uuid|Uuid.NONE}. * @param {boolean} isAdmin - true if the client is an administrator in the domain, false if not. * @returns {Signal} */ diff --git a/scripts/developer/utilities/render/materialInspector.js b/scripts/developer/utilities/render/materialInspector.js index 8a7d5ad7dd..d20f20f304 100644 --- a/scripts/developer/utilities/render/materialInspector.js +++ b/scripts/developer/utilities/render/materialInspector.js @@ -139,7 +139,7 @@ function setSelectedObject(id, type) { function setWindow(window) { if (activeWindow !== undefined) { - setSelectedObject(Uuid.NULL, ""); + setSelectedObject(Uuid.NONE, ""); // activeWindow.closed.disconnect(killWindow); activeWindow.fromQml.disconnect(fromQml); Controller.mousePressEvent.disconnect(mousePressEvent); diff --git a/scripts/system/attachedEntitiesManager.js b/scripts/system/attachedEntitiesManager.js index 061e27f595..4af97a41fe 100644 --- a/scripts/system/attachedEntitiesManager.js +++ b/scripts/system/attachedEntitiesManager.js @@ -115,7 +115,7 @@ function AttachedEntitiesManager() { var allowedJoints = getEntityCustomData('wearable', grabbedEntity, DEFAULT_WEARABLE_DATA).joints; var props = Entities.getEntityProperties(grabbedEntity, ["position", "parentID", "parentJointIndex"]); - if (props.parentID === Uuid.NULL || props.parentID === MyAvatar.sessionUUID) { + if (props.parentID === Uuid.NONE || props.parentID === MyAvatar.sessionUUID) { var bestJointName = ""; var bestJointIndex = -1; var bestJointDistance = 0; @@ -167,7 +167,7 @@ function AttachedEntitiesManager() { if (updatePresets) { this.updateRelativeOffsets(newEntity); } - } else if (props.parentID != Uuid.NULL) { + } else if (props.parentID != Uuid.NONE) { // drop the entity and set it to have no parent (not on the avatar), unless it's being equipped in a hand. if (props.parentID === MyAvatar.sessionUUID && (props.parentJointIndex == MyAvatar.getJointIndex("RightHand") || @@ -175,7 +175,7 @@ function AttachedEntitiesManager() { // this is equipped on a hand -- don't clear the parent. } else { var wearProps = Entities.getEntityProperties(grabbedEntity); - wearProps.parentID = Uuid.NULL; + wearProps.parentID = Uuid.NONE; wearProps.parentJointIndex = -1; delete wearProps.id; delete wearProps.created; diff --git a/scripts/system/controllers/controllerModules/equipEntity.js b/scripts/system/controllers/controllerModules/equipEntity.js index 4b24ef17b0..06bde716c8 100644 --- a/scripts/system/controllers/controllerModules/equipEntity.js +++ b/scripts/system/controllers/controllerModules/equipEntity.js @@ -340,7 +340,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa var props = controllerData.nearbyEntityPropertiesByID[hotspot.entityID]; var hasParent = true; - if (props.parentID === Uuid.NULL) { + if (props.parentID === Uuid.NONE) { hasParent = false; } @@ -561,7 +561,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa this.storeAttachPointInSettings(); Entities.editEntity(this.targetEntityID, { - parentID: Uuid.NULL, + parentID: Uuid.NONE, parentJointIndex: -1 }); diff --git a/scripts/system/controllers/controllerModules/farActionGrabEntity.js b/scripts/system/controllers/controllerModules/farActionGrabEntity.js index 4fabcae04d..585b2d5a61 100644 --- a/scripts/system/controllers/controllerModules/farActionGrabEntity.js +++ b/scripts/system/controllers/controllerModules/farActionGrabEntity.js @@ -168,7 +168,7 @@ Script.include("/~/system/libraries/controllers.js"); tag: "far-grab-" + MyAvatar.sessionUUID, ttl: ACTION_TTL }); - if (this.actionID === Uuid.NULL) { + if (this.actionID === Uuid.NONE) { this.actionID = null; } diff --git a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js index cb071c2dbd..a7a273f719 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js @@ -134,9 +134,9 @@ Script.include("/~/system/libraries/utils.js"); this.endNearParentingGrabOverlay = function () { var previousParentID = this.previousParentID[this.grabbedThingID]; - if ((previousParentID === Uuid.NULL || previousParentID === null) && !this.robbed) { + if ((previousParentID === Uuid.NONE || previousParentID === null) && !this.robbed) { Entities.editEntity(this.grabbedThingID, { - parentID: Uuid.NULL, + parentID: Uuid.NONE, parentJointIndex: -1 }); } else if (!this.robbed){ diff --git a/scripts/system/controllers/controllerModules/stylusInput.js b/scripts/system/controllers/controllerModules/stylusInput.js index 15048bca00..3b58657ad3 100644 --- a/scripts/system/controllers/controllerModules/stylusInput.js +++ b/scripts/system/controllers/controllerModules/stylusInput.js @@ -108,7 +108,7 @@ Script.include("/~/system/libraries/controllers.js"); } // add the tabletScreen, if it is valid - if (HMD.tabletScreenID && HMD.tabletScreenID !== Uuid.NULL && + if (HMD.tabletScreenID && HMD.tabletScreenID !== Uuid.NONE && Entities.getEntityProperties(HMD.tabletScreenID, ["visible"]).visible) { stylusTarget = getOverlayDistance(controllerPosition, HMD.tabletScreenID); if (stylusTarget) { @@ -117,7 +117,7 @@ Script.include("/~/system/libraries/controllers.js"); } // add the tablet home button. - if (HMD.homeButtonID && HMD.homeButtonID !== Uuid.NULL && + if (HMD.homeButtonID && HMD.homeButtonID !== Uuid.NONE && Entities.getEntityProperties(HMD.homeButtonID, ["visible"]).visible) { stylusTarget = getOverlayDistance(controllerPosition, HMD.homeButtonID); if (stylusTarget) { diff --git a/scripts/system/controllers/controllerModules/teleport.js b/scripts/system/controllers/controllerModules/teleport.js index be45d3b70e..8e1458360d 100644 --- a/scripts/system/controllers/controllerModules/teleport.js +++ b/scripts/system/controllers/controllerModules/teleport.js @@ -513,7 +513,7 @@ Script.include("/~/system/libraries/controllers.js"); if (Vec3.distance(targetXZPosition, avatarXZPosition) < MIN_PARENTING_DISTANCE) { // Set play area position and rotation in world coordinates with no parenting. Overlays.editOverlay(_this.playAreaOverlay, { - parentID: Uuid.NULL, + parentID: Uuid.NONE, position: Vec3.sum(position, Vec3.multiplyQbyV(sensorToWorldRotation, Vec3.multiply(MyAvatar.sensorToWorldScale, diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index 12e8629134..3a1d9d23e3 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -106,7 +106,7 @@ } else if (properties.type === "Zone") { return { imageURL: ZONE_URL }; } else if (properties.type === "Material") { - if (properties.parentID !== Uuid.NULL && properties.name !== "MATERIAL_" + entityShapeVisualizerSessionName) { + if (properties.parentID !== Uuid.NONE && properties.name !== "MATERIAL_" + entityShapeVisualizerSessionName) { return { imageURL: MATERIAL_URL }; } else { return { imageURL: "" }; @@ -1858,7 +1858,7 @@ } selectedEntities.forEach(function (id, index) { var parentId = Entities.getEntityProperties(id, ["parentID"]).parentID; - if (parentId !== null && parentId.length > 0 && parentId !== Uuid.NULL) { + if (parentId !== null && parentId.length > 0 && parentId !== Uuid.NONE) { parentCheck = true; } Entities.editEntity(id, {parentID: null}); @@ -2890,7 +2890,7 @@ } else if (data.type === "materialTargetRequest") { var parentModelData; var properties = Entities.getEntityProperties(data.entityID, ["type", "parentID"]); - if (properties.type === "Material" && properties.parentID !== Uuid.NULL) { + if (properties.type === "Material" && properties.parentID !== Uuid.NONE) { var parentType = Entities.getEntityProperties(properties.parentID, ["type"]).type; if (parentType === "Model" || Entities.getNestableType(properties.parentID) === "avatar") { parentModelData = Graphics.getModel(properties.parentID); @@ -3313,7 +3313,7 @@ var state = "NONE"; var properties = Entities.getEntityProperties(id, ["parentID"]); var children = createApp.getDomainOnlyChildrenIDs(id); - if (properties.parentID !== Uuid.NULL) { + if (properties.parentID !== Uuid.NONE) { if (children.length > 0) { state = "PARENT_CHILDREN"; } else { diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js index 574f91eba7..42a4f0f247 100644 --- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js +++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js @@ -428,7 +428,7 @@ SelectionManager = (function() { entityID: newEntityID, properties: properties }); - if (properties.parentID !== Uuid.NULL) { + if (properties.parentID !== Uuid.NONE) { duplicatedChildrenWithOldParents[newEntityID] = properties.parentID; } originalEntityToNewEntityID[originalEntityID] = newEntityID; @@ -480,7 +480,7 @@ SelectionManager = (function() { entityID: newEntityID, properties: properties }); - if (properties.parentID !== Uuid.NULL) { + if (properties.parentID !== Uuid.NONE) { createdChildrenWithOldParents[newEntityID] = properties.parentID; } originalEntityToNewEntityID[properties.id] = newEntityID; @@ -755,7 +755,7 @@ SelectionManager = (function() { that.selections = []; for (var i = 0; i < currentSelection.length; i++) { var properties = Entities.getEntityProperties(currentSelection[i], ['parentID']); - if (properties.parentID !== Uuid.NULL) { + if (properties.parentID !== Uuid.NONE) { that.selections.push(properties.parentID); } } @@ -772,7 +772,7 @@ SelectionManager = (function() { that.selections = []; for (var i = 0; i < currentSelection.length; i++) { var topParentId = getTopParent(currentSelection[i]); - if (topParentId !== Uuid.NULL) { + if (topParentId !== Uuid.NONE) { that.selections.push(topParentId); } } @@ -784,9 +784,9 @@ SelectionManager = (function() { }; function getTopParent(id) { - var topParentId = Uuid.NULL; + var topParentId = Uuid.NONE; var properties = Entities.getEntityProperties(id, ['parentID']); - if (properties.parentID === Uuid.NULL) { + if (properties.parentID === Uuid.NONE) { topParentId = id; } else { topParentId = getTopParent(properties.parentID); @@ -1567,7 +1567,7 @@ SelectionDisplay = (function() { } else if (toolEntity === handleTranslateZCylinder) { return handleTranslateZCone; } - return Uuid.NULL; + return Uuid.NONE; }; that.updateHighlight = function(event) { diff --git a/scripts/system/libraries/controllerDispatcherUtils.js b/scripts/system/libraries/controllerDispatcherUtils.js index f331c147e0..705991d97d 100644 --- a/scripts/system/libraries/controllerDispatcherUtils.js +++ b/scripts/system/libraries/controllerDispatcherUtils.js @@ -317,7 +317,7 @@ var isAnothersAvatarEntity = function (iaaeProps) { }; var isAnothersChildEntity = function (iaceProps) { - while (iaceProps.parentID && iaceProps.parentID !== Uuid.NULL) { + while (iaceProps.parentID && iaceProps.parentID !== Uuid.NONE) { if (Entities.getNestableType(iaceProps.parentID) == "avatar") { if (iaceProps.parentID == MyAvatar.SELF_ID || iaceProps.parentID == MyAvatar.sessionUUID) { return false; // not another's, it's mine. @@ -452,7 +452,7 @@ var ensureDynamic = function (entityID) { // if we distance hold something and keep it very still before releasing it, it ends up // non-dynamic in bullet. If it's too still, give it a little bounce so it will fall. var edProps = Entities.getEntityProperties(entityID, ["velocity", "dynamic", "parentID"]); - if (edProps.dynamic && edProps.parentID === Uuid.NULL) { + if (edProps.dynamic && edProps.parentID === Uuid.NONE) { var velocity = edProps.velocity; if (Vec3.length(velocity) < 0.05) { // see EntityMotionState.cpp DYNAMIC_LINEAR_VELOCITY_THRESHOLD velocity = { x: 0.0, y: 0.2, z: 0.0 }; @@ -464,7 +464,7 @@ var ensureDynamic = function (entityID) { var findGrabbableGroupParent = function (controllerData, targetProps) { while (targetProps.grab.grabDelegateToParent && targetProps.parentID && - targetProps.parentID !== Uuid.NULL && + targetProps.parentID !== Uuid.NONE && Entities.getNestableType(targetProps.parentID) == "entity") { var parentProps = Entities.getEntityProperties(targetProps.parentID, DISPATCHER_PROPERTIES); if (!parentProps) { @@ -484,7 +484,7 @@ var findGrabbableGroupParent = function (controllerData, targetProps) { var getEntityParents = function(targetProps) { var parentProperties = []; while (targetProps.parentID && - targetProps.parentID !== Uuid.NULL && + targetProps.parentID !== Uuid.NONE && Entities.getNestableType(targetProps.parentID) == "entity") { var parentProps = Entities.getEntityProperties(targetProps.parentID, DISPATCHER_PROPERTIES); if (!parentProps) { diff --git a/scripts/system/libraries/touchEventUtils.js b/scripts/system/libraries/touchEventUtils.js index bdee5cf5dc..e9ab4f3770 100644 --- a/scripts/system/libraries/touchEventUtils.js +++ b/scripts/system/libraries/touchEventUtils.js @@ -13,21 +13,21 @@ var controllerDispatcher = Script.require("/~/system/libraries/controllerDispatcherUtils.js"); function touchTargetHasKeyboardFocus(touchTarget) { - if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) { + if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) { return Entities.keyboardFocusEntity === touchTarget.entityID; - } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) { + } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) { return Overlays.keyboardFocusOverlay === touchTarget.overlayID; } } function setKeyboardFocusOnTouchTarget(touchTarget) { - if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL && + if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE && Entities.wantsHandControllerPointerEvents(touchTarget.entityID)) { - Overlays.keyboardFocusOverlay = Uuid.NULL; + Overlays.keyboardFocusOverlay = Uuid.NONE; Entities.keyboardFocusEntity = touchTarget.entityID; - } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) { + } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) { Overlays.keyboardFocusOverlay = touchTarget.overlayID; - Entities.keyboardFocusEntity = Uuid.NULL; + Entities.keyboardFocusEntity = Uuid.NONE; } } @@ -42,9 +42,9 @@ function sendHoverEnterEventToTouchTarget(hand, touchTarget) { button: "None" }; - if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) { + if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) { Entities.sendHoverEnterEntity(touchTarget.entityID, pointerEvent); - } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) { + } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) { Overlays.sendHoverEnterOverlay(touchTarget.overlayID, pointerEvent); } } @@ -60,10 +60,10 @@ function sendHoverOverEventToTouchTarget(hand, touchTarget) { button: "None" }; - if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) { + if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) { Entities.sendMouseMoveOnEntity(touchTarget.entityID, pointerEvent); Entities.sendHoverOverEntity(touchTarget.entityID, pointerEvent); - } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) { + } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) { Overlays.sendMouseMoveOnOverlay(touchTarget.overlayID, pointerEvent); Overlays.sendHoverOverOverlay(touchTarget.overlayID, pointerEvent); } @@ -81,10 +81,10 @@ function sendTouchStartEventToTouchTarget(hand, touchTarget) { isPrimaryHeld: true }; - if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) { + if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) { Entities.sendMousePressOnEntity(touchTarget.entityID, pointerEvent); Entities.sendClickDownOnEntity(touchTarget.entityID, pointerEvent); - } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) { + } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) { Overlays.sendMousePressOnOverlay(touchTarget.overlayID, pointerEvent); } } @@ -100,11 +100,11 @@ function sendTouchEndEventToTouchTarget(hand, touchTarget) { button: "Primary" }; - if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) { + if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) { Entities.sendMouseReleaseOnEntity(touchTarget.entityID, pointerEvent); Entities.sendClickReleaseOnEntity(touchTarget.entityID, pointerEvent); Entities.sendHoverLeaveEntity(touchTarget.entityID, pointerEvent); - } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) { + } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) { Overlays.sendMouseReleaseOnOverlay(touchTarget.overlayID, pointerEvent); } } @@ -121,10 +121,10 @@ function sendTouchMoveEventToTouchTarget(hand, touchTarget) { isPrimaryHeld: true }; - if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) { + if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) { Entities.sendMouseMoveOnEntity(touchTarget.entityID, pointerEvent); Entities.sendHoldingClickOnEntity(touchTarget.entityID, pointerEvent); - } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) { + } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) { Overlays.sendMouseMoveOnOverlay(touchTarget.overlayID, pointerEvent); } } diff --git a/scripts/system/miniTablet.js b/scripts/system/miniTablet.js index acd0d96e9b..f75cbe2346 100644 --- a/scripts/system/miniTablet.js +++ b/scripts/system/miniTablet.js @@ -442,7 +442,7 @@ function release() { Entities.editEntity(miniOverlay, { - "parentID": Uuid.NULL, // Release hold so that hand can grab tablet proper. + "parentID": Uuid.NONE, // Release hold so that hand can grab tablet proper. "grab": { "grabbable": false } diff --git a/scripts/system/nameTag.js b/scripts/system/nameTag.js index 147da25779..e09f19f90b 100644 --- a/scripts/system/nameTag.js +++ b/scripts/system/nameTag.js @@ -23,7 +23,7 @@ const SIZE_Y = 0.075; const LETTER_OFFSET = 0.03; // arbitrary value to dynamically change width, could be more accurate by detecting characters const LINE_HEIGHT = 0.05; -var nameTagEntityID = Uuid.NULL; +var nameTagEntityID = Uuid.NONE; var lastCheckForEntity = 0; // create the name tag entity after a brief delay @@ -61,9 +61,9 @@ function updateNameTag() { }; function deleteNameTag() { - if(nameTagEntityID !== Uuid.NULL) { + if(nameTagEntityID !== Uuid.NONE) { Entities.deleteEntity(nameTagEntityID); - nameTagEntityID = Uuid.NULL; + nameTagEntityID = Uuid.NONE; } } @@ -84,7 +84,7 @@ function cleanup() { Script.update.connect(update); function update() { // if no entity we return - if(nameTagEntityID == Uuid.NULL) { + if(nameTagEntityID == Uuid.NONE) { return; } diff --git a/scripts/system/notifications.js b/scripts/system/notifications.js index fec9fb2341..2f6bca6878 100644 --- a/scripts/system/notifications.js +++ b/scripts/system/notifications.js @@ -47,7 +47,7 @@ var HMD_UI_SCALE_FACTOR = 1.0; //This define the size of all the notification system in HMD. var hmdPanelLocalPosition = {"x": 0.3, "y": 0.25, "z": -1.5}; var hmdPanelLocalRotation = Quat.fromVec3Degrees({"x": 0, "y": -3, "z": 0}); - var mainHMDnotificationContainerID = Uuid.NULL; + var mainHMDnotificationContainerID = Uuid.NONE; var CAMERA_MATRIX_INDEX = -7; //HMD LOCAL ENTITY PROPERTIES @@ -128,7 +128,7 @@ "unlit": true, "renderLayer": "hud" }; - if (notifications[i].entityID === Uuid.NULL){ + if (notifications[i].entityID === Uuid.NONE){ properties.text = notifications[i].dataText; notifications[i].entityID = Entities.addEntity(properties, "local"); } else { @@ -149,7 +149,7 @@ "alpha": alpha, "renderLayer": "hud" }; - if (notifications[i].imageEntityID === Uuid.NULL){ + if (notifications[i].imageEntityID === Uuid.NONE){ properties.imageURL = notifications[i].dataImage.path; notifications[i].imageEntityID = Entities.addEntity(properties, "local"); } else { @@ -174,7 +174,7 @@ "leftMargin": overlayLeftMargin, "font": {"size": overlayFontSize} }; - if (notifications[i].overlayID === Uuid.NULL){ + if (notifications[i].overlayID === Uuid.NONE){ properties.text = notifications[i].dataText; notifications[i].overlayID = Overlays.addOverlay("text", properties); } else { @@ -192,7 +192,7 @@ "visible": true, "alpha": alpha }; - if (notifications[i].imageOverlayID === Uuid.NULL){ + if (notifications[i].imageOverlayID === Uuid.NONE){ properties.imageURL = notifications[i].dataImage.path; notifications[i].imageOverlayID = Overlays.addOverlay("image", properties); } else { @@ -214,26 +214,26 @@ } function deleteSpecificNotification(indexNotification) { - if (notifications[indexNotification].entityID !== Uuid.NULL){ + if (notifications[indexNotification].entityID !== Uuid.NONE){ Entities.deleteEntity(notifications[indexNotification].entityID); - notifications[indexNotification].entityID = Uuid.NULL; + notifications[indexNotification].entityID = Uuid.NONE; } - if (notifications[indexNotification].overlayID !== Uuid.NULL){ + if (notifications[indexNotification].overlayID !== Uuid.NONE){ Overlays.deleteOverlay(notifications[indexNotification].overlayID); - notifications[indexNotification].overlayID = Uuid.NULL; + notifications[indexNotification].overlayID = Uuid.NONE; } - if (notifications[indexNotification].imageEntityID !== Uuid.NULL){ + if (notifications[indexNotification].imageEntityID !== Uuid.NONE){ Entities.deleteEntity(notifications[indexNotification].imageEntityID); - notifications[indexNotification].imageEntityID = Uuid.NULL; + notifications[indexNotification].imageEntityID = Uuid.NONE; } - if (notifications[indexNotification].imageOverlayID !== Uuid.NULL){ + if (notifications[indexNotification].imageOverlayID !== Uuid.NONE){ Overlays.deleteOverlay(notifications[indexNotification].imageOverlayID); - notifications[indexNotification].imageOverlayID = Uuid.NULL; + notifications[indexNotification].imageOverlayID = Uuid.NONE; } } function createMainHMDnotificationContainer() { - if (mainHMDnotificationContainerID === Uuid.NULL) { + if (mainHMDnotificationContainerID === Uuid.NONE) { var properties = { "type": "Shape", "shape": "Cube", @@ -249,9 +249,9 @@ } function deleteMainHMDnotificationContainer() { - if (mainHMDnotificationContainerID !== Uuid.NULL) { + if (mainHMDnotificationContainerID !== Uuid.NONE) { Entities.deleteEntity(mainHMDnotificationContainerID); - mainHMDnotificationContainerID = Uuid.NULL; + mainHMDnotificationContainerID = Uuid.NONE; } } //UTILITY FUNCTIONS @@ -288,10 +288,10 @@ "dataText": dataText, "dataImage": dataImage, "timestamp": d.getTime(), - "entityID": Uuid.NULL, - "imageEntityID": Uuid.NULL, - "overlayID": Uuid.NULL, - "imageOverlayID": Uuid.NULL + "entityID": Uuid.NONE, + "imageEntityID": Uuid.NONE, + "overlayID": Uuid.NONE, + "imageOverlayID": Uuid.NONE }; notifications.push(notification); newEventDetected = true;