diff --git a/interface/resources/meshes/defaultAvatar_full.fst b/interface/resources/meshes/defaultAvatar_full.fst new file mode 100644 index 0000000000..eba175e771 --- /dev/null +++ b/interface/resources/meshes/defaultAvatar_full.fst @@ -0,0 +1,64 @@ +name = defaultAvatar_full +type = body+head +scale = 1 +filename = defaultAvatar_full/defaultAvatar_full.fbx +texdir = defaultAvatar_full/textures +joint = jointNeck = Head +joint = jointLeftHand = LeftHand +joint = jointRoot = Hips +joint = jointHead = HeadTop_End +joint = jointRightHand = RightHand +joint = jointLean = Spine +freeJoint = LeftArm +freeJoint = LeftForeArm +freeJoint = RightArm +freeJoint = RightForeArm +jointIndex = LeftHand = 35 +jointIndex = Reye = 3 +jointIndex = Hips = 10 +jointIndex = LeftHandIndex1 = 36 +jointIndex = LeftHandIndex2 = 37 +jointIndex = LeftHandIndex3 = 38 +jointIndex = LeftHandIndex4 = 39 +jointIndex = LeftShoulder = 32 +jointIndex = RightLeg = 12 +jointIndex = Grp_blendshapes = 0 +jointIndex = Leye = 4 +jointIndex = headphone = 8 +jointIndex = RightForeArm = 26 +jointIndex = Spine = 21 +jointIndex = LeftFoot = 18 +jointIndex = RightToeBase = 14 +jointIndex = face = 1 +jointIndex = LeftToe_End = 20 +jointIndex = Spine1 = 22 +jointIndex = body = 9 +jointIndex = Spine2 = 23 +jointIndex = RightUpLeg = 11 +jointIndex = top1 = 7 +jointIndex = Neck = 40 +jointIndex = HeadTop_End = 42 +jointIndex = RightShoulder = 24 +jointIndex = RightArm = 25 +jointIndex = Head = 41 +jointIndex = LeftLeg = 17 +jointIndex = LeftForeArm = 34 +jointIndex = hair = 6 +jointIndex = RightHand = 27 +jointIndex = LeftToeBase = 19 +jointIndex = LeftUpLeg = 16 +jointIndex = mouth = 2 +jointIndex = RightFoot = 13 +jointIndex = LeftArm = 33 +jointIndex = shield = 5 +jointIndex = RightHandIndex1 = 28 +jointIndex = RightHandIndex2 = 29 +jointIndex = RightToe_End = 15 +jointIndex = RightHandIndex3 = 30 +jointIndex = RightHandIndex4 = 31 +ry = 0 +rz = 0 +tx = 0 +ty = 0 +tz = 0 +rx = 0 diff --git a/interface/resources/meshes/defaultAvatar_full/defaultAvatar_full.fbx b/interface/resources/meshes/defaultAvatar_full/defaultAvatar_full.fbx new file mode 100644 index 0000000000..71bc127c41 Binary files /dev/null and b/interface/resources/meshes/defaultAvatar_full/defaultAvatar_full.fbx differ diff --git a/interface/resources/meshes/defaultAvatar_full/textures/visor.png b/interface/resources/meshes/defaultAvatar_full/textures/visor.png new file mode 100644 index 0000000000..e4e6292b2c Binary files /dev/null and b/interface/resources/meshes/defaultAvatar_full/textures/visor.png differ diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 095a225952..a6c18b7010 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -960,8 +960,14 @@ void Avatar::setFaceModelURL(const QUrl& faceModelURL) { void Avatar::setSkeletonModelURL(const QUrl& skeletonModelURL) { AvatarData::setSkeletonModelURL(skeletonModelURL); + const QUrl DEFAULT_FULL_MODEL_URL = QUrl::fromLocalFile(PathUtils::resourcesPath() + "meshes/defaultAvatar_full.fst"); const QUrl DEFAULT_SKELETON_MODEL_URL = QUrl::fromLocalFile(PathUtils::resourcesPath() + "meshes/defaultAvatar_body.fst"); - _skeletonModel.setURL(_skeletonModelURL, DEFAULT_SKELETON_MODEL_URL, true, !isMyAvatar()); + if (isMyAvatar()) { + _skeletonModel.setURL(_skeletonModelURL, + getUseFullAvatar() ? DEFAULT_FULL_MODEL_URL : DEFAULT_SKELETON_MODEL_URL, true, !isMyAvatar()); + } else { + _skeletonModel.setURL(_skeletonModelURL, DEFAULT_SKELETON_MODEL_URL, true, !isMyAvatar()); + } } void Avatar::setAttachmentData(const QVector& attachmentData) { diff --git a/interface/src/avatar/Avatar.h b/interface/src/avatar/Avatar.h index 253c94b0b3..fca6b51922 100644 --- a/interface/src/avatar/Avatar.h +++ b/interface/src/avatar/Avatar.h @@ -170,6 +170,7 @@ public: Q_INVOKABLE glm::vec3 getAngularVelocity() const { return _angularVelocity; } Q_INVOKABLE glm::vec3 getAngularAcceleration() const { return _angularAcceleration; } + virtual bool getUseFullAvatar() const { return false; } /// Scales a world space position vector relative to the avatar position and scale /// \param vector position to be scaled. Will store the result diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index b18b8df121..a27710bb80 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -129,7 +129,7 @@ public: Q_INVOKABLE void useBodyURL(const QUrl& bodyURL, const QString& modelName = QString()); Q_INVOKABLE void useHeadAndBodyURLs(const QUrl& headURL, const QUrl& bodyURL, const QString& headName = QString(), const QString& bodyName = QString()); - Q_INVOKABLE bool getUseFullAvatar() const { return _useFullAvatar; } + Q_INVOKABLE virtual bool getUseFullAvatar() const { return _useFullAvatar; } Q_INVOKABLE const QUrl& getFullAvatarURLFromPreferences() const { return _fullAvatarURLFromPreferences; } Q_INVOKABLE const QUrl& getHeadURLFromPreferences() const { return _headURLFromPreferences; } Q_INVOKABLE const QUrl& getBodyURLFromPreferences() const { return _skeletonURLFromPreferences; }