From 080774387d1e0c455bc6a8701ab4ee77f4bcc025 Mon Sep 17 00:00:00 2001 From: elmanytas Date: Sun, 9 Sep 2018 08:22:58 +0200 Subject: [PATCH 01/79] Added steps to run interface in Ubuntu 18.04 . --- BUILD_LINUX.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index 1ee3d2b7c8..ea8171cf57 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -86,19 +86,73 @@ In a server, it does not make sense to compile interface ### Running the software +#### Domain server + Running domain server: ```bash ./domain-server/domain-server ``` +#### Assignment clients + Running assignment client: ```bash ./assignment-client/assignment-client -n 6 ``` +#### Interface + Running interface: ```bash ./interface/interface ``` Go to localhost in the running interface. + +##### Ubuntu 18.04 only + +In Ubuntu 18.04 there is a problem related with NVidia driver library version. + +It can be workarounded following these steps: + +Uninstall incompatible nvtt libraries: +```bash +sudo apt-get remove libnvtt2 libnvtt-dev +``` + +Install libssl1.0-dev: +```bash +sudo apt-get -y install libssl1.0-dev +``` + +Clone castano nvidia-texture-tools: +``` +git clone https://github.com/castano/nvidia-texture-tools +cd nvidia-texture-tools/ +``` + +Make these changes in repo: +* In file **VERSION** set `2.2.1` +* In file **configure**: + * set `build="release"` + * set `-DNVTT_SHARED=1` + +Configure, build and install: +``` +./configure +make +sudo make install +``` + +Link compiled files: +``` +sudo ln -s /usr/local/lib/libnvcore.so /usr/lib/libnvcore.so +sudo ln -s /usr/local/lib/libnvimage.so /usr/lib/libnvimage.so +sudo ln -s /usr/local/lib/libnvmath.so /usr/lib/libnvmath.so +sudo ln -s /usr/local/lib/libnvtt.so /usr/lib/libnvtt.so +``` + +After running this steps you can run interface: +``` +interface/interface +``` From 0eead13fb95d78ff8ee856a64db6523c8c82535d Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 25 Oct 2018 15:03:47 +1300 Subject: [PATCH 02/79] Make Create not grab tablet if editing an entity with hand --- .../nearParentGrabOverlay.js | 35 ++++++++++++++++--- .../libraries/controllerDispatcherUtils.js | 4 +++ .../system/libraries/entitySelectionTool.js | 13 ++++++- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js index 763a0a0a27..69aaad4247 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js @@ -9,7 +9,7 @@ /* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex, enableDispatcherModule, disableDispatcherModule, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, makeDispatcherModuleParameters, Overlays, makeRunningValues, Vec3, resizeTablet, getTabletWidthFromSettings, - NEAR_GRAB_RADIUS, HMD, Uuid + NEAR_GRAB_RADIUS, HMD, Uuid, HIFI_EDIT_MANIPULATION_CHANNEL */ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); @@ -172,10 +172,14 @@ Script.include("/~/system/libraries/utils.js"); return null; }; + this.isEditing = false; + this.setIsEditing = function (editing) { + this.isEditing = editing; + }; this.isReady = function (controllerData) { - if ((controllerData.triggerClicks[this.hand] === 0 && - controllerData.secondaryValues[this.hand] === 0)) { + if ((controllerData.triggerClicks[this.hand] === 0 && controllerData.secondaryValues[this.hand] === 0) + || this.isEditing) { this.robbed = false; return makeRunningValues(false, [], []); } @@ -198,7 +202,8 @@ Script.include("/~/system/libraries/utils.js"); }; this.run = function (controllerData) { - if (controllerData.triggerClicks[this.hand] === 0 && controllerData.secondaryValues[this.hand] === 0) { + if ((controllerData.triggerClicks[this.hand] === 0 && controllerData.secondaryValues[this.hand] === 0) + || this.isEditing) { this.endNearParentingGrabOverlay(); this.robbed = false; return makeRunningValues(false, [], []); @@ -226,6 +231,28 @@ Script.include("/~/system/libraries/utils.js"); enableDispatcherModule("LeftNearParentingGrabOverlay", leftNearParentingGrabOverlay); enableDispatcherModule("RightNearParentingGrabOverlay", rightNearParentingGrabOverlay); + function onMessageReceived(channel, data, senderID) { + var message; + + if (channel !== HIFI_EDIT_MANIPULATION_CHANNEL || senderID !== MyAvatar.sessionUUID) { + return; + } + + try { + message = JSON.parse(data); + } catch (e) { + return; + } + + if (message.hand === Controller.Standard.LeftHand) { + leftNearParentingGrabOverlay.setIsEditing(message.action === "startEdit"); + } else if (message.hand === Controller.Standard.RightHand) { + rightNearParentingGrabOverlay.setIsEditing(message.action === "startEdit"); + } + } + Messages.subscribe(HIFI_EDIT_MANIPULATION_CHANNEL); + Messages.messageReceived.connect(onMessageReceived); + function cleanup() { leftNearParentingGrabOverlay.cleanup(); rightNearParentingGrabOverlay.cleanup(); diff --git a/scripts/system/libraries/controllerDispatcherUtils.js b/scripts/system/libraries/controllerDispatcherUtils.js index e9d5255d28..f7b997a897 100644 --- a/scripts/system/libraries/controllerDispatcherUtils.js +++ b/scripts/system/libraries/controllerDispatcherUtils.js @@ -24,6 +24,7 @@ HAPTIC_PULSE_DURATION:true, DISPATCHER_HOVERING_LIST:true, DISPATCHER_HOVERING_STYLE:true, + HIFI_EDIT_MANIPULATION_CHANNEL:true, Entities, makeDispatcherModuleParameters:true, makeRunningValues:true, @@ -149,6 +150,8 @@ DISPATCHER_PROPERTIES = [ "userData" ]; +HIFI_EDIT_MANIPULATION_CHANNEL = "HiFi-Edit-Manipulation"; + // priority -- a lower priority means the module will be asked sooner than one with a higher priority in a given update step // activitySlots -- indicates which "slots" must not yet be in use for this module to start // requiredDataForReady -- which "situation" parts this module looks at to decide if it will start @@ -590,6 +593,7 @@ if (typeof module !== 'undefined') { TRIGGER_OFF_VALUE: TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE: TRIGGER_ON_VALUE, DISPATCHER_HOVERING_LIST: DISPATCHER_HOVERING_LIST, + HIFI_EDIT_MANIPULATION_CHANNEL: HIFI_EDIT_MANIPULATION_CHANNEL, worldPositionToRegistrationFrameMatrix: worldPositionToRegistrationFrameMatrix }; } diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 3bb36d632e..8f972e14c2 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -14,7 +14,7 @@ // /* global SelectionManager, SelectionDisplay, grid, rayPlaneIntersection, rayPlaneIntersection2, pushCommandForSelections, - getMainTabletIDs, getControllerWorldLocation, TRIGGER_ON_VALUE */ + getMainTabletIDs, getControllerWorldLocation, TRIGGER_ON_VALUE, HIFI_EDIT_MANIPULATION_CHANNEL */ const SPACE_LOCAL = "local"; const SPACE_WORLD = "world"; @@ -983,6 +983,7 @@ SelectionDisplay = (function() { that.triggerPressMapping = Controller.newMapping(Script.resolvePath('') + '-press'); that.triggeredHand = NO_HAND; that.pressedHand = NO_HAND; + that.editingHand = NO_HAND; that.triggered = function() { return that.triggeredHand !== NO_HAND; }; @@ -1115,6 +1116,11 @@ SelectionDisplay = (function() { activeTool = hitTool; that.clearDebugPickPlane(); if (activeTool.onBegin) { + Messages.sendLocalMessage(HIFI_EDIT_MANIPULATION_CHANNEL, JSON.stringify({ + action: "startEdit", + hand: that.triggeredHand + })); + that.editingHand = that.triggeredHand; activeTool.onBegin(event, pickRay, results); } else { print("ERROR: entitySelectionTool.mousePressEvent - ActiveTool(" + activeTool.mode + ") missing onBegin"); @@ -1263,6 +1269,11 @@ SelectionDisplay = (function() { if (wantDebug) { print(" Triggering ActiveTool(" + activeTool.mode + ")'s onEnd"); } + Messages.sendLocalMessage(HIFI_EDIT_MANIPULATION_CHANNEL, JSON.stringify({ + action: "finishEdit", + hand: that.editingHand + })); + that.editingHand = NO_HAND; activeTool.onEnd(event); } else if (wantDebug) { print(" ActiveTool(" + activeTool.mode + ")'s missing onEnd"); From 1460e43f6e1348850a965f93f926af67f43a397d Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 25 Oct 2018 15:04:59 +1300 Subject: [PATCH 03/79] Make tablet highlight not display if editing an entity with hand --- .../controllerModules/nearTabletHighlight.js | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/scripts/system/controllers/controllerModules/nearTabletHighlight.js b/scripts/system/controllers/controllerModules/nearTabletHighlight.js index c24464ab38..3ced0a9e87 100644 --- a/scripts/system/controllers/controllerModules/nearTabletHighlight.js +++ b/scripts/system/controllers/controllerModules/nearTabletHighlight.js @@ -11,7 +11,7 @@ // /* global LEFT_HAND, RIGHT_HAND, makeDispatcherModuleParameters, makeRunningValues, enableDispatcherModule, - * disableDispatcherModule */ + * disableDispatcherModule, HIFI_EDIT_MANIPULATION_CHANNEL */ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); @@ -66,12 +66,17 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); 100 ); + this.isEditing = false; + this.setIsEditing = function (editing) { + this.isEditing = editing; + }; + this.isNearTablet = function (controllerData) { return HMD.tabletID && controllerData.nearbyOverlayIDs[this.hand].indexOf(HMD.tabletID) !== -1; }; this.isReady = function (controllerData) { - if (this.isNearTablet(controllerData)) { + if (!this.isEditing && this.isNearTablet(controllerData)) { return makeRunningValues(true, [], []); } setTabletNearGrabbable(this.hand, false); @@ -79,7 +84,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); }; this.run = function (controllerData) { - if (!this.isNearTablet(controllerData)) { + if (this.isEditing || !this.isNearTablet(controllerData)) { setTabletNearGrabbable(this.hand, false); return makeRunningValues(false, [], []); } @@ -111,6 +116,28 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); HMD.mountedChanged.connect(onDisplayModeChanged); onDisplayModeChanged(); + function onMessageReceived(channel, data, senderID) { + var message; + + if (channel !== HIFI_EDIT_MANIPULATION_CHANNEL || senderID !== MyAvatar.sessionUUID) { + return; + } + + try { + message = JSON.parse(data); + } catch (e) { + return; + } + + if (message.hand === Controller.Standard.LeftHand) { + leftNearTabletHighlight.setIsEditing(message.action === "startEdit"); + } else if (message.hand === Controller.Standard.RightHand) { + rightNearTabletHighlight.setIsEditing(message.action === "startEdit"); + } + } + Messages.subscribe(HIFI_EDIT_MANIPULATION_CHANNEL); + Messages.messageReceived.connect(onMessageReceived); + function cleanUp() { disableDispatcherModule("LeftNearTabletHighlight"); disableDispatcherModule("RightNearTabletHighlight"); From 1e3549d2637bd7ee30f67f0cd32c6b7ed239cbc3 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 2 Nov 2018 08:33:14 +1300 Subject: [PATCH 04/79] Increase delay in shrinking the mini tablet after start of trigger --- scripts/system/miniTablet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/miniTablet.js b/scripts/system/miniTablet.js index a2f0d074f0..63ee91d976 100644 --- a/scripts/system/miniTablet.js +++ b/scripts/system/miniTablet.js @@ -551,7 +551,7 @@ // Trigger values. leftTriggerOn = 0, rightTriggerOn = 0, - MAX_TRIGGER_ON_TIME = 100, + MAX_TRIGGER_ON_TIME = 400, // Visibility. MAX_HAND_CAMERA_ANGLE = 30, From 8924f0832a547068fb73989b72fe63bb58eeafc0 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 2 Nov 2018 18:06:00 +1300 Subject: [PATCH 05/79] Use half angles relative to palm normal for mini tablet visibility --- scripts/system/miniTablet.js | 65 +++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/scripts/system/miniTablet.js b/scripts/system/miniTablet.js index 63ee91d976..16673d373f 100644 --- a/scripts/system/miniTablet.js +++ b/scripts/system/miniTablet.js @@ -250,11 +250,8 @@ } - function getUIPositionAndRotation(hand) { - return { - position: MINI_POSITIONS[hand], - rotation: MINI_ROTATIONS[hand] - }; + function getUIPosition(hand) { + return MINI_POSITIONS[hand]; } function getMiniTabletID() { @@ -492,7 +489,7 @@ create(); return { - getUIPositionAndRotation: getUIPositionAndRotation, + getUIPosition: getUIPosition, getMiniTabletID: getMiniTabletID, getMiniTabletProperties: getMiniTabletProperties, isLaserPointingAt: isLaserPointingAt, @@ -554,13 +551,22 @@ MAX_TRIGGER_ON_TIME = 400, // Visibility. - MAX_HAND_CAMERA_ANGLE = 30, - MAX_CAMERA_HAND_ANGLE = 30, + MAX_MEDIAL_FINGER_CAMERA_ANGLE = 25, // From palm normal along palm towards fingers. + MAX_MEDIAL_WRIST_CAMERA_ANGLE = 65, // From palm normal along palm towards wrist. + MAX_LATERAL_THUMB_CAMERA_ANGLE = 25, // From palm normal across palm towards of thumb. + MAX_LATERAL_PINKY_CAMERA_ANGLE = 25, // From palm normal across palm towards pinky. DEGREES_180 = 180, - MAX_HAND_CAMERA_ANGLE_COS = Math.cos(Math.PI * MAX_HAND_CAMERA_ANGLE / DEGREES_180), - MAX_CAMERA_HAND_ANGLE_COS = Math.cos(Math.PI * MAX_CAMERA_HAND_ANGLE / DEGREES_180), + DEGREES_TO_RADIANS = Math.PI / DEGREES_180, + MAX_MEDIAL_FINGER_CAMERA_ANGLE_RAD = DEGREES_TO_RADIANS * MAX_MEDIAL_FINGER_CAMERA_ANGLE, + MAX_MEDIAL_WRIST_CAMERA_ANGLE_RAD = DEGREES_TO_RADIANS * MAX_MEDIAL_WRIST_CAMERA_ANGLE, + MAX_LATERAL_THUMB_CAMERA_ANGLE_RAD = DEGREES_TO_RADIANS * MAX_LATERAL_THUMB_CAMERA_ANGLE, + MAX_LATERAL_PINKY_CAMERA_ANGLE_RAD = DEGREES_TO_RADIANS * MAX_LATERAL_PINKY_CAMERA_ANGLE, + MAX_CAMERA_MINI_ANGLE = 30, + MAX_CAMERA_MINI_ANGLE_COS = Math.cos(MAX_CAMERA_MINI_ANGLE * DEGREES_TO_RADIANS), HIDING_DELAY = 1000, // ms - lastVisible = [0, 0]; + lastVisible = [0, 0], + + HALF_PI = Math.PI / 2; function enterMiniDisabled() { @@ -597,11 +603,13 @@ jointIndex, handPosition, handOrientation, - uiPositionAndOrientation, miniPosition, - miniOrientation, miniToCameraDirection, - cameraToHand; + medialHandVector, + lateralHandVector, + medialAngle, + lateralAngle, + cameraToMini; // Shouldn't show mini tablet if hand isn't being controlled. pose = Controller.getPoseValue(hand === LEFT_HAND ? Controller.Standard.LeftHand : Controller.Standard.RightHand); @@ -646,15 +654,24 @@ Vec3.multiplyQbyV(MyAvatar.orientation, MyAvatar.getAbsoluteJointTranslationInObjectFrame(jointIndex))); handOrientation = Quat.multiply(MyAvatar.orientation, MyAvatar.getAbsoluteJointRotationInObjectFrame(jointIndex)); - uiPositionAndOrientation = ui.getUIPositionAndRotation(hand); + var uiPosition = ui.getUIPosition(hand); miniPosition = Vec3.sum(handPosition, Vec3.multiply(MyAvatar.sensorToWorldScale, - Vec3.multiplyQbyV(handOrientation, uiPositionAndOrientation.position))); - miniOrientation = Quat.multiply(handOrientation, uiPositionAndOrientation.rotation); + Vec3.multiplyQbyV(handOrientation, uiPosition))); miniToCameraDirection = Vec3.normalize(Vec3.subtract(Camera.position, miniPosition)); - show = Vec3.dot(miniToCameraDirection, Quat.getForward(miniOrientation)) > MAX_HAND_CAMERA_ANGLE_COS; - show = show || (-Vec3.dot(miniToCameraDirection, Quat.getForward(handOrientation)) > MAX_HAND_CAMERA_ANGLE_COS); - cameraToHand = -Vec3.dot(miniToCameraDirection, Quat.getForward(Camera.orientation)); - show = show && (cameraToHand > MAX_CAMERA_HAND_ANGLE_COS); + + // Mini tablet aimed toward camera? + medialHandVector = Vec3.multiplyQbyV(handOrientation, Vec3.UNIT_NEG_Y); + lateralHandVector = Vec3.multiplyQbyV(handOrientation, hand === LEFT_HAND ? Vec3.UNIT_X : Vec3.UNIT_NEG_X); + medialAngle = Math.acos(Vec3.dot(medialHandVector, miniToCameraDirection)) - HALF_PI; + lateralAngle = Math.acos(Vec3.dot(lateralHandVector, miniToCameraDirection)) - HALF_PI; + show = -MAX_MEDIAL_WRIST_CAMERA_ANGLE_RAD <= medialAngle + && medialAngle <= MAX_MEDIAL_FINGER_CAMERA_ANGLE_RAD + && -MAX_LATERAL_PINKY_CAMERA_ANGLE_RAD <= lateralAngle + && lateralAngle <= MAX_LATERAL_THUMB_CAMERA_ANGLE_RAD; + + // Camera looking at mini tablet? + cameraToMini = -Vec3.dot(miniToCameraDirection, Quat.getForward(Camera.orientation)); + show = show && (cameraToMini > MAX_CAMERA_MINI_ANGLE_COS); // Persist showing for a while after it would otherwise be hidden. if (show) { @@ -666,7 +683,7 @@ return { show: show, - cameraToHand: cameraToHand + cameraToMini: cameraToMini }; } @@ -689,7 +706,7 @@ showRight = shouldShowMini(RIGHT_HAND); if (showLeft.show && showRight.show) { // Both hands would be pointing at camera; show the one the camera is gazing at. - if (showLeft.cameraToHand > showRight.cameraToHand) { + if (showLeft.cameraToMini > showRight.cameraToMini) { setState(MINI_SHOWING, LEFT_HAND); } else { setState(MINI_SHOWING, RIGHT_HAND); @@ -751,7 +768,7 @@ showLeft = shouldShowMini(LEFT_HAND); showRight = shouldShowMini(RIGHT_HAND); if (showLeft.show && showRight.show) { - if (showLeft.cameraToHand > showRight.cameraToHand) { + if (showLeft.cameraToMini > showRight.cameraToMini) { if (miniHand !== LEFT_HAND) { setState(MINI_HIDING); } From 55d0822b1a3224af0c95de0ed41de965693a80b7 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 2 Nov 2018 18:18:41 +1300 Subject: [PATCH 06/79] Delay showing mini tablet --- scripts/system/miniTablet.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/system/miniTablet.js b/scripts/system/miniTablet.js index 16673d373f..a4cd0baf45 100644 --- a/scripts/system/miniTablet.js +++ b/scripts/system/miniTablet.js @@ -563,6 +563,8 @@ MAX_LATERAL_PINKY_CAMERA_ANGLE_RAD = DEGREES_TO_RADIANS * MAX_LATERAL_PINKY_CAMERA_ANGLE, MAX_CAMERA_MINI_ANGLE = 30, MAX_CAMERA_MINI_ANGLE_COS = Math.cos(MAX_CAMERA_MINI_ANGLE * DEGREES_TO_RADIANS), + SHOWING_DELAY = 1000, // ms + lastInvisible = [0, 0], HIDING_DELAY = 1000, // ms lastVisible = [0, 0], @@ -609,7 +611,8 @@ lateralHandVector, medialAngle, lateralAngle, - cameraToMini; + cameraToMini, + now; // Shouldn't show mini tablet if hand isn't being controlled. pose = Controller.getPoseValue(hand === LEFT_HAND ? Controller.Standard.LeftHand : Controller.Standard.RightHand); @@ -673,11 +676,19 @@ cameraToMini = -Vec3.dot(miniToCameraDirection, Quat.getForward(Camera.orientation)); show = show && (cameraToMini > MAX_CAMERA_MINI_ANGLE_COS); + // Delay showing for a while after it would otherwise be shown, unless it was showing on the other hand. + now = Date.now(); + if (show) { + show = now - lastInvisible[hand] >= SHOWING_DELAY || now - lastVisible[otherHand(hand)] <= HIDING_DELAY; + } else { + lastInvisible[hand] = now; + } + // Persist showing for a while after it would otherwise be hidden. if (show) { - lastVisible[hand] = Date.now(); + lastVisible[hand] = now; } else { - show = Date.now() - lastVisible[hand] <= HIDING_DELAY; + show = now - lastVisible[hand] <= HIDING_DELAY; } } From b24c4827433eaae0c1e6fa1746f7f0f1ac3a70b9 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 16 Nov 2018 16:29:57 +1300 Subject: [PATCH 07/79] Terminate Create far grab etc. upon laser intersecting tablet --- .../controllerModules/inEditMode.js | 42 +++++++++++++++---- .../system/libraries/entitySelectionTool.js | 5 ++- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/scripts/system/controllers/controllerModules/inEditMode.js b/scripts/system/controllers/controllerModules/inEditMode.js index 6adfa88fb2..5d0b64606d 100644 --- a/scripts/system/controllers/controllerModules/inEditMode.js +++ b/scripts/system/controllers/controllerModules/inEditMode.js @@ -20,6 +20,7 @@ Script.include("/~/system/libraries/utils.js"); var MARGIN = 25; function InEditMode(hand) { this.hand = hand; + this.running = false; this.triggerClicked = false; this.selectedTarget = null; this.reticleMinX = MARGIN; @@ -62,25 +63,27 @@ Script.include("/~/system/libraries/utils.js"); return point2d; }; + this.ENTITY_TOOL_UPDATES_CHANNEL = "entityToolUpdates"; + this.sendPickData = function(controllerData) { if (controllerData.triggerClicks[this.hand]) { var hand = this.hand === RIGHT_HAND ? Controller.Standard.RightHand : Controller.Standard.LeftHand; if (!this.triggerClicked) { this.selectedTarget = controllerData.rayPicks[this.hand]; if (!this.selectedTarget.intersects) { - Messages.sendLocalMessage("entityToolUpdates", JSON.stringify({ + Messages.sendLocalMessage(this.ENTITY_TOOL_UPDATES_CHANNEL, JSON.stringify({ method: "clearSelection", hand: hand })); } else { if (this.selectedTarget.type === Picks.INTERSECTED_ENTITY) { - Messages.sendLocalMessage("entityToolUpdates", JSON.stringify({ + Messages.sendLocalMessage(this.ENTITY_TOOL_UPDATES_CHANNEL, JSON.stringify({ method: "selectEntity", entityID: this.selectedTarget.objectID, hand: hand })); } else if (this.selectedTarget.type === Picks.INTERSECTED_OVERLAY) { - Messages.sendLocalMessage("entityToolUpdates", JSON.stringify({ + Messages.sendLocalMessage(this.ENTITY_TOOL_UPDATES_CHANNEL, JSON.stringify({ method: "selectOverlay", overlayID: this.selectedTarget.objectID, hand: hand @@ -102,7 +105,7 @@ Script.include("/~/system/libraries/utils.js"); var desktopWindow = Window.isPointOnDesktopWindow(point2d); var tablet = this.pointingAtTablet(rayPick.objectID); var rightHand = this.hand === RIGHT_HAND; - Messages.sendLocalMessage("entityToolUpdates", JSON.stringify({ + Messages.sendLocalMessage(this.ENTITY_TOOL_UPDATES_CHANNEL, JSON.stringify({ method: "pointingAt", desktopWindow: desktopWindow, tablet: tablet, @@ -110,7 +113,27 @@ Script.include("/~/system/libraries/utils.js"); })); }; + this.runModule = function() { + if (!this.running) { + Messages.sendLocalMessage(this.ENTITY_TOOL_UPDATES_CHANNEL, JSON.stringify({ + method: "moduleRunning", + hand: this.hand, + running: true + })); + this.running = true; + } + return makeRunningValues(true, [], []); + }; + this.exitModule = function() { + if (this.running) { + Messages.sendLocalMessage(this.ENTITY_TOOL_UPDATES_CHANNEL, JSON.stringify({ + method: "moduleRunning", + hand: this.hand, + running: false + })); + this.running = false; + } return makeRunningValues(false, [], []); }; @@ -120,13 +143,15 @@ Script.include("/~/system/libraries/utils.js"); this.triggerClicked = false; } Messages.sendLocalMessage('Hifi-unhighlight-all', ''); - return makeRunningValues(true, [], []); + return this.runModule(); } this.triggerClicked = false; - return makeRunningValues(false, [], []); + return this.exitModule(); }; this.run = function(controllerData) { + + // Tablet stylus. var tabletStylusInput = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightTabletStylusInput" : "LeftTabletStylusInput"); if (tabletStylusInput) { @@ -136,6 +161,7 @@ Script.include("/~/system/libraries/utils.js"); } } + // Tablet surface. var webLaser = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightWebSurfaceLaserInput" : "LeftWebSurfaceLaserInput"); if (webLaser) { @@ -147,6 +173,7 @@ Script.include("/~/system/libraries/utils.js"); } } + // HUD overlay. if (!controllerData.triggerClicks[this.hand]) { // Don't grab if trigger pressed when laser starts intersecting. var hudLaser = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightHudOverlayPointer" : "LeftHudOverlayPointer"); @@ -168,6 +195,7 @@ Script.include("/~/system/libraries/utils.js"); } } + // Teleport. var teleport = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightTeleporter" : "LeftTeleporter"); if (teleport) { var teleportReady = teleport.isReady(controllerData); @@ -176,8 +204,6 @@ Script.include("/~/system/libraries/utils.js"); } } - var stopRunning = false; - if ((controllerData.triggerClicks[this.hand] === 0 && controllerData.secondaryValues[this.hand] === 0)) { var stopRunning = false; controllerData.nearbyOverlayIDs[this.hand].forEach(function(overlayID) { diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 4552ed27fb..191a961228 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -58,7 +58,10 @@ SelectionManager = (function() { return; } - if (messageParsed.method === "selectEntity") { + if (messageParsed.method === "moduleRunning") { + // Terminate any current laser or mouse action. + SelectionDisplay.mouseReleaseEvent({}); + } else if (messageParsed.method === "selectEntity") { if (!SelectionDisplay.triggered() || SelectionDisplay.triggeredHand === messageParsed.hand) { if (wantDebug) { print("setting selection to " + messageParsed.entityID); From eb00435353ae2b7925a8fc41680ae91b354f75c4 Mon Sep 17 00:00:00 2001 From: amantley Date: Fri, 16 Nov 2018 10:35:50 -0800 Subject: [PATCH 08/79] removed whitespace --- libraries/animation/src/Rig.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 128ac05b81..baa8ac94ce 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -363,7 +363,6 @@ void Rig::reset(const HFMModel& hfmModel) { _animSkeleton = std::make_shared(hfmModel); - _internalPoseSet._relativePoses.clear(); _internalPoseSet._relativePoses = _animSkeleton->getRelativeDefaultPoses(); From cbe5814c64347ecfdcf8ca1770d6fabfccf6e924 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Fri, 16 Nov 2018 14:53:53 -0800 Subject: [PATCH 09/79] shader compilation prototype --- interface/src/Application.cpp | 44 +------------- interface/src/Application.h | 2 + interface/src/Application_render.cpp | 60 ++++++++++++------- .../display-plugins/OpenGLDisplayPlugin.cpp | 15 +++++ .../src/display-plugins/OpenGLDisplayPlugin.h | 3 + .../gpu-gl-common/src/gpu/gl/GLShader.cpp | 1 + libraries/plugins/src/plugins/DisplayPlugin.h | 4 ++ 7 files changed, 65 insertions(+), 64 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 969a05a792..6d13305af7 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2382,6 +2382,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo checkLoginTimer->start(); } #endif + + const QString SPLASH_SKYBOX { "{\"ProceduralEntity\":{ \"version\":2, \"shaderUrl\":\"qrc:///shaders/splashSkybox.frag\" } }" }; + _splashScreen->parse(SPLASH_SKYBOX); } void Application::updateVerboseLogging() { @@ -2862,8 +2865,6 @@ void Application::initializeGL() { DependencyManager::get()->setGPUContext(_gpuContext); } -static const QString SPLASH_SKYBOX{ "{\"ProceduralEntity\":{ \"version\":2, \"shaderUrl\":\"qrc:///shaders/splashSkybox.frag\" } }" }; - void Application::initializeDisplayPlugins() { auto displayPlugins = PluginManager::getInstance()->getDisplayPlugins(); Setting::Handle activeDisplayPluginSetting{ ACTIVE_DISPLAY_PLUGIN_SETTING_NAME, displayPlugins.at(0)->getName() }; @@ -2899,45 +2900,6 @@ void Application::initializeDisplayPlugins() { // Submit a default frame to render until the engine starts up updateRenderArgs(0.0f); - -#define ENABLE_SPLASH_FRAME 0 -#if ENABLE_SPLASH_FRAME - { - QMutexLocker viewLocker(&_renderArgsMutex); - - if (_appRenderArgs._isStereo) { - _gpuContext->enableStereo(true); - _gpuContext->setStereoProjections(_appRenderArgs._eyeProjections); - _gpuContext->setStereoViews(_appRenderArgs._eyeOffsets); - } - - // Frame resources - auto framebufferCache = DependencyManager::get(); - gpu::FramebufferPointer finalFramebuffer = framebufferCache->getFramebuffer(); - std::shared_ptr procedural = std::make_shared(); - procedural->parse(SPLASH_SKYBOX); - - _gpuContext->beginFrame(_appRenderArgs._view, _appRenderArgs._headPose); - gpu::doInBatch("splashFrame", _gpuContext, [&](gpu::Batch& batch) { - batch.resetStages(); - batch.enableStereo(false); - batch.setFramebuffer(finalFramebuffer); - batch.clearColorFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, { 0, 0, 0, 1 }); - batch.enableSkybox(true); - batch.enableStereo(_appRenderArgs._isStereo); - batch.setViewportTransform({ 0, 0, finalFramebuffer->getSize() }); - procedural->render(batch, _appRenderArgs._renderArgs.getViewFrustum()); - }); - auto frame = _gpuContext->endFrame(); - frame->frameIndex = 0; - frame->framebuffer = finalFramebuffer; - frame->pose = _appRenderArgs._headPose; - frame->framebufferRecycler = [framebufferCache, procedural](const gpu::FramebufferPointer& framebuffer) { - framebufferCache->releaseFramebuffer(framebuffer); - }; - _displayPlugin->submitFrame(frame); - } -#endif } void Application::initializeRenderEngine() { diff --git a/interface/src/Application.h b/interface/src/Application.h index 9b8aac425a..fb1c916c36 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -793,5 +793,7 @@ private: bool _showTrackedObjects { false }; bool _prevShowTrackedObjects { false }; + + std::shared_ptr _splashScreen { std::make_shared() }; }; #endif // hifi_Application_h diff --git a/interface/src/Application_render.cpp b/interface/src/Application_render.cpp index a87caeb9a8..47cde80ab3 100644 --- a/interface/src/Application_render.cpp +++ b/interface/src/Application_render.cpp @@ -62,6 +62,7 @@ void Application::paintGL() { glm::mat4 HMDSensorPose; glm::mat4 eyeToWorld; glm::mat4 sensorToWorld; + ViewFrustum viewFrustum; bool isStereo; glm::mat4 stereoEyeOffsets[2]; @@ -84,6 +85,7 @@ void Application::paintGL() { stereoEyeOffsets[eye] = _appRenderArgs._eyeOffsets[eye]; stereoEyeProjections[eye] = _appRenderArgs._eyeProjections[eye]; }); + viewFrustum = _appRenderArgs._renderArgs.getViewFrustum(); } { @@ -94,21 +96,12 @@ void Application::paintGL() { gpu::doInBatch("Application_render::gpuContextReset", _gpuContext, [&](gpu::Batch& batch) { batch.resetStages(); }); - } - - { - PROFILE_RANGE(render, "/renderOverlay"); - PerformanceTimer perfTimer("renderOverlay"); - // NOTE: There is no batch associated with this renderArgs - // the ApplicationOverlay class assumes it's viewport is setup to be the device size - renderArgs._viewport = glm::ivec4(0, 0, getDeviceSize()); - _applicationOverlay.renderOverlay(&renderArgs); - } - - { - PROFILE_RANGE(render, "/updateCompositor"); - getApplicationCompositor().setFrameInfo(_renderFrameCount, eyeToWorld, sensorToWorld); + if (isStereo) { + renderArgs._context->enableStereo(true); + renderArgs._context->setStereoProjections(stereoEyeProjections); + renderArgs._context->setStereoViews(stereoEyeOffsets); + } } gpu::FramebufferPointer finalFramebuffer; @@ -122,17 +115,38 @@ void Application::paintGL() { finalFramebuffer = framebufferCache->getFramebuffer(); } - { - if (isStereo) { - renderArgs._context->enableStereo(true); - renderArgs._context->setStereoProjections(stereoEyeProjections); - renderArgs._context->setStereoViews(stereoEyeOffsets); + if (!displayPlugin->areAllProgramsLoaded()) { + gpu::doInBatch("splashFrame", _gpuContext, [&](gpu::Batch& batch) { + batch.enableStereo(false); + batch.setFramebuffer(finalFramebuffer); + batch.clearColorFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, { 0, 0, 0, 1 }); + batch.enableSkybox(true); + batch.enableStereo(isStereo); + batch.setViewportTransform({ 0, 0, finalFramebuffer->getSize() }); + _splashScreen->render(batch, viewFrustum); + }); + } else { + { + PROFILE_RANGE(render, "/renderOverlay"); + PerformanceTimer perfTimer("renderOverlay"); + // NOTE: There is no batch associated with this renderArgs + // the ApplicationOverlay class assumes it's viewport is setup to be the device size + renderArgs._viewport = glm::ivec4(0, 0, getDeviceSize()); + _applicationOverlay.renderOverlay(&renderArgs); } - renderArgs._hudOperator = displayPlugin->getHUDOperator(); - renderArgs._hudTexture = _applicationOverlay.getOverlayTexture(); - renderArgs._blitFramebuffer = finalFramebuffer; - runRenderFrame(&renderArgs); + { + PROFILE_RANGE(render, "/updateCompositor"); + getApplicationCompositor().setFrameInfo(_renderFrameCount, eyeToWorld, sensorToWorld); + } + + { + PROFILE_RANGE(render, "/runRenderFrame"); + renderArgs._hudOperator = displayPlugin->getHUDOperator(); + renderArgs._hudTexture = _applicationOverlay.getOverlayTexture(); + renderArgs._blitFramebuffer = finalFramebuffer; + runRenderFrame(&renderArgs); + } } auto frame = _gpuContext->endFrame(); diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp index 190d4d4104..f562efbe22 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -637,6 +638,17 @@ void OpenGLDisplayPlugin::present() { auto frameId = (uint64_t)presentCount(); PROFILE_RANGE_EX(render, __FUNCTION__, 0xffffff00, frameId) uint64_t startPresent = usecTimestampNow(); + + if (!_allProgramsLoaded) { + const auto& programIDs = shader::allPrograms(); + if (_currentLoadingProgramIndex < programIDs.size()) { + auto shader = gpu::Shader::createProgram(programIDs.at(_currentLoadingProgramIndex++)); + gpu::gl::GLShader::sync(*getGLBackend(), *shader); + } else { + _allProgramsLoaded = true; + } + } + { PROFILE_RANGE_EX(render, "updateFrameData", 0xff00ff00, frameId) updateFrameData(); @@ -829,6 +841,9 @@ void OpenGLDisplayPlugin::render(std::function f) { _gpuContext->executeBatch(batch); } +OpenGLDisplayPlugin::OpenGLDisplayPlugin() : DisplayPlugin() { + _allProgramsLoaded = false; +} OpenGLDisplayPlugin::~OpenGLDisplayPlugin() { } diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h index 1cc060161b..1e3983d366 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h @@ -38,6 +38,7 @@ protected: using Lock = std::unique_lock; using Condition = std::condition_variable; public: + OpenGLDisplayPlugin(); ~OpenGLDisplayPlugin(); // These must be final to ensure proper ordering of operations // between the main thread and the presentation thread @@ -180,5 +181,7 @@ protected: // be serialized through this mutex mutable Mutex _presentMutex; float _hudAlpha{ 1.0f }; + + size_t _currentLoadingProgramIndex { 0 }; }; diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLShader.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLShader.cpp index 44d2bd6ca0..cf123a3f66 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLShader.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLShader.cpp @@ -37,6 +37,7 @@ GLShader* GLShader::sync(GLBackend& backend, const Shader& shader, const Shader: if (object) { return object; } + PROFILE_RANGE(render, "/GLShader::sync"); // need to have a gpu object? if (shader.isProgram()) { GLShader* tempObject = backend.compileBackendProgram(shader, handler); diff --git a/libraries/plugins/src/plugins/DisplayPlugin.h b/libraries/plugins/src/plugins/DisplayPlugin.h index ad49ceafe6..e925309042 100644 --- a/libraries/plugins/src/plugins/DisplayPlugin.h +++ b/libraries/plugins/src/plugins/DisplayPlugin.h @@ -217,6 +217,8 @@ public: static const QString& MENU_PATH(); + bool areAllProgramsLoaded() { return _allProgramsLoaded; } + signals: void recommendedFramebufferSizeChanged(const QSize& size); void resetSensorsRequested(); @@ -233,6 +235,8 @@ protected: float _renderResolutionScale { 1.0f }; + std::atomic _allProgramsLoaded { true }; + private: QMutex _presentMutex; QWaitCondition _presentCondition; From fd9c05ce8055d72bbc5540f38d0f2e88744b8437 Mon Sep 17 00:00:00 2001 From: amantley Date: Fri, 16 Nov 2018 17:39:46 -0800 Subject: [PATCH 10/79] joint mapping. adding to fbx reader and avatar classes to get non standard names to map to hifi --- .../src/avatars-renderer/Avatar.cpp | 15 +++++++++++++++ libraries/fbx/src/FBXReader.cpp | 18 ++++++++++++++++++ libraries/fbx/src/FSTReader.h | 1 + libraries/hfm/src/hfm/HFM.h | 1 + 4 files changed, 35 insertions(+) diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index fceb146470..4b730fccda 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1437,6 +1437,21 @@ int Avatar::getJointIndex(const QString& name) const { withValidJointIndicesCache([&]() { if (_modelJointIndicesCache.contains(name)) { result = _modelJointIndicesCache[name] - 1; + if (_skeletonModel && _skeletonModel->isActive()) { + qCDebug(avatars_renderer) << "the other head id is this" << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]; + qCDebug(avatars_renderer) << "joint indices cache " << name << " " << _modelJointIndicesCache[name]; + if (_modelJointIndicesCache.contains(_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"])) { + qCDebug(avatars_renderer) << "joint alternate name " << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"] << " " << _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]]; + } + } + } else { + // doesn't contain name. + qCDebug(avatars_renderer) << "name is not here"; + if (_skeletonModel && _skeletonModel->isActive()) { + if (_modelJointIndicesCache.contains(_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"])) { + qCDebug(avatars_renderer) << "the other head id is this" << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"] << " " << _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]];; + } + } } }); return result; diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index dd10cd30b3..343f7e6c6d 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -417,6 +417,21 @@ QByteArray fileOnUrl(const QByteArray& filepath, const QString& url) { return filepath.mid(filepath.lastIndexOf('/') + 1); } +QMap getJointNameMapping(const QVariantHash& mapping) { + static const QString JOINT_NAME_MAPPING_FIELD = "jointMap"; + QMap fbxToHifiJointNameMap; + if (!mapping.isEmpty() && mapping.contains(JOINT_NAME_MAPPING_FIELD) && mapping[JOINT_NAME_MAPPING_FIELD].type() == QVariant::Hash) { + auto jointNames = mapping[JOINT_NAME_MAPPING_FIELD].toHash(); + for (auto itr = jointNames.begin(); itr != jointNames.end(); itr++) { + qCDebug(modelformat) << "found a joint mapping field key " << itr.key() << " value " << itr.value().toString(); + fbxToHifiJointNameMap.insert(itr.key(), itr.value().toString()); + qCDebug(modelformat) << "the mapped key (Head) has a value of " << fbxToHifiJointNameMap[itr.key()]; + } + + } + return fbxToHifiJointNameMap; +} + QMap getJointRotationOffsets(const QVariantHash& mapping) { QMap jointRotationOffsets; static const QString JOINT_ROTATION_OFFSET_FIELD = "jointRotationOffset"; @@ -1830,6 +1845,9 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString& qCDebug(modelformat) << "Joint Rotation Offset added to Rig._jointRotationOffsets : " << " jointName: " << jointName << " jointIndex: " << jointIndex << " rotation offset: " << rotationOffset; } + hfmModel.fbxToHifiJointNameMapping.clear(); + hfmModel.fbxToHifiJointNameMapping = getJointNameMapping(mapping); + return hfmModelPtr; } diff --git a/libraries/fbx/src/FSTReader.h b/libraries/fbx/src/FSTReader.h index 4a8574f0cf..00244877b3 100644 --- a/libraries/fbx/src/FSTReader.h +++ b/libraries/fbx/src/FSTReader.h @@ -29,6 +29,7 @@ static const QString JOINT_FIELD = "joint"; static const QString FREE_JOINT_FIELD = "freeJoint"; static const QString BLENDSHAPE_FIELD = "bs"; static const QString SCRIPT_FIELD = "script"; +static const QString JOINT_NAME_MAPPING_FIELD = "jointMap"; class FSTReader { public: diff --git a/libraries/hfm/src/hfm/HFM.h b/libraries/hfm/src/hfm/HFM.h index 05e48b6534..b33417666f 100644 --- a/libraries/hfm/src/hfm/HFM.h +++ b/libraries/hfm/src/hfm/HFM.h @@ -313,6 +313,7 @@ public: QList blendshapeChannelNames; QMap jointRotationOffsets; + QMap fbxToHifiJointNameMapping; }; }; From 0fccb4c73c048a381b2024bc31eeeebee8750786 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Fri, 16 Nov 2018 18:30:30 -0800 Subject: [PATCH 11/79] move to batch, try to use static --- interface/src/Application_render.cpp | 2 -- .../display-plugins/OpenGLDisplayPlugin.cpp | 23 +++++++++++-------- .../src/display-plugins/OpenGLDisplayPlugin.h | 6 +++-- .../gpu-gl-common/src/gpu/gl/GLBackend.cpp | 7 ++++++ .../gpu-gl-common/src/gpu/gl/GLBackend.h | 2 ++ libraries/gpu/src/gpu/Batch.cpp | 6 +++++ libraries/gpu/src/gpu/Batch.h | 4 ++++ libraries/plugins/src/plugins/DisplayPlugin.h | 4 +--- 8 files changed, 37 insertions(+), 17 deletions(-) diff --git a/interface/src/Application_render.cpp b/interface/src/Application_render.cpp index 47cde80ab3..8d9cdc980a 100644 --- a/interface/src/Application_render.cpp +++ b/interface/src/Application_render.cpp @@ -117,9 +117,7 @@ void Application::paintGL() { if (!displayPlugin->areAllProgramsLoaded()) { gpu::doInBatch("splashFrame", _gpuContext, [&](gpu::Batch& batch) { - batch.enableStereo(false); batch.setFramebuffer(finalFramebuffer); - batch.clearColorFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, { 0, 0, 0, 1 }); batch.enableSkybox(true); batch.enableStereo(isStereo); batch.setViewportTransform({ 0, 0, finalFramebuffer->getSize() }); diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp index f562efbe22..45e0bbc2a6 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include #include @@ -634,18 +633,26 @@ void OpenGLDisplayPlugin::internalPresent() { _presentRate.increment(); } +std::atomic OpenGLDisplayPlugin::_allProgramsLoaded { false }; +unsigned int OpenGLDisplayPlugin::_currentLoadingProgramIndex { 0 }; + +bool OpenGLDisplayPlugin::areAllProgramsLoaded() const { + return OpenGLDisplayPlugin::_allProgramsLoaded.load(); +} + void OpenGLDisplayPlugin::present() { auto frameId = (uint64_t)presentCount(); PROFILE_RANGE_EX(render, __FUNCTION__, 0xffffff00, frameId) uint64_t startPresent = usecTimestampNow(); - if (!_allProgramsLoaded) { + if (!OpenGLDisplayPlugin::_allProgramsLoaded.load()) { const auto& programIDs = shader::allPrograms(); - if (_currentLoadingProgramIndex < programIDs.size()) { - auto shader = gpu::Shader::createProgram(programIDs.at(_currentLoadingProgramIndex++)); - gpu::gl::GLShader::sync(*getGLBackend(), *shader); + if (OpenGLDisplayPlugin::_currentLoadingProgramIndex < programIDs.size()) { + gpu::doInBatch("createAndSyncProgram", _gpuContext, [&programIDs](gpu::Batch& batch) { + batch.createAndSyncProgram(programIDs.at(OpenGLDisplayPlugin::_currentLoadingProgramIndex++)); + }); } else { - _allProgramsLoaded = true; + OpenGLDisplayPlugin::_allProgramsLoaded.store(true); } } @@ -841,10 +848,6 @@ void OpenGLDisplayPlugin::render(std::function f) { _gpuContext->executeBatch(batch); } -OpenGLDisplayPlugin::OpenGLDisplayPlugin() : DisplayPlugin() { - _allProgramsLoaded = false; -} - OpenGLDisplayPlugin::~OpenGLDisplayPlugin() { } diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h index 1e3983d366..acb12aa69a 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h @@ -38,7 +38,6 @@ protected: using Lock = std::unique_lock; using Condition = std::condition_variable; public: - OpenGLDisplayPlugin(); ~OpenGLDisplayPlugin(); // These must be final to ensure proper ordering of operations // between the main thread and the presentation thread @@ -84,6 +83,8 @@ public: void copyTextureToQuickFramebuffer(NetworkTexturePointer source, QOpenGLFramebufferObject* target, GLsync* fenceSync) override; + bool areAllProgramsLoaded() const override; + protected: friend class PresentThread; @@ -182,6 +183,7 @@ protected: mutable Mutex _presentMutex; float _hudAlpha{ 1.0f }; - size_t _currentLoadingProgramIndex { 0 }; + static std::atomic _allProgramsLoaded; + static unsigned int _currentLoadingProgramIndex; }; diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp index c1ce05c18b..415c5135d9 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp @@ -102,6 +102,8 @@ GLBackend::CommandCall GLBackend::_commandCalls[Batch::NUM_COMMANDS] = (&::gpu::gl::GLBackend::do_pushProfileRange), (&::gpu::gl::GLBackend::do_popProfileRange), + + (&::gpu::gl::GLBackend::do_createAndSyncProgram), }; #define GL_GET_INTEGER(NAME) glGetIntegerv(GL_##NAME, &const_cast(NAME)); @@ -706,6 +708,11 @@ void GLBackend::do_glColor4f(const Batch& batch, size_t paramOffset) { (void)CHECK_GL_ERROR(); } +void GLBackend::do_createAndSyncProgram(const Batch& batch, size_t paramOffset) { + auto shader = gpu::Shader::createProgram(batch._params[paramOffset + 0]._uint); + gpu::gl::GLShader::sync(*this, *shader); +} + void GLBackend::releaseBuffer(GLuint id, Size size) const { Lock lock(_trashMutex); _currentFrameTrash.buffersTrash.push_back({ id, size }); diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h index 37dde5b08e..0a2c1b92ff 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h @@ -380,6 +380,8 @@ public: virtual void do_setStateBlendFactor(const Batch& batch, size_t paramOffset) final; virtual void do_setStateScissorRect(const Batch& batch, size_t paramOffset) final; + virtual void do_createAndSyncProgram(const Batch& batch, size_t paramOffset) final; + virtual GLuint getFramebufferID(const FramebufferPointer& framebuffer) = 0; virtual GLuint getTextureID(const TexturePointer& texture) final; virtual GLuint getBufferID(const Buffer& buffer) = 0; diff --git a/libraries/gpu/src/gpu/Batch.cpp b/libraries/gpu/src/gpu/Batch.cpp index e3ea210ecb..43c1c69287 100644 --- a/libraries/gpu/src/gpu/Batch.cpp +++ b/libraries/gpu/src/gpu/Batch.cpp @@ -760,3 +760,9 @@ void Batch::flush() { buffer->flush(); } } + +void Batch::createAndSyncProgram(unsigned int programID) { + ADD_COMMAND(createAndSyncProgram); + + _params.emplace_back(programID); +} \ No newline at end of file diff --git a/libraries/gpu/src/gpu/Batch.h b/libraries/gpu/src/gpu/Batch.h index 96a45d3111..aff6cf5ddd 100644 --- a/libraries/gpu/src/gpu/Batch.h +++ b/libraries/gpu/src/gpu/Batch.h @@ -289,6 +289,8 @@ public: void _glColor4f(float red, float green, float blue, float alpha); + void createAndSyncProgram(unsigned int programID); + // Maybe useful but shoudln't be public. Please convince me otherwise // Well porting to gles i need it... void runLambda(std::function f); @@ -368,6 +370,8 @@ public: COMMAND_pushProfileRange, COMMAND_popProfileRange, + COMMAND_createAndSyncProgram, + NUM_COMMANDS, }; typedef std::vector Commands; diff --git a/libraries/plugins/src/plugins/DisplayPlugin.h b/libraries/plugins/src/plugins/DisplayPlugin.h index e925309042..e9fbd71689 100644 --- a/libraries/plugins/src/plugins/DisplayPlugin.h +++ b/libraries/plugins/src/plugins/DisplayPlugin.h @@ -217,7 +217,7 @@ public: static const QString& MENU_PATH(); - bool areAllProgramsLoaded() { return _allProgramsLoaded; } + virtual bool areAllProgramsLoaded() const { return true; } signals: void recommendedFramebufferSizeChanged(const QSize& size); @@ -235,8 +235,6 @@ protected: float _renderResolutionScale { 1.0f }; - std::atomic _allProgramsLoaded { true }; - private: QMutex _presentMutex; QWaitCondition _presentCondition; From 372f4390e8f5c9cca94da1fbee648ee75f051cfb Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Mon, 19 Nov 2018 19:14:07 -0500 Subject: [PATCH 12/79] replicate default skybox --- interface/resources/shaders/splashSkybox.frag | 71 ++++++++----------- 1 file changed, 28 insertions(+), 43 deletions(-) diff --git a/interface/resources/shaders/splashSkybox.frag b/interface/resources/shaders/splashSkybox.frag index 38c89b4d26..244dad3356 100644 --- a/interface/resources/shaders/splashSkybox.frag +++ b/interface/resources/shaders/splashSkybox.frag @@ -1,47 +1,32 @@ -const vec3 COLOR = vec3(0x00, 0xD8, 0x02) / vec3(0xFF); -const float CUTOFF = 0.65; -const float NOISE_MULT = 8.0; -const float NOISE_POWER = 1.0; +// Replicate the default skybox texture -float noise4D(vec4 p) { - return fract(sin(dot(p ,vec4(12.9898,78.233,126.7235, 593.2241))) * 43758.5453); -} - -float worley4D(vec4 p) { - float r = 3.0; - vec4 f = floor(p); - vec4 x = fract(p); - for(int i = -1; i<=1; i++) - { - for(int j = -1; j<=1; j++) - { - for(int k = -1; k<=1; k++) - { - for (int l = -1; l <= 1; l++) { - vec4 q = vec4(float(i),float(j),float(k), float(l)); - vec4 v = q + vec4(noise4D((q+f)*1.11), noise4D((q+f)*1.14), noise4D((q+f)*1.17), noise4D((q+f)*1.20)) - x; - float d = dot(v, v); - r = min(r, d); - } - } - } - } - return sqrt(r); -} - - -vec3 mainColor(vec3 direction) { - float n = worley4D(vec4(direction * NOISE_MULT, iGlobalTime / 3.0)); - n = 1.0 - n; - n = pow(n, NOISE_POWER); - if (n < CUTOFF) { - return vec3(0.0); - } - - n = (n - CUTOFF) / (1.0 - CUTOFF); - return COLOR * (1.0 - n); -} +const int NUM_COLORS = 5; +const vec3 WHITISH = vec3(0.471, 0.725, 0.825); +const vec3 GREENISH = vec3(0.157, 0.529, 0.588); +const vec3 COLORS[NUM_COLORS] = vec3[]( + GREENISH, + GREENISH, + WHITISH, + WHITISH, + vec3(0.6, 0.275, 0.706) // purple +); +const float PI = 3.14159265359; +const vec3 BLACK = vec3(0.0); +const vec3 SPACE_BLUE = vec3(0.0, 0.118, 0.392); +const float HORIZONTAL_OFFSET = 3.75; vec3 getSkyboxColor() { - return mainColor(normalize(_normal)); + vec2 horizontal = vec2(_normal.x, _normal.z); + horizontal = normalize(horizontal); + float theta = atan(horizontal.y, horizontal.x); + theta = 0.5 * (theta / PI + 1.0); + float index = theta * NUM_COLORS; + index = mod(index + HORIZONTAL_OFFSET, NUM_COLORS); + int index1 = int(index) % NUM_COLORS; + int index2 = (index1 + 1) % NUM_COLORS; + vec3 horizonColor = mix(COLORS[index1], COLORS[index2], index - index1); + horizonColor = mix(horizonColor, SPACE_BLUE, smoothstep(0.0, 0.08, _normal.y)); + horizonColor = mix(horizonColor, BLACK, smoothstep(0.04, 0.15, _normal.y)); + horizonColor = mix(BLACK, horizonColor, smoothstep(-0.01, 0.0, _normal.y)); + return pow(horizonColor, vec3(0.4545));; } From 1fd03102c5c690f38745e83e4a229b7441ca5b09 Mon Sep 17 00:00:00 2001 From: amantley Date: Mon, 19 Nov 2018 17:40:43 -0800 Subject: [PATCH 13/79] debugging name mapping code --- libraries/animation/src/AnimSkeleton.cpp | 33 +++++++++++++++---- libraries/animation/src/AnimSkeleton.h | 4 ++- libraries/animation/src/Rig.cpp | 5 +++ .../src/avatars-renderer/Avatar.cpp | 12 ++++--- libraries/fbx/src/FBXReader.cpp | 2 +- 5 files changed, 43 insertions(+), 13 deletions(-) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index 91ca2359b4..908b4eb1d3 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -23,6 +23,8 @@ AnimSkeleton::AnimSkeleton(const HFMModel& hfmModel) { for (auto& joint : hfmModel.joints) { joints.push_back(joint); } + + _fbxToHifiJointNameMapping = hfmModel.fbxToHifiJointNameMapping; buildSkeletonFromJoints(joints, hfmModel.jointRotationOffsets); // we make a copy of the inverseBindMatrices in order to prevent mutating the model bind pose @@ -59,7 +61,16 @@ AnimSkeleton::AnimSkeleton(const std::vector& joints, const QMap AnimSkeleton::getChildrenOfJoint(int jointIndex) const { return result; } -const QString& AnimSkeleton::getJointName(int jointIndex) const { - return _joints[jointIndex].name; +const QString AnimSkeleton::getJointName(int jointIndex) const { + + QString jointName = _joints[jointIndex].name; + QMapIterator i(_fbxToHifiJointNameMapping); + while (i.hasNext()) { + i.next(); + if (i.value() == _joints[jointIndex].name) { + jointName = i.key(); + break; + } + } + return jointName; //;_joints[jointIndex].name; } AnimPose AnimSkeleton::getAbsolutePose(int jointIndex, const AnimPoseVec& relativePoses) const { @@ -245,9 +266,9 @@ void AnimSkeleton::buildSkeletonFromJoints(const std::vector& joints, _nonMirroredIndices.clear(); _mirrorMap.reserve(_jointsSize); for (int i = 0; i < _jointsSize; i++) { - if (_joints[i].name != "Hips" && _joints[i].name != "Spine" && - _joints[i].name != "Spine1" && _joints[i].name != "Spine2" && - _joints[i].name != "Neck" && _joints[i].name != "Head" && + if (_joints[i].name != "Hips" && _joints[i].name != _fbxToHifiJointNameMapping["Hips"] && _joints[i].name != "Spine" && _joints[i].name != _fbxToHifiJointNameMapping["Spine"] && + _joints[i].name != "Spine1" && _joints[i].name != _fbxToHifiJointNameMapping["Spine1"] && _joints[i].name != "Spine2" && _joints[i].name != _fbxToHifiJointNameMapping["Spine2"] && + _joints[i].name != "Neck" && _joints[i].name != _fbxToHifiJointNameMapping["Neck"] && _joints[i].name != "Head" && _joints[i].name != _fbxToHifiJointNameMapping["Head"] && !((_joints[i].name.startsWith("Left") || _joints[i].name.startsWith("Right")) && _joints[i].name != "LeftEye" && _joints[i].name != "RightEye")) { // HACK: we don't want to mirror some joints so we remember their indices @@ -327,7 +348,7 @@ std::vector AnimSkeleton::lookUpJointIndices(const std::vector& jo for (auto& name : jointNames) { int index = nameToJointIndex(name); if (index == -1) { - qWarning(animation) << "AnimSkeleton::lookUpJointIndices(): could not find bone with named " << name; + qWarning(animation) << "AnimSkeleton::lookUpJointIndices(): could not find bone with name " << name; } result.push_back(index); } diff --git a/libraries/animation/src/AnimSkeleton.h b/libraries/animation/src/AnimSkeleton.h index ab89eb643d..bcbfe628c7 100644 --- a/libraries/animation/src/AnimSkeleton.h +++ b/libraries/animation/src/AnimSkeleton.h @@ -27,7 +27,7 @@ public: explicit AnimSkeleton(const std::vector& joints, const QMap jointOffsets); int nameToJointIndex(const QString& jointName) const; - const QString& getJointName(int jointIndex) const; + const QString getJointName(int jointIndex) const; int getNumJoints() const; int getChainDepth(int jointIndex) const; @@ -64,6 +64,7 @@ public: std::vector lookUpJointIndices(const std::vector& jointNames) const; const HFMCluster getClusterBindMatricesOriginalValues(const int meshIndex, const int clusterIndex) const { return _clusterBindMatrixOriginalValues[meshIndex][clusterIndex]; } + const QMap getFBXToHifiJointNameMapping() const { return _fbxToHifiJointNameMapping; } protected: void buildSkeletonFromJoints(const std::vector& joints, const QMap jointOffsets); @@ -79,6 +80,7 @@ protected: std::vector _mirrorMap; QHash _jointIndicesByName; std::vector> _clusterBindMatrixOriginalValues; + QMap _fbxToHifiJointNameMapping; // no copies AnimSkeleton(const AnimSkeleton&) = delete; diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index baa8ac94ce..0c30a7696f 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -420,7 +420,12 @@ static const uint32_t MAX_JOINT_NAME_WARNING_COUNT = 100; int Rig::indexOfJoint(const QString& jointName) const { if (_animSkeleton) { + int result = _animSkeleton->nameToJointIndex(jointName); + if (_animSkeleton->getFBXToHifiJointNameMapping().contains(jointName)) { + qCDebug(animation) << "the alternate name for the joint " << jointName << " is " << _animSkeleton->getFBXToHifiJointNameMapping()[jointName] << " " << _animSkeleton->nameToJointIndex(_animSkeleton->getFBXToHifiJointNameMapping()[jointName]); + result = _animSkeleton->nameToJointIndex(jointName); + } // This is a content error, so we should issue a warning. if (result < 0 && _jointNameWarningCount < MAX_JOINT_NAME_WARNING_COUNT) { diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index 4b730fccda..e5435a9a8c 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1438,18 +1438,20 @@ int Avatar::getJointIndex(const QString& name) const { if (_modelJointIndicesCache.contains(name)) { result = _modelJointIndicesCache[name] - 1; if (_skeletonModel && _skeletonModel->isActive()) { - qCDebug(avatars_renderer) << "the other head id is this" << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]; - qCDebug(avatars_renderer) << "joint indices cache " << name << " " << _modelJointIndicesCache[name]; + // qCDebug(avatars_renderer) << "the other head id is this" << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]; + // qCDebug(avatars_renderer) << "joint indices cache " << name << " " << _modelJointIndicesCache[name]; if (_modelJointIndicesCache.contains(_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"])) { - qCDebug(avatars_renderer) << "joint alternate name " << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"] << " " << _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]]; + // qCDebug(avatars_renderer) << "joint alternate name " << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"] << " " << _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]]; } } } else { // doesn't contain name. qCDebug(avatars_renderer) << "name is not here"; if (_skeletonModel && _skeletonModel->isActive()) { - if (_modelJointIndicesCache.contains(_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"])) { - qCDebug(avatars_renderer) << "the other head id is this" << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"] << " " << _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]];; + + if (_modelJointIndicesCache.contains(_skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name])) { + result = _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name]] - 1; + qCDebug(avatars_renderer) << "joint " << name << " remapped to " << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name] << result; } } } diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index 343f7e6c6d..2e43573ec2 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -425,7 +425,7 @@ QMap getJointNameMapping(const QVariantHash& mapping) { for (auto itr = jointNames.begin(); itr != jointNames.end(); itr++) { qCDebug(modelformat) << "found a joint mapping field key " << itr.key() << " value " << itr.value().toString(); fbxToHifiJointNameMap.insert(itr.key(), itr.value().toString()); - qCDebug(modelformat) << "the mapped key (Head) has a value of " << fbxToHifiJointNameMap[itr.key()]; + qCDebug(modelformat) << "the mapped key " << itr.key() << " has a value of " << fbxToHifiJointNameMap[itr.key()]; } } From 44efd18882ee8454a1c9c27d10f659b049a001e9 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 21 Nov 2018 08:38:30 +1300 Subject: [PATCH 14/79] Make Create and Shapes lasers ignore tablet while editing --- .../controllers/controllerDispatcher.js | 33 ++++++++++++++++--- .../controllerModules/inEditMode.js | 17 ---------- .../system/libraries/entitySelectionTool.js | 5 +-- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/scripts/system/controllers/controllerDispatcher.js b/scripts/system/controllers/controllerDispatcher.js index b657faefba..a393205b5b 100644 --- a/scripts/system/controllers/controllerDispatcher.js +++ b/scripts/system/controllers/controllerDispatcher.js @@ -12,7 +12,7 @@ LEFT_HAND, RIGHT_HAND, NEAR_GRAB_PICK_RADIUS, DEFAULT_SEARCH_SPHERE_DISTANCE, DISPATCHER_PROPERTIES, getGrabPointSphereOffset, HMD, MyAvatar, Messages, findHandChildEntities, Picks, PickType, Pointers, PointerManager, getGrabPointSphereOffset, HMD, MyAvatar, Messages, findHandChildEntities, Picks, PickType, Pointers, - PointerManager, print, Selection, DISPATCHER_HOVERING_LIST, DISPATCHER_HOVERING_STYLE + PointerManager, print, Selection, DISPATCHER_HOVERING_LIST, DISPATCHER_HOVERING_STYLE, HIFI_EDIT_MANIPULATION_CHANNEL */ controllerDispatcherPlugins = {}; @@ -427,9 +427,19 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); } }; + this.leftBlacklistTabletIDs = []; + this.rightBlacklistTabletIDs = []; + + this.setLeftBlacklist = function () { + Pointers.setIgnoreItems(_this.leftPointer, _this.blacklist.concat(_this.leftBlacklistTabletIDs)); + }; + this.setRightBlacklist = function () { + Pointers.setIgnoreItems(_this.rightPointer, _this.blacklist.concat(_this.rightBlacklistTabletIDs)); + }; + this.setBlacklist = function() { - Pointers.setIgnoreItems(_this.leftPointer, this.blacklist); - Pointers.setIgnoreItems(_this.rightPointer, this.blacklist); + _this.setLeftBlacklist(); + _this.setRightBlacklist(); }; var MAPPING_NAME = "com.highfidelity.controllerDispatcher"; @@ -493,7 +503,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); filter: Picks.PICK_OVERLAYS | Picks.PICK_ENTITIES | Picks.PICK_INCLUDE_NONCOLLIDABLE, enabled: true }); - this.handleHandMessage = function(channel, data, sender) { + this.handleMessage = function (channel, data, sender) { var message; if (sender === MyAvatar.sessionUUID) { try { @@ -514,6 +524,17 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); _this.setBlacklist(); } } + } else if (channel === HIFI_EDIT_MANIPULATION_CHANNEL) { + message = JSON.parse(data); + var tabletIDs = message.action === "startEdit" ? + [HMD.tabletID, HMD.tabletScreenID, HMD.homeButtonID, HMD.homeButtonHighlightID] : []; + if (message.hand === Controller.Standard.LeftHand) { + _this.leftBlacklistTabletIDs = tabletIDs; + _this.setLeftBlacklist(); + } else if (message.hand === Controller.Standard.RightHand) { + _this.rightBlacklistTabletIDs = tabletIDs; + _this.setRightBlacklist(); + } } } catch (e) { print("WARNING: handControllerGrab.js -- error parsing message: " + data); @@ -554,7 +575,9 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); var controllerDispatcher = new ControllerDispatcher(); Messages.subscribe('Hifi-Hand-RayPick-Blacklist'); - Messages.messageReceived.connect(controllerDispatcher.handleHandMessage); + Messages.subscribe(HIFI_EDIT_MANIPULATION_CHANNEL); + Messages.messageReceived.connect(controllerDispatcher.handleMessage); + Script.scriptEnding.connect(controllerDispatcher.cleanup); Script.setTimeout(controllerDispatcher.update, BASIC_TIMER_INTERVAL_MS); }()); diff --git a/scripts/system/controllers/controllerModules/inEditMode.js b/scripts/system/controllers/controllerModules/inEditMode.js index 5d0b64606d..3a1b835146 100644 --- a/scripts/system/controllers/controllerModules/inEditMode.js +++ b/scripts/system/controllers/controllerModules/inEditMode.js @@ -20,7 +20,6 @@ Script.include("/~/system/libraries/utils.js"); var MARGIN = 25; function InEditMode(hand) { this.hand = hand; - this.running = false; this.triggerClicked = false; this.selectedTarget = null; this.reticleMinX = MARGIN; @@ -114,26 +113,10 @@ Script.include("/~/system/libraries/utils.js"); }; this.runModule = function() { - if (!this.running) { - Messages.sendLocalMessage(this.ENTITY_TOOL_UPDATES_CHANNEL, JSON.stringify({ - method: "moduleRunning", - hand: this.hand, - running: true - })); - this.running = true; - } return makeRunningValues(true, [], []); }; this.exitModule = function() { - if (this.running) { - Messages.sendLocalMessage(this.ENTITY_TOOL_UPDATES_CHANNEL, JSON.stringify({ - method: "moduleRunning", - hand: this.hand, - running: false - })); - this.running = false; - } return makeRunningValues(false, [], []); }; diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 191a961228..4552ed27fb 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -58,10 +58,7 @@ SelectionManager = (function() { return; } - if (messageParsed.method === "moduleRunning") { - // Terminate any current laser or mouse action. - SelectionDisplay.mouseReleaseEvent({}); - } else if (messageParsed.method === "selectEntity") { + if (messageParsed.method === "selectEntity") { if (!SelectionDisplay.triggered() || SelectionDisplay.triggeredHand === messageParsed.hand) { if (wantDebug) { print("setting selection to " + messageParsed.entityID); From c3a0805db1eadb9386297452b2a8692296c77cd3 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 21 Nov 2018 10:28:46 +1300 Subject: [PATCH 15/79] Make far grab ignore tablet while grabbing an entity --- .../farActionGrabEntityDynOnly.js | 14 +++++++++----- .../controllerModules/farParentGrabEntity.js | 17 +++++++++-------- .../controllers/controllerModules/farTrigger.js | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/scripts/system/controllers/controllerModules/farActionGrabEntityDynOnly.js b/scripts/system/controllers/controllerModules/farActionGrabEntityDynOnly.js index f983ed1e7d..0ba3dd6e6b 100644 --- a/scripts/system/controllers/controllerModules/farActionGrabEntityDynOnly.js +++ b/scripts/system/controllers/controllerModules/farActionGrabEntityDynOnly.js @@ -48,6 +48,7 @@ Script.include("/~/system/libraries/controllers.js"); function FarActionGrabEntity(hand) { this.hand = hand; + this.grabbing = false; this.grabbedThingID = null; this.targetObject = null; this.actionID = null; // action this script created... @@ -151,6 +152,7 @@ Script.include("/~/system/libraries/controllers.js"); Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand); this.previousRoomControllerPosition = roomControllerPosition; + this.grabbing = true; }; this.continueDistanceHolding = function(controllerData) { @@ -246,6 +248,7 @@ Script.include("/~/system/libraries/controllers.js"); this.grabbedThingID = null; this.targetObject = null; this.potentialEntityWithContextOverlay = false; + this.grabbing = false; }; this.updateRecommendedArea = function() { @@ -357,8 +360,7 @@ Script.include("/~/system/libraries/controllers.js"); }; this.run = function (controllerData) { - if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE || - this.notPointingAtEntity(controllerData) || this.targetIsNull()) { + if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE || this.targetIsNull()) { this.endFarGrabAction(); Selection.removeFromSelectedItemsList(DISPATCHER_HOVERING_LIST, "entity", this.highlightedEntity); @@ -375,10 +377,12 @@ Script.include("/~/system/libraries/controllers.js"); this.hand === RIGHT_HAND ? "RightScaleAvatar" : "LeftScaleAvatar", this.hand === RIGHT_HAND ? "RightFarTriggerEntity" : "LeftFarTriggerEntity", this.hand === RIGHT_HAND ? "RightNearActionGrabEntity" : "LeftNearActionGrabEntity", - this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity", - this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay", - this.hand === RIGHT_HAND ? "RightNearTabletHighlight" : "LeftNearTabletHighlight" + this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity" ]; + if (!this.grabbing) { + nearGrabNames.push(this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay"); + nearGrabNames.push(this.hand === RIGHT_HAND ? "RightNearTabletHighlight" : "LeftNearTabletHighlight"); + } var nearGrabReadiness = []; for (var i = 0; i < nearGrabNames.length; i++) { diff --git a/scripts/system/controllers/controllerModules/farParentGrabEntity.js b/scripts/system/controllers/controllerModules/farParentGrabEntity.js index f85869aa7f..c023c4032d 100644 --- a/scripts/system/controllers/controllerModules/farParentGrabEntity.js +++ b/scripts/system/controllers/controllerModules/farParentGrabEntity.js @@ -47,6 +47,7 @@ Script.include("/~/system/libraries/controllers.js"); function FarParentGrabEntity(hand) { this.hand = hand; + this.grabbing = false; this.targetEntityID = null; this.targetObject = null; this.previouslyUnhooked = {}; @@ -453,8 +454,7 @@ Script.include("/~/system/libraries/controllers.js"); }; this.run = function (controllerData) { - if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE || - this.notPointingAtEntity(controllerData) || this.targetIsNull()) { + if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE || this.targetIsNull()) { this.endFarParentGrab(controllerData); Selection.removeFromSelectedItemsList(DISPATCHER_HOVERING_LIST, "entity", this.highlightedEntity); this.highlightedEntity = null; @@ -470,10 +470,12 @@ Script.include("/~/system/libraries/controllers.js"); this.hand === RIGHT_HAND ? "RightScaleAvatar" : "LeftScaleAvatar", this.hand === RIGHT_HAND ? "RightFarTriggerEntity" : "LeftFarTriggerEntity", this.hand === RIGHT_HAND ? "RightNearActionGrabEntity" : "LeftNearActionGrabEntity", - this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity", - this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay", - this.hand === RIGHT_HAND ? "RightNearTabletHighlight" : "LeftNearTabletHighlight" + this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity" ]; + if (!this.grabbing) { + nearGrabNames.push(this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay"); + nearGrabNames.push(this.hand === RIGHT_HAND ? "RightNearTabletHighlight" : "LeftNearTabletHighlight"); + } var nearGrabReadiness = []; for (var i = 0; i < nearGrabNames.length; i++) { @@ -483,11 +485,10 @@ Script.include("/~/system/libraries/controllers.js"); } if (this.targetEntityID) { - // if we are doing a distance grab and the object or tablet gets close enough to the controller, + // if we are doing a distance grab and the object gets close enough to the controller, // stop the far-grab so the near-grab or equip can take over. for (var k = 0; k < nearGrabReadiness.length; k++) { - if (nearGrabReadiness[k].active && (nearGrabReadiness[k].targets[0] === this.targetEntityID || - HMD.tabletID && nearGrabReadiness[k].targets[0] === HMD.tabletID)) { + if (nearGrabReadiness[k].active && (nearGrabReadiness[k].targets[0] === this.targetEntityID)) { this.endFarParentGrab(controllerData); return makeRunningValues(false, [], []); } diff --git a/scripts/system/controllers/controllerModules/farTrigger.js b/scripts/system/controllers/controllerModules/farTrigger.js index 2b003e4732..c9c9d3deee 100644 --- a/scripts/system/controllers/controllerModules/farTrigger.js +++ b/scripts/system/controllers/controllerModules/farTrigger.js @@ -37,7 +37,7 @@ Script.include("/~/system/libraries/controllers.js"); this.getTargetProps = function (controllerData) { var targetEntity = controllerData.rayPicks[this.hand].objectID; - if (targetEntity) { + if (targetEntity && controllerData.rayPicks[this.hand].type === RayPick.INTERSECTED_ENTITY) { var targetProperties = Entities.getEntityProperties(targetEntity, DISPATCHER_PROPERTIES); if (entityWantsFarTrigger(targetProperties)) { return targetProperties; From 572cdcd008f4758debd3c80ea8abb79fcd27c9b3 Mon Sep 17 00:00:00 2001 From: amantley Date: Tue, 20 Nov 2018 17:09:37 -0800 Subject: [PATCH 16/79] remapping is now able to work remains to clean up code and check for gotchas from old fst code --- libraries/animation/src/AnimSkeleton.cpp | 102 +++++++++++++++--- libraries/animation/src/AnimSkeleton.h | 3 + libraries/animation/src/Rig.cpp | 2 +- .../src/avatars-renderer/Avatar.cpp | 4 +- .../src/avatars-renderer/SkeletonModel.cpp | 1 + libraries/fbx/src/FBXReader.cpp | 28 ++--- 6 files changed, 110 insertions(+), 30 deletions(-) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index 908b4eb1d3..6e71ef0184 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -54,6 +54,7 @@ AnimSkeleton::AnimSkeleton(const HFMModel& hfmModel) { } _clusterBindMatrixOriginalValues.push_back(dummyClustersList); } + //dump(false); } AnimSkeleton::AnimSkeleton(const std::vector& joints, const QMap jointOffsets) { @@ -64,16 +65,18 @@ int AnimSkeleton::nameToJointIndex(const QString& jointName) const { auto itr = _jointIndicesByName.find(jointName); - if (getFBXToHifiJointNameMapping().contains(jointName)) { - qCDebug(animation) << "failing joint name is " << jointName; + if (_fbxToHifiJointNameMapping.contains(jointName)) { + //qCDebug(animation) << "failing joint name is " << jointName; itr = _jointIndicesByName.find(_fbxToHifiJointNameMapping[jointName]); - qCDebug(animation) << "the alternate name for the joint " << jointName << " is " << - _fbxToHifiJointNameMapping[jointName] << " " << itr.value(); + //qCDebug(animation) << "the alternate name for the joint " << jointName << " is " << + //_fbxToHifiJointNameMapping[jointName] << " " << itr.value(); } if (_jointIndicesByName.end() != itr) { + //qCDebug(animation) << "returning " << itr.value() << " for " << jointName; return itr.value(); } + //qCDebug(animation) << "returning -1 " << " for " << jointName; return -1; } @@ -142,6 +145,7 @@ const QString AnimSkeleton::getJointName(int jointIndex) const { break; } } + //qCDebug(animation) << "reverse lookup: returning " << jointName << " for " << jointIndex; return jointName; //;_joints[jointIndex].name; } @@ -215,6 +219,81 @@ void AnimSkeleton::mirrorAbsolutePoses(AnimPoseVec& poses) const { } } +bool AnimSkeleton::checkNonMirrored(QString jointName) const { + + //bool isNonMirrored = false; + QMapIterator i(_fbxToHifiJointNameMapping); + while (i.hasNext()) { + i.next(); + if (i.value() == jointName) { + // check for left right in the key + if (i.key() != "Hips" && i.key() != "Spine" && + i.key() != "Spine1" && i.key() != "Spine2" && + i.key() != "Neck" && i.key() != "Head" && + !((i.key().startsWith("Left") || i.key().startsWith("Right")) && + i.key() != "LeftEye" && i.key() != "RightEye")) { + //return true + return true; + } else { + return false; + } + } + } + // check the unmapped name + if (jointName != "Hips" && jointName != "Spine" && + jointName != "Spine1" && jointName != "Spine2" && + jointName != "Neck" && jointName != "Head" && + !((jointName.startsWith("Left") || jointName.startsWith("Right")) && + jointName != "LeftEye" && jointName != "RightEye")) { + //return true + return true; + } else { + return false; + } + +} + +int AnimSkeleton::containsLeft(QString jointName) const { + QMapIterator i(_fbxToHifiJointNameMapping); + int mirrorJointIndex = -1; + while (i.hasNext()) { + i.next(); + if (i.value() == jointName) { + // check for left right in the key + if (i.key().startsWith("Left")) { + QString mirrorJointName = QString(i.key()).replace(0, 4, "Right"); + mirrorJointIndex = nameToJointIndex(mirrorJointName); + //return true + } + } + } + if (jointName.startsWith("Left")) { + QString mirrorJointName = QString(i.key()).replace(0, 4, "Right"); + mirrorJointIndex = nameToJointIndex(mirrorJointName); + } + return mirrorJointIndex; +} + +int AnimSkeleton::containsRight(QString jointName) const { + QMapIterator i(_fbxToHifiJointNameMapping); + int mirrorJointIndex = -1; + while (i.hasNext()) { + i.next(); + if (i.value() == jointName) { + // check for left right in the key + if (i.key().startsWith("Right")) { + QString mirrorJointName = QString(i.key()).replace(0, 5, "Left"); + mirrorJointIndex = nameToJointIndex(mirrorJointName); + } + } + } + if (jointName.startsWith("Right")) { + QString mirrorJointName = QString(i.key()).replace(0, 5, "Left"); + mirrorJointIndex = nameToJointIndex(mirrorJointName); + } + return mirrorJointIndex; +} + void AnimSkeleton::buildSkeletonFromJoints(const std::vector& joints, const QMap jointOffsets) { _joints = joints; @@ -266,22 +345,15 @@ void AnimSkeleton::buildSkeletonFromJoints(const std::vector& joints, _nonMirroredIndices.clear(); _mirrorMap.reserve(_jointsSize); for (int i = 0; i < _jointsSize; i++) { - if (_joints[i].name != "Hips" && _joints[i].name != _fbxToHifiJointNameMapping["Hips"] && _joints[i].name != "Spine" && _joints[i].name != _fbxToHifiJointNameMapping["Spine"] && - _joints[i].name != "Spine1" && _joints[i].name != _fbxToHifiJointNameMapping["Spine1"] && _joints[i].name != "Spine2" && _joints[i].name != _fbxToHifiJointNameMapping["Spine2"] && - _joints[i].name != "Neck" && _joints[i].name != _fbxToHifiJointNameMapping["Neck"] && _joints[i].name != "Head" && _joints[i].name != _fbxToHifiJointNameMapping["Head"] && - !((_joints[i].name.startsWith("Left") || _joints[i].name.startsWith("Right")) && - _joints[i].name != "LeftEye" && _joints[i].name != "RightEye")) { + if (checkNonMirrored(_joints[i].name)) { // HACK: we don't want to mirror some joints so we remember their indices // so we can restore them after a future mirror operation _nonMirroredIndices.push_back(i); } int mirrorJointIndex = -1; - if (_joints[i].name.startsWith("Left")) { - QString mirrorJointName = QString(_joints[i].name).replace(0, 4, "Right"); - mirrorJointIndex = nameToJointIndex(mirrorJointName); - } else if (_joints[i].name.startsWith("Right")) { - QString mirrorJointName = QString(_joints[i].name).replace(0, 5, "Left"); - mirrorJointIndex = nameToJointIndex(mirrorJointName); + mirrorJointIndex = containsLeft(_joints[i].name); + if (mirrorJointIndex > -1) { + mirrorJointIndex = containsRight(_joints[i].name); } if (mirrorJointIndex >= 0) { _mirrorMap.push_back(mirrorJointIndex); diff --git a/libraries/animation/src/AnimSkeleton.h b/libraries/animation/src/AnimSkeleton.h index bcbfe628c7..5581976d74 100644 --- a/libraries/animation/src/AnimSkeleton.h +++ b/libraries/animation/src/AnimSkeleton.h @@ -56,6 +56,9 @@ public: void saveNonMirroredPoses(const AnimPoseVec& poses) const; void restoreNonMirroredPoses(AnimPoseVec& poses) const; + bool checkNonMirrored(QString jointName) const; + int containsLeft(QString jointName) const; + int containsRight(QString jointName) const; void mirrorRelativePoses(AnimPoseVec& poses) const; void mirrorAbsolutePoses(AnimPoseVec& poses) const; diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 0c30a7696f..1675ea8e90 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -423,7 +423,7 @@ int Rig::indexOfJoint(const QString& jointName) const { int result = _animSkeleton->nameToJointIndex(jointName); if (_animSkeleton->getFBXToHifiJointNameMapping().contains(jointName)) { - qCDebug(animation) << "the alternate name for the joint " << jointName << " is " << _animSkeleton->getFBXToHifiJointNameMapping()[jointName] << " " << _animSkeleton->nameToJointIndex(_animSkeleton->getFBXToHifiJointNameMapping()[jointName]); + //qCDebug(animation) << "the alternate name for the joint " << jointName << " is " << _animSkeleton->getFBXToHifiJointNameMapping()[jointName] << " " << _animSkeleton->nameToJointIndex(_animSkeleton->getFBXToHifiJointNameMapping()[jointName]); result = _animSkeleton->nameToJointIndex(jointName); } diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index e5435a9a8c..14e97a5bf9 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1446,12 +1446,12 @@ int Avatar::getJointIndex(const QString& name) const { } } else { // doesn't contain name. - qCDebug(avatars_renderer) << "name is not here"; + //qCDebug(avatars_renderer) << "name is not here"; if (_skeletonModel && _skeletonModel->isActive()) { if (_modelJointIndicesCache.contains(_skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name])) { result = _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name]] - 1; - qCDebug(avatars_renderer) << "joint " << name << " remapped to " << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name] << result; + // qCDebug(avatars_renderer) << "joint " << name << " remapped to " << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name] << result; } } } diff --git a/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp b/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp index 36e37dd3d4..a97ba4bf4b 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp @@ -317,6 +317,7 @@ bool SkeletonModel::getEyePositions(glm::vec3& firstEyePosition, glm::vec3& seco } glm::vec3 SkeletonModel::getDefaultEyeModelPosition() const { + //qCDebug(avatars_renderer) << "default eye model position " << _defaultEyeModelPosition; return _owningAvatar->getModelScale() * _defaultEyeModelPosition; } diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index 2e43573ec2..3ddcd75255 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -485,7 +485,7 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString& QString jointNeckName = processID(getString(joints.value("jointNeck", "jointNeck"))); QString jointRootName = processID(getString(joints.value("jointRoot", "jointRoot"))); QString jointLeanName = processID(getString(joints.value("jointLean", "jointLean"))); - QString jointHeadName = processID(getString(joints.value("jointHead", "jointHead"))); + QString jointHeadName = "Head";// processID(getString(joints.value("jointHead", "jointHead"))); QString jointLeftHandName = processID(getString(joints.value("jointLeftHand", "jointLeftHand"))); QString jointRightHandName = processID(getString(joints.value("jointRightHand", "jointRightHand"))); QString jointEyeLeftID; @@ -534,6 +534,8 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString& HFMModel& hfmModel = *hfmModelPtr; hfmModel.originalURL = url; + hfmModel.fbxToHifiJointNameMapping.clear(); + hfmModel.fbxToHifiJointNameMapping = getJointNameMapping(mapping); float unitScaleFactor = 1.0f; glm::vec3 ambientColor; @@ -602,34 +604,34 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString& hifiGlobalNodeID = id; } - if (name == jointEyeLeftName || name == "EyeL" || name == "joint_Leye") { + if (name == jointEyeLeftName || name == "EyeL" || name == "joint_Leye" || (hfmModel.fbxToHifiJointNameMapping.contains(jointEyeLeftName) && (name == hfmModel.fbxToHifiJointNameMapping[jointEyeLeftName]))) { jointEyeLeftID = getID(object.properties); - } else if (name == jointEyeRightName || name == "EyeR" || name == "joint_Reye") { + } else if (name == jointEyeRightName || name == "EyeR" || name == "joint_Reye" || (hfmModel.fbxToHifiJointNameMapping.contains(jointEyeRightName) && (name == hfmModel.fbxToHifiJointNameMapping[jointEyeRightName]))) { jointEyeRightID = getID(object.properties); - } else if (name == jointNeckName || name == "NeckRot" || name == "joint_neck") { + } else if (name == jointNeckName || name == "NeckRot" || name == "joint_neck" || (hfmModel.fbxToHifiJointNameMapping.contains(jointNeckName) && (name == hfmModel.fbxToHifiJointNameMapping[jointNeckName]))) { jointNeckID = getID(object.properties); - } else if (name == jointRootName) { + } else if (name == jointRootName || (hfmModel.fbxToHifiJointNameMapping.contains(jointRootName) && (name == hfmModel.fbxToHifiJointNameMapping[jointRootName]))) { jointRootID = getID(object.properties); } else if (name == jointLeanName) { jointLeanID = getID(object.properties); - } else if (name == jointHeadName) { + } else if ((name == jointHeadName) || (hfmModel.fbxToHifiJointNameMapping.contains(jointHeadName) && (name == hfmModel.fbxToHifiJointNameMapping[jointHeadName]))) { jointHeadID = getID(object.properties); - } else if (name == jointLeftHandName || name == "LeftHand" || name == "joint_L_hand") { + } else if (name == jointLeftHandName || name == "LeftHand" || name == "joint_L_hand" || (hfmModel.fbxToHifiJointNameMapping.contains(jointLeftHandName) && (name == hfmModel.fbxToHifiJointNameMapping[jointLeftHandName]))) { jointLeftHandID = getID(object.properties); - } else if (name == jointRightHandName || name == "RightHand" || name == "joint_R_hand") { + } else if (name == jointRightHandName || name == "RightHand" || name == "joint_R_hand" || (hfmModel.fbxToHifiJointNameMapping.contains(jointRightHandName) && (name == hfmModel.fbxToHifiJointNameMapping[jointRightHandName]))) { jointRightHandID = getID(object.properties); - } else if (name == "LeftToe" || name == "joint_L_toe" || name == "LeftToe_End") { + } else if (name == "LeftToe" || name == "joint_L_toe" || name == "LeftToe_End" || (hfmModel.fbxToHifiJointNameMapping.contains("LeftToe") && (name == hfmModel.fbxToHifiJointNameMapping["LeftToe"]))) { jointLeftToeID = getID(object.properties); - } else if (name == "RightToe" || name == "joint_R_toe" || name == "RightToe_End") { + } else if (name == "RightToe" || name == "joint_R_toe" || name == "RightToe_End" || (hfmModel.fbxToHifiJointNameMapping.contains("RightToe") && (name == hfmModel.fbxToHifiJointNameMapping["RightToe"]))) { jointRightToeID = getID(object.properties); } @@ -1839,14 +1841,16 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString& QString jointName = itr.key(); glm::quat rotationOffset = itr.value(); int jointIndex = hfmModel.getJointIndex(jointName); + if (hfmModel.fbxToHifiJointNameMapping.contains(jointName)) { + jointIndex = hfmModel.getJointIndex(hfmModel.fbxToHifiJointNameMapping[jointName]); + } if (jointIndex != -1) { hfmModel.jointRotationOffsets.insert(jointIndex, rotationOffset); } qCDebug(modelformat) << "Joint Rotation Offset added to Rig._jointRotationOffsets : " << " jointName: " << jointName << " jointIndex: " << jointIndex << " rotation offset: " << rotationOffset; } - hfmModel.fbxToHifiJointNameMapping.clear(); - hfmModel.fbxToHifiJointNameMapping = getJointNameMapping(mapping); + return hfmModelPtr; } From a4883649760c15a6ff148720e3f49874c6277c6f Mon Sep 17 00:00:00 2001 From: amantley Date: Tue, 20 Nov 2018 17:14:35 -0800 Subject: [PATCH 17/79] fixed mirroring helper functions contains left and contains right --- libraries/animation/src/AnimSkeleton.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index 6e71ef0184..e928658366 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -268,7 +268,7 @@ int AnimSkeleton::containsLeft(QString jointName) const { } } if (jointName.startsWith("Left")) { - QString mirrorJointName = QString(i.key()).replace(0, 4, "Right"); + QString mirrorJointName = QString(jointName).replace(0, 4, "Right"); mirrorJointIndex = nameToJointIndex(mirrorJointName); } return mirrorJointIndex; @@ -288,7 +288,7 @@ int AnimSkeleton::containsRight(QString jointName) const { } } if (jointName.startsWith("Right")) { - QString mirrorJointName = QString(i.key()).replace(0, 5, "Left"); + QString mirrorJointName = QString(jointName).replace(0, 5, "Left"); mirrorJointIndex = nameToJointIndex(mirrorJointName); } return mirrorJointIndex; From 5e51ba051ab5dbdc13b063eff0735a4c2a63772f Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 22 Nov 2018 11:12:22 +1300 Subject: [PATCH 18/79] Improve code responsibilities --- .../controllers/controllerDispatcher.js | 24 +++---- .../controllerModules/inEditMode.js | 32 +++++++++ .../controllerModules/inVREditMode.js | 65 ++++++++++++------- .../nearParentGrabOverlay.js | 43 +++++------- .../controllerModules/nearTabletHighlight.js | 43 +++++------- .../libraries/controllerDispatcherUtils.js | 4 -- .../system/libraries/entitySelectionTool.js | 20 +++--- 7 files changed, 127 insertions(+), 104 deletions(-) diff --git a/scripts/system/controllers/controllerDispatcher.js b/scripts/system/controllers/controllerDispatcher.js index a393205b5b..a880eb8b10 100644 --- a/scripts/system/controllers/controllerDispatcher.js +++ b/scripts/system/controllers/controllerDispatcher.js @@ -12,7 +12,7 @@ LEFT_HAND, RIGHT_HAND, NEAR_GRAB_PICK_RADIUS, DEFAULT_SEARCH_SPHERE_DISTANCE, DISPATCHER_PROPERTIES, getGrabPointSphereOffset, HMD, MyAvatar, Messages, findHandChildEntities, Picks, PickType, Pointers, PointerManager, getGrabPointSphereOffset, HMD, MyAvatar, Messages, findHandChildEntities, Picks, PickType, Pointers, - PointerManager, print, Selection, DISPATCHER_HOVERING_LIST, DISPATCHER_HOVERING_STYLE, HIFI_EDIT_MANIPULATION_CHANNEL + PointerManager, print, Selection, DISPATCHER_HOVERING_LIST, DISPATCHER_HOVERING_STYLE */ controllerDispatcherPlugins = {}; @@ -524,16 +524,17 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); _this.setBlacklist(); } } - } else if (channel === HIFI_EDIT_MANIPULATION_CHANNEL) { - message = JSON.parse(data); - var tabletIDs = message.action === "startEdit" ? - [HMD.tabletID, HMD.tabletScreenID, HMD.homeButtonID, HMD.homeButtonHighlightID] : []; - if (message.hand === Controller.Standard.LeftHand) { - _this.leftBlacklistTabletIDs = tabletIDs; - _this.setLeftBlacklist(); - } else if (message.hand === Controller.Standard.RightHand) { - _this.rightBlacklistTabletIDs = tabletIDs; - _this.setRightBlacklist(); + + if (action === "tablet") { + var tabletIDs = message.blacklist + ? [HMD.tabletID, HMD.tabletScreenID, HMD.homeButtonID, HMD.homeButtonHighlightID] : []; + if (message.hand === LEFT_HAND) { + _this.leftBlacklistTabletIDs = tabletIDs; + _this.setLeftBlacklist(); + } else { + _this.rightBlacklistTabletIDs = tabletIDs; + _this.setRightBlacklist(); + } } } } catch (e) { @@ -575,7 +576,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); var controllerDispatcher = new ControllerDispatcher(); Messages.subscribe('Hifi-Hand-RayPick-Blacklist'); - Messages.subscribe(HIFI_EDIT_MANIPULATION_CHANNEL); Messages.messageReceived.connect(controllerDispatcher.handleMessage); Script.scriptEnding.connect(controllerDispatcher.cleanup); diff --git a/scripts/system/controllers/controllerModules/inEditMode.js b/scripts/system/controllers/controllerModules/inEditMode.js index 3a1b835146..5709b19efe 100644 --- a/scripts/system/controllers/controllerModules/inEditMode.js +++ b/scripts/system/controllers/controllerModules/inEditMode.js @@ -20,6 +20,7 @@ Script.include("/~/system/libraries/utils.js"); var MARGIN = 25; function InEditMode(hand) { this.hand = hand; + this.isEditing = false; this.triggerClicked = false; this.selectedTarget = null; this.reticleMinX = MARGIN; @@ -212,6 +213,37 @@ Script.include("/~/system/libraries/utils.js"); enableDispatcherModule("LeftHandInEditMode", leftHandInEditMode); enableDispatcherModule("RightHandInEditMode", rightHandInEditMode); + var INEDIT_STATUS_CHANNEL = "Hifi-InEdit-Status"; + var HAND_RAYPICK_BLACKLIST_CHANNEL = "Hifi-Hand-RayPick-Blacklist"; + this.handleMessage = function (channel, data, sender) { + if (channel === INEDIT_STATUS_CHANNEL && sender === MyAvatar.sessionUUID) { + var message; + + try { + message = JSON.parse(data); + } catch (e) { + return; + } + + switch (message.method) { + case "editing": + if (message.hand === LEFT_HAND) { + leftHandInEditMode.isEditing = message.editing; + } else { + rightHandInEditMode.isEditing = message.editing; + } + Messages.sendLocalMessage(HAND_RAYPICK_BLACKLIST_CHANNEL, JSON.stringify({ + action: "tablet", + hand: message.hand, + blacklist: message.editing + })); + break; + } + } + }; + Messages.subscribe(INEDIT_STATUS_CHANNEL); + Messages.messageReceived.connect(this.handleMessage); + function cleanup() { disableDispatcherModule("LeftHandInEditMode"); disableDispatcherModule("RightHandInEditMode"); diff --git a/scripts/system/controllers/controllerModules/inVREditMode.js b/scripts/system/controllers/controllerModules/inVREditMode.js index 0c04918ab1..104e37d76c 100644 --- a/scripts/system/controllers/controllerModules/inVREditMode.js +++ b/scripts/system/controllers/controllerModules/inVREditMode.js @@ -18,7 +18,8 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); function InVREditMode(hand) { this.hand = hand; - this.disableModules = false; + this.isAppActive = false; + this.isEditing = false; this.running = false; var NO_HAND_LASER = -1; // Invalid hand parameter so that standard laser is not displayed. this.parameters = makeDispatcherModuleParameters( @@ -66,7 +67,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); }; this.isReady = function (controllerData) { - if (this.disableModules) { + if (this.isAppActive) { return makeRunningValues(true, [], []); } return makeRunningValues(false, [], []); @@ -74,14 +75,13 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); this.run = function (controllerData) { // Default behavior if disabling is not enabled. - if (!this.disableModules) { + if (!this.isAppActive) { return this.exitModule(); } // Tablet stylus. - var tabletStylusInput = getEnabledModuleByName(this.hand === RIGHT_HAND ? - "RightTabletStylusInput" : - "LeftTabletStylusInput"); + var tabletStylusInput = getEnabledModuleByName(this.hand === RIGHT_HAND + ? "RightTabletStylusInput" : "LeftTabletStylusInput"); if (tabletStylusInput) { var tabletReady = tabletStylusInput.isReady(controllerData); if (tabletReady.active) { @@ -90,9 +90,8 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); } // Tablet surface. - var overlayLaser = getEnabledModuleByName(this.hand === RIGHT_HAND ? - "RightWebSurfaceLaserInput" : - "LeftWebSurfaceLaserInput"); + var overlayLaser = getEnabledModuleByName(this.hand === RIGHT_HAND + ? "RightWebSurfaceLaserInput" : "LeftWebSurfaceLaserInput"); if (overlayLaser) { var overlayLaserReady = overlayLaser.isReady(controllerData); var target = controllerData.rayPicks[this.hand].objectID; @@ -114,8 +113,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); // HUD overlay. if (!controllerData.triggerClicks[this.hand]) { var hudLaser = getEnabledModuleByName(this.hand === RIGHT_HAND - ? "RightHudOverlayPointer" - : "LeftHudOverlayPointer"); + ? "RightHudOverlayPointer" : "LeftHudOverlayPointer"); if (hudLaser) { var hudLaserReady = hudLaser.isReady(controllerData); if (hudLaserReady.active) { @@ -125,9 +123,8 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); } // Teleport. - var teleporter = getEnabledModuleByName(this.hand === RIGHT_HAND ? - "RightTeleporter" : - "LeftTeleporter"); + var teleporter = getEnabledModuleByName(this.hand === RIGHT_HAND + ? "RightTeleporter" : "LeftTeleporter"); if (teleporter) { var teleporterReady = teleporter.isReady(controllerData); if (teleporterReady.active) { @@ -145,19 +142,39 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); enableDispatcherModule("LeftHandInVREditMode", leftHandInVREditMode); enableDispatcherModule("RightHandInVREditMode", rightHandInVREditMode); - var INVREDIT_DISABLER_MESSAGE_CHANNEL = "Hifi-InVREdit-Disabler"; - this.handleMessage = function (channel, message, sender) { - if (sender === MyAvatar.sessionUUID && channel === INVREDIT_DISABLER_MESSAGE_CHANNEL) { - if (message === "both") { - leftHandInVREditMode.disableModules = true; - rightHandInVREditMode.disableModules = true; - } else if (message === "none") { - leftHandInVREditMode.disableModules = false; - rightHandInVREditMode.disableModules = false; + var INVREDIT_STATUS_CHANNEL = "Hifi-InVREdit-Status"; + var HAND_RAYPICK_BLACKLIST_CHANNEL = "Hifi-Hand-RayPick-Blacklist"; + this.handleMessage = function (channel, data, sender) { + if (channel === INVREDIT_STATUS_CHANNEL && sender === MyAvatar.sessionUUID) { + var message; + + try { + message = JSON.parse(data); + } catch (e) { + return; + } + + switch (message.method) { + case "active": + leftHandInVREditMode.isAppActive = message.active; + rightHandInVREditMode.isAppActive = message.active; + break; + case "editing": + if (message.hand === LEFT_HAND) { + leftHandInVREditMode.isEditing = message.editing; + } else { + rightHandInVREditMode.isEditing = message.editing; + } + Messages.sendLocalMessage(HAND_RAYPICK_BLACKLIST_CHANNEL, JSON.stringify({ + action: "tablet", + hand: message.hand, + blacklist: message.editing + })); + break; } } }; - Messages.subscribe(INVREDIT_DISABLER_MESSAGE_CHANNEL); + Messages.subscribe(INVREDIT_STATUS_CHANNEL); Messages.messageReceived.connect(this.handleMessage); this.cleanup = function () { diff --git a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js index cbee8cabf7..e59b2e35ad 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js @@ -9,7 +9,7 @@ /* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex, enableDispatcherModule, disableDispatcherModule, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, makeDispatcherModuleParameters, Overlays, makeRunningValues, Vec3, resizeTablet, getTabletWidthFromSettings, - NEAR_GRAB_RADIUS, HMD, Uuid, HIFI_EDIT_MANIPULATION_CHANNEL + NEAR_GRAB_RADIUS, HMD, Uuid, getEnabledModuleByName */ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); @@ -176,14 +176,23 @@ Script.include("/~/system/libraries/utils.js"); return null; }; - this.isEditing = false; - this.setIsEditing = function (editing) { - this.isEditing = editing; + this.isEditing = function () { + var inEditModeModule = getEnabledModuleByName(this.hand === RIGHT_HAND + ? "RightHandInEditMode" : "LeftHandInEditMode"); + if (inEditModeModule && inEditModeModule.isEditing) { + return true; + } + var inVREditModeModule = getEnabledModuleByName(this.hand === RIGHT_HAND + ? "RightHandInVREditMode" : "LeftHandInVREditMode"); + if (inVREditModeModule && inVREditModeModule.isEditing) { + return true; + } + return false; }; this.isReady = function (controllerData) { if ((controllerData.triggerClicks[this.hand] === 0 && controllerData.secondaryValues[this.hand] === 0) - || this.isEditing) { + || this.isEditing()) { this.robbed = false; return makeRunningValues(false, [], []); } @@ -207,7 +216,7 @@ Script.include("/~/system/libraries/utils.js"); this.run = function (controllerData) { if ((controllerData.triggerClicks[this.hand] === 0 && controllerData.secondaryValues[this.hand] === 0) - || this.isEditing || !this.isGrabbedThingVisible()) { + || this.isEditing() || !this.isGrabbedThingVisible()) { this.endNearParentingGrabOverlay(); this.robbed = false; return makeRunningValues(false, [], []); @@ -235,28 +244,6 @@ Script.include("/~/system/libraries/utils.js"); enableDispatcherModule("LeftNearParentingGrabOverlay", leftNearParentingGrabOverlay); enableDispatcherModule("RightNearParentingGrabOverlay", rightNearParentingGrabOverlay); - function onMessageReceived(channel, data, senderID) { - var message; - - if (channel !== HIFI_EDIT_MANIPULATION_CHANNEL || senderID !== MyAvatar.sessionUUID) { - return; - } - - try { - message = JSON.parse(data); - } catch (e) { - return; - } - - if (message.hand === Controller.Standard.LeftHand) { - leftNearParentingGrabOverlay.setIsEditing(message.action === "startEdit"); - } else if (message.hand === Controller.Standard.RightHand) { - rightNearParentingGrabOverlay.setIsEditing(message.action === "startEdit"); - } - } - Messages.subscribe(HIFI_EDIT_MANIPULATION_CHANNEL); - Messages.messageReceived.connect(onMessageReceived); - function cleanup() { leftNearParentingGrabOverlay.cleanup(); rightNearParentingGrabOverlay.cleanup(); diff --git a/scripts/system/controllers/controllerModules/nearTabletHighlight.js b/scripts/system/controllers/controllerModules/nearTabletHighlight.js index 3ced0a9e87..2e046f5dc6 100644 --- a/scripts/system/controllers/controllerModules/nearTabletHighlight.js +++ b/scripts/system/controllers/controllerModules/nearTabletHighlight.js @@ -11,7 +11,7 @@ // /* global LEFT_HAND, RIGHT_HAND, makeDispatcherModuleParameters, makeRunningValues, enableDispatcherModule, - * disableDispatcherModule, HIFI_EDIT_MANIPULATION_CHANNEL */ + * disableDispatcherModule, getEnabledModuleByName */ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); @@ -66,9 +66,18 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); 100 ); - this.isEditing = false; - this.setIsEditing = function (editing) { - this.isEditing = editing; + this.isEditing = function () { + var inEditModeModule = getEnabledModuleByName(this.hand === RIGHT_HAND + ? "RightHandInEditMode" : "LeftHandInEditMode"); + if (inEditModeModule && inEditModeModule.isEditing) { + return true; + } + var inVREditModeModule = getEnabledModuleByName(this.hand === RIGHT_HAND + ? "RightHandInVREditMode" : "LeftHandInVREditMode"); + if (inVREditModeModule && inVREditModeModule.isEditing) { + return true; + } + return false; }; this.isNearTablet = function (controllerData) { @@ -76,7 +85,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); }; this.isReady = function (controllerData) { - if (!this.isEditing && this.isNearTablet(controllerData)) { + if (!this.isEditing() && this.isNearTablet(controllerData)) { return makeRunningValues(true, [], []); } setTabletNearGrabbable(this.hand, false); @@ -84,7 +93,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); }; this.run = function (controllerData) { - if (this.isEditing || !this.isNearTablet(controllerData)) { + if (this.isEditing() || !this.isNearTablet(controllerData)) { setTabletNearGrabbable(this.hand, false); return makeRunningValues(false, [], []); } @@ -116,28 +125,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); HMD.mountedChanged.connect(onDisplayModeChanged); onDisplayModeChanged(); - function onMessageReceived(channel, data, senderID) { - var message; - - if (channel !== HIFI_EDIT_MANIPULATION_CHANNEL || senderID !== MyAvatar.sessionUUID) { - return; - } - - try { - message = JSON.parse(data); - } catch (e) { - return; - } - - if (message.hand === Controller.Standard.LeftHand) { - leftNearTabletHighlight.setIsEditing(message.action === "startEdit"); - } else if (message.hand === Controller.Standard.RightHand) { - rightNearTabletHighlight.setIsEditing(message.action === "startEdit"); - } - } - Messages.subscribe(HIFI_EDIT_MANIPULATION_CHANNEL); - Messages.messageReceived.connect(onMessageReceived); - function cleanUp() { disableDispatcherModule("LeftNearTabletHighlight"); disableDispatcherModule("RightNearTabletHighlight"); diff --git a/scripts/system/libraries/controllerDispatcherUtils.js b/scripts/system/libraries/controllerDispatcherUtils.js index f7b997a897..e9d5255d28 100644 --- a/scripts/system/libraries/controllerDispatcherUtils.js +++ b/scripts/system/libraries/controllerDispatcherUtils.js @@ -24,7 +24,6 @@ HAPTIC_PULSE_DURATION:true, DISPATCHER_HOVERING_LIST:true, DISPATCHER_HOVERING_STYLE:true, - HIFI_EDIT_MANIPULATION_CHANNEL:true, Entities, makeDispatcherModuleParameters:true, makeRunningValues:true, @@ -150,8 +149,6 @@ DISPATCHER_PROPERTIES = [ "userData" ]; -HIFI_EDIT_MANIPULATION_CHANNEL = "HiFi-Edit-Manipulation"; - // priority -- a lower priority means the module will be asked sooner than one with a higher priority in a given update step // activitySlots -- indicates which "slots" must not yet be in use for this module to start // requiredDataForReady -- which "situation" parts this module looks at to decide if it will start @@ -593,7 +590,6 @@ if (typeof module !== 'undefined') { TRIGGER_OFF_VALUE: TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE: TRIGGER_ON_VALUE, DISPATCHER_HOVERING_LIST: DISPATCHER_HOVERING_LIST, - HIFI_EDIT_MANIPULATION_CHANNEL: HIFI_EDIT_MANIPULATION_CHANNEL, worldPositionToRegistrationFrameMatrix: worldPositionToRegistrationFrameMatrix }; } diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 4552ed27fb..e1427b0a51 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -14,7 +14,7 @@ // /* global SelectionManager, SelectionDisplay, grid, rayPlaneIntersection, rayPlaneIntersection2, pushCommandForSelections, - getMainTabletIDs, getControllerWorldLocation, TRIGGER_ON_VALUE, HIFI_EDIT_MANIPULATION_CHANNEL */ + getMainTabletIDs, getControllerWorldLocation, TRIGGER_ON_VALUE */ const SPACE_LOCAL = "local"; const SPACE_WORLD = "world"; @@ -639,6 +639,8 @@ SelectionDisplay = (function() { ROLL: 2 }; + const INEDIT_STATUS_CHANNEL = "Hifi-InEdit-Status"; + /** * The current space mode, this could have been a forced space mode since we do not support multi selection while in * local space mode. @@ -1118,11 +1120,12 @@ SelectionDisplay = (function() { activeTool = hitTool; that.clearDebugPickPlane(); if (activeTool.onBegin) { - Messages.sendLocalMessage(HIFI_EDIT_MANIPULATION_CHANNEL, JSON.stringify({ - action: "startEdit", - hand: that.triggeredHand - })); that.editingHand = that.triggeredHand; + Messages.sendLocalMessage(INEDIT_STATUS_CHANNEL, JSON.stringify({ + method: "editing", + hand: that.editingHand === Controller.Standard.LeftHand ? LEFT_HAND : RIGHT_HAND, + editing: true + })); activeTool.onBegin(event, pickRay, results); } else { print("ERROR: entitySelectionTool.mousePressEvent - ActiveTool(" + activeTool.mode + ") missing onBegin"); @@ -1271,9 +1274,10 @@ SelectionDisplay = (function() { if (wantDebug) { print(" Triggering ActiveTool(" + activeTool.mode + ")'s onEnd"); } - Messages.sendLocalMessage(HIFI_EDIT_MANIPULATION_CHANNEL, JSON.stringify({ - action: "finishEdit", - hand: that.editingHand + Messages.sendLocalMessage(INEDIT_STATUS_CHANNEL, JSON.stringify({ + method: "editing", + hand: that.editingHand === Controller.Standard.LeftHand ? LEFT_HAND : RIGHT_HAND, + editing: false })); that.editingHand = NO_HAND; activeTool.onEnd(event); From 746c5ed621a0206fea789fc6d58242995ddf6b1c Mon Sep 17 00:00:00 2001 From: amantley Date: Wed, 21 Nov 2018 15:46:54 -0800 Subject: [PATCH 19/79] we can now handle missing joints and extra joints --- libraries/animation/src/AnimSkeleton.cpp | 3 ++- libraries/fbx/src/FBXReader.cpp | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index e928658366..c5fb20d99b 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -27,6 +27,7 @@ AnimSkeleton::AnimSkeleton(const HFMModel& hfmModel) { _fbxToHifiJointNameMapping = hfmModel.fbxToHifiJointNameMapping; buildSkeletonFromJoints(joints, hfmModel.jointRotationOffsets); + // we make a copy of the inverseBindMatrices in order to prevent mutating the model bind pose // when we are dealing with a joint offset in the model for (int i = 0; i < (int)hfmModel.meshes.size(); i++) { @@ -352,7 +353,7 @@ void AnimSkeleton::buildSkeletonFromJoints(const std::vector& joints, } int mirrorJointIndex = -1; mirrorJointIndex = containsLeft(_joints[i].name); - if (mirrorJointIndex > -1) { + if (!(mirrorJointIndex > -1)) { mirrorJointIndex = containsRight(_joints[i].name); } if (mirrorJointIndex >= 0) { diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index 3ddcd75255..abf84d96b1 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -480,14 +480,14 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString& std::map lights; QVariantHash joints = mapping.value("joint").toHash(); - QString jointEyeLeftName = processID(getString(joints.value("jointEyeLeft", "jointEyeLeft"))); - QString jointEyeRightName = processID(getString(joints.value("jointEyeRight", "jointEyeRight"))); - QString jointNeckName = processID(getString(joints.value("jointNeck", "jointNeck"))); - QString jointRootName = processID(getString(joints.value("jointRoot", "jointRoot"))); + QString jointEyeLeftName = "EyeLeft"; //processID(getString(joints.value("jointEyeLeft", "jointEyeLeft"))); + QString jointEyeRightName = "EyeRight"; // processID(getString(joints.value("jointEyeRight", "jointEyeRight"))); + QString jointNeckName = "Neck"; //processID(getString(joints.value("jointNeck", "jointNeck"))); + QString jointRootName = "Hips"; //processID(getString(joints.value("jointRoot", "jointRoot"))); QString jointLeanName = processID(getString(joints.value("jointLean", "jointLean"))); QString jointHeadName = "Head";// processID(getString(joints.value("jointHead", "jointHead"))); - QString jointLeftHandName = processID(getString(joints.value("jointLeftHand", "jointLeftHand"))); - QString jointRightHandName = processID(getString(joints.value("jointRightHand", "jointRightHand"))); + QString jointLeftHandName = "LeftHand"; //processID(getString(joints.value("jointLeftHand", "jointLeftHand"))); + QString jointRightHandName = "RightHand"; // processID(getString(joints.value("jointRightHand", "jointRightHand"))); QString jointEyeLeftID; QString jointEyeRightID; QString jointNeckID; @@ -1845,7 +1845,15 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString& jointIndex = hfmModel.getJointIndex(hfmModel.fbxToHifiJointNameMapping[jointName]); } if (jointIndex != -1) { - hfmModel.jointRotationOffsets.insert(jointIndex, rotationOffset); + //if (jointIndex == 18) { + // glm::quat spine3LocalOffset(0.94232035f, 0.000000014995882f, 0.33471236f, 0.000000058068572f); + // glm::quat spine3AbsoluteOffset = spine3LocalOffset * hfmModel.jointRotationOffsets[16]; + // hfmModel.jointRotationOffsets.insert(jointIndex, spine3AbsoluteOffset); + // qCDebug(modelformat) << "Joint Rotation Offset added for spine3 : " << spine3AbsoluteOffset; + //} else { + hfmModel.jointRotationOffsets.insert(jointIndex, rotationOffset); + //} + } qCDebug(modelformat) << "Joint Rotation Offset added to Rig._jointRotationOffsets : " << " jointName: " << jointName << " jointIndex: " << jointIndex << " rotation offset: " << rotationOffset; } From 26fc53ef7808c86db8b7aab6fa7970c241dad536 Mon Sep 17 00:00:00 2001 From: amantley Date: Mon, 26 Nov 2018 11:08:59 -0800 Subject: [PATCH 20/79] cleaned up whitespace and removed debug prints --- libraries/animation/src/AnimSkeleton.cpp | 40 +++++++++---------- libraries/animation/src/Rig.cpp | 1 - .../src/avatars-renderer/Avatar.cpp | 12 +----- .../src/avatars-renderer/SkeletonModel.cpp | 1 - libraries/fbx/src/FBXReader.cpp | 28 ++++--------- 5 files changed, 27 insertions(+), 55 deletions(-) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index c5fb20d99b..110dd5f92a 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -65,19 +65,14 @@ AnimSkeleton::AnimSkeleton(const std::vector& joints, const QMap AnimSkeleton::getChildrenOfJoint(int jointIndex) const { } const QString AnimSkeleton::getJointName(int jointIndex) const { - + QString jointName = _joints[jointIndex].name; QMapIterator i(_fbxToHifiJointNameMapping); while (i.hasNext()) { @@ -146,8 +141,7 @@ const QString AnimSkeleton::getJointName(int jointIndex) const { break; } } - //qCDebug(animation) << "reverse lookup: returning " << jointName << " for " << jointIndex; - return jointName; //;_joints[jointIndex].name; + return jointName; } AnimPose AnimSkeleton::getAbsolutePose(int jointIndex, const AnimPoseVec& relativePoses) const { @@ -222,7 +216,6 @@ void AnimSkeleton::mirrorAbsolutePoses(AnimPoseVec& poses) const { bool AnimSkeleton::checkNonMirrored(QString jointName) const { - //bool isNonMirrored = false; QMapIterator i(_fbxToHifiJointNameMapping); while (i.hasNext()) { i.next(); @@ -264,14 +257,15 @@ int AnimSkeleton::containsLeft(QString jointName) const { if (i.key().startsWith("Left")) { QString mirrorJointName = QString(i.key()).replace(0, 4, "Right"); mirrorJointIndex = nameToJointIndex(mirrorJointName); - //return true } } } - if (jointName.startsWith("Left")) { - QString mirrorJointName = QString(jointName).replace(0, 4, "Right"); - mirrorJointIndex = nameToJointIndex(mirrorJointName); - } + if (mirrorJointIndex < 0) { + if (jointName.startsWith("Left")) { + QString mirrorJointName = QString(jointName).replace(0, 4, "Right"); + mirrorJointIndex = nameToJointIndex(mirrorJointName); + } + } return mirrorJointIndex; } @@ -285,12 +279,14 @@ int AnimSkeleton::containsRight(QString jointName) const { if (i.key().startsWith("Right")) { QString mirrorJointName = QString(i.key()).replace(0, 5, "Left"); mirrorJointIndex = nameToJointIndex(mirrorJointName); - } + } } } - if (jointName.startsWith("Right")) { - QString mirrorJointName = QString(jointName).replace(0, 5, "Left"); - mirrorJointIndex = nameToJointIndex(mirrorJointName); + if (mirrorJointIndex < 0) { + if (jointName.startsWith("Right")) { + QString mirrorJointName = QString(jointName).replace(0, 5, "Left"); + mirrorJointIndex = nameToJointIndex(mirrorJointName); + } } return mirrorJointIndex; } @@ -353,7 +349,7 @@ void AnimSkeleton::buildSkeletonFromJoints(const std::vector& joints, } int mirrorJointIndex = -1; mirrorJointIndex = containsLeft(_joints[i].name); - if (!(mirrorJointIndex > -1)) { + if (mirrorJointIndex < 0) { mirrorJointIndex = containsRight(_joints[i].name); } if (mirrorJointIndex >= 0) { diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 1675ea8e90..5e2610e37e 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -423,7 +423,6 @@ int Rig::indexOfJoint(const QString& jointName) const { int result = _animSkeleton->nameToJointIndex(jointName); if (_animSkeleton->getFBXToHifiJointNameMapping().contains(jointName)) { - //qCDebug(animation) << "the alternate name for the joint " << jointName << " is " << _animSkeleton->getFBXToHifiJointNameMapping()[jointName] << " " << _animSkeleton->nameToJointIndex(_animSkeleton->getFBXToHifiJointNameMapping()[jointName]); result = _animSkeleton->nameToJointIndex(jointName); } diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index 14e97a5bf9..f3017049a7 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1437,21 +1437,11 @@ int Avatar::getJointIndex(const QString& name) const { withValidJointIndicesCache([&]() { if (_modelJointIndicesCache.contains(name)) { result = _modelJointIndicesCache[name] - 1; - if (_skeletonModel && _skeletonModel->isActive()) { - // qCDebug(avatars_renderer) << "the other head id is this" << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]; - // qCDebug(avatars_renderer) << "joint indices cache " << name << " " << _modelJointIndicesCache[name]; - if (_modelJointIndicesCache.contains(_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"])) { - // qCDebug(avatars_renderer) << "joint alternate name " << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"] << " " << _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping["Head"]]; - } - } } else { - // doesn't contain name. - //qCDebug(avatars_renderer) << "name is not here"; + // doesn't contain name. check the fbx-to-hifi joint name mapping if (_skeletonModel && _skeletonModel->isActive()) { - if (_modelJointIndicesCache.contains(_skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name])) { result = _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name]] - 1; - // qCDebug(avatars_renderer) << "joint " << name << " remapped to " << _skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name] << result; } } } diff --git a/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp b/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp index a97ba4bf4b..36e37dd3d4 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/SkeletonModel.cpp @@ -317,7 +317,6 @@ bool SkeletonModel::getEyePositions(glm::vec3& firstEyePosition, glm::vec3& seco } glm::vec3 SkeletonModel::getDefaultEyeModelPosition() const { - //qCDebug(avatars_renderer) << "default eye model position " << _defaultEyeModelPosition; return _owningAvatar->getModelScale() * _defaultEyeModelPosition; } diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index abf84d96b1..35aabca123 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -423,11 +423,9 @@ QMap getJointNameMapping(const QVariantHash& mapping) { if (!mapping.isEmpty() && mapping.contains(JOINT_NAME_MAPPING_FIELD) && mapping[JOINT_NAME_MAPPING_FIELD].type() == QVariant::Hash) { auto jointNames = mapping[JOINT_NAME_MAPPING_FIELD].toHash(); for (auto itr = jointNames.begin(); itr != jointNames.end(); itr++) { - qCDebug(modelformat) << "found a joint mapping field key " << itr.key() << " value " << itr.value().toString(); fbxToHifiJointNameMap.insert(itr.key(), itr.value().toString()); qCDebug(modelformat) << "the mapped key " << itr.key() << " has a value of " << fbxToHifiJointNameMap[itr.key()]; } - } return fbxToHifiJointNameMap; } @@ -480,14 +478,14 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString& std::map lights; QVariantHash joints = mapping.value("joint").toHash(); - QString jointEyeLeftName = "EyeLeft"; //processID(getString(joints.value("jointEyeLeft", "jointEyeLeft"))); - QString jointEyeRightName = "EyeRight"; // processID(getString(joints.value("jointEyeRight", "jointEyeRight"))); - QString jointNeckName = "Neck"; //processID(getString(joints.value("jointNeck", "jointNeck"))); - QString jointRootName = "Hips"; //processID(getString(joints.value("jointRoot", "jointRoot"))); + QString jointEyeLeftName = "EyeLeft"; + QString jointEyeRightName = "EyeRight"; + QString jointNeckName = "Neck"; + QString jointRootName = "Hips"; QString jointLeanName = processID(getString(joints.value("jointLean", "jointLean"))); - QString jointHeadName = "Head";// processID(getString(joints.value("jointHead", "jointHead"))); - QString jointLeftHandName = "LeftHand"; //processID(getString(joints.value("jointLeftHand", "jointLeftHand"))); - QString jointRightHandName = "RightHand"; // processID(getString(joints.value("jointRightHand", "jointRightHand"))); + QString jointHeadName = "Head"; + QString jointLeftHandName = "LeftHand"; + QString jointRightHandName = "RightHand"; QString jointEyeLeftID; QString jointEyeRightID; QString jointNeckID; @@ -1845,21 +1843,11 @@ HFMModel* FBXReader::extractHFMModel(const QVariantHash& mapping, const QString& jointIndex = hfmModel.getJointIndex(hfmModel.fbxToHifiJointNameMapping[jointName]); } if (jointIndex != -1) { - //if (jointIndex == 18) { - // glm::quat spine3LocalOffset(0.94232035f, 0.000000014995882f, 0.33471236f, 0.000000058068572f); - // glm::quat spine3AbsoluteOffset = spine3LocalOffset * hfmModel.jointRotationOffsets[16]; - // hfmModel.jointRotationOffsets.insert(jointIndex, spine3AbsoluteOffset); - // qCDebug(modelformat) << "Joint Rotation Offset added for spine3 : " << spine3AbsoluteOffset; - //} else { - hfmModel.jointRotationOffsets.insert(jointIndex, rotationOffset); - //} - + hfmModel.jointRotationOffsets.insert(jointIndex, rotationOffset); } qCDebug(modelformat) << "Joint Rotation Offset added to Rig._jointRotationOffsets : " << " jointName: " << jointName << " jointIndex: " << jointIndex << " rotation offset: " << rotationOffset; } - - return hfmModelPtr; } From fb7b503ce94ce8da1aaea43dc21d7b5905662ae3 Mon Sep 17 00:00:00 2001 From: amantley Date: Mon, 26 Nov 2018 13:48:00 -0800 Subject: [PATCH 21/79] removed unnecessary iteration of the joint name mapping in AnimSkeleton.cpp --- libraries/animation/src/AnimSkeleton.cpp | 54 ++++-------------------- 1 file changed, 8 insertions(+), 46 deletions(-) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index 110dd5f92a..c5e6241555 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -27,7 +27,6 @@ AnimSkeleton::AnimSkeleton(const HFMModel& hfmModel) { _fbxToHifiJointNameMapping = hfmModel.fbxToHifiJointNameMapping; buildSkeletonFromJoints(joints, hfmModel.jointRotationOffsets); - // we make a copy of the inverseBindMatrices in order to prevent mutating the model bind pose // when we are dealing with a joint offset in the model for (int i = 0; i < (int)hfmModel.meshes.size(); i++) { @@ -133,13 +132,8 @@ std::vector AnimSkeleton::getChildrenOfJoint(int jointIndex) const { const QString AnimSkeleton::getJointName(int jointIndex) const { QString jointName = _joints[jointIndex].name; - QMapIterator i(_fbxToHifiJointNameMapping); - while (i.hasNext()) { - i.next(); - if (i.value() == _joints[jointIndex].name) { - jointName = i.key(); - break; - } + if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(_joints[jointIndex].name))) { + jointName = _fbxToHifiJointNameMapping.key(_joints[jointIndex].name); } return jointName; } @@ -216,22 +210,8 @@ void AnimSkeleton::mirrorAbsolutePoses(AnimPoseVec& poses) const { bool AnimSkeleton::checkNonMirrored(QString jointName) const { - QMapIterator i(_fbxToHifiJointNameMapping); - while (i.hasNext()) { - i.next(); - if (i.value() == jointName) { - // check for left right in the key - if (i.key() != "Hips" && i.key() != "Spine" && - i.key() != "Spine1" && i.key() != "Spine2" && - i.key() != "Neck" && i.key() != "Head" && - !((i.key().startsWith("Left") || i.key().startsWith("Right")) && - i.key() != "LeftEye" && i.key() != "RightEye")) { - //return true - return true; - } else { - return false; - } - } + if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { + jointName = _fbxToHifiJointNameMapping.key(jointName); } // check the unmapped name if (jointName != "Hips" && jointName != "Spine" && @@ -239,26 +219,16 @@ bool AnimSkeleton::checkNonMirrored(QString jointName) const { jointName != "Neck" && jointName != "Head" && !((jointName.startsWith("Left") || jointName.startsWith("Right")) && jointName != "LeftEye" && jointName != "RightEye")) { - //return true return true; } else { return false; } - } int AnimSkeleton::containsLeft(QString jointName) const { - QMapIterator i(_fbxToHifiJointNameMapping); int mirrorJointIndex = -1; - while (i.hasNext()) { - i.next(); - if (i.value() == jointName) { - // check for left right in the key - if (i.key().startsWith("Left")) { - QString mirrorJointName = QString(i.key()).replace(0, 4, "Right"); - mirrorJointIndex = nameToJointIndex(mirrorJointName); - } - } + if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { + jointName = _fbxToHifiJointNameMapping.key(jointName); } if (mirrorJointIndex < 0) { if (jointName.startsWith("Left")) { @@ -270,17 +240,9 @@ int AnimSkeleton::containsLeft(QString jointName) const { } int AnimSkeleton::containsRight(QString jointName) const { - QMapIterator i(_fbxToHifiJointNameMapping); int mirrorJointIndex = -1; - while (i.hasNext()) { - i.next(); - if (i.value() == jointName) { - // check for left right in the key - if (i.key().startsWith("Right")) { - QString mirrorJointName = QString(i.key()).replace(0, 5, "Left"); - mirrorJointIndex = nameToJointIndex(mirrorJointName); - } - } + if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { + jointName = _fbxToHifiJointNameMapping.key(jointName); } if (mirrorJointIndex < 0) { if (jointName.startsWith("Right")) { From f900a81e7ad282dbad5c7fcfd1be58f081a04826 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Wed, 14 Nov 2018 15:33:40 -0800 Subject: [PATCH 22/79] Add ModelLoader --- .../src/model-networking/ModelLoader.cpp | 52 +++++++++++ .../src/model-networking/ModelLoader.h | 87 +++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 libraries/model-networking/src/model-networking/ModelLoader.cpp create mode 100644 libraries/model-networking/src/model-networking/ModelLoader.h diff --git a/libraries/model-networking/src/model-networking/ModelLoader.cpp b/libraries/model-networking/src/model-networking/ModelLoader.cpp new file mode 100644 index 0000000000..3eb1bec9f0 --- /dev/null +++ b/libraries/model-networking/src/model-networking/ModelLoader.cpp @@ -0,0 +1,52 @@ +// +// ModelLoader.cpp +// libraries/model-networking/src/model-networking +// +// Created by Sabrina Shanman on 2018/11/14. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#include "ModelLoader.h" + +hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { + // Check file contents + for (auto& supportedFormat : supportedFormats) { + for (auto& fileSignature : supportedFormat.mimeType.fileSignatures) { + auto testBytes = data.mid(fileSignature.byteOffset, (int)fileSignature.bytes.size()).toStdString(); + if (testBytes == fileSignature.bytes) { + return supportedFormat.loader(data, mapping, url); + } + } + } + + // Check file extension + std::string urlString = url.path().toStdString(); + std::size_t extensionSeparator = urlString.rfind('.'); + if (extensionSeparator != std::string::npos) { + std::string detectedExtension = urlString.substr(extensionSeparator + 1); + for (auto& supportedFormat : supportedFormats) { + for (auto& extension : supportedFormat.mimeType.extensions) { + if (extension == detectedExtension) { + return supportedFormat.loader(data, mapping, url); + } + } + } + } + + // Check web media type + if (webMediaType != "") { + for (auto& supportedFormat : supportedFormats) { + for (auto& candidateWebMediaType : supportedFormat.mimeType.webMediaTypes) { + if (candidateWebMediaType == webMediaType) { + return supportedFormat.loader(data, mapping, url); + } + } + } + } + + // Supported file type not found. Abort loading. + return hfm::Model::Pointer(); +} diff --git a/libraries/model-networking/src/model-networking/ModelLoader.h b/libraries/model-networking/src/model-networking/ModelLoader.h new file mode 100644 index 0000000000..1a8901e8da --- /dev/null +++ b/libraries/model-networking/src/model-networking/ModelLoader.h @@ -0,0 +1,87 @@ +// +// ModelLoader.h +// libraries/model-networking/src/model-networking +// +// Created by Sabrina Shanman on 2018/11/13. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_ModelLoader_h +#define hifi_ModelLoader_h + +#include +#include +#include + +#include +#include + +class ModelLoader { +public: + + // A short sequence of bytes, typically at the beginning of the file, which identifies the file format + class FileSignature { + public: + FileSignature(const std::string& bytes, int byteOffset) : + bytes(bytes), + byteOffset(byteOffset) { + } + + std::string bytes; + int byteOffset; + }; + + // A named file extension with a list of known ways to positively identify the file type + class MIMEType { + public: + MIMEType(const std::string& name) : + name(name) { + } + + std::string name; + std::vector extensions; + std::vector webMediaTypes; + std::vector fileSignatures; + }; + + // T is a subclass of hfm::Serializer + template + void addSupportedFormat(const MIMEType& mimeType) { + supportedFormats.push_back(SupportedFormat(mimeType, SupportedFormat::getLoader())); + } + + // Given the currently stored list of supported file formats, determine how to load a model from the given parameters. + // If successful, return an owned reference to the newly loaded model. + // If failed, return an empty reference. + hfm::Model::Pointer load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const; + +protected: + using Loader = std::function; + + class SupportedFormat { + public: + SupportedFormat(const MIMEType& mimeType, const Loader& loader) : + mimeType(mimeType), + loader(loader) { + } + + MIMEType mimeType; + Loader loader; + + template + static Loader getLoader() { + assert(dynamic_cast(&T())); + + return [](const hifi::ByteArray& bytes, const hifi::VariantHash& mapping, const hifi::URL& url) -> hfm::Model::Pointer { + return T().read(bytes, mapping, url); + }; + } + }; + + std::vector supportedFormats; +}; + +#endif // hifi_ModelLoader_h From fc0a31fa0de40879235a8c828598750acda25a06 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Wed, 14 Nov 2018 17:21:47 -0800 Subject: [PATCH 23/79] Define ModelLoader instance in ModelCache --- .../src/model-networking/ModelCache.cpp | 16 ++++++++++++++++ .../src/model-networking/ModelCache.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 254f61eba9..53a0ec14a1 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -316,6 +316,22 @@ ModelCache::ModelCache() { const qint64 GEOMETRY_DEFAULT_UNUSED_MAX_SIZE = DEFAULT_UNUSED_MAX_SIZE; setUnusedResourceCacheSize(GEOMETRY_DEFAULT_UNUSED_MAX_SIZE); setObjectName("ModelCache"); + + // Add supported model formats + + ModelLoader::MIMEType fbxMIMEType("fbx"); + fbxMIMEType.extensions.push_back("fbx"); + fbxMIMEType.fileSignatures.emplace_back("Kaydara FBX Binary \x00", 0); + _modelLoader.addSupportedFormat(fbxMIMEType); + + ModelLoader::MIMEType objMIMEType("obj"); + objMIMEType.extensions.push_back("obj"); + _modelLoader.addSupportedFormat(objMIMEType); + + ModelLoader::MIMEType gltfMIMEType("gltf"); + gltfMIMEType.extensions.push_back("gltf"); + gltfMIMEType.webMediaTypes.push_back("model/gltf+json"); + _modelLoader.addSupportedFormat(gltfMIMEType); } QSharedPointer ModelCache::createResource(const QUrl& url, const QSharedPointer& fallback, diff --git a/libraries/model-networking/src/model-networking/ModelCache.h b/libraries/model-networking/src/model-networking/ModelCache.h index 9d458e7512..1018bdecd5 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.h +++ b/libraries/model-networking/src/model-networking/ModelCache.h @@ -20,6 +20,7 @@ #include "FBXSerializer.h" #include "TextureCache.h" +#include "ModelLoader.h" // Alias instead of derive to avoid copying @@ -158,6 +159,7 @@ protected: private: ModelCache(); virtual ~ModelCache() = default; + ModelLoader _modelLoader; }; class NetworkMaterial : public graphics::Material { From 2387641cbbbb8b264c752a73e98bc97606c996d7 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 15 Nov 2018 14:52:27 -0800 Subject: [PATCH 24/79] Store the MIME type in HTTPResourceRequest::onRequestFinished() --- .../networking/src/HTTPResourceRequest.cpp | 21 ++++++++++++++++++- libraries/networking/src/ResourceRequest.h | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/libraries/networking/src/HTTPResourceRequest.cpp b/libraries/networking/src/HTTPResourceRequest.cpp index e26f27adcf..50221a136a 100644 --- a/libraries/networking/src/HTTPResourceRequest.cpp +++ b/libraries/networking/src/HTTPResourceRequest.cpp @@ -94,7 +94,7 @@ void HTTPResourceRequest::onRequestFinished() { // Content-Range: -/* // Content-Range: */ // - auto parseContentRangeHeader = [](QString contentRangeHeader) -> std::pair { + static auto parseContentRangeHeader = [](QString contentRangeHeader) -> std::pair { auto unitRangeParts = contentRangeHeader.split(' '); if (unitRangeParts.size() != 2) { return { false, 0 }; @@ -115,6 +115,15 @@ void HTTPResourceRequest::onRequestFinished() { } }; + static auto parseMediaType = [](QString contentTypeHeader) -> std::pair { + auto contentTypeParts = contentTypeHeader.split(';'); + if (contentTypeParts.size() < 1) { + return { false, "" }; + } + + return { true, contentTypeParts[0] }; + }; + switch(_reply->error()) { case QNetworkReply::NoError: _data = _reply->readAll(); @@ -141,6 +150,16 @@ void HTTPResourceRequest::onRequestFinished() { } } + { + auto contentTypeHeader = _reply->rawHeader("Content-Type"); + bool success; + QString mediaType; + std::tie(success, mediaType) = parseMediaType(contentTypeHeader); + if (success) { + _webMediaType = mediaType; + } + } + recordBytesDownloadedInStats(STAT_HTTP_RESOURCE_TOTAL_BYTES, _data.size()); break; diff --git a/libraries/networking/src/ResourceRequest.h b/libraries/networking/src/ResourceRequest.h index eb306ca5be..550294d79b 100644 --- a/libraries/networking/src/ResourceRequest.h +++ b/libraries/networking/src/ResourceRequest.h @@ -84,6 +84,7 @@ public: bool loadedFromCache() const { return _loadedFromCache; } bool getRangeRequestSuccessful() const { return _rangeRequestSuccessful; } bool getTotalSizeOfResource() const { return _totalSizeOfResource; } + QString getWebMediaType() const { return _webMediaType; } void setFailOnRedirect(bool failOnRedirect) { _failOnRedirect = failOnRedirect; } void setCacheEnabled(bool value) { _cacheEnabled = value; } @@ -111,6 +112,7 @@ protected: ByteRange _byteRange; bool _rangeRequestSuccessful { false }; uint64_t _totalSizeOfResource { 0 }; + QString _webMediaType; int64_t _lastRecordedBytesDownloaded { 0 }; bool _isObservable; qint64 _callerId; From b3d5f2fa65689c9155259feeb5cedbba67ca51ea Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 15 Nov 2018 17:25:05 -0800 Subject: [PATCH 25/79] Add MIME type-based Serializer selection --- .../src/model-networking/ModelCache.cpp | 115 +++++++++--------- 1 file changed, 55 insertions(+), 60 deletions(-) diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 53a0ec14a1..81188031e1 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -144,9 +144,9 @@ void GeometryMappingResource::onGeometryMappingLoaded(bool success) { class GeometryReader : public QRunnable { public: - GeometryReader(QWeakPointer& resource, const QUrl& url, const QVariantHash& mapping, - const QByteArray& data, bool combineParts) : - _resource(resource), _url(url), _mapping(mapping), _data(data), _combineParts(combineParts) { + GeometryReader(const ModelLoader& modelLoader, QWeakPointer& resource, const QUrl& url, const QVariantHash& mapping, + const QByteArray& data, bool combineParts, const QString& webMediaType) : + _modelLoader(modelLoader), _resource(resource), _url(url), _mapping(mapping), _data(data), _combineParts(combineParts), _webMediaType(webMediaType) { DependencyManager::get()->incrementStat("PendingProcessing"); } @@ -154,11 +154,13 @@ public: virtual void run() override; private: + ModelLoader _modelLoader; QWeakPointer _resource; QUrl _url; QVariantHash _mapping; QByteArray _data; bool _combineParts; + QString _webMediaType; }; void GeometryReader::run() { @@ -183,62 +185,54 @@ void GeometryReader::run() { throw QString("reply is NULL"); } + // Ensure the resource has not been deleted + auto resource = _resource.toStrongRef(); + if (!resource) { + qCWarning(modelnetworking) << "Abandoning load of" << _url << "; could not get strong ref"; + return; + } + QString urlname = _url.path().toLower(); - if (!urlname.isEmpty() && !_url.path().isEmpty() && - - (_url.path().toLower().endsWith(".fbx") || - _url.path().toLower().endsWith(".obj") || - _url.path().toLower().endsWith(".obj.gz") || - _url.path().toLower().endsWith(".gltf"))) { - - HFMModel::Pointer hfmModel; - - QVariantHash serializerMapping = _mapping; - serializerMapping["combineParts"] = _combineParts; - - if (_url.path().toLower().endsWith(".fbx")) { - hfmModel = FBXSerializer().read(_data, serializerMapping, _url); - if (hfmModel->meshes.size() == 0 && hfmModel->joints.size() == 0) { - throw QString("empty geometry, possibly due to an unsupported FBX version"); - } - } else if (_url.path().toLower().endsWith(".obj")) { - hfmModel = OBJSerializer().read(_data, serializerMapping, _url); - } else if (_url.path().toLower().endsWith(".obj.gz")) { - QByteArray uncompressedData; - if (gunzip(_data, uncompressedData)){ - hfmModel = OBJSerializer().read(uncompressedData, serializerMapping, _url); - } else { - throw QString("failed to decompress .obj.gz"); - } - - } else if (_url.path().toLower().endsWith(".gltf")) { - hfmModel = GLTFSerializer().read(_data, serializerMapping, _url); - if (hfmModel->meshes.size() == 0 && hfmModel->joints.size() == 0) { - throw QString("empty geometry, possibly due to an unsupported GLTF version"); - } - } else { - throw QString("unsupported format"); - } - - // Add scripts to hfmModel - if (!_mapping.value(SCRIPT_FIELD).isNull()) { - QVariantList scripts = _mapping.values(SCRIPT_FIELD); - for (auto &script : scripts) { - hfmModel->scripts.push_back(script.toString()); - } - } - - // Ensure the resource has not been deleted - auto resource = _resource.toStrongRef(); - if (!resource) { - qCWarning(modelnetworking) << "Abandoning load of" << _url << "; could not get strong ref"; - } else { - QMetaObject::invokeMethod(resource.data(), "setGeometryDefinition", - Q_ARG(HFMModel::Pointer, hfmModel)); - } - } else { + if (urlname.isEmpty() || _url.path().isEmpty()) { throw QString("url is invalid"); } + + HFMModel::Pointer hfmModel; + QVariantHash serializerMapping = _mapping; + serializerMapping["combineParts"] = _combineParts; + + if (_url.path().toLower().endsWith(".gz")) { + QByteArray uncompressedData; + if (!gunzip(_data, uncompressedData)) { + throw QString("failed to decompress .gz model"); + } + // Strip the compression extension from the path, so the loader can infer the file type from what remains. + // This is okay because we don't expect the serializer to be able to read the contents of a compressed model file. + auto strippedUrl = _url; + strippedUrl.setPath(_url.path().left(_url.path().size() - 3)); + hfmModel = _modelLoader.load(uncompressedData, serializerMapping, strippedUrl, ""); + } else { + hfmModel = _modelLoader.load(_data, serializerMapping, _url, _webMediaType.toStdString()); + } + + if (!hfmModel) { + throw QString("unsupported format"); + } + + if (hfmModel->meshes.size() == 0 && hfmModel->joints.size() == 0) { + throw QString("empty geometry, possibly due to an unsupported model version"); + } + + // Add scripts to hfmModel + if (!_mapping.value(SCRIPT_FIELD).isNull()) { + QVariantList scripts = _mapping.values(SCRIPT_FIELD); + for (auto &script : scripts) { + hfmModel->scripts.push_back(script.toString()); + } + } + + QMetaObject::invokeMethod(resource.data(), "setGeometryDefinition", + Q_ARG(HFMModel::Pointer, hfmModel)); } catch (const std::exception&) { auto resource = _resource.toStrongRef(); if (resource) { @@ -258,8 +252,8 @@ void GeometryReader::run() { class GeometryDefinitionResource : public GeometryResource { Q_OBJECT public: - GeometryDefinitionResource(const QUrl& url, const QVariantHash& mapping, const QUrl& textureBaseUrl, bool combineParts) : - GeometryResource(url, resolveTextureBaseUrl(url, textureBaseUrl)), _mapping(mapping), _combineParts(combineParts) {} + GeometryDefinitionResource(const ModelLoader& modelLoader, const QUrl& url, const QVariantHash& mapping, const QUrl& textureBaseUrl, bool combineParts) : + GeometryResource(url, resolveTextureBaseUrl(url, textureBaseUrl)), _modelLoader(modelLoader), _mapping(mapping), _combineParts(combineParts) {} QString getType() const override { return "GeometryDefinition"; } @@ -269,6 +263,7 @@ protected: Q_INVOKABLE void setGeometryDefinition(HFMModel::Pointer hfmModel); private: + ModelLoader _modelLoader; QVariantHash _mapping; bool _combineParts; }; @@ -278,7 +273,7 @@ void GeometryDefinitionResource::downloadFinished(const QByteArray& data) { _url = _effectiveBaseURL; _textureBaseUrl = _effectiveBaseURL; } - QThreadPool::globalInstance()->start(new GeometryReader(_self, _effectiveBaseURL, _mapping, data, _combineParts)); + QThreadPool::globalInstance()->start(new GeometryReader(_modelLoader, _self, _effectiveBaseURL, _mapping, data, _combineParts, _request->getWebMediaType())); } void GeometryDefinitionResource::setGeometryDefinition(HFMModel::Pointer hfmModel) { @@ -344,7 +339,7 @@ QSharedPointer ModelCache::createResource(const QUrl& url, const QShar auto mapping = geometryExtra ? geometryExtra->mapping : QVariantHash(); auto textureBaseUrl = geometryExtra ? geometryExtra->textureBaseUrl : QUrl(); bool combineParts = geometryExtra ? geometryExtra->combineParts : true; - resource = new GeometryDefinitionResource(url, mapping, textureBaseUrl, combineParts); + resource = new GeometryDefinitionResource(_modelLoader, url, mapping, textureBaseUrl, combineParts); } return QSharedPointer(resource, &Resource::deleter); From 98853b5d1d97d9c3f1d31db581dd8d93251c5f91 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 26 Nov 2018 14:31:57 -0800 Subject: [PATCH 26/79] Move FBXSerializer import by AnimationCache to source file --- libraries/animation/src/AnimationCache.cpp | 1 + libraries/animation/src/AnimationCache.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/animation/src/AnimationCache.cpp b/libraries/animation/src/AnimationCache.cpp index ec26782d0e..f7a7dd861a 100644 --- a/libraries/animation/src/AnimationCache.cpp +++ b/libraries/animation/src/AnimationCache.cpp @@ -20,6 +20,7 @@ #include #include "AnimationLogging.h" +#include int animationPointerMetaTypeId = qRegisterMetaType(); diff --git a/libraries/animation/src/AnimationCache.h b/libraries/animation/src/AnimationCache.h index d4574d9d3b..2f8168625e 100644 --- a/libraries/animation/src/AnimationCache.h +++ b/libraries/animation/src/AnimationCache.h @@ -17,7 +17,7 @@ #include #include -#include +#include #include class Animation; From d1f8bfe48bee695b70cb25ef8fccbd5089dc9dda Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 26 Nov 2018 17:45:55 -0800 Subject: [PATCH 27/79] Move definition of supported file types into ModelLoader --- .../src/model-networking/ModelCache.cpp | 19 ---------------- .../src/model-networking/ModelLoader.cpp | 22 +++++++++++++++++++ .../src/model-networking/ModelLoader.h | 2 ++ 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 81188031e1..22835de59d 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -12,9 +12,6 @@ #include "ModelCache.h" #include #include -#include "FBXSerializer.h" -#include "OBJSerializer.h" -#include "GLTFSerializer.h" #include #include @@ -311,22 +308,6 @@ ModelCache::ModelCache() { const qint64 GEOMETRY_DEFAULT_UNUSED_MAX_SIZE = DEFAULT_UNUSED_MAX_SIZE; setUnusedResourceCacheSize(GEOMETRY_DEFAULT_UNUSED_MAX_SIZE); setObjectName("ModelCache"); - - // Add supported model formats - - ModelLoader::MIMEType fbxMIMEType("fbx"); - fbxMIMEType.extensions.push_back("fbx"); - fbxMIMEType.fileSignatures.emplace_back("Kaydara FBX Binary \x00", 0); - _modelLoader.addSupportedFormat(fbxMIMEType); - - ModelLoader::MIMEType objMIMEType("obj"); - objMIMEType.extensions.push_back("obj"); - _modelLoader.addSupportedFormat(objMIMEType); - - ModelLoader::MIMEType gltfMIMEType("gltf"); - gltfMIMEType.extensions.push_back("gltf"); - gltfMIMEType.webMediaTypes.push_back("model/gltf+json"); - _modelLoader.addSupportedFormat(gltfMIMEType); } QSharedPointer ModelCache::createResource(const QUrl& url, const QSharedPointer& fallback, diff --git a/libraries/model-networking/src/model-networking/ModelLoader.cpp b/libraries/model-networking/src/model-networking/ModelLoader.cpp index 3eb1bec9f0..04384acd39 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.cpp +++ b/libraries/model-networking/src/model-networking/ModelLoader.cpp @@ -11,6 +11,28 @@ #include "ModelLoader.h" +#include "FBXSerializer.h" +#include "OBJSerializer.h" +#include "GLTFSerializer.h" + +ModelLoader::ModelLoader() { + // Add supported model formats + + MIMEType fbxMIMEType("fbx"); + fbxMIMEType.extensions.push_back("fbx"); + fbxMIMEType.fileSignatures.emplace_back("Kaydara FBX Binary \x00", 0); + addSupportedFormat(fbxMIMEType); + + MIMEType objMIMEType("obj"); + objMIMEType.extensions.push_back("obj"); + addSupportedFormat(objMIMEType); + + MIMEType gltfMIMEType("gltf"); + gltfMIMEType.extensions.push_back("gltf"); + gltfMIMEType.webMediaTypes.push_back("model/gltf+json"); + addSupportedFormat(gltfMIMEType); +} + hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { // Check file contents for (auto& supportedFormat : supportedFormats) { diff --git a/libraries/model-networking/src/model-networking/ModelLoader.h b/libraries/model-networking/src/model-networking/ModelLoader.h index 1a8901e8da..2cd5460f84 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.h +++ b/libraries/model-networking/src/model-networking/ModelLoader.h @@ -47,6 +47,8 @@ public: std::vector fileSignatures; }; + ModelLoader(); + // T is a subclass of hfm::Serializer template void addSupportedFormat(const MIMEType& mimeType) { From fd83ae231b752ca1c30108555812a1d0b2f80609 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Tue, 27 Nov 2018 09:49:55 -0800 Subject: [PATCH 28/79] Fix case for ModelLoader import --- libraries/model-networking/src/model-networking/ModelLoader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/model-networking/src/model-networking/ModelLoader.h b/libraries/model-networking/src/model-networking/ModelLoader.h index 2cd5460f84..92d93a040e 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.h +++ b/libraries/model-networking/src/model-networking/ModelLoader.h @@ -16,7 +16,7 @@ #include #include -#include +#include #include class ModelLoader { From df1083970f00e50e7aee8e4b269b16371c7e8ce9 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Tue, 27 Nov 2018 10:24:45 -0800 Subject: [PATCH 29/79] Fix assert in ModelLoader.h --- .../model-networking/src/model-networking/ModelLoader.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/model-networking/src/model-networking/ModelLoader.h b/libraries/model-networking/src/model-networking/ModelLoader.h index 92d93a040e..0deb339f15 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.h +++ b/libraries/model-networking/src/model-networking/ModelLoader.h @@ -18,6 +18,7 @@ #include #include +#include class ModelLoader { public: @@ -75,7 +76,10 @@ protected: template static Loader getLoader() { - assert(dynamic_cast(&T())); + assert([](){ + T t; + return dynamic_cast(&t) != nullptr; + }()); return [](const hifi::ByteArray& bytes, const hifi::VariantHash& mapping, const hifi::URL& url) -> hfm::Model::Pointer { return T().read(bytes, mapping, url); From 579e2dd2eeed15b0a7ae74cf7249a914c87bcf28 Mon Sep 17 00:00:00 2001 From: amantley Date: Tue, 27 Nov 2018 14:10:20 -0800 Subject: [PATCH 30/79] removed unnecessary mirror joint code and cleaned up whitespace in rig.cpp --- libraries/animation/src/AnimSkeleton.cpp | 65 ++++++------------------ libraries/animation/src/AnimSkeleton.h | 4 -- libraries/animation/src/Rig.cpp | 5 +- 3 files changed, 16 insertions(+), 58 deletions(-) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index c5e6241555..b124f55641 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -54,7 +54,6 @@ AnimSkeleton::AnimSkeleton(const HFMModel& hfmModel) { } _clusterBindMatrixOriginalValues.push_back(dummyClustersList); } - //dump(false); } AnimSkeleton::AnimSkeleton(const std::vector& joints, const QMap jointOffsets) { @@ -208,51 +207,6 @@ void AnimSkeleton::mirrorAbsolutePoses(AnimPoseVec& poses) const { } } -bool AnimSkeleton::checkNonMirrored(QString jointName) const { - - if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { - jointName = _fbxToHifiJointNameMapping.key(jointName); - } - // check the unmapped name - if (jointName != "Hips" && jointName != "Spine" && - jointName != "Spine1" && jointName != "Spine2" && - jointName != "Neck" && jointName != "Head" && - !((jointName.startsWith("Left") || jointName.startsWith("Right")) && - jointName != "LeftEye" && jointName != "RightEye")) { - return true; - } else { - return false; - } -} - -int AnimSkeleton::containsLeft(QString jointName) const { - int mirrorJointIndex = -1; - if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { - jointName = _fbxToHifiJointNameMapping.key(jointName); - } - if (mirrorJointIndex < 0) { - if (jointName.startsWith("Left")) { - QString mirrorJointName = QString(jointName).replace(0, 4, "Right"); - mirrorJointIndex = nameToJointIndex(mirrorJointName); - } - } - return mirrorJointIndex; -} - -int AnimSkeleton::containsRight(QString jointName) const { - int mirrorJointIndex = -1; - if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { - jointName = _fbxToHifiJointNameMapping.key(jointName); - } - if (mirrorJointIndex < 0) { - if (jointName.startsWith("Right")) { - QString mirrorJointName = QString(jointName).replace(0, 5, "Left"); - mirrorJointIndex = nameToJointIndex(mirrorJointName); - } - } - return mirrorJointIndex; -} - void AnimSkeleton::buildSkeletonFromJoints(const std::vector& joints, const QMap jointOffsets) { _joints = joints; @@ -304,15 +258,26 @@ void AnimSkeleton::buildSkeletonFromJoints(const std::vector& joints, _nonMirroredIndices.clear(); _mirrorMap.reserve(_jointsSize); for (int i = 0; i < _jointsSize; i++) { - if (checkNonMirrored(_joints[i].name)) { + QString jointName = _joints[i].name; + if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { + jointName = _fbxToHifiJointNameMapping.key(jointName); + } + if (jointName != "Hips" && jointName != "Spine" && + jointName != "Spine1" && jointName != "Spine2" && + jointName != "Neck" && jointName != "Head" && + !((jointName.startsWith("Left") || jointName.startsWith("Right")) && + jointName != "LeftEye" && jointName != "RightEye")) { // HACK: we don't want to mirror some joints so we remember their indices // so we can restore them after a future mirror operation _nonMirroredIndices.push_back(i); } int mirrorJointIndex = -1; - mirrorJointIndex = containsLeft(_joints[i].name); - if (mirrorJointIndex < 0) { - mirrorJointIndex = containsRight(_joints[i].name); + if (jointName.startsWith("Left")) { + QString mirrorJointName = QString(jointName).replace(0, 4, "Right"); + mirrorJointIndex = nameToJointIndex(mirrorJointName); + } else if (jointName.startsWith("Right")) { + QString mirrorJointName = QString(jointName).replace(0, 5, "Left"); + mirrorJointIndex = nameToJointIndex(mirrorJointName); } if (mirrorJointIndex >= 0) { _mirrorMap.push_back(mirrorJointIndex); diff --git a/libraries/animation/src/AnimSkeleton.h b/libraries/animation/src/AnimSkeleton.h index 5581976d74..50b5d25c63 100644 --- a/libraries/animation/src/AnimSkeleton.h +++ b/libraries/animation/src/AnimSkeleton.h @@ -56,9 +56,6 @@ public: void saveNonMirroredPoses(const AnimPoseVec& poses) const; void restoreNonMirroredPoses(AnimPoseVec& poses) const; - bool checkNonMirrored(QString jointName) const; - int containsLeft(QString jointName) const; - int containsRight(QString jointName) const; void mirrorRelativePoses(AnimPoseVec& poses) const; void mirrorAbsolutePoses(AnimPoseVec& poses) const; @@ -67,7 +64,6 @@ public: std::vector lookUpJointIndices(const std::vector& jointNames) const; const HFMCluster getClusterBindMatricesOriginalValues(const int meshIndex, const int clusterIndex) const { return _clusterBindMatrixOriginalValues[meshIndex][clusterIndex]; } - const QMap getFBXToHifiJointNameMapping() const { return _fbxToHifiJointNameMapping; } protected: void buildSkeletonFromJoints(const std::vector& joints, const QMap jointOffsets); diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 5e2610e37e..128ac05b81 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -363,6 +363,7 @@ void Rig::reset(const HFMModel& hfmModel) { _animSkeleton = std::make_shared(hfmModel); + _internalPoseSet._relativePoses.clear(); _internalPoseSet._relativePoses = _animSkeleton->getRelativeDefaultPoses(); @@ -420,11 +421,7 @@ static const uint32_t MAX_JOINT_NAME_WARNING_COUNT = 100; int Rig::indexOfJoint(const QString& jointName) const { if (_animSkeleton) { - int result = _animSkeleton->nameToJointIndex(jointName); - if (_animSkeleton->getFBXToHifiJointNameMapping().contains(jointName)) { - result = _animSkeleton->nameToJointIndex(jointName); - } // This is a content error, so we should issue a warning. if (result < 0 && _jointNameWarningCount < MAX_JOINT_NAME_WARNING_COUNT) { From 1f354f813c2553566913e1c514dafb749278a438 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Tue, 27 Nov 2018 14:38:02 -0800 Subject: [PATCH 31/79] rework shader pre-compilation --- interface/src/Application.cpp | 7 ++++ interface/src/Application.h | 2 ++ interface/src/Application_render.cpp | 2 +- .../display-plugins/OpenGLDisplayPlugin.cpp | 21 ++---------- .../src/display-plugins/OpenGLDisplayPlugin.h | 5 --- .../gpu-gl-common/src/gpu/gl/GLBackend.cpp | 11 +++---- .../gpu-gl-common/src/gpu/gl/GLBackend.h | 4 +-- libraries/gpu/src/gpu/Batch.cpp | 6 ---- libraries/gpu/src/gpu/Batch.h | 4 --- libraries/gpu/src/gpu/Context.cpp | 33 +++++++++++++++++++ libraries/gpu/src/gpu/Context.h | 21 ++++++++++++ libraries/gpu/src/gpu/null/NullBackend.h | 2 ++ libraries/plugins/src/plugins/DisplayPlugin.h | 2 -- 13 files changed, 75 insertions(+), 45 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 6d13305af7..8e311e5487 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2862,6 +2862,13 @@ void Application::initializeGL() { _glWidget->makeCurrent(); _gpuContext = std::make_shared(); + static std::once_flag once; + std::call_once(once, [&] { + _gpuContext->pushProgramsToSync(shader::allPrograms(), [this] { + _programsCompiled.store(true); + }, 1); + }); + DependencyManager::get()->setGPUContext(_gpuContext); } diff --git a/interface/src/Application.h b/interface/src/Application.h index fb1c916c36..c234cd757c 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -795,5 +795,7 @@ private: bool _prevShowTrackedObjects { false }; std::shared_ptr _splashScreen { std::make_shared() }; + std::atomic _programsCompiled { false }; + }; #endif // hifi_Application_h diff --git a/interface/src/Application_render.cpp b/interface/src/Application_render.cpp index 8d9cdc980a..046cd3b617 100644 --- a/interface/src/Application_render.cpp +++ b/interface/src/Application_render.cpp @@ -115,7 +115,7 @@ void Application::paintGL() { finalFramebuffer = framebufferCache->getFramebuffer(); } - if (!displayPlugin->areAllProgramsLoaded()) { + if (!_programsCompiled.load()) { gpu::doInBatch("splashFrame", _gpuContext, [&](gpu::Batch& batch) { batch.setFramebuffer(finalFramebuffer); batch.enableSkybox(true); diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp index 45e0bbc2a6..aafc1a28a5 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp @@ -525,6 +525,9 @@ void OpenGLDisplayPlugin::updateFrameData() { if (_newFrameQueue.size() > 1) { _droppedFrameRate.increment(_newFrameQueue.size() - 1); } + + _gpuContext->processProgramsToSync(); + while (!_newFrameQueue.empty()) { _currentFrame = _newFrameQueue.front(); _newFrameQueue.pop(); @@ -633,29 +636,11 @@ void OpenGLDisplayPlugin::internalPresent() { _presentRate.increment(); } -std::atomic OpenGLDisplayPlugin::_allProgramsLoaded { false }; -unsigned int OpenGLDisplayPlugin::_currentLoadingProgramIndex { 0 }; - -bool OpenGLDisplayPlugin::areAllProgramsLoaded() const { - return OpenGLDisplayPlugin::_allProgramsLoaded.load(); -} - void OpenGLDisplayPlugin::present() { auto frameId = (uint64_t)presentCount(); PROFILE_RANGE_EX(render, __FUNCTION__, 0xffffff00, frameId) uint64_t startPresent = usecTimestampNow(); - if (!OpenGLDisplayPlugin::_allProgramsLoaded.load()) { - const auto& programIDs = shader::allPrograms(); - if (OpenGLDisplayPlugin::_currentLoadingProgramIndex < programIDs.size()) { - gpu::doInBatch("createAndSyncProgram", _gpuContext, [&programIDs](gpu::Batch& batch) { - batch.createAndSyncProgram(programIDs.at(OpenGLDisplayPlugin::_currentLoadingProgramIndex++)); - }); - } else { - OpenGLDisplayPlugin::_allProgramsLoaded.store(true); - } - } - { PROFILE_RANGE_EX(render, "updateFrameData", 0xff00ff00, frameId) updateFrameData(); diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h index acb12aa69a..1cc060161b 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h @@ -83,8 +83,6 @@ public: void copyTextureToQuickFramebuffer(NetworkTexturePointer source, QOpenGLFramebufferObject* target, GLsync* fenceSync) override; - bool areAllProgramsLoaded() const override; - protected: friend class PresentThread; @@ -182,8 +180,5 @@ protected: // be serialized through this mutex mutable Mutex _presentMutex; float _hudAlpha{ 1.0f }; - - static std::atomic _allProgramsLoaded; - static unsigned int _currentLoadingProgramIndex; }; diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp index 415c5135d9..295b9becb8 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.cpp @@ -102,8 +102,6 @@ GLBackend::CommandCall GLBackend::_commandCalls[Batch::NUM_COMMANDS] = (&::gpu::gl::GLBackend::do_pushProfileRange), (&::gpu::gl::GLBackend::do_popProfileRange), - - (&::gpu::gl::GLBackend::do_createAndSyncProgram), }; #define GL_GET_INTEGER(NAME) glGetIntegerv(GL_##NAME, &const_cast(NAME)); @@ -708,11 +706,6 @@ void GLBackend::do_glColor4f(const Batch& batch, size_t paramOffset) { (void)CHECK_GL_ERROR(); } -void GLBackend::do_createAndSyncProgram(const Batch& batch, size_t paramOffset) { - auto shader = gpu::Shader::createProgram(batch._params[paramOffset + 0]._uint); - gpu::gl::GLShader::sync(*this, *shader); -} - void GLBackend::releaseBuffer(GLuint id, Size size) const { Lock lock(_trashMutex); _currentFrameTrash.buffersTrash.push_back({ id, size }); @@ -866,3 +859,7 @@ void GLBackend::setCameraCorrection(const Mat4& correction, const Mat4& prevRend _pipeline._cameraCorrectionBuffer._buffer->setSubData(0, _transform._correction); _pipeline._cameraCorrectionBuffer._buffer->flush(); } + +void GLBackend::syncProgram(const gpu::ShaderPointer& program) { + gpu::gl::GLShader::sync(*this, *program); +} \ No newline at end of file diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h index 0a2c1b92ff..07f7df9277 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackend.h @@ -249,6 +249,8 @@ public: // Let's try to avoid to do that as much as possible! void syncCache() final override; + void syncProgram(const gpu::ShaderPointer& program) override; + // This is the ugly "download the pixels to sysmem for taking a snapshot" // Just avoid using it, it's ugly and will break performances virtual void downloadFramebuffer(const FramebufferPointer& srcFramebuffer, @@ -380,8 +382,6 @@ public: virtual void do_setStateBlendFactor(const Batch& batch, size_t paramOffset) final; virtual void do_setStateScissorRect(const Batch& batch, size_t paramOffset) final; - virtual void do_createAndSyncProgram(const Batch& batch, size_t paramOffset) final; - virtual GLuint getFramebufferID(const FramebufferPointer& framebuffer) = 0; virtual GLuint getTextureID(const TexturePointer& texture) final; virtual GLuint getBufferID(const Buffer& buffer) = 0; diff --git a/libraries/gpu/src/gpu/Batch.cpp b/libraries/gpu/src/gpu/Batch.cpp index 43c1c69287..a9b062a285 100644 --- a/libraries/gpu/src/gpu/Batch.cpp +++ b/libraries/gpu/src/gpu/Batch.cpp @@ -759,10 +759,4 @@ void Batch::flush() { } buffer->flush(); } -} - -void Batch::createAndSyncProgram(unsigned int programID) { - ADD_COMMAND(createAndSyncProgram); - - _params.emplace_back(programID); } \ No newline at end of file diff --git a/libraries/gpu/src/gpu/Batch.h b/libraries/gpu/src/gpu/Batch.h index aff6cf5ddd..96a45d3111 100644 --- a/libraries/gpu/src/gpu/Batch.h +++ b/libraries/gpu/src/gpu/Batch.h @@ -289,8 +289,6 @@ public: void _glColor4f(float red, float green, float blue, float alpha); - void createAndSyncProgram(unsigned int programID); - // Maybe useful but shoudln't be public. Please convince me otherwise // Well porting to gles i need it... void runLambda(std::function f); @@ -370,8 +368,6 @@ public: COMMAND_pushProfileRange, COMMAND_popProfileRange, - COMMAND_createAndSyncProgram, - NUM_COMMANDS, }; typedef std::vector Commands; diff --git a/libraries/gpu/src/gpu/Context.cpp b/libraries/gpu/src/gpu/Context.cpp index dd0d510509..be55e5ba87 100644 --- a/libraries/gpu/src/gpu/Context.cpp +++ b/libraries/gpu/src/gpu/Context.cpp @@ -335,6 +335,39 @@ Size Context::getTextureResourceIdealGPUMemSize() { return Backend::textureResourceIdealGPUMemSize.getValue(); } +void Context::pushProgramsToSync(const std::vector& programIDs, std::function callback, size_t rate) { + std::vector programs; + for (auto programID : programIDs) { + programs.push_back(gpu::Shader::createProgram(programID)); + } + pushProgramsToSync(programs, callback, rate); +} + +void Context::pushProgramsToSync(const std::vector& programs, std::function callback, size_t rate) { + Lock lock(_programsToSyncMutex); + _programsToSyncQueue.emplace(programs, callback, rate == 0 ? programs.size() : rate); +} + +void Context::processProgramsToSync() { + Lock lock(_programsToSyncMutex); + if (!_programsToSyncQueue.empty()) { + ProgramsToSync programsToSync = _programsToSyncQueue.front(); + int numSynced = 0; + while (_nextProgramToSyncIndex < programsToSync.programs.size() && numSynced < programsToSync.rate) { + auto nextProgram = programsToSync.programs.at(_nextProgramToSyncIndex); + _backend->syncProgram(nextProgram); + _syncedPrograms.push_back(nextProgram); + _nextProgramToSyncIndex++; + numSynced++; + } + + if (_nextProgramToSyncIndex == programsToSync.programs.size()) { + programsToSync.callback(); + _nextProgramToSyncIndex = 0; + _programsToSyncQueue.pop(); + } + } +} BatchPointer Context::acquireBatch(const char* name) { Batch* rawBatch = nullptr; diff --git a/libraries/gpu/src/gpu/Context.h b/libraries/gpu/src/gpu/Context.h index 011f980957..3fb90fd2e9 100644 --- a/libraries/gpu/src/gpu/Context.h +++ b/libraries/gpu/src/gpu/Context.h @@ -13,6 +13,7 @@ #include #include +#include #include @@ -61,6 +62,7 @@ public: virtual void render(const Batch& batch) = 0; virtual void syncCache() = 0; + virtual void syncProgram(const gpu::ShaderPointer& program) = 0; virtual void recycle() const = 0; virtual void downloadFramebuffer(const FramebufferPointer& srcFramebuffer, const Vec4i& region, QImage& destImage) = 0; @@ -245,6 +247,20 @@ public: static Size getTextureResourcePopulatedGPUMemSize(); static Size getTextureResourceIdealGPUMemSize(); + struct ProgramsToSync { + ProgramsToSync(const std::vector& programs, std::function callback, size_t rate) : + programs(programs), callback(callback), rate(rate) {} + + std::vector programs; + std::function callback; + size_t rate; + }; + + void pushProgramsToSync(const std::vector& programIDs, std::function callback, size_t rate = 0); + void pushProgramsToSync(const std::vector& programs, std::function callback, size_t rate = 0); + + void processProgramsToSync(); + protected: Context(const Context& context); @@ -256,6 +272,11 @@ protected: RangeTimerPointer _frameRangeTimer; StereoState _stereo; + std::mutex _programsToSyncMutex; + std::queue _programsToSyncQueue; + gpu::Shaders _syncedPrograms; + size_t _nextProgramToSyncIndex { 0 }; + // Sampled at the end of every frame, the stats of all the counters mutable ContextStats _frameStats; diff --git a/libraries/gpu/src/gpu/null/NullBackend.h b/libraries/gpu/src/gpu/null/NullBackend.h index e227b631c7..f934bcf619 100644 --- a/libraries/gpu/src/gpu/null/NullBackend.h +++ b/libraries/gpu/src/gpu/null/NullBackend.h @@ -43,6 +43,8 @@ public: // Let's try to avoid to do that as much as possible! void syncCache() final { } + void syncProgram(const gpu::ShaderPointer& program) final {} + // This is the ugly "download the pixels to sysmem for taking a snapshot" // Just avoid using it, it's ugly and will break performances virtual void downloadFramebuffer(const FramebufferPointer& srcFramebuffer, const Vec4i& region, QImage& destImage) final { } diff --git a/libraries/plugins/src/plugins/DisplayPlugin.h b/libraries/plugins/src/plugins/DisplayPlugin.h index e9fbd71689..ad49ceafe6 100644 --- a/libraries/plugins/src/plugins/DisplayPlugin.h +++ b/libraries/plugins/src/plugins/DisplayPlugin.h @@ -217,8 +217,6 @@ public: static const QString& MENU_PATH(); - virtual bool areAllProgramsLoaded() const { return true; } - signals: void recommendedFramebufferSizeChanged(const QSize& size); void resetSensorsRequested(); From ad777201f60dbb66790ded7d792145bfe82a3e99 Mon Sep 17 00:00:00 2001 From: amantley Date: Tue, 27 Nov 2018 15:08:50 -0800 Subject: [PATCH 32/79] changed comment and cleaned up variable name in getJointName --- libraries/animation/src/AnimSkeleton.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index b124f55641..36664a41fe 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -65,7 +65,7 @@ int AnimSkeleton::nameToJointIndex(const QString& jointName) const { auto itr = _jointIndicesByName.find(jointName); if (_fbxToHifiJointNameMapping.contains(jointName)) { // if the fbx joint name is different than the hifi standard then look up the - // index from that name. + // index from the fbx joint name. itr = _jointIndicesByName.find(_fbxToHifiJointNameMapping[jointName]); } if (itr != _jointIndicesByName.end()) { @@ -131,8 +131,8 @@ std::vector AnimSkeleton::getChildrenOfJoint(int jointIndex) const { const QString AnimSkeleton::getJointName(int jointIndex) const { QString jointName = _joints[jointIndex].name; - if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(_joints[jointIndex].name))) { - jointName = _fbxToHifiJointNameMapping.key(_joints[jointIndex].name); + if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { + jointName = _fbxToHifiJointNameMapping.key(jointName); } return jointName; } From 2919097f29719a5ad72211d395344ff53e43cadc Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Wed, 28 Nov 2018 15:56:56 -0800 Subject: [PATCH 33/79] Complain about empty HFMModel when EITHER meshes or joints are empty --- libraries/model-networking/src/model-networking/ModelCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 22835de59d..8dc483e43b 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -216,7 +216,7 @@ void GeometryReader::run() { throw QString("unsupported format"); } - if (hfmModel->meshes.size() == 0 && hfmModel->joints.size() == 0) { + if (hfmModel->meshes.empty() || hfmModel->joints.empty()) { throw QString("empty geometry, possibly due to an unsupported model version"); } From 142e787a9cdc585453e38eda26da7388ecfbec7f Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 29 Nov 2018 16:46:08 -0800 Subject: [PATCH 34/79] Create MIMETypeLibrary for general MIME type detection --- .../shared/src/shared/MIMETypeLibrary.cpp | 85 +++++++++++++++++ libraries/shared/src/shared/MIMETypeLibrary.h | 91 +++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 libraries/shared/src/shared/MIMETypeLibrary.cpp create mode 100644 libraries/shared/src/shared/MIMETypeLibrary.h diff --git a/libraries/shared/src/shared/MIMETypeLibrary.cpp b/libraries/shared/src/shared/MIMETypeLibrary.cpp new file mode 100644 index 0000000000..4f12f373fe --- /dev/null +++ b/libraries/shared/src/shared/MIMETypeLibrary.cpp @@ -0,0 +1,85 @@ +// +// MIMETypeLibrary.cpp +// libraries/shared/src/shared +// +// Created by Sabrina Shanman on 2018/11/29. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#include "MIMETypeLibrary.h" + +MIMETypeLibrary::ID MIMETypeLibrary::registerMIMEType(const MIMEType& mimeType) { + ID id; + withWriteLock([&](){ + id = nextID++; + _mimeTypes.emplace_back(id, mimeType); + }); + return id; +} + +void MIMETypeLibrary::unregisterMIMEType(const MIMETypeLibrary::ID& id) { + withWriteLock([&](){ + for (auto it = _mimeTypes.begin(); it != _mimeTypes.end(); it++) { + if ((*it).id == id) { + _mimeTypes.erase(it); + break; + } + } + }); +} + +MIMEType MIMETypeLibrary::getMIMEType(const MIMETypeLibrary::ID& id) const { + return resultWithReadLock([&](){ + for (auto& supportedFormat : _mimeTypes) { + if (supportedFormat.id == id) { + return supportedFormat.mimeType; + } + } + return MIMEType::NONE; + }); +} + +MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { + return resultWithReadLock([&](){ + // Check file contents + for (auto& mimeType : _mimeTypes) { + for (auto& fileSignature : mimeType.mimeType.fileSignatures) { + auto testBytes = data.mid(fileSignature.byteOffset, (int)fileSignature.bytes.size()).toStdString(); + if (testBytes == fileSignature.bytes) { + return mimeType.id; + } + } + } + + // Check file extension + std::string urlString = url.path().toStdString(); + std::size_t extensionSeparator = urlString.rfind('.'); + if (extensionSeparator != std::string::npos) { + std::string detectedExtension = urlString.substr(extensionSeparator + 1); + for (auto& supportedFormat : _mimeTypes) { + for (auto& extension : supportedFormat.mimeType.extensions) { + if (extension == detectedExtension) { + return supportedFormat.id; + } + } + } + } + + // Check web media type + if (webMediaType != "") { + for (auto& supportedFormat : _mimeTypes) { + for (auto& candidateWebMediaType : supportedFormat.mimeType.webMediaTypes) { + if (candidateWebMediaType == webMediaType) { + return supportedFormat.id; + } + } + } + } + + // Supported file type not found. + return INVALID_ID; + }); +} diff --git a/libraries/shared/src/shared/MIMETypeLibrary.h b/libraries/shared/src/shared/MIMETypeLibrary.h new file mode 100644 index 0000000000..62bc28cdad --- /dev/null +++ b/libraries/shared/src/shared/MIMETypeLibrary.h @@ -0,0 +1,91 @@ +// +// MIMETypeLibrary.h +// libraries/shared/src/shared +// +// Created by Sabrina Shanman on 2018/11/28. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_MIMETypeLibrary_h +#define hifi_MIMETypeLibrary_h + +#include +#include +#include +#include + +#include "HifiTypes.h" + +#include "ReadWriteLockable.h" + +// A short sequence of bytes, typically at the beginning of the file, which identifies the file format +class FileSignature { +public: + FileSignature(const std::string& bytes, int byteOffset) : + bytes(bytes), + byteOffset(byteOffset) { + } + FileSignature(const FileSignature& fileSignature) : + bytes(fileSignature.bytes), + byteOffset(fileSignature.byteOffset) { + } + + std::string bytes; + int byteOffset; +}; + +// A named file extension with a list of known ways to positively identify the file type +class MIMEType { +public: + MIMEType(const std::string& name) : + name(name) { + } + MIMEType() {}; + MIMEType(const MIMEType& mimeType) : + name(mimeType.name), + extensions(mimeType.extensions), + webMediaTypes(mimeType.webMediaTypes), + fileSignatures(mimeType.fileSignatures) { + } + + static MIMEType NONE; + + std::string name; + std::vector extensions; + std::vector webMediaTypes; + std::vector fileSignatures; +}; + +MIMEType MIMEType::NONE = MIMEType(""); + +class MIMETypeLibrary : ReadWriteLockable { +public: + using ID = unsigned int; + static const ID INVALID_ID { 0 }; + + ID registerMIMEType(const MIMEType& mimeType); + void unregisterMIMEType(const ID& id); + + MIMEType getMIMEType(const ID& id) const; + ID findMatchingMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const; + +protected: + ID nextID { 1 }; + + class Entry { + public: + Entry(const ID& id, const MIMEType& mimeType) : + id(id), + mimeType(mimeType) { + } + ID id; + MIMEType mimeType; + }; + + std::vector _mimeTypes; +}; + +#endif // hifi_MIMETypeLibrary_h From d1ac50196742e3a58152258373483b922798b58e Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 29 Nov 2018 16:51:56 -0800 Subject: [PATCH 35/79] Create hfm::FormatRegistry, for more general model format definition --- libraries/hfm/src/hfm/HFMFormat.h | 25 ++++++++++ libraries/hfm/src/hfm/HFMFormatRegistry.cpp | 52 +++++++++++++++++++++ libraries/hfm/src/hfm/HFMFormatRegistry.h | 48 +++++++++++++++++++ libraries/hfm/src/hfm/HFMSerializer.h | 6 +++ 4 files changed, 131 insertions(+) create mode 100644 libraries/hfm/src/hfm/HFMFormat.h create mode 100644 libraries/hfm/src/hfm/HFMFormatRegistry.cpp create mode 100644 libraries/hfm/src/hfm/HFMFormatRegistry.h diff --git a/libraries/hfm/src/hfm/HFMFormat.h b/libraries/hfm/src/hfm/HFMFormat.h new file mode 100644 index 0000000000..4430bca3f4 --- /dev/null +++ b/libraries/hfm/src/hfm/HFMFormat.h @@ -0,0 +1,25 @@ +// +// HFMFormat.h +// libraries/hfm/src/hfm +// +// Created by Sabrina Shanman on 2018/11/30. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_HFMFormat_h +#define hifi_HFMFormat_h + +#include "HFMFormatRegistry.h" + +namespace hfm { + class Format { + public: + virtual void registerFormat(FormatRegistry& registry) = 0; + virtual void unregisterFormat(FormatRegistry& registry) = 0; + }; +}; + +#endif // hifi_HFMFormat_h diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp new file mode 100644 index 0000000000..08f13c414a --- /dev/null +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp @@ -0,0 +1,52 @@ +// +// HFMFormatRegistry.cpp +// libraries/hfm/src/hfm +// +// Created by Sabrina Shanman on 2018/11/29. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#include "HFMFormatRegistry.h" + +namespace hfm { + +FormatRegistry::MIMETypeID FormatRegistry::registerMIMEType(const MIMEType& mimeType, const std::shared_ptr& supportedFactory) { + MIMETypeID id = _mimeTypeLibrary.registerMIMEType(mimeType); + withWriteLock([&](){ + _supportedFormats.emplace_back(id, supportedFactory); + }); + return id; +} + +void FormatRegistry::unregisterMIMEType(const MIMETypeID& mimeTypeID) { + withWriteLock([&](){ + for (auto it = _supportedFormats.begin(); it != _supportedFormats.end(); it++) { + if ((*it).mimeTypeID == mimeTypeID) { + _supportedFormats.erase(it); + break; + } + } + }); + _mimeTypeLibrary.unregisterMIMEType(mimeTypeID); +} + +std::shared_ptr FormatRegistry::getFactoryForMIMETypeID(FormatRegistry::MIMETypeID mimeTypeID) const { + return resultWithReadLock>([&](){ + for (auto it = _supportedFormats.begin(); it != _supportedFormats.end(); it++) { + if ((*it).mimeTypeID == mimeTypeID) { + return (*it).factory; + } + } + return std::shared_ptr(); + }); +} + +std::shared_ptr FormatRegistry::getFactoryForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { + MIMETypeID id = _mimeTypeLibrary.findMatchingMIMEType(data, mapping, url, webMediaType); + return getFactoryForMIMETypeID(id); +} + +}; diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.h b/libraries/hfm/src/hfm/HFMFormatRegistry.h new file mode 100644 index 0000000000..e807d98c46 --- /dev/null +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.h @@ -0,0 +1,48 @@ +// +// HFMFormatRegistry.h +// libraries/hfm/src/hfm +// +// Created by Sabrina Shanman on 2018/11/28. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_HFMFormatRegistry_h +#define hifi_HFMFormatRegistry_h + +#include "HFMSerializer.h" +#include +#include + +namespace hfm { + +class FormatRegistry : public ReadWriteLockable { +public: + using MIMETypeID = MIMETypeLibrary::ID; + static const MIMETypeID INVALID_MIME_TYPE_ID { MIMETypeLibrary::INVALID_ID }; + + MIMETypeID registerMIMEType(const MIMEType& mimeType, const std::shared_ptr& supportedFactory); + void unregisterMIMEType(const MIMETypeID& id); + + std::shared_ptr getFactoryForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const; + std::shared_ptr getFactoryForMIMETypeID(MIMETypeID id) const; + +protected: + MIMETypeLibrary _mimeTypeLibrary; + class SupportedFormat { + public: + SupportedFormat(const MIMETypeID& mimeTypeID, const std::shared_ptr& factory) : + mimeTypeID(mimeTypeID), + factory(factory) { + } + MIMETypeID mimeTypeID; + std::shared_ptr factory; + }; + std::vector _supportedFormats; +}; + +}; + +#endif // hifi_HFMFormatRegistry_h diff --git a/libraries/hfm/src/hfm/HFMSerializer.h b/libraries/hfm/src/hfm/HFMSerializer.h index db18f21e06..a8ff4a3fa0 100644 --- a/libraries/hfm/src/hfm/HFMSerializer.h +++ b/libraries/hfm/src/hfm/HFMSerializer.h @@ -19,6 +19,12 @@ namespace hfm { class Serializer { +public: + class Factory { + public: + virtual std::shared_ptr get() = 0; + }; + virtual Model::Pointer read(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url = hifi::URL()) = 0; }; From 74015a1a5ed961aa8d5e84472bf36a8c436afde7 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Fri, 30 Nov 2018 11:19:27 -0800 Subject: [PATCH 36/79] Implement hfm::Format/hfm::Factory for model serializers --- libraries/fbx/src/FBXSerializer.cpp | 16 ++++++++++++++++ libraries/fbx/src/FBXSerializer.h | 13 +++++++++++++ libraries/fbx/src/GLTFSerializer.cpp | 16 ++++++++++++++++ libraries/fbx/src/GLTFSerializer.h | 12 ++++++++++++ libraries/fbx/src/OBJSerializer.cpp | 14 ++++++++++++++ libraries/fbx/src/OBJSerializer.h | 12 ++++++++++++ 6 files changed, 83 insertions(+) diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index a9887cde15..dc39143f6b 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -1833,6 +1833,22 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr return hfmModelPtr; } +void FBXFormat::registerFormat(hfm::FormatRegistry& registry) { + MIMEType mimeType("fbx"); + mimeType.extensions.push_back("fbx"); + mimeType.fileSignatures.emplace_back("Kaydara FBX Binary \x00", 0); + mimeTypeID = registry.registerMIMEType(mimeType, std::make_shared()); +} + +void FBXFormat::unregisterFormat(hfm::FormatRegistry& registry) { + registry.unregisterMIMEType(mimeTypeID); + mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; +} + +std::shared_ptr FBXSerializer::Factory::get() { + return std::make_shared(); +} + HFMModel::Pointer FBXSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { QBuffer buffer(const_cast(&data)); buffer.open(QIODevice::ReadOnly); diff --git a/libraries/fbx/src/FBXSerializer.h b/libraries/fbx/src/FBXSerializer.h index c69f75cc5c..231fc5316c 100644 --- a/libraries/fbx/src/FBXSerializer.h +++ b/libraries/fbx/src/FBXSerializer.h @@ -28,6 +28,7 @@ #include "FBX.h" #include +#include #include #include @@ -94,8 +95,20 @@ public: class ExtractedMesh; +class FBXFormat : public hfm::Format { +public: + virtual void registerFormat(hfm::FormatRegistry& registry) override; + virtual void unregisterFormat(hfm::FormatRegistry& registry) override; +protected: + hfm::FormatRegistry::MIMETypeID mimeTypeID { hfm::FormatRegistry::INVALID_MIME_TYPE_ID }; +}; + class FBXSerializer : public HFMSerializer { public: + class Factory : public HFMSerializer::Factory { + std::shared_ptr get() override; + }; + HFMModel* _hfmModel; /// Reads HFMModel from the supplied model and mapping data. /// \exception QString if an error occurs in parsing diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 28d377c605..801adf6bc5 100644 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -910,6 +910,22 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const QUrl& url) { return true; } +void GLTFFormat::registerFormat(hfm::FormatRegistry& registry) { + MIMEType mimeType("gltf"); + mimeType.extensions.push_back("gltf"); + mimeType.webMediaTypes.push_back("model/gltf+json"); + mimeTypeID = registry.registerMIMEType(mimeType, std::make_shared()); +} + +void GLTFFormat::unregisterFormat(hfm::FormatRegistry& registry) { + registry.unregisterMIMEType(mimeTypeID); + mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; +} + +std::shared_ptr GLTFSerializer::Factory::get() { + return std::make_shared(); +} + HFMModel::Pointer GLTFSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { _url = url; diff --git a/libraries/fbx/src/GLTFSerializer.h b/libraries/fbx/src/GLTFSerializer.h index 1ec1183e36..154ba08e9d 100644 --- a/libraries/fbx/src/GLTFSerializer.h +++ b/libraries/fbx/src/GLTFSerializer.h @@ -16,6 +16,7 @@ #include #include #include +#include #include "FBXSerializer.h" @@ -700,9 +701,20 @@ struct GLTFFile { } }; +class GLTFFormat : public hfm::Format { +public: + virtual void registerFormat(hfm::FormatRegistry& registry) override; + virtual void unregisterFormat(hfm::FormatRegistry& registry) override; +protected: + hfm::FormatRegistry::MIMETypeID mimeTypeID; +}; + class GLTFSerializer : public QObject, public HFMSerializer { Q_OBJECT public: + class Factory : public HFMSerializer::Factory { + std::shared_ptr get() override; + }; GLTFSerializer(); HFMModel::Pointer read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url = QUrl()) override; private: diff --git a/libraries/fbx/src/OBJSerializer.cpp b/libraries/fbx/src/OBJSerializer.cpp index af8dfb5562..ae279bf0a7 100644 --- a/libraries/fbx/src/OBJSerializer.cpp +++ b/libraries/fbx/src/OBJSerializer.cpp @@ -651,6 +651,20 @@ done: return result; } +void OBJFormat::registerFormat(hfm::FormatRegistry& registry) { + MIMEType mimeType("obj"); + mimeType.extensions.push_back("obj"); + mimeTypeID = registry.registerMIMEType(mimeType, std::make_shared()); +} + +void OBJFormat::unregisterFormat(hfm::FormatRegistry& registry) { + registry.unregisterMIMEType(mimeTypeID); + mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; +} + +std::shared_ptr OBJSerializer::Factory::get() { + return std::make_shared(); +} HFMModel::Pointer OBJSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { PROFILE_RANGE_EX(resource_parse, __FUNCTION__, 0xffff0000, nullptr); diff --git a/libraries/fbx/src/OBJSerializer.h b/libraries/fbx/src/OBJSerializer.h index a6fe3817ca..0a3f4c93ac 100644 --- a/libraries/fbx/src/OBJSerializer.h +++ b/libraries/fbx/src/OBJSerializer.h @@ -14,6 +14,7 @@ #include #include +#include #include "FBXSerializer.h" class OBJTokenizer { @@ -89,9 +90,20 @@ public: OBJMaterial() : shininess(0.0f), opacity(1.0f), diffuseColor(0.9f), specularColor(0.9f), emissiveColor(0.0f), illuminationModel(-1) {} }; +class OBJFormat : public hfm::Format { +public: + virtual void registerFormat(hfm::FormatRegistry& registry) override; + virtual void unregisterFormat(hfm::FormatRegistry& registry) override; +protected: + hfm::FormatRegistry::MIMETypeID mimeTypeID; +}; + class OBJSerializer: public QObject, public HFMSerializer { // QObject so we can make network requests. Q_OBJECT public: + class Factory : public HFMSerializer::Factory { + std::shared_ptr get() override; + }; typedef QVector FaceGroup; QVector vertices; QVector vertexColors; From 243a1d6598e69b50a59bdc5f2e571d6a1f498f7a Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Fri, 30 Nov 2018 14:34:44 -0800 Subject: [PATCH 37/79] Add ModelFormatRegistry for handling model loading on the application side --- interface/src/Application.cpp | 3 ++ .../model-networking/ModelFormatRegistry.cpp | 40 +++++++++++++++++++ .../model-networking/ModelFormatRegistry.h | 29 ++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp create mode 100644 libraries/model-networking/src/model-networking/ModelFormatRegistry.h diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 21af28ffcb..6ff8618918 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -101,6 +101,7 @@ #include #include #include +#include #include #include #include @@ -883,6 +884,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { DependencyManager::set(NodeType::Agent, listenPort); DependencyManager::set(); DependencyManager::set(); + DependencyManager::set(); DependencyManager::set(); DependencyManager::set(); DependencyManager::set(); @@ -2745,6 +2747,7 @@ Application::~Application() { DependencyManager::destroy(); DependencyManager::destroy(); DependencyManager::destroy(); + DependencyManager::destroy(); DependencyManager::destroy(); DependencyManager::destroy(); DependencyManager::destroy(); diff --git a/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp b/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp new file mode 100644 index 0000000000..26f5b66b48 --- /dev/null +++ b/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp @@ -0,0 +1,40 @@ +// +// ModelFormatRegistry.cpp +// libraries/model-networking/src/model-networking +// +// Created by Sabrina Shanman on 2018/11/30. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#include "ModelFormatRegistry.h" + +#include "FBXSerializer.h" +#include "OBJSerializer.h" +#include "GLTFSerializer.h" + +ModelFormatRegistry::ModelFormatRegistry() : hfm::FormatRegistry() { + addDefaultFormats(); +} + +void ModelFormatRegistry::addDefaultFormats() { + addFormat(std::make_shared()); + addFormat(std::make_shared()); + addFormat(std::make_shared()); +} + +void ModelFormatRegistry::addFormat(const std::shared_ptr& format) { + format->registerFormat(*this); + withWriteLock([&](){ + formats.push_back(format); + }); +} + +ModelFormatRegistry::~ModelFormatRegistry() { + for (auto& format : formats) { + format->unregisterFormat(*this); + } + formats.clear(); +} diff --git a/libraries/model-networking/src/model-networking/ModelFormatRegistry.h b/libraries/model-networking/src/model-networking/ModelFormatRegistry.h new file mode 100644 index 0000000000..becc53fc1b --- /dev/null +++ b/libraries/model-networking/src/model-networking/ModelFormatRegistry.h @@ -0,0 +1,29 @@ +// +// ModelFormatRegistry.h +// libraries/model-networking/src/model-networking +// +// Created by Sabrina Shanman on 2018/11/30. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_ModelFormatRegistry_h +#define hifi_ModelFormatRegistry_h + +#include +#include + +class ModelFormatRegistry : public hfm::FormatRegistry { +public: + ModelFormatRegistry(); + ~ModelFormatRegistry(); + void addFormat(const std::shared_ptr& format); + +protected: + void addDefaultFormats(); + std::vector> formats; +}; + +#endif // hifi_ModelFormatRegistry_h From 39d1a2be6fab230de00e51b7518cc9eb1de764d0 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Fri, 30 Nov 2018 16:14:14 -0800 Subject: [PATCH 38/79] Simplify ModelLoader to utilize new model format registry --- .../src/model-networking/ModelLoader.cpp | 62 ++--------------- .../src/model-networking/ModelLoader.h | 67 ------------------- 2 files changed, 6 insertions(+), 123 deletions(-) diff --git a/libraries/model-networking/src/model-networking/ModelLoader.cpp b/libraries/model-networking/src/model-networking/ModelLoader.cpp index 04384acd39..ff32c3a999 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.cpp +++ b/libraries/model-networking/src/model-networking/ModelLoader.cpp @@ -11,64 +11,14 @@ #include "ModelLoader.h" -#include "FBXSerializer.h" -#include "OBJSerializer.h" -#include "GLTFSerializer.h" +#include +#include "ModelFormatRegistry.h" -ModelLoader::ModelLoader() { - // Add supported model formats - - MIMEType fbxMIMEType("fbx"); - fbxMIMEType.extensions.push_back("fbx"); - fbxMIMEType.fileSignatures.emplace_back("Kaydara FBX Binary \x00", 0); - addSupportedFormat(fbxMIMEType); - - MIMEType objMIMEType("obj"); - objMIMEType.extensions.push_back("obj"); - addSupportedFormat(objMIMEType); - - MIMEType gltfMIMEType("gltf"); - gltfMIMEType.extensions.push_back("gltf"); - gltfMIMEType.webMediaTypes.push_back("model/gltf+json"); - addSupportedFormat(gltfMIMEType); -} hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { - // Check file contents - for (auto& supportedFormat : supportedFormats) { - for (auto& fileSignature : supportedFormat.mimeType.fileSignatures) { - auto testBytes = data.mid(fileSignature.byteOffset, (int)fileSignature.bytes.size()).toStdString(); - if (testBytes == fileSignature.bytes) { - return supportedFormat.loader(data, mapping, url); - } - } + auto factory = DependencyManager::get()->getFactoryForMIMEType(data, mapping, url, webMediaType); + if (!factory) { + return hfm::Model::Pointer(); } - - // Check file extension - std::string urlString = url.path().toStdString(); - std::size_t extensionSeparator = urlString.rfind('.'); - if (extensionSeparator != std::string::npos) { - std::string detectedExtension = urlString.substr(extensionSeparator + 1); - for (auto& supportedFormat : supportedFormats) { - for (auto& extension : supportedFormat.mimeType.extensions) { - if (extension == detectedExtension) { - return supportedFormat.loader(data, mapping, url); - } - } - } - } - - // Check web media type - if (webMediaType != "") { - for (auto& supportedFormat : supportedFormats) { - for (auto& candidateWebMediaType : supportedFormat.mimeType.webMediaTypes) { - if (candidateWebMediaType == webMediaType) { - return supportedFormat.loader(data, mapping, url); - } - } - } - } - - // Supported file type not found. Abort loading. - return hfm::Model::Pointer(); + return factory->get()->read(data, mapping, url); } diff --git a/libraries/model-networking/src/model-networking/ModelLoader.h b/libraries/model-networking/src/model-networking/ModelLoader.h index 0deb339f15..5fbab4fb65 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.h +++ b/libraries/model-networking/src/model-networking/ModelLoader.h @@ -12,82 +12,15 @@ #ifndef hifi_ModelLoader_h #define hifi_ModelLoader_h -#include -#include -#include - #include #include -#include class ModelLoader { public: - - // A short sequence of bytes, typically at the beginning of the file, which identifies the file format - class FileSignature { - public: - FileSignature(const std::string& bytes, int byteOffset) : - bytes(bytes), - byteOffset(byteOffset) { - } - - std::string bytes; - int byteOffset; - }; - - // A named file extension with a list of known ways to positively identify the file type - class MIMEType { - public: - MIMEType(const std::string& name) : - name(name) { - } - - std::string name; - std::vector extensions; - std::vector webMediaTypes; - std::vector fileSignatures; - }; - - ModelLoader(); - - // T is a subclass of hfm::Serializer - template - void addSupportedFormat(const MIMEType& mimeType) { - supportedFormats.push_back(SupportedFormat(mimeType, SupportedFormat::getLoader())); - } - // Given the currently stored list of supported file formats, determine how to load a model from the given parameters. // If successful, return an owned reference to the newly loaded model. // If failed, return an empty reference. hfm::Model::Pointer load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const; - -protected: - using Loader = std::function; - - class SupportedFormat { - public: - SupportedFormat(const MIMEType& mimeType, const Loader& loader) : - mimeType(mimeType), - loader(loader) { - } - - MIMEType mimeType; - Loader loader; - - template - static Loader getLoader() { - assert([](){ - T t; - return dynamic_cast(&t) != nullptr; - }()); - - return [](const hifi::ByteArray& bytes, const hifi::VariantHash& mapping, const hifi::URL& url) -> hfm::Model::Pointer { - return T().read(bytes, mapping, url); - }; - } - }; - - std::vector supportedFormats; }; #endif // hifi_ModelLoader_h From ad42f6a590907a6e59cc55210fee0ffa56de56c2 Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Sat, 1 Dec 2018 12:32:29 -0700 Subject: [PATCH 39/79] Add method to check entities joint hierarchy --- .../entities-renderer/src/RenderableModelEntityItem.cpp | 8 ++++++++ .../entities-renderer/src/RenderableModelEntityItem.h | 1 + libraries/entities/src/EntityItem.h | 1 + libraries/entities/src/EntityScriptingInterface.cpp | 9 +++++++++ libraries/entities/src/EntityScriptingInterface.h | 2 +- libraries/shared/src/SpatiallyNestable.h | 2 ++ 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index f60bf20e3d..5ed45aa1e7 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -774,6 +774,14 @@ bool RenderableModelEntityItem::shouldBePhysical() const { } } +int RenderableModelEntityItem::getJointParent(int index) const { + auto model = getModel(); + if (model) { + return model->getRig().getJointParentIndex(index); + } + return -1; +} + glm::quat RenderableModelEntityItem::getAbsoluteJointRotationInObjectFrame(int index) const { auto model = getModel(); if (model) { diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.h b/libraries/entities-renderer/src/RenderableModelEntityItem.h index 79e56d7a76..ba185dee96 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.h +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.h @@ -94,6 +94,7 @@ public: // these are in the frame of this object (model space) virtual glm::quat getAbsoluteJointRotationInObjectFrame(int index) const override; virtual glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override; + virtual int getJointParent(int index) const override; virtual bool setAbsoluteJointRotationInObjectFrame(int index, const glm::quat& rotation) override; virtual bool setAbsoluteJointTranslationInObjectFrame(int index, const glm::vec3& translation) override; diff --git a/libraries/entities/src/EntityItem.h b/libraries/entities/src/EntityItem.h index c49017b2e0..954a2740ac 100644 --- a/libraries/entities/src/EntityItem.h +++ b/libraries/entities/src/EntityItem.h @@ -455,6 +455,7 @@ public: // these are in the frame of this object virtual glm::quat getAbsoluteJointRotationInObjectFrame(int index) const override { return glm::quat(); } virtual glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override { return glm::vec3(0.0f); } + virtual int getJointParent(int index) const override { return -1; } virtual bool setLocalJointRotation(int index, const glm::quat& rotation) override { return false; } virtual bool setLocalJointTranslation(int index, const glm::vec3& translation) override { return false; } diff --git a/libraries/entities/src/EntityScriptingInterface.cpp b/libraries/entities/src/EntityScriptingInterface.cpp index 3491688588..aae03789e0 100644 --- a/libraries/entities/src/EntityScriptingInterface.cpp +++ b/libraries/entities/src/EntityScriptingInterface.cpp @@ -1806,6 +1806,15 @@ glm::vec3 EntityScriptingInterface::localCoordsToVoxelCoords(const QUuid& entity } } +int EntityScriptingInterface::getJointParent(const QUuid& entityID, int index) { + if (auto entity = checkForTreeEntityAndTypeMatch(entityID, EntityTypes::Model)) { + auto modelEntity = std::dynamic_pointer_cast(entity); + return modelEntity->getJointParent(index); + } else { + return -1; + } +} + glm::vec3 EntityScriptingInterface::getAbsoluteJointTranslationInObjectFrame(const QUuid& entityID, int jointIndex) { if (auto entity = checkForTreeEntityAndTypeMatch(entityID, EntityTypes::Model)) { auto modelEntity = std::dynamic_pointer_cast(entity); diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index df7b0df9a1..ad1c11ba41 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -980,7 +980,7 @@ public slots: */ // FIXME move to a renderable entity interface Q_INVOKABLE glm::vec3 getAbsoluteJointTranslationInObjectFrame(const QUuid& entityID, int jointIndex); - + Q_INVOKABLE int getJointParent(const QUuid& entityID, int index); /**jsdoc * Get the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and * orientation. diff --git a/libraries/shared/src/SpatiallyNestable.h b/libraries/shared/src/SpatiallyNestable.h index 03ed97afbd..f8658f73d4 100644 --- a/libraries/shared/src/SpatiallyNestable.h +++ b/libraries/shared/src/SpatiallyNestable.h @@ -163,6 +163,8 @@ public: virtual glm::vec3 getAbsoluteJointScaleInObjectFrame(int index) const { return glm::vec3(1.0f); } virtual glm::quat getAbsoluteJointRotationInObjectFrame(int index) const { return glm::quat(); } virtual glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const { return glm::vec3(); } + virtual int getJointParent(int index) const { return -1; } + virtual bool setAbsoluteJointRotationInObjectFrame(int index, const glm::quat& rotation) { return false; } virtual bool setAbsoluteJointTranslationInObjectFrame(int index, const glm::vec3& translation) {return false; } From f7fcf503c21f587a2b0910e38f1aa953442da70a Mon Sep 17 00:00:00 2001 From: amantley Date: Mon, 3 Dec 2018 14:50:57 -0800 Subject: [PATCH 40/79] removed joint lean from fbxSerializer. it was unused --- libraries/fbx/src/FBXSerializer.cpp | 6 ------ libraries/fbx/src/GLTFSerializer.cpp | 1 - libraries/hfm/src/hfm/HFM.h | 1 - 3 files changed, 8 deletions(-) diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index c7785003f9..cfdf596b98 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -482,7 +482,6 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr QString jointEyeRightName = "EyeRight"; QString jointNeckName = "Neck"; QString jointRootName = "Hips"; - QString jointLeanName = processID(getString(joints.value("jointLean", "jointLean"))); QString jointHeadName = "Head"; QString jointLeftHandName = "LeftHand"; QString jointRightHandName = "RightHand"; @@ -490,7 +489,6 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr QString jointEyeRightID; QString jointNeckID; QString jointRootID; - QString jointLeanID; QString jointHeadID; QString jointLeftHandID; QString jointRightHandID; @@ -614,9 +612,6 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr } else if (name == jointRootName || (hfmModel.fbxToHifiJointNameMapping.contains(jointRootName) && (name == hfmModel.fbxToHifiJointNameMapping[jointRootName]))) { jointRootID = getID(object.properties); - } else if (name == jointLeanName) { - jointLeanID = getID(object.properties); - } else if ((name == jointHeadName) || (hfmModel.fbxToHifiJointNameMapping.contains(jointHeadName) && (name == hfmModel.fbxToHifiJointNameMapping[jointHeadName]))) { jointHeadID = getID(object.properties); @@ -1451,7 +1446,6 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr hfmModel.rightEyeJointIndex = modelIDs.indexOf(jointEyeRightID); hfmModel.neckJointIndex = modelIDs.indexOf(jointNeckID); hfmModel.rootJointIndex = modelIDs.indexOf(jointRootID); - hfmModel.leanJointIndex = modelIDs.indexOf(jointLeanID); hfmModel.headJointIndex = modelIDs.indexOf(jointHeadID); hfmModel.leftHandJointIndex = modelIDs.indexOf(jointLeftHandID); hfmModel.rightHandJointIndex = modelIDs.indexOf(jointRightHandID); diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 28d377c605..5485f46905 100644 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -1186,7 +1186,6 @@ void GLTFSerializer::hfmDebugDump(const HFMModel& hfmModel) { qCDebug(modelformat) << " rightEyeJointIndex =" << hfmModel.rightEyeJointIndex; qCDebug(modelformat) << " neckJointIndex =" << hfmModel.neckJointIndex; qCDebug(modelformat) << " rootJointIndex =" << hfmModel.rootJointIndex; - qCDebug(modelformat) << " leanJointIndex =" << hfmModel.leanJointIndex; qCDebug(modelformat) << " headJointIndex =" << hfmModel.headJointIndex; qCDebug(modelformat) << " leftHandJointIndex" << hfmModel.leftHandJointIndex; qCDebug(modelformat) << " rightHandJointIndex" << hfmModel.rightHandJointIndex; diff --git a/libraries/hfm/src/hfm/HFM.h b/libraries/hfm/src/hfm/HFM.h index b33417666f..ff1b4fd01b 100644 --- a/libraries/hfm/src/hfm/HFM.h +++ b/libraries/hfm/src/hfm/HFM.h @@ -274,7 +274,6 @@ public: int rightEyeJointIndex = -1; int neckJointIndex = -1; int rootJointIndex = -1; - int leanJointIndex = -1; int headJointIndex = -1; int leftHandJointIndex = -1; int rightHandJointIndex = -1; From 2178baf1a8b0691b8a42683dc43365134b5137f9 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Fri, 30 Nov 2018 16:49:28 -0800 Subject: [PATCH 41/79] Create SimpleFormat --- libraries/hfm/src/hfm/HFMSimpleFormat.cpp | 35 +++++++++++++++++ libraries/hfm/src/hfm/HFMSimpleFormat.h | 47 +++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 libraries/hfm/src/hfm/HFMSimpleFormat.cpp create mode 100644 libraries/hfm/src/hfm/HFMSimpleFormat.h diff --git a/libraries/hfm/src/hfm/HFMSimpleFormat.cpp b/libraries/hfm/src/hfm/HFMSimpleFormat.cpp new file mode 100644 index 0000000000..2881945400 --- /dev/null +++ b/libraries/hfm/src/hfm/HFMSimpleFormat.cpp @@ -0,0 +1,35 @@ +// +// HFMSimpleFormat.cpp +// libraries/hfm/src/hfm +// +// Created by Sabrina Shanman on 2018/11/30. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#include "HFMSimpleFormat.h" + +namespace hfm { + template + std::shared_ptr SimpleFactory::get() { + return std::make_shared(); + } + + template + SimpleFormat::SimpleFormat(const MIMEType& mimeType) : Format(), + _mimeType(mimeType) { + } + + template + void SimpleFormat::registerFormat(FormatRegistry& registry) { + _mimeTypeID = registry.registerMIMEType(_mimeType, std::make_shared>()); + } + + template + void SimpleFormat::unregisterFormat(FormatRegistry& registry) { + registry.unregisterMIMEType(_mimeTypeID); + _mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; + } +}; diff --git a/libraries/hfm/src/hfm/HFMSimpleFormat.h b/libraries/hfm/src/hfm/HFMSimpleFormat.h new file mode 100644 index 0000000000..c12a7233bf --- /dev/null +++ b/libraries/hfm/src/hfm/HFMSimpleFormat.h @@ -0,0 +1,47 @@ +// +// HFMSimpleFormat.h +// libraries/hfm/src/hfm +// +// Created by Sabrina Shanman on 2018/11/30. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_HFMSimpleFormat_h +#define hifi_HFMSimpleFormat_h + +#include "HFMFormat.h" +#include "HFMSerializer.h" + +namespace hfm { + template + class SimpleFactory : public Serializer::Factory { + std::shared_ptr get() override { + return std::make_shared(); + } + }; + + template // T is an implementation of hfm::Serializer + class SimpleFormat : public Format { + public: + SimpleFormat(const MIMEType& mimeType) : Format(), + _mimeType(mimeType) { + } + + void registerFormat(FormatRegistry& registry) override { + _mimeTypeID = registry.registerMIMEType(_mimeType, std::make_unique>()); + } + + void unregisterFormat(FormatRegistry& registry) override { + registry.unregisterMIMEType(_mimeTypeID); + _mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; + } + protected: + MIMEType _mimeType; + hfm::FormatRegistry::MIMETypeID _mimeTypeID; + }; +}; + +#endif // hifi_HFMSimpleFormat_h From 30c4830bd8192582461a68bb0ad6e22b3b4a8fdb Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Fri, 30 Nov 2018 17:20:16 -0800 Subject: [PATCH 42/79] Make Serializers use SimpleFormat --- libraries/fbx/src/FBXSerializer.cpp | 14 ++++---------- libraries/fbx/src/FBXSerializer.h | 12 +----------- libraries/fbx/src/GLTFSerializer.cpp | 14 ++++---------- libraries/fbx/src/GLTFSerializer.h | 14 +++----------- libraries/fbx/src/OBJSerializer.cpp | 14 ++++---------- libraries/fbx/src/OBJSerializer.h | 13 ++----------- .../src/model-networking/ModelFormatRegistry.cpp | 6 +++--- 7 files changed, 21 insertions(+), 66 deletions(-) diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index dc39143f6b..b57ff183a0 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -33,6 +33,7 @@ #include #include +#include #include // TOOL: Uncomment the following line to enable the filtering of all the unkwnon fields of a node so we can break point easily while loading a model with problems... @@ -1833,21 +1834,14 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr return hfmModelPtr; } -void FBXFormat::registerFormat(hfm::FormatRegistry& registry) { +MIMEType getFBXMIMEType() { MIMEType mimeType("fbx"); mimeType.extensions.push_back("fbx"); mimeType.fileSignatures.emplace_back("Kaydara FBX Binary \x00", 0); - mimeTypeID = registry.registerMIMEType(mimeType, std::make_shared()); + return mimeType; } -void FBXFormat::unregisterFormat(hfm::FormatRegistry& registry) { - registry.unregisterMIMEType(mimeTypeID); - mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; -} - -std::shared_ptr FBXSerializer::Factory::get() { - return std::make_shared(); -} +std::shared_ptr FBXSerializer::FORMAT = std::make_shared>(getFBXMIMEType()); HFMModel::Pointer FBXSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { QBuffer buffer(const_cast(&data)); diff --git a/libraries/fbx/src/FBXSerializer.h b/libraries/fbx/src/FBXSerializer.h index 231fc5316c..e66a6b911a 100644 --- a/libraries/fbx/src/FBXSerializer.h +++ b/libraries/fbx/src/FBXSerializer.h @@ -95,19 +95,9 @@ public: class ExtractedMesh; -class FBXFormat : public hfm::Format { -public: - virtual void registerFormat(hfm::FormatRegistry& registry) override; - virtual void unregisterFormat(hfm::FormatRegistry& registry) override; -protected: - hfm::FormatRegistry::MIMETypeID mimeTypeID { hfm::FormatRegistry::INVALID_MIME_TYPE_ID }; -}; - class FBXSerializer : public HFMSerializer { public: - class Factory : public HFMSerializer::Factory { - std::shared_ptr get() override; - }; + static std::shared_ptr FORMAT; HFMModel* _hfmModel; /// Reads HFMModel from the supplied model and mapping data. diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 801adf6bc5..2cad08984f 100644 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -34,6 +34,7 @@ #include #include "FBXSerializer.h" +#include GLTFSerializer::GLTFSerializer() { @@ -910,21 +911,14 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const QUrl& url) { return true; } -void GLTFFormat::registerFormat(hfm::FormatRegistry& registry) { +MIMEType getGLTFMIMEType() { MIMEType mimeType("gltf"); mimeType.extensions.push_back("gltf"); mimeType.webMediaTypes.push_back("model/gltf+json"); - mimeTypeID = registry.registerMIMEType(mimeType, std::make_shared()); + return mimeType; } -void GLTFFormat::unregisterFormat(hfm::FormatRegistry& registry) { - registry.unregisterMIMEType(mimeTypeID); - mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; -} - -std::shared_ptr GLTFSerializer::Factory::get() { - return std::make_shared(); -} +std::shared_ptr GLTFSerializer::FORMAT = std::make_shared>(getGLTFMIMEType()); HFMModel::Pointer GLTFSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { diff --git a/libraries/fbx/src/GLTFSerializer.h b/libraries/fbx/src/GLTFSerializer.h index 154ba08e9d..626e6c0995 100644 --- a/libraries/fbx/src/GLTFSerializer.h +++ b/libraries/fbx/src/GLTFSerializer.h @@ -701,21 +701,13 @@ struct GLTFFile { } }; -class GLTFFormat : public hfm::Format { -public: - virtual void registerFormat(hfm::FormatRegistry& registry) override; - virtual void unregisterFormat(hfm::FormatRegistry& registry) override; -protected: - hfm::FormatRegistry::MIMETypeID mimeTypeID; -}; - class GLTFSerializer : public QObject, public HFMSerializer { Q_OBJECT public: - class Factory : public HFMSerializer::Factory { - std::shared_ptr get() override; - }; GLTFSerializer(); + + static std::shared_ptr FORMAT; + HFMModel::Pointer read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url = QUrl()) override; private: GLTFFile _file; diff --git a/libraries/fbx/src/OBJSerializer.cpp b/libraries/fbx/src/OBJSerializer.cpp index ae279bf0a7..62b33e3690 100644 --- a/libraries/fbx/src/OBJSerializer.cpp +++ b/libraries/fbx/src/OBJSerializer.cpp @@ -28,6 +28,7 @@ #include #include "FBXSerializer.h" +#include #include #include @@ -651,20 +652,13 @@ done: return result; } -void OBJFormat::registerFormat(hfm::FormatRegistry& registry) { +MIMEType getOBJMIMEType() { MIMEType mimeType("obj"); mimeType.extensions.push_back("obj"); - mimeTypeID = registry.registerMIMEType(mimeType, std::make_shared()); + return mimeType; } -void OBJFormat::unregisterFormat(hfm::FormatRegistry& registry) { - registry.unregisterMIMEType(mimeTypeID); - mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; -} - -std::shared_ptr OBJSerializer::Factory::get() { - return std::make_shared(); -} +std::shared_ptr OBJSerializer::FORMAT = std::make_shared>(getOBJMIMEType()); HFMModel::Pointer OBJSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { PROFILE_RANGE_EX(resource_parse, __FUNCTION__, 0xffff0000, nullptr); diff --git a/libraries/fbx/src/OBJSerializer.h b/libraries/fbx/src/OBJSerializer.h index 0a3f4c93ac..cbf6ee3ce2 100644 --- a/libraries/fbx/src/OBJSerializer.h +++ b/libraries/fbx/src/OBJSerializer.h @@ -90,20 +90,11 @@ public: OBJMaterial() : shininess(0.0f), opacity(1.0f), diffuseColor(0.9f), specularColor(0.9f), emissiveColor(0.0f), illuminationModel(-1) {} }; -class OBJFormat : public hfm::Format { -public: - virtual void registerFormat(hfm::FormatRegistry& registry) override; - virtual void unregisterFormat(hfm::FormatRegistry& registry) override; -protected: - hfm::FormatRegistry::MIMETypeID mimeTypeID; -}; - class OBJSerializer: public QObject, public HFMSerializer { // QObject so we can make network requests. Q_OBJECT public: - class Factory : public HFMSerializer::Factory { - std::shared_ptr get() override; - }; + static std::shared_ptr FORMAT; + typedef QVector FaceGroup; QVector vertices; QVector vertexColors; diff --git a/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp b/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp index 26f5b66b48..ccc89eb402 100644 --- a/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp +++ b/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp @@ -20,9 +20,9 @@ ModelFormatRegistry::ModelFormatRegistry() : hfm::FormatRegistry() { } void ModelFormatRegistry::addDefaultFormats() { - addFormat(std::make_shared()); - addFormat(std::make_shared()); - addFormat(std::make_shared()); + addFormat(FBXSerializer::FORMAT); + addFormat(OBJSerializer::FORMAT); + addFormat(GLTFSerializer::FORMAT); } void ModelFormatRegistry::addFormat(const std::shared_ptr& format) { From bf1c5f2fa5b1d1e78531279e08c1e6eb00a2fef5 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 10:48:50 -0800 Subject: [PATCH 43/79] Make Serializer::Factory stored by HFMFormatRegistry unique_ptr --- libraries/hfm/src/hfm/HFMFormatRegistry.cpp | 14 +++++++------- libraries/hfm/src/hfm/HFMFormatRegistry.h | 12 ++++++------ libraries/hfm/src/hfm/HFMSimpleFormat.cpp | 2 +- .../src/model-networking/ModelLoader.cpp | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp index 08f13c414a..1be05e99d9 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp @@ -13,7 +13,7 @@ namespace hfm { -FormatRegistry::MIMETypeID FormatRegistry::registerMIMEType(const MIMEType& mimeType, const std::shared_ptr& supportedFactory) { +FormatRegistry::MIMETypeID FormatRegistry::registerMIMEType(const MIMEType& mimeType, std::unique_ptr& supportedFactory) { MIMETypeID id = _mimeTypeLibrary.registerMIMEType(mimeType); withWriteLock([&](){ _supportedFormats.emplace_back(id, supportedFactory); @@ -33,20 +33,20 @@ void FormatRegistry::unregisterMIMEType(const MIMETypeID& mimeTypeID) { _mimeTypeLibrary.unregisterMIMEType(mimeTypeID); } -std::shared_ptr FormatRegistry::getFactoryForMIMETypeID(FormatRegistry::MIMETypeID mimeTypeID) const { - return resultWithReadLock>([&](){ +std::shared_ptr FormatRegistry::getSerializerForMIMETypeID(FormatRegistry::MIMETypeID mimeTypeID) const { + return resultWithReadLock>([&](){ for (auto it = _supportedFormats.begin(); it != _supportedFormats.end(); it++) { if ((*it).mimeTypeID == mimeTypeID) { - return (*it).factory; + return (*it).factory->get(); } } - return std::shared_ptr(); + return std::shared_ptr(); }); } -std::shared_ptr FormatRegistry::getFactoryForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { +std::shared_ptr FormatRegistry::getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { MIMETypeID id = _mimeTypeLibrary.findMatchingMIMEType(data, mapping, url, webMediaType); - return getFactoryForMIMETypeID(id); + return getSerializerForMIMETypeID(id); } }; diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.h b/libraries/hfm/src/hfm/HFMFormatRegistry.h index e807d98c46..6e0bd5c66c 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.h +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.h @@ -23,22 +23,22 @@ public: using MIMETypeID = MIMETypeLibrary::ID; static const MIMETypeID INVALID_MIME_TYPE_ID { MIMETypeLibrary::INVALID_ID }; - MIMETypeID registerMIMEType(const MIMEType& mimeType, const std::shared_ptr& supportedFactory); + MIMETypeID registerMIMEType(const MIMEType& mimeType, std::unique_ptr& supportedFactory); void unregisterMIMEType(const MIMETypeID& id); - std::shared_ptr getFactoryForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const; - std::shared_ptr getFactoryForMIMETypeID(MIMETypeID id) const; + std::shared_ptr getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const; + std::shared_ptr getSerializerForMIMETypeID(MIMETypeID id) const; protected: MIMETypeLibrary _mimeTypeLibrary; class SupportedFormat { public: - SupportedFormat(const MIMETypeID& mimeTypeID, const std::shared_ptr& factory) : + SupportedFormat(const MIMETypeID& mimeTypeID, std::unique_ptr& factory) : mimeTypeID(mimeTypeID), - factory(factory) { + factory(std::move(factory)) { } MIMETypeID mimeTypeID; - std::shared_ptr factory; + std::unique_ptr factory; }; std::vector _supportedFormats; }; diff --git a/libraries/hfm/src/hfm/HFMSimpleFormat.cpp b/libraries/hfm/src/hfm/HFMSimpleFormat.cpp index 2881945400..0388268de8 100644 --- a/libraries/hfm/src/hfm/HFMSimpleFormat.cpp +++ b/libraries/hfm/src/hfm/HFMSimpleFormat.cpp @@ -24,7 +24,7 @@ namespace hfm { template void SimpleFormat::registerFormat(FormatRegistry& registry) { - _mimeTypeID = registry.registerMIMEType(_mimeType, std::make_shared>()); + _mimeTypeID = registry.registerMIMEType(_mimeType, std::make_unique>()); } template diff --git a/libraries/model-networking/src/model-networking/ModelLoader.cpp b/libraries/model-networking/src/model-networking/ModelLoader.cpp index ff32c3a999..51d2c96ee3 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.cpp +++ b/libraries/model-networking/src/model-networking/ModelLoader.cpp @@ -16,9 +16,9 @@ hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { - auto factory = DependencyManager::get()->getFactoryForMIMEType(data, mapping, url, webMediaType); - if (!factory) { + auto serializer = DependencyManager::get()->getSerializerForMIMEType(data, mapping, url, webMediaType); + if (!serializer) { return hfm::Model::Pointer(); } - return factory->get()->read(data, mapping, url); + return serializer->read(data, mapping, url); } From 6ec0e42ded733c1d98267fde56b5f725005f43d3 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 11:04:29 -0800 Subject: [PATCH 44/79] Remove locks from MIMETypeLibrary --- .../shared/src/shared/MIMETypeLibrary.cpp | 91 +++++++++---------- libraries/shared/src/shared/MIMETypeLibrary.h | 4 +- 2 files changed, 42 insertions(+), 53 deletions(-) diff --git a/libraries/shared/src/shared/MIMETypeLibrary.cpp b/libraries/shared/src/shared/MIMETypeLibrary.cpp index 4f12f373fe..3532876b67 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.cpp +++ b/libraries/shared/src/shared/MIMETypeLibrary.cpp @@ -12,74 +12,65 @@ #include "MIMETypeLibrary.h" MIMETypeLibrary::ID MIMETypeLibrary::registerMIMEType(const MIMEType& mimeType) { - ID id; - withWriteLock([&](){ - id = nextID++; - _mimeTypes.emplace_back(id, mimeType); - }); + ID id = nextID++; + _mimeTypes.emplace_back(id, mimeType); return id; } void MIMETypeLibrary::unregisterMIMEType(const MIMETypeLibrary::ID& id) { - withWriteLock([&](){ - for (auto it = _mimeTypes.begin(); it != _mimeTypes.end(); it++) { - if ((*it).id == id) { - _mimeTypes.erase(it); - break; - } + for (auto it = _mimeTypes.begin(); it != _mimeTypes.end(); it++) { + if ((*it).id == id) { + _mimeTypes.erase(it); + break; } - }); + } } MIMEType MIMETypeLibrary::getMIMEType(const MIMETypeLibrary::ID& id) const { - return resultWithReadLock([&](){ - for (auto& supportedFormat : _mimeTypes) { - if (supportedFormat.id == id) { - return supportedFormat.mimeType; - } + for (auto& supportedFormat : _mimeTypes) { + if (supportedFormat.id == id) { + return supportedFormat.mimeType; } - return MIMEType::NONE; - }); + } + return MIMEType::NONE; } MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { - return resultWithReadLock([&](){ - // Check file contents - for (auto& mimeType : _mimeTypes) { - for (auto& fileSignature : mimeType.mimeType.fileSignatures) { - auto testBytes = data.mid(fileSignature.byteOffset, (int)fileSignature.bytes.size()).toStdString(); - if (testBytes == fileSignature.bytes) { - return mimeType.id; + // Check file contents + for (auto& mimeType : _mimeTypes) { + for (auto& fileSignature : mimeType.mimeType.fileSignatures) { + auto testBytes = data.mid(fileSignature.byteOffset, (int)fileSignature.bytes.size()).toStdString(); + if (testBytes == fileSignature.bytes) { + return mimeType.id; + } + } + } + + // Check file extension + std::string urlString = url.path().toStdString(); + std::size_t extensionSeparator = urlString.rfind('.'); + if (extensionSeparator != std::string::npos) { + std::string detectedExtension = urlString.substr(extensionSeparator + 1); + for (auto& supportedFormat : _mimeTypes) { + for (auto& extension : supportedFormat.mimeType.extensions) { + if (extension == detectedExtension) { + return supportedFormat.id; } } } + } - // Check file extension - std::string urlString = url.path().toStdString(); - std::size_t extensionSeparator = urlString.rfind('.'); - if (extensionSeparator != std::string::npos) { - std::string detectedExtension = urlString.substr(extensionSeparator + 1); - for (auto& supportedFormat : _mimeTypes) { - for (auto& extension : supportedFormat.mimeType.extensions) { - if (extension == detectedExtension) { - return supportedFormat.id; - } + // Check web media type + if (webMediaType != "") { + for (auto& supportedFormat : _mimeTypes) { + for (auto& candidateWebMediaType : supportedFormat.mimeType.webMediaTypes) { + if (candidateWebMediaType == webMediaType) { + return supportedFormat.id; } } } + } - // Check web media type - if (webMediaType != "") { - for (auto& supportedFormat : _mimeTypes) { - for (auto& candidateWebMediaType : supportedFormat.mimeType.webMediaTypes) { - if (candidateWebMediaType == webMediaType) { - return supportedFormat.id; - } - } - } - } - - // Supported file type not found. - return INVALID_ID; - }); + // Supported file type not found. + return INVALID_ID; } diff --git a/libraries/shared/src/shared/MIMETypeLibrary.h b/libraries/shared/src/shared/MIMETypeLibrary.h index 62bc28cdad..354192dd48 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.h +++ b/libraries/shared/src/shared/MIMETypeLibrary.h @@ -19,8 +19,6 @@ #include "HifiTypes.h" -#include "ReadWriteLockable.h" - // A short sequence of bytes, typically at the beginning of the file, which identifies the file format class FileSignature { public: @@ -61,7 +59,7 @@ public: MIMEType MIMEType::NONE = MIMEType(""); -class MIMETypeLibrary : ReadWriteLockable { +class MIMETypeLibrary { public: using ID = unsigned int; static const ID INVALID_ID { 0 }; From 0da4669370ac272f87777617f7cb8310b1b0e4a0 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 11:24:31 -0800 Subject: [PATCH 45/79] Replace ReadWriteLockable with std::lock_guard in HFMFormatRegistry/ModelFormatRegistry --- libraries/hfm/src/hfm/HFMFormatRegistry.cpp | 42 +++++++++++-------- libraries/hfm/src/hfm/HFMFormatRegistry.h | 3 +- .../model-networking/ModelFormatRegistry.cpp | 5 ++- .../model-networking/ModelFormatRegistry.h | 1 + 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp index 1be05e99d9..2a537af151 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp @@ -14,38 +14,44 @@ namespace hfm { FormatRegistry::MIMETypeID FormatRegistry::registerMIMEType(const MIMEType& mimeType, std::unique_ptr& supportedFactory) { + std::lock_guard lock(_libraryLock); + MIMETypeID id = _mimeTypeLibrary.registerMIMEType(mimeType); - withWriteLock([&](){ - _supportedFormats.emplace_back(id, supportedFactory); - }); + _supportedFormats.emplace_back(id, supportedFactory); return id; } void FormatRegistry::unregisterMIMEType(const MIMETypeID& mimeTypeID) { - withWriteLock([&](){ - for (auto it = _supportedFormats.begin(); it != _supportedFormats.end(); it++) { - if ((*it).mimeTypeID == mimeTypeID) { - _supportedFormats.erase(it); - break; - } + std::lock_guard lock(_libraryLock); + + for (auto it = _supportedFormats.begin(); it != _supportedFormats.end(); it++) { + if ((*it).mimeTypeID == mimeTypeID) { + _supportedFormats.erase(it); + break; } - }); + } _mimeTypeLibrary.unregisterMIMEType(mimeTypeID); } std::shared_ptr FormatRegistry::getSerializerForMIMETypeID(FormatRegistry::MIMETypeID mimeTypeID) const { - return resultWithReadLock>([&](){ - for (auto it = _supportedFormats.begin(); it != _supportedFormats.end(); it++) { - if ((*it).mimeTypeID == mimeTypeID) { - return (*it).factory->get(); - } + // TODO: shared_lock in C++14 + std::lock_guard lock(*const_cast(&_libraryLock)); + + for (auto it = _supportedFormats.begin(); it != _supportedFormats.end(); it++) { + if ((*it).mimeTypeID == mimeTypeID) { + return (*it).factory->get(); } - return std::shared_ptr(); - }); + } + return std::shared_ptr(); } std::shared_ptr FormatRegistry::getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { - MIMETypeID id = _mimeTypeLibrary.findMatchingMIMEType(data, mapping, url, webMediaType); + MIMETypeID id; + { + // TODO: shared_lock in C++14 + std::lock_guard lock(*const_cast(&_libraryLock)); + id = _mimeTypeLibrary.findMatchingMIMEType(data, mapping, url, webMediaType); + } return getSerializerForMIMETypeID(id); } diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.h b/libraries/hfm/src/hfm/HFMFormatRegistry.h index 6e0bd5c66c..6a16dce0b9 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.h +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.h @@ -18,7 +18,7 @@ namespace hfm { -class FormatRegistry : public ReadWriteLockable { +class FormatRegistry { public: using MIMETypeID = MIMETypeLibrary::ID; static const MIMETypeID INVALID_MIME_TYPE_ID { MIMETypeLibrary::INVALID_ID }; @@ -31,6 +31,7 @@ public: protected: MIMETypeLibrary _mimeTypeLibrary; + std::mutex _libraryLock; class SupportedFormat { public: SupportedFormat(const MIMETypeID& mimeTypeID, std::unique_ptr& factory) : diff --git a/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp b/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp index ccc89eb402..8adc4ea5d9 100644 --- a/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp +++ b/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp @@ -27,9 +27,10 @@ void ModelFormatRegistry::addDefaultFormats() { void ModelFormatRegistry::addFormat(const std::shared_ptr& format) { format->registerFormat(*this); - withWriteLock([&](){ + { + std::lock_guard lock(_formatsLock); formats.push_back(format); - }); + } } ModelFormatRegistry::~ModelFormatRegistry() { diff --git a/libraries/model-networking/src/model-networking/ModelFormatRegistry.h b/libraries/model-networking/src/model-networking/ModelFormatRegistry.h index becc53fc1b..c88873eaca 100644 --- a/libraries/model-networking/src/model-networking/ModelFormatRegistry.h +++ b/libraries/model-networking/src/model-networking/ModelFormatRegistry.h @@ -24,6 +24,7 @@ public: protected: void addDefaultFormats(); std::vector> formats; + std::mutex _formatsLock; }; #endif // hifi_ModelFormatRegistry_h From 660d8c4e92633afb5596ef469c17af806bcc0183 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 11:30:29 -0800 Subject: [PATCH 46/79] Remove unused mapping parameter from MIME type detection --- libraries/hfm/src/hfm/HFMFormatRegistry.cpp | 4 ++-- libraries/hfm/src/hfm/HFMFormatRegistry.h | 2 +- .../model-networking/src/model-networking/ModelLoader.cpp | 2 +- libraries/shared/src/shared/MIMETypeLibrary.cpp | 2 +- libraries/shared/src/shared/MIMETypeLibrary.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp index 2a537af151..1125486f5e 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp @@ -45,12 +45,12 @@ std::shared_ptr FormatRegistry::getSerializerForMIMETypeID(FormatReg return std::shared_ptr(); } -std::shared_ptr FormatRegistry::getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { +std::shared_ptr FormatRegistry::getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const { MIMETypeID id; { // TODO: shared_lock in C++14 std::lock_guard lock(*const_cast(&_libraryLock)); - id = _mimeTypeLibrary.findMatchingMIMEType(data, mapping, url, webMediaType); + id = _mimeTypeLibrary.findMatchingMIMEType(data, url, webMediaType); } return getSerializerForMIMETypeID(id); } diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.h b/libraries/hfm/src/hfm/HFMFormatRegistry.h index 6a16dce0b9..bf67254c39 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.h +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.h @@ -26,7 +26,7 @@ public: MIMETypeID registerMIMEType(const MIMEType& mimeType, std::unique_ptr& supportedFactory); void unregisterMIMEType(const MIMETypeID& id); - std::shared_ptr getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const; + std::shared_ptr getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const; std::shared_ptr getSerializerForMIMETypeID(MIMETypeID id) const; protected: diff --git a/libraries/model-networking/src/model-networking/ModelLoader.cpp b/libraries/model-networking/src/model-networking/ModelLoader.cpp index 51d2c96ee3..a69559ad38 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.cpp +++ b/libraries/model-networking/src/model-networking/ModelLoader.cpp @@ -16,7 +16,7 @@ hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { - auto serializer = DependencyManager::get()->getSerializerForMIMEType(data, mapping, url, webMediaType); + auto serializer = DependencyManager::get()->getSerializerForMIMEType(data, url, webMediaType); if (!serializer) { return hfm::Model::Pointer(); } diff --git a/libraries/shared/src/shared/MIMETypeLibrary.cpp b/libraries/shared/src/shared/MIMETypeLibrary.cpp index 3532876b67..7bc9defab6 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.cpp +++ b/libraries/shared/src/shared/MIMETypeLibrary.cpp @@ -35,7 +35,7 @@ MIMEType MIMETypeLibrary::getMIMEType(const MIMETypeLibrary::ID& id) const { return MIMEType::NONE; } -MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { +MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const { // Check file contents for (auto& mimeType : _mimeTypes) { for (auto& fileSignature : mimeType.mimeType.fileSignatures) { diff --git a/libraries/shared/src/shared/MIMETypeLibrary.h b/libraries/shared/src/shared/MIMETypeLibrary.h index 354192dd48..94dba0b3c8 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.h +++ b/libraries/shared/src/shared/MIMETypeLibrary.h @@ -68,7 +68,7 @@ public: void unregisterMIMEType(const ID& id); MIMEType getMIMEType(const ID& id) const; - ID findMatchingMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const; + ID findMatchingMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const; protected: ID nextID { 1 }; From 19459c15a54a2eebe7b08895c0e07e5aed5adfa9 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 11:50:50 -0800 Subject: [PATCH 47/79] Split MIMETypeLibrary file type detection into three separate functions --- libraries/hfm/src/hfm/HFMFormatRegistry.cpp | 9 ++++++++- libraries/shared/src/shared/MIMETypeLibrary.cpp | 11 +++++++++-- libraries/shared/src/shared/MIMETypeLibrary.h | 5 ++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp index 1125486f5e..b96662bdcc 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp @@ -50,7 +50,14 @@ std::shared_ptr FormatRegistry::getSerializerForMIMEType(const hifi: { // TODO: shared_lock in C++14 std::lock_guard lock(*const_cast(&_libraryLock)); - id = _mimeTypeLibrary.findMatchingMIMEType(data, url, webMediaType); + + id = _mimeTypeLibrary.findMIMETypeForData(data); + if (id == INVALID_MIME_TYPE_ID) { + id = _mimeTypeLibrary.findMIMETypeForURL(url); + } + if (id == INVALID_MIME_TYPE_ID) { + id = _mimeTypeLibrary.findMIMETypeForMediaType(webMediaType); + } } return getSerializerForMIMETypeID(id); } diff --git a/libraries/shared/src/shared/MIMETypeLibrary.cpp b/libraries/shared/src/shared/MIMETypeLibrary.cpp index 7bc9defab6..f3874012b1 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.cpp +++ b/libraries/shared/src/shared/MIMETypeLibrary.cpp @@ -35,7 +35,7 @@ MIMEType MIMETypeLibrary::getMIMEType(const MIMETypeLibrary::ID& id) const { return MIMEType::NONE; } -MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const { +MIMETypeLibrary::ID MIMETypeLibrary::findMIMETypeForData(const hifi::ByteArray& data) const { // Check file contents for (auto& mimeType : _mimeTypes) { for (auto& fileSignature : mimeType.mimeType.fileSignatures) { @@ -46,6 +46,10 @@ MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& } } + return INVALID_ID; +} + +MIMETypeLibrary::ID MIMETypeLibrary::findMIMETypeForURL(const hifi::URL& url) const { // Check file extension std::string urlString = url.path().toStdString(); std::size_t extensionSeparator = urlString.rfind('.'); @@ -60,6 +64,10 @@ MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& } } + return INVALID_ID; +} + +MIMETypeLibrary::ID MIMETypeLibrary::findMIMETypeForMediaType(const std::string& webMediaType) const { // Check web media type if (webMediaType != "") { for (auto& supportedFormat : _mimeTypes) { @@ -71,6 +79,5 @@ MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& } } - // Supported file type not found. return INVALID_ID; } diff --git a/libraries/shared/src/shared/MIMETypeLibrary.h b/libraries/shared/src/shared/MIMETypeLibrary.h index 94dba0b3c8..33e415a86c 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.h +++ b/libraries/shared/src/shared/MIMETypeLibrary.h @@ -68,7 +68,10 @@ public: void unregisterMIMEType(const ID& id); MIMEType getMIMEType(const ID& id) const; - ID findMatchingMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const; + + ID findMIMETypeForData(const hifi::ByteArray& data) const; + ID findMIMETypeForURL(const hifi::URL& url) const; + ID findMIMETypeForMediaType(const std::string& webMediaType) const; protected: ID nextID { 1 }; From da9f37bb3986e6c8e7332bf5de45dd615957dbc0 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 14:13:33 -0800 Subject: [PATCH 48/79] Fix up HFMFormatRegistry to accept subclass factory unique pointers --- libraries/hfm/src/hfm/HFMFormatRegistry.cpp | 2 +- libraries/hfm/src/hfm/HFMFormatRegistry.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp index b96662bdcc..8ff11d851d 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp @@ -13,7 +13,7 @@ namespace hfm { -FormatRegistry::MIMETypeID FormatRegistry::registerMIMEType(const MIMEType& mimeType, std::unique_ptr& supportedFactory) { +FormatRegistry::MIMETypeID FormatRegistry::registerMIMEType(const MIMEType& mimeType, std::unique_ptr supportedFactory) { std::lock_guard lock(_libraryLock); MIMETypeID id = _mimeTypeLibrary.registerMIMEType(mimeType); diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.h b/libraries/hfm/src/hfm/HFMFormatRegistry.h index bf67254c39..92076e814c 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.h +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.h @@ -23,7 +23,7 @@ public: using MIMETypeID = MIMETypeLibrary::ID; static const MIMETypeID INVALID_MIME_TYPE_ID { MIMETypeLibrary::INVALID_ID }; - MIMETypeID registerMIMEType(const MIMEType& mimeType, std::unique_ptr& supportedFactory); + MIMETypeID registerMIMEType(const MIMEType& mimeType, std::unique_ptr supportedFactory); void unregisterMIMEType(const MIMETypeID& id); std::shared_ptr getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const; From a04c822ef0f44acd56dcfefda2c8948d14d64378 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 14:25:55 -0800 Subject: [PATCH 49/79] Oops, ModelFormatRegistry needs to be defined as a Dependency before it can be used by DependencyManager --- .../src/model-networking/ModelFormatRegistry.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/model-networking/src/model-networking/ModelFormatRegistry.h b/libraries/model-networking/src/model-networking/ModelFormatRegistry.h index c88873eaca..88681a01d7 100644 --- a/libraries/model-networking/src/model-networking/ModelFormatRegistry.h +++ b/libraries/model-networking/src/model-networking/ModelFormatRegistry.h @@ -15,7 +15,9 @@ #include #include -class ModelFormatRegistry : public hfm::FormatRegistry { +#include + +class ModelFormatRegistry : public hfm::FormatRegistry, Dependency { public: ModelFormatRegistry(); ~ModelFormatRegistry(); From a63888cac8aa96a90e6d6987b7c6d11fedff4f48 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 14:26:37 -0800 Subject: [PATCH 50/79] Remove unused default constructor for GLTFSerializer --- libraries/fbx/src/GLTFSerializer.cpp | 5 ----- libraries/fbx/src/GLTFSerializer.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 2cad08984f..b841226a9e 100644 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -36,11 +36,6 @@ #include "FBXSerializer.h" #include - -GLTFSerializer::GLTFSerializer() { - -} - bool GLTFSerializer::getStringVal(const QJsonObject& object, const QString& fieldname, QString& value, QMap& defined) { bool _defined = (object.contains(fieldname) && object[fieldname].isString()); diff --git a/libraries/fbx/src/GLTFSerializer.h b/libraries/fbx/src/GLTFSerializer.h index 626e6c0995..fffb192b5b 100644 --- a/libraries/fbx/src/GLTFSerializer.h +++ b/libraries/fbx/src/GLTFSerializer.h @@ -704,8 +704,6 @@ struct GLTFFile { class GLTFSerializer : public QObject, public HFMSerializer { Q_OBJECT public: - GLTFSerializer(); - static std::shared_ptr FORMAT; HFMModel::Pointer read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url = QUrl()) override; From 3c38b43a6516ceef302dfd3bbc6a20b871b3eab6 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 15:26:34 -0800 Subject: [PATCH 51/79] Fix compilation error due to static variable definition in MIMETypeLibrary header file --- libraries/shared/src/shared/MIMETypeLibrary.cpp | 2 ++ libraries/shared/src/shared/MIMETypeLibrary.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/shared/src/shared/MIMETypeLibrary.cpp b/libraries/shared/src/shared/MIMETypeLibrary.cpp index f3874012b1..5ae4016c54 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.cpp +++ b/libraries/shared/src/shared/MIMETypeLibrary.cpp @@ -11,6 +11,8 @@ #include "MIMETypeLibrary.h" +MIMEType MIMEType::NONE = MIMEType(""); + MIMETypeLibrary::ID MIMETypeLibrary::registerMIMEType(const MIMEType& mimeType) { ID id = nextID++; _mimeTypes.emplace_back(id, mimeType); diff --git a/libraries/shared/src/shared/MIMETypeLibrary.h b/libraries/shared/src/shared/MIMETypeLibrary.h index 33e415a86c..5066e859fb 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.h +++ b/libraries/shared/src/shared/MIMETypeLibrary.h @@ -57,8 +57,6 @@ public: std::vector fileSignatures; }; -MIMEType MIMEType::NONE = MIMEType(""); - class MIMETypeLibrary { public: using ID = unsigned int; From 1c9beed44fb96238bdb2109f31cf0dbdb473cdde Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 3 Dec 2018 15:28:18 -0800 Subject: [PATCH 52/79] Fix ModelFormatRegistry Dependency inheritance being private --- .../model-networking/src/model-networking/ModelFormatRegistry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/model-networking/src/model-networking/ModelFormatRegistry.h b/libraries/model-networking/src/model-networking/ModelFormatRegistry.h index 88681a01d7..ec1ce79b43 100644 --- a/libraries/model-networking/src/model-networking/ModelFormatRegistry.h +++ b/libraries/model-networking/src/model-networking/ModelFormatRegistry.h @@ -17,7 +17,7 @@ #include -class ModelFormatRegistry : public hfm::FormatRegistry, Dependency { +class ModelFormatRegistry : public hfm::FormatRegistry, public Dependency { public: ModelFormatRegistry(); ~ModelFormatRegistry(); From ed1684967f7bcc41a174f1c338d82833d31facdb Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Tue, 4 Dec 2018 10:07:31 -0800 Subject: [PATCH 53/79] Remove straggler HFMSimpleFormat.cpp --- libraries/hfm/src/hfm/HFMSimpleFormat.cpp | 35 ----------------------- 1 file changed, 35 deletions(-) delete mode 100644 libraries/hfm/src/hfm/HFMSimpleFormat.cpp diff --git a/libraries/hfm/src/hfm/HFMSimpleFormat.cpp b/libraries/hfm/src/hfm/HFMSimpleFormat.cpp deleted file mode 100644 index 0388268de8..0000000000 --- a/libraries/hfm/src/hfm/HFMSimpleFormat.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// -// HFMSimpleFormat.cpp -// libraries/hfm/src/hfm -// -// Created by Sabrina Shanman on 2018/11/30. -// Copyright 2018 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "HFMSimpleFormat.h" - -namespace hfm { - template - std::shared_ptr SimpleFactory::get() { - return std::make_shared(); - } - - template - SimpleFormat::SimpleFormat(const MIMEType& mimeType) : Format(), - _mimeType(mimeType) { - } - - template - void SimpleFormat::registerFormat(FormatRegistry& registry) { - _mimeTypeID = registry.registerMIMEType(_mimeType, std::make_unique>()); - } - - template - void SimpleFormat::unregisterFormat(FormatRegistry& registry) { - registry.unregisterMIMEType(_mimeTypeID); - _mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; - } -}; From edab74caa46dd34d467bb3174f115f44705c1a61 Mon Sep 17 00:00:00 2001 From: amantley Date: Tue, 4 Dec 2018 16:20:46 -0800 Subject: [PATCH 54/79] mapped the model joint names to hifi compliant joint names in FBX serializer --- libraries/animation/src/AnimSkeleton.cpp | 41 ++++++------------- libraries/animation/src/AnimSkeleton.h | 3 +- .../src/avatars-renderer/Avatar.cpp | 7 ---- libraries/fbx/src/FBXSerializer.cpp | 37 +++++++++-------- libraries/hfm/src/hfm/HFM.h | 2 +- 5 files changed, 34 insertions(+), 56 deletions(-) diff --git a/libraries/animation/src/AnimSkeleton.cpp b/libraries/animation/src/AnimSkeleton.cpp index 36664a41fe..16c2c1cc7e 100644 --- a/libraries/animation/src/AnimSkeleton.cpp +++ b/libraries/animation/src/AnimSkeleton.cpp @@ -23,8 +23,6 @@ AnimSkeleton::AnimSkeleton(const HFMModel& hfmModel) { for (auto& joint : hfmModel.joints) { joints.push_back(joint); } - - _fbxToHifiJointNameMapping = hfmModel.fbxToHifiJointNameMapping; buildSkeletonFromJoints(joints, hfmModel.jointRotationOffsets); // we make a copy of the inverseBindMatrices in order to prevent mutating the model bind pose @@ -61,14 +59,8 @@ AnimSkeleton::AnimSkeleton(const std::vector& joints, const QMap AnimSkeleton::getChildrenOfJoint(int jointIndex) const { return result; } -const QString AnimSkeleton::getJointName(int jointIndex) const { - - QString jointName = _joints[jointIndex].name; - if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { - jointName = _fbxToHifiJointNameMapping.key(jointName); - } - return jointName; +const QString& AnimSkeleton::getJointName(int jointIndex) const { + return _joints[jointIndex].name; } AnimPose AnimSkeleton::getAbsolutePose(int jointIndex, const AnimPoseVec& relativePoses) const { @@ -258,25 +245,21 @@ void AnimSkeleton::buildSkeletonFromJoints(const std::vector& joints, _nonMirroredIndices.clear(); _mirrorMap.reserve(_jointsSize); for (int i = 0; i < _jointsSize; i++) { - QString jointName = _joints[i].name; - if (_fbxToHifiJointNameMapping.contains(_fbxToHifiJointNameMapping.key(jointName))) { - jointName = _fbxToHifiJointNameMapping.key(jointName); - } - if (jointName != "Hips" && jointName != "Spine" && - jointName != "Spine1" && jointName != "Spine2" && - jointName != "Neck" && jointName != "Head" && - !((jointName.startsWith("Left") || jointName.startsWith("Right")) && - jointName != "LeftEye" && jointName != "RightEye")) { + if (_joints[i].name != "Hips" && _joints[i].name != "Spine" && + _joints[i].name != "Spine1" && _joints[i].name != "Spine2" && + _joints[i].name != "Neck" && _joints[i].name != "Head" && + !((_joints[i].name.startsWith("Left") || _joints[i].name.startsWith("Right")) && + _joints[i].name != "LeftEye" && _joints[i].name != "RightEye")) { // HACK: we don't want to mirror some joints so we remember their indices // so we can restore them after a future mirror operation _nonMirroredIndices.push_back(i); } int mirrorJointIndex = -1; - if (jointName.startsWith("Left")) { - QString mirrorJointName = QString(jointName).replace(0, 4, "Right"); + if (_joints[i].name.startsWith("Left")) { + QString mirrorJointName = QString(_joints[i].name).replace(0, 4, "Right"); mirrorJointIndex = nameToJointIndex(mirrorJointName); - } else if (jointName.startsWith("Right")) { - QString mirrorJointName = QString(jointName).replace(0, 5, "Left"); + } else if (_joints[i].name.startsWith("Right")) { + QString mirrorJointName = QString(_joints[i].name).replace(0, 5, "Left"); mirrorJointIndex = nameToJointIndex(mirrorJointName); } if (mirrorJointIndex >= 0) { diff --git a/libraries/animation/src/AnimSkeleton.h b/libraries/animation/src/AnimSkeleton.h index 777cb61302..14f39eedbc 100644 --- a/libraries/animation/src/AnimSkeleton.h +++ b/libraries/animation/src/AnimSkeleton.h @@ -27,7 +27,7 @@ public: explicit AnimSkeleton(const std::vector& joints, const QMap jointOffsets); int nameToJointIndex(const QString& jointName) const; - const QString getJointName(int jointIndex) const; + const QString& getJointName(int jointIndex) const; int getNumJoints() const; int getChainDepth(int jointIndex) const; @@ -79,7 +79,6 @@ protected: std::vector _mirrorMap; QHash _jointIndicesByName; std::vector> _clusterBindMatrixOriginalValues; - QMap _fbxToHifiJointNameMapping; // no copies AnimSkeleton(const AnimSkeleton&) = delete; diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index f3017049a7..fceb146470 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1437,13 +1437,6 @@ int Avatar::getJointIndex(const QString& name) const { withValidJointIndicesCache([&]() { if (_modelJointIndicesCache.contains(name)) { result = _modelJointIndicesCache[name] - 1; - } else { - // doesn't contain name. check the fbx-to-hifi joint name mapping - if (_skeletonModel && _skeletonModel->isActive()) { - if (_modelJointIndicesCache.contains(_skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name])) { - result = _modelJointIndicesCache[_skeletonModel->getHFMModel().fbxToHifiJointNameMapping[name]] - 1; - } - } } }); return result; diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index cfdf596b98..1581204819 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -419,15 +419,15 @@ QByteArray fileOnUrl(const QByteArray& filepath, const QString& url) { QMap getJointNameMapping(const QVariantHash& mapping) { static const QString JOINT_NAME_MAPPING_FIELD = "jointMap"; - QMap fbxToHifiJointNameMap; + QMap hfmToHifiJointNameMap; if (!mapping.isEmpty() && mapping.contains(JOINT_NAME_MAPPING_FIELD) && mapping[JOINT_NAME_MAPPING_FIELD].type() == QVariant::Hash) { auto jointNames = mapping[JOINT_NAME_MAPPING_FIELD].toHash(); for (auto itr = jointNames.begin(); itr != jointNames.end(); itr++) { - fbxToHifiJointNameMap.insert(itr.key(), itr.value().toString()); - qCDebug(modelformat) << "the mapped key " << itr.key() << " has a value of " << fbxToHifiJointNameMap[itr.key()]; + hfmToHifiJointNameMap.insert(itr.key(), itr.value().toString()); + qCDebug(modelformat) << "the mapped key " << itr.key() << " has a value of " << hfmToHifiJointNameMap[itr.key()]; } } - return fbxToHifiJointNameMap; + return hfmToHifiJointNameMap; } QMap getJointRotationOffsets(const QVariantHash& mapping) { @@ -530,8 +530,8 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr HFMModel& hfmModel = *hfmModelPtr; hfmModel.originalURL = url; - hfmModel.fbxToHifiJointNameMapping.clear(); - hfmModel.fbxToHifiJointNameMapping = getJointNameMapping(mapping); + hfmModel.hfmToHifiJointNameMapping.clear(); + hfmModel.hfmToHifiJointNameMapping = getJointNameMapping(mapping); float unitScaleFactor = 1.0f; glm::vec3 ambientColor; @@ -600,31 +600,31 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr hifiGlobalNodeID = id; } - if (name == jointEyeLeftName || name == "EyeL" || name == "joint_Leye" || (hfmModel.fbxToHifiJointNameMapping.contains(jointEyeLeftName) && (name == hfmModel.fbxToHifiJointNameMapping[jointEyeLeftName]))) { + if (name == jointEyeLeftName || name == "EyeL" || name == "joint_Leye" || (hfmModel.hfmToHifiJointNameMapping.contains(jointEyeLeftName) && (name == hfmModel.hfmToHifiJointNameMapping[jointEyeLeftName]))) { jointEyeLeftID = getID(object.properties); - } else if (name == jointEyeRightName || name == "EyeR" || name == "joint_Reye" || (hfmModel.fbxToHifiJointNameMapping.contains(jointEyeRightName) && (name == hfmModel.fbxToHifiJointNameMapping[jointEyeRightName]))) { + } else if (name == jointEyeRightName || name == "EyeR" || name == "joint_Reye" || (hfmModel.hfmToHifiJointNameMapping.contains(jointEyeRightName) && (name == hfmModel.hfmToHifiJointNameMapping[jointEyeRightName]))) { jointEyeRightID = getID(object.properties); - } else if (name == jointNeckName || name == "NeckRot" || name == "joint_neck" || (hfmModel.fbxToHifiJointNameMapping.contains(jointNeckName) && (name == hfmModel.fbxToHifiJointNameMapping[jointNeckName]))) { + } else if (name == jointNeckName || name == "NeckRot" || name == "joint_neck" || (hfmModel.hfmToHifiJointNameMapping.contains(jointNeckName) && (name == hfmModel.hfmToHifiJointNameMapping[jointNeckName]))) { jointNeckID = getID(object.properties); - } else if (name == jointRootName || (hfmModel.fbxToHifiJointNameMapping.contains(jointRootName) && (name == hfmModel.fbxToHifiJointNameMapping[jointRootName]))) { + } else if (name == jointRootName || (hfmModel.hfmToHifiJointNameMapping.contains(jointRootName) && (name == hfmModel.hfmToHifiJointNameMapping[jointRootName]))) { jointRootID = getID(object.properties); - } else if ((name == jointHeadName) || (hfmModel.fbxToHifiJointNameMapping.contains(jointHeadName) && (name == hfmModel.fbxToHifiJointNameMapping[jointHeadName]))) { + } else if ((name == jointHeadName) || (hfmModel.hfmToHifiJointNameMapping.contains(jointHeadName) && (name == hfmModel.hfmToHifiJointNameMapping[jointHeadName]))) { jointHeadID = getID(object.properties); - } else if (name == jointLeftHandName || name == "LeftHand" || name == "joint_L_hand" || (hfmModel.fbxToHifiJointNameMapping.contains(jointLeftHandName) && (name == hfmModel.fbxToHifiJointNameMapping[jointLeftHandName]))) { + } else if (name == jointLeftHandName || name == "LeftHand" || name == "joint_L_hand" || (hfmModel.hfmToHifiJointNameMapping.contains(jointLeftHandName) && (name == hfmModel.hfmToHifiJointNameMapping[jointLeftHandName]))) { jointLeftHandID = getID(object.properties); - } else if (name == jointRightHandName || name == "RightHand" || name == "joint_R_hand" || (hfmModel.fbxToHifiJointNameMapping.contains(jointRightHandName) && (name == hfmModel.fbxToHifiJointNameMapping[jointRightHandName]))) { + } else if (name == jointRightHandName || name == "RightHand" || name == "joint_R_hand" || (hfmModel.hfmToHifiJointNameMapping.contains(jointRightHandName) && (name == hfmModel.hfmToHifiJointNameMapping[jointRightHandName]))) { jointRightHandID = getID(object.properties); - } else if (name == "LeftToe" || name == "joint_L_toe" || name == "LeftToe_End" || (hfmModel.fbxToHifiJointNameMapping.contains("LeftToe") && (name == hfmModel.fbxToHifiJointNameMapping["LeftToe"]))) { + } else if (name == "LeftToe" || name == "joint_L_toe" || name == "LeftToe_End" || (hfmModel.hfmToHifiJointNameMapping.contains("LeftToe") && (name == hfmModel.hfmToHifiJointNameMapping["LeftToe"]))) { jointLeftToeID = getID(object.properties); - } else if (name == "RightToe" || name == "joint_R_toe" || name == "RightToe_End" || (hfmModel.fbxToHifiJointNameMapping.contains("RightToe") && (name == hfmModel.fbxToHifiJointNameMapping["RightToe"]))) { + } else if (name == "RightToe" || name == "joint_R_toe" || name == "RightToe_End" || (hfmModel.hfmToHifiJointNameMapping.contains("RightToe") && (name == hfmModel.hfmToHifiJointNameMapping["RightToe"]))) { jointRightToeID = getID(object.properties); } @@ -1398,6 +1398,9 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr } joint.inverseBindRotation = joint.inverseDefaultRotation; joint.name = fbxModel.name; + if (hfmModel.hfmToHifiJointNameMapping.contains(hfmModel.hfmToHifiJointNameMapping.key(joint.name))) { + joint.name = hfmModel.hfmToHifiJointNameMapping.key(fbxModel.name); + } foreach (const QString& childID, _connectionChildMap.values(modelID)) { QString type = typeFlags.value(childID); @@ -1833,8 +1836,8 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr QString jointName = itr.key(); glm::quat rotationOffset = itr.value(); int jointIndex = hfmModel.getJointIndex(jointName); - if (hfmModel.fbxToHifiJointNameMapping.contains(jointName)) { - jointIndex = hfmModel.getJointIndex(hfmModel.fbxToHifiJointNameMapping[jointName]); + if (hfmModel.hfmToHifiJointNameMapping.contains(jointName)) { + jointIndex = hfmModel.getJointIndex(hfmModel.hfmToHifiJointNameMapping[jointName]); } if (jointIndex != -1) { hfmModel.jointRotationOffsets.insert(jointIndex, rotationOffset); diff --git a/libraries/hfm/src/hfm/HFM.h b/libraries/hfm/src/hfm/HFM.h index ff1b4fd01b..3cc12724d5 100644 --- a/libraries/hfm/src/hfm/HFM.h +++ b/libraries/hfm/src/hfm/HFM.h @@ -312,7 +312,7 @@ public: QList blendshapeChannelNames; QMap jointRotationOffsets; - QMap fbxToHifiJointNameMapping; + QMap hfmToHifiJointNameMapping; }; }; From aa952e91429af6ee05224aa5c9815c4e2f163be1 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 6 Dec 2018 15:24:03 +1300 Subject: [PATCH 55/79] Fix mini tablet visibility angle calculations --- scripts/system/miniTablet.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/system/miniTablet.js b/scripts/system/miniTablet.js index a933116dc8..780dacf85e 100644 --- a/scripts/system/miniTablet.js +++ b/scripts/system/miniTablet.js @@ -567,9 +567,7 @@ SHOWING_DELAY = 1000, // ms lastInvisible = [0, 0], HIDING_DELAY = 1000, // ms - lastVisible = [0, 0], - - HALF_PI = Math.PI / 2; + lastVisible = [0, 0]; function enterMiniDisabled() { @@ -608,8 +606,12 @@ handOrientation, miniPosition, miniToCameraDirection, + normalHandVector, medialHandVector, lateralHandVector, + normalDot, + medialDot, + lateralDot, medialAngle, lateralAngle, cameraToMini, @@ -664,14 +666,18 @@ miniToCameraDirection = Vec3.normalize(Vec3.subtract(Camera.position, miniPosition)); // Mini tablet aimed toward camera? - medialHandVector = Vec3.multiplyQbyV(handOrientation, Vec3.UNIT_NEG_Y); + medialHandVector = Vec3.multiplyQbyV(handOrientation, Vec3.UNIT_Y); lateralHandVector = Vec3.multiplyQbyV(handOrientation, hand === LEFT_HAND ? Vec3.UNIT_X : Vec3.UNIT_NEG_X); - medialAngle = Math.acos(Vec3.dot(medialHandVector, miniToCameraDirection)) - HALF_PI; - lateralAngle = Math.acos(Vec3.dot(lateralHandVector, miniToCameraDirection)) - HALF_PI; + normalHandVector = Vec3.multiplyQbyV(handOrientation, Vec3.UNIT_Z); + medialDot = Vec3.dot(medialHandVector, miniToCameraDirection); + lateralDot = Vec3.dot(lateralHandVector, miniToCameraDirection); + normalDot = Vec3.dot(normalHandVector, miniToCameraDirection); + medialAngle = Math.atan2(medialDot, normalDot); + lateralAngle = Math.atan2(lateralDot, normalDot); show = -MAX_MEDIAL_WRIST_CAMERA_ANGLE_RAD <= medialAngle && medialAngle <= MAX_MEDIAL_FINGER_CAMERA_ANGLE_RAD - && -MAX_LATERAL_PINKY_CAMERA_ANGLE_RAD <= lateralAngle - && lateralAngle <= MAX_LATERAL_THUMB_CAMERA_ANGLE_RAD; + && -MAX_LATERAL_THUMB_CAMERA_ANGLE_RAD <= lateralAngle + && lateralAngle <= MAX_LATERAL_PINKY_CAMERA_ANGLE_RAD; // Camera looking at mini tablet? cameraToMini = -Vec3.dot(miniToCameraDirection, Quat.getForward(Camera.orientation)); From 1171821fc9993d2cd510ffd34a3cd3ef88821068 Mon Sep 17 00:00:00 2001 From: David Back Date: Wed, 5 Dec 2018 17:39:15 -0800 Subject: [PATCH 56/79] unity avatar exporter plugin --- .../unity-avatar-exporter/Assets/Editor.meta | 8 + .../Assets/Editor/AvatarExporter.cs | 207 +++++++++ .../Assets/Editor/AvatarExporter.cs.meta | 11 + .../unity-avatar-exporter/Assets/Scenes.meta | 8 + .../Assets/Scenes/SampleScene.unity | 258 +++++++++++ .../Assets/Scenes/SampleScene.unity.meta | 7 + .../Unity.PackageManagerUI.Editor.csproj | 402 +++++++++++++++++ .../Unity.TextMeshPro.Editor.csproj | 403 ++++++++++++++++++ .../Unity.TextMeshPro.csproj | 400 +++++++++++++++++ .../UnityEditor.StandardEvents.csproj | 359 ++++++++++++++++ .../avatarExporter.unitypackage | Bin 0 -> 2836 bytes tools/unity-avatar-exporter/packager.bat | 1 + .../unity-avatar-exporter.Editor.csproj | 386 +++++++++++++++++ .../unity-avatar-exporter.sln | 44 ++ 14 files changed, 2494 insertions(+) create mode 100644 tools/unity-avatar-exporter/Assets/Editor.meta create mode 100644 tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs create mode 100644 tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs.meta create mode 100644 tools/unity-avatar-exporter/Assets/Scenes.meta create mode 100644 tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity create mode 100644 tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity.meta create mode 100644 tools/unity-avatar-exporter/Unity.PackageManagerUI.Editor.csproj create mode 100644 tools/unity-avatar-exporter/Unity.TextMeshPro.Editor.csproj create mode 100644 tools/unity-avatar-exporter/Unity.TextMeshPro.csproj create mode 100644 tools/unity-avatar-exporter/UnityEditor.StandardEvents.csproj create mode 100644 tools/unity-avatar-exporter/avatarExporter.unitypackage create mode 100644 tools/unity-avatar-exporter/packager.bat create mode 100644 tools/unity-avatar-exporter/unity-avatar-exporter.Editor.csproj create mode 100644 tools/unity-avatar-exporter/unity-avatar-exporter.sln diff --git a/tools/unity-avatar-exporter/Assets/Editor.meta b/tools/unity-avatar-exporter/Assets/Editor.meta new file mode 100644 index 0000000000..aac82b4258 --- /dev/null +++ b/tools/unity-avatar-exporter/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 51b3237a2992bd449a58ade16e52d0e0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs b/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs new file mode 100644 index 0000000000..60b5e0e643 --- /dev/null +++ b/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs @@ -0,0 +1,207 @@ +// AvatarExporter.cs +// +// Created by David Back on 28 Nov 2018 +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html + +using UnityEngine; +using UnityEditor; +using System; +using System.IO; +using System.Collections.Generic; + +public class AvatarExporter : MonoBehaviour { + public static Dictionary UNITY_TO_HIFI_JOINT_NAME = new Dictionary { + {"Chest", "Spine1"}, + {"Head", "Head"}, + {"Hips", "Hips"}, + {"Left Index Distal", "LeftHandIndex3"}, + {"Left Index Intermediate", "LeftHandIndex2"}, + {"Left Index Proximal", "LeftHandIndex1"}, + {"Left Little Distal", "LeftHandPinky3"}, + {"Left Little Intermediate", "LeftHandPinky2"}, + {"Left Little Proximal", "LeftHandPinky1"}, + {"Left Middle Distal", "LeftHandMiddle3"}, + {"Left Middle Intermediate", "LeftHandMiddle2"}, + {"Left Middle Proximal", "LeftHandMiddle1"}, + {"Left Ring Distal", "LeftHandRing3"}, + {"Left Ring Intermediate", "LeftHandRing2"}, + {"Left Ring Proximal", "LeftHandRing1"}, + {"Left Thumb Distal", "LeftHandThumb3"}, + {"Left Thumb Intermediate", "LeftHandThumb2"}, + {"Left Thumb Proximal", "LeftHandThumb1"}, + {"LeftEye", "LeftEye"}, + {"LeftFoot", "LeftFoot"}, + {"LeftHand", "LeftHand"}, + {"LeftLowerArm", "LeftForeArm"}, + {"LeftLowerLeg", "LeftLeg"}, + {"LeftShoulder", "LeftShoulder"}, + {"LeftToes", "LeftToeBase"}, + {"LeftUpperArm", "LeftArm"}, + {"LeftUpperLeg", "LeftUpLeg"}, + {"Neck", "Neck"}, + {"Right Index Distal", "RightHandIndex3"}, + {"Right Index Intermediate", "RightHandIndex2"}, + {"Right Index Proximal", "RightHandIndex1"}, + {"Right Little Distal", "RightHandPinky3"}, + {"Right Little Intermediate", "RightHandPinky2"}, + {"Right Little Proximal", "RightHandPinky1"}, + {"Right Middle Distal", "RightHandMiddle3"}, + {"Right Middle Intermediate", "RightHandMiddle2"}, + {"Right Middle Proximal", "RightHandMiddle1"}, + {"Right Ring Distal", "RightHandRing3"}, + {"Right Ring Intermediate", "RightHandRing2"}, + {"Right Ring Proximal", "RightHandRing1"}, + {"Right Thumb Distal", "RightHandThumb3"}, + {"Right Thumb Intermediate", "RightHandThumb2"}, + {"Right Thumb Proximal", "RightHandThumb1"}, + {"RightEye", "RightEye"}, + {"RightFoot", "RightFoot"}, + {"RightHand", "RightHand"}, + {"RightLowerArm", "RightForeArm"}, + {"RightLowerLeg", "RightLeg"}, + {"RightShoulder", "RightShoulder"}, + {"RightToes", "RightToeBase"}, + {"RightUpperArm", "RightArm"}, + {"RightUpperLeg", "RightUpLeg"}, + {"Spine", "Spine"}, + {"UpperChest", "Spine2"}, + }; + + public static string exportedPath = String.Empty; + + [MenuItem("High Fidelity/Export New Avatar")] + public static void ExportNewAvatar() { + ExportSelectedAvatar(false); + } + + [MenuItem("High Fidelity/Export New Avatar", true)] + private static bool ExportNewAvatarValidator() { + // only enable Export New Avatar option if we have an asset selected + string[] guids = Selection.assetGUIDs; + return guids.Length > 0; + } + + [MenuItem("High Fidelity/Update Avatar")] + public static void UpdateAvatar() { + ExportSelectedAvatar(true); + } + + [MenuItem("High Fidelity/Update Avatar", true)] + private static bool UpdateAvatarValidation() { + // only enable Update Avatar option if the selected avatar is the last one that was exported + if (exportedPath != String.Empty) { + string[] guids = Selection.assetGUIDs; + if (guids.Length > 0) { + string selectedAssetPath = AssetDatabase.GUIDToAssetPath(guids[0]); + string selectedAsset = Path.GetFileNameWithoutExtension(selectedAssetPath); + string exportedAsset = Path.GetFileNameWithoutExtension(exportedPath); + return exportedAsset == selectedAsset; + } + } + return false; + } + + public static void ExportSelectedAvatar(bool usePreviousPath) { + string assetPath = AssetDatabase.GUIDToAssetPath(Selection.assetGUIDs[0]); + if (assetPath.LastIndexOf(".fbx") == -1) { + EditorUtility.DisplayDialog("Error", "Please select an fbx avatar to export", "Ok"); + return; + } + ModelImporter importer = ModelImporter.GetAtPath(assetPath) as ModelImporter; + if (importer == null) { + EditorUtility.DisplayDialog("Error", "Please select a model", "Ok"); + return; + } + if (importer.animationType != ModelImporterAnimationType.Human) { + EditorUtility.DisplayDialog("Error", "Please set model's Animation Type to Humanoid", "Ok"); + return; + } + + // store joint mappings only for joints that exist in hifi and verify missing joints + HumanDescription humanDescription = importer.humanDescription; + HumanBone[] boneMap = humanDescription.human; + Dictionary jointMappings = new Dictionary(); + foreach (HumanBone bone in boneMap) { + string humanBone = bone.humanName; + string hifiJointName; + if (UNITY_TO_HIFI_JOINT_NAME.TryGetValue(humanBone, out hifiJointName)) { + jointMappings.Add(hifiJointName, bone.boneName); + } + } + if (!jointMappings.ContainsKey("Hips")) { + EditorUtility.DisplayDialog("Error", "There is no Hips bone in selected avatar", "Ok"); + return; + } + if (!jointMappings.ContainsKey("Spine")) { + EditorUtility.DisplayDialog("Error", "There is no Spine bone in selected avatar", "Ok"); + return; + } + if (!jointMappings.ContainsKey("Spine1")) { + EditorUtility.DisplayDialog("Error", "There is no Chest bone in selected avatar", "Ok"); + return; + } + if (!jointMappings.ContainsKey("Spine2")) { + // if there is no UpperChest (Spine2) bone then we remap Chest (Spine1) to Spine2 in hifi and skip Spine1 + jointMappings["Spine2"] = jointMappings["Spine1"]; + jointMappings.Remove("Spine1"); + } + + // open folder explorer defaulting to user documents folder to select target path if exporting new avatar, + // otherwise use previously exported path if updating avatar + string directoryPath; + string assetName = Path.GetFileNameWithoutExtension(assetPath); + if (!usePreviousPath || exportedPath == String.Empty) { + string documentsFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); + if (!SelectExportFolder(assetName, documentsFolder, out directoryPath)) { + return; + } + } else { + directoryPath = Path.GetDirectoryName(exportedPath) + "/"; + } + Directory.CreateDirectory(directoryPath); + + // delete any existing fst since we agreed to overwrite it + string fstPath = directoryPath + assetName + ".fst"; + if (File.Exists(fstPath)) { + File.Delete(fstPath); + } + + // write out core fields to top of fst file + File.WriteAllText(fstPath, "name = " + assetName + "\ntype = body+head\nscale = 1\nfilename = " + + assetName + ".fbx\n" + "texdir = textures\n"); + + // write out joint mappings to fst file + foreach (var jointMapping in jointMappings) { + File.AppendAllText(fstPath, "jointMap = " + jointMapping.Key + " = " + jointMapping.Value + "\n"); + } + + // delete any existing fbx since we agreed to overwrite it, and copy fbx over + string targetAssetPath = directoryPath + assetName + ".fbx"; + if (File.Exists(targetAssetPath)) { + File.Delete(targetAssetPath); + } + File.Copy(assetPath, targetAssetPath); + + exportedPath = targetAssetPath; + } + + public static bool SelectExportFolder(string assetName, string initialPath, out string directoryPath) { + string selectedPath = EditorUtility.OpenFolderPanel("Select export location", initialPath, ""); + if (selectedPath.Length == 0) { // folder selection cancelled + directoryPath = ""; + return false; + } + directoryPath = selectedPath + "/" + assetName + "/"; + if (Directory.Exists(directoryPath)) { + bool overwrite = EditorUtility.DisplayDialog("Error", "Directory " + assetName + + " already exists here, would you like to overwrite it?", "Yes", "No"); + if (!overwrite) { + SelectExportFolder(assetName, selectedPath, out directoryPath); + } + } + return true; + } +} diff --git a/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs.meta b/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs.meta new file mode 100644 index 0000000000..c71e4c396d --- /dev/null +++ b/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c7a34be82b3ae554ea097963914b083f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/tools/unity-avatar-exporter/Assets/Scenes.meta b/tools/unity-avatar-exporter/Assets/Scenes.meta new file mode 100644 index 0000000000..17072cfd6a --- /dev/null +++ b/tools/unity-avatar-exporter/Assets/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4f704ae4b4f98ae41a0bce26658850c1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity b/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity new file mode 100644 index 0000000000..6511ad2971 --- /dev/null +++ b/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity @@ -0,0 +1,258 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 10 + m_AtlasSize: 512 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 256 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &170076733 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 170076735} + - component: {fileID: 170076734} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &170076734 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170076733} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &170076735 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170076733} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &534669902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 534669905} + - component: {fileID: 534669904} + - component: {fileID: 534669903} + m_Layer: 0 + m_Name: Main Camera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &534669903 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_Enabled: 1 +--- !u!20 &534669904 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &534669905 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity.meta b/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity.meta new file mode 100644 index 0000000000..9531828bcd --- /dev/null +++ b/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 99c9720ab356a0642a771bea13969a05 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/tools/unity-avatar-exporter/Unity.PackageManagerUI.Editor.csproj b/tools/unity-avatar-exporter/Unity.PackageManagerUI.Editor.csproj new file mode 100644 index 0000000000..69a90a40fc --- /dev/null +++ b/tools/unity-avatar-exporter/Unity.PackageManagerUI.Editor.csproj @@ -0,0 +1,402 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D} + Library + Unity.PackageManagerUI.Editor + 512 + {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + .NETFramework + v3.5 + Unity Full v3.5 + + Editor:5 + StandaloneWindows64:19 + 2018.2.18f1 + + 4 + + + pdbonly + false + Temp\UnityVS_bin\Debug\ + Temp\UnityVS_obj\Debug\ + prompt + 4 + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + pdbonly + false + Temp\UnityVS_bin\Release\ + Temp\UnityVS_obj\Release\ + prompt + 4 + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + + + + + + + + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll + + + C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll + + + C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll + + + C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll + + + C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\mscorlib.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Core.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Runtime.Serialization.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.Linq.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.Lang.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\Boo.Lang.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/unity-avatar-exporter/Unity.TextMeshPro.Editor.csproj b/tools/unity-avatar-exporter/Unity.TextMeshPro.Editor.csproj new file mode 100644 index 0000000000..e73e797cbe --- /dev/null +++ b/tools/unity-avatar-exporter/Unity.TextMeshPro.Editor.csproj @@ -0,0 +1,403 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {3A848AB7-9891-EDDA-D555-BF184C2F81F4} + Library + Unity.TextMeshPro.Editor + 512 + {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + .NETFramework + v3.5 + Unity Full v3.5 + + Editor:5 + StandaloneWindows64:19 + 2018.2.18f1 + + 4 + + + pdbonly + false + Temp\UnityVS_bin\Debug\ + Temp\UnityVS_obj\Debug\ + prompt + 4 + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + pdbonly + false + Temp\UnityVS_bin\Release\ + Temp\UnityVS_obj\Release\ + prompt + 4 + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + + + + + + + + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll + + + C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll + + + C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll + + + C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll + + + C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\mscorlib.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Core.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Runtime.Serialization.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.Linq.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.Lang.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\Boo.Lang.dll + + + + + {07A21C90-D344-AE1A-8456-9910C203B41A} + Unity.TextMeshPro + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/unity-avatar-exporter/Unity.TextMeshPro.csproj b/tools/unity-avatar-exporter/Unity.TextMeshPro.csproj new file mode 100644 index 0000000000..971a6148b1 --- /dev/null +++ b/tools/unity-avatar-exporter/Unity.TextMeshPro.csproj @@ -0,0 +1,400 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {07A21C90-D344-AE1A-8456-9910C203B41A} + Library + Unity.TextMeshPro + 512 + {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + .NETFramework + v3.5 + Unity Subset v3.5 + + Game:1 + StandaloneWindows64:19 + 2018.2.18f1 + + 4 + + + pdbonly + false + Temp\UnityVS_bin\Debug\ + Temp\UnityVS_obj\Debug\ + prompt + 4 + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + pdbonly + false + Temp\UnityVS_bin\Release\ + Temp\UnityVS_obj\Release\ + prompt + 4 + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + + + + + + + + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll + + + C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll + + + C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll + + + C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll + + + C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\mscorlib.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.Core.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.Runtime.Serialization.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.Xml.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.Xml.Linq.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\UnityScript.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\UnityScript.Lang.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\Boo.Lang.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/unity-avatar-exporter/UnityEditor.StandardEvents.csproj b/tools/unity-avatar-exporter/UnityEditor.StandardEvents.csproj new file mode 100644 index 0000000000..6489fc514a --- /dev/null +++ b/tools/unity-avatar-exporter/UnityEditor.StandardEvents.csproj @@ -0,0 +1,359 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {6800202F-4402-D405-F8CB-03DC7BD78B92} + Library + UnityEditor.StandardEvents + 512 + {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + .NETFramework + v3.5 + Unity Full v3.5 + + Editor:5 + StandaloneWindows64:19 + 2018.2.18f1 + + 4 + + + pdbonly + false + Temp\UnityVS_bin\Debug\ + Temp\UnityVS_obj\Debug\ + prompt + 4 + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + pdbonly + false + Temp\UnityVS_bin\Release\ + Temp\UnityVS_obj\Release\ + prompt + 4 + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + + + + + + + + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll + + + C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll + + + C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll + + + C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll + + + C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\mscorlib.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Core.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Runtime.Serialization.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.Linq.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.Lang.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\Boo.Lang.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/unity-avatar-exporter/avatarExporter.unitypackage b/tools/unity-avatar-exporter/avatarExporter.unitypackage new file mode 100644 index 0000000000000000000000000000000000000000..afddc4498b7357fd9ebd188871140616118db852 GIT binary patch literal 2836 zcmV+v3+wbBiwFqrhzMK+0AX@tXmn+5a4vLVascgH+j84B5cRXZ0@X|9sY=}}JGSa} zoJele`jUz5b~=eC1Cfx0nj$zPXp2qrWqs%;^%uGTco7IvveVR^X@qG_3fNs7EEWd~ zlIeFQy>4$0clY+kM$ zL4HTh|C7wgXFmT^>XKs?%rXCo1R-VK0qWLnBI+EVb)iw4GS?x&kqD3j6qB$vBvTx@ zd_4DAz)5gWLx?Qk#>4LU5%!6s!`uMVL{kJ>)0{`!{JG-0p{}e^8-mo=tC}+XerhIP2-ow3} z33=9?^f2l7cL;9p@9ppQ_B%V1_OssfzsmnQyPN#)DazXUmpk#+KPs#FzuVdE_tNyJNMErgElFt}l~P>GvmhqYF#CK_G@1asn`NsNa0jymW$wr>&h zQ1=-+V|S?A?mSb1%#QGd_1~wI~#3t~@|F@@}X{2Fq1yTTH7i;*gWM{>vJl7b;#b z*M(FUu!q+7#3KQ<2eq0XO#lV5U06>AZ=(Zr$~^X*%)r4c3efu+f|6)JcyhQ5sWgd$ z_#5yZbk{`c`YpOT8(;qN?(+QI%klB}-4EyEv&(m9N2eonh&*z?LQ`~VQ;x&rs`Ds=W%>g3e2N>XfLQP|jUag6$RcZsT61h6c{i>sIPz=nS1Qbf?sDO3|r? zUWLjEc&fQurI_P0mC69V79nrK6V<&caT8ju)U8m;U=8;s*%$Qhx*}W!_SzqqSlsIAca2yZjxt)N(&kDg4a+31YVJiOr;Wl2_I$mrbNm} z`43Gd??UU(l*w2rmCI?#6wP@_RlvO|w#-a=g(;hIQ~JXsC)tv*Qzi=cXbf3sqpl_3 zEtPAcGjg9KpY`qQlAi7uWcW%JM3rP?JI@o7whICoE+9z+rq~V1_CSq7{CzZ-CgMRv zQb+-XT9RU#FyE~ZV>aiI8x9lx+e&-Z8%JL>QOTa zlOd(X5~shpM&e<3DEv*5wBC{$-(QV~;UE(a2#*3!30o(`yMa0S7PT{{toO>5@4%?n zPmhv&=-f!ZrYIf*VC|GB@#Xmt&RH=biH0#5;#8OUA7Rx>Ls<>SB@Q;k$q#dMkHc&g zq@4%@4Q*+Bp|6b;&__;e+C_0@Q?sV&Y%KEGYO-48y?Es@0Rpl_AD1j^SH|D8ueS#e zvI+Kt8XPbAF;#C(ex@8qkdGD|PP$?q3=oyJl}jIEJ5?x{)z?DN?4dpeUF}0HzblxL z?6SO$Di%h0{EJW(ubW;4L>#U|2^qat>#^Vm{NVX237KsA@{q~wStk(2G9x^nHtN=N zvZ!whhkV^BMv;2paK))ukrt#6zKi1_#V)&P)JH+URLGUsMc;_g!hJdnP+Lo~fP)Eh)x9LYiD!`lYW=~B8Ma$E33B68hNGH5gx9X@uD z%Wy30(YYk8%h)IAi^52cmRqft(HwjK5I9$uzYI}k8wulL&ZK>a;>QkXnQKD;L(s2` zde9U0eTeB$5%81+syZF$daM zmgsB?235iusfD-HSM{A*<@$J&g1bhCg_hLY*Mn+x>ou9PJCe^#(LGu=?86w;XES1# zc3A*7j{0f_jEP}Hp{QbZG$+8oi7+&z8y`&04eTW1vkY*Z+Utd`;J#$?np&5_x%U({ zpa}l=lQhVUv-B)86+wC~EG1To*^xs7=${3#*zyNuxsxQ9hvbhq&q?(NDkN&?_umVr z-iM_2x%ZBh^A6KjGb8Vg2Fw#}0-tJD37si$;S(Fyj}o#@<6&ww2b}{~38BhBl}01; zNV5n?(zx!=Y+;zot&*J)fy7u>(~T}o#W1ZGfb{$weTC|+dfB4Rlq~fYF#Fxmu@6eK z5eHnt#R)rB>4tn=2WuAc3!8|AjBf%$91+^=4nj1bAWivlU?nPQEQPUsm4}=dfdz7P zJ(@)LStHSP*nrkjH%pnJM4HL0OS2?WIfb^!x2BZ1P6)$*|9r%z0!~GEFOKJ}$75gR7*71v4BorF^+FrFqN?-O6ZUh}44zqvUYac4dUbKj z$pRb-`fvkbMnb6H9;_a)o?D7BXM;5pt2-QMObN`aGiT{s9Qi-%WWf$2 zMpV`$5~#$VIy0}0)X8F9q&DRqW5auIAuXE=g;30)TVk!I>c3NPY;hlOcLoTdAba)tTCBtuz9kj^2> zQu_CZ+o&r<$#|+)4Uy=_6oRzFy z&w{{w5@JlGsjm%P(R(q{T7@vns6CCfmAjLg#C$CrJ}~{vdNKH}hCa5`5q1Nh$7Jn> zNaT`DbT8frpqNF-rMINGbiWg5eo=1*&RD%{N6*B|cIK7az2^Rsz5W5`Ej8it32eHY zKKwhMKR@jIuYdRZ|K4uT`2N4MxB33-DawlP|JQ{^O?Ul zugMhFE07|Hzqyu1h#d*8JP#Z&i`q~}ZK3rZ4wGE)=XeO!n}0^|Ny@rOev + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {C03F9C15-54AA-E5FF-7017-7CEBE37FC988} + Library + Assembly-CSharp-Editor + 512 + {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + .NETFramework + v3.5 + Unity Full v3.5 + + Editor:5 + StandaloneWindows64:19 + 2018.2.18f1 + + 4 + + + pdbonly + false + Temp\UnityVS_bin\Debug\ + Temp\UnityVS_obj\Debug\ + prompt + 4 + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + pdbonly + false + Temp\UnityVS_bin\Release\ + Temp\UnityVS_obj\Release\ + prompt + 4 + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + + + + + + + + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll + + + C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll + + + C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/Editor/UnityEditor.TestRunner.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/UnityEngine.TestRunner.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/net35/unity-custom/nunit.framework.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll + + + C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll + + + C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll + + + C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll + + + C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll + + + C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\mscorlib.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Core.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Runtime.Serialization.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.Linq.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.Lang.dll + + + C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\Boo.Lang.dll + + + + + {6800202F-4402-D405-F8CB-03DC7BD78B92} + UnityEditor.StandardEvents + + + {3A848AB7-9891-EDDA-D555-BF184C2F81F4} + Unity.TextMeshPro.Editor + + + {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D} + Unity.PackageManagerUI.Editor + + + {07A21C90-D344-AE1A-8456-9910C203B41A} + Unity.TextMeshPro + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/unity-avatar-exporter/unity-avatar-exporter.sln b/tools/unity-avatar-exporter/unity-avatar-exporter.sln new file mode 100644 index 0000000000..9f608ed5c3 --- /dev/null +++ b/tools/unity-avatar-exporter/unity-avatar-exporter.sln @@ -0,0 +1,44 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2017 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.TextMeshPro", "Unity.TextMeshPro.csproj", "{07A21C90-D344-AE1A-8456-9910C203B41A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.PackageManagerUI.Editor", "Unity.PackageManagerUI.Editor.csproj", "{6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.TextMeshPro.Editor", "Unity.TextMeshPro.Editor.csproj", "{3A848AB7-9891-EDDA-D555-BF184C2F81F4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor.StandardEvents", "UnityEditor.StandardEvents.csproj", "{6800202F-4402-D405-F8CB-03DC7BD78B92}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "unity-avatar-exporter.Editor", "unity-avatar-exporter.Editor.csproj", "{C03F9C15-54AA-E5FF-7017-7CEBE37FC988}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {07A21C90-D344-AE1A-8456-9910C203B41A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07A21C90-D344-AE1A-8456-9910C203B41A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07A21C90-D344-AE1A-8456-9910C203B41A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07A21C90-D344-AE1A-8456-9910C203B41A}.Release|Any CPU.Build.0 = Release|Any CPU + {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}.Release|Any CPU.Build.0 = Release|Any CPU + {3A848AB7-9891-EDDA-D555-BF184C2F81F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A848AB7-9891-EDDA-D555-BF184C2F81F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A848AB7-9891-EDDA-D555-BF184C2F81F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A848AB7-9891-EDDA-D555-BF184C2F81F4}.Release|Any CPU.Build.0 = Release|Any CPU + {6800202F-4402-D405-F8CB-03DC7BD78B92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6800202F-4402-D405-F8CB-03DC7BD78B92}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6800202F-4402-D405-F8CB-03DC7BD78B92}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6800202F-4402-D405-F8CB-03DC7BD78B92}.Release|Any CPU.Build.0 = Release|Any CPU + {C03F9C15-54AA-E5FF-7017-7CEBE37FC988}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C03F9C15-54AA-E5FF-7017-7CEBE37FC988}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C03F9C15-54AA-E5FF-7017-7CEBE37FC988}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C03F9C15-54AA-E5FF-7017-7CEBE37FC988}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal From 37854ab05eb061961d83e5d10f5b4d71a2dd5c4a Mon Sep 17 00:00:00 2001 From: Luis Cuenca Date: Thu, 6 Dec 2018 11:58:48 -0800 Subject: [PATCH 57/79] Add jsdoc information --- libraries/entities/src/EntityScriptingInterface.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index ad1c11ba41..4b06d2d16b 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -980,7 +980,16 @@ public slots: */ // FIXME move to a renderable entity interface Q_INVOKABLE glm::vec3 getAbsoluteJointTranslationInObjectFrame(const QUuid& entityID, int jointIndex); + + /**jsdoc + * Get the index of the parent joint. + * @function Entities.getJointParent + * @param {Uuid} entityID - The ID of the entity. + * @param {number} index - The integer index of the joint. + * @returns {number} The index of the parent joint. + */ Q_INVOKABLE int getJointParent(const QUuid& entityID, int index); + /**jsdoc * Get the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and * orientation. From 6ea4769173d2000f92a0d9a1962a89d1591434dc Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 6 Dec 2018 13:38:57 -0800 Subject: [PATCH 58/79] Re-name MIMETypeLibrary to MediaTypeLibrary and update related references --- libraries/fbx/src/FBXSerializer.cpp | 12 ++--- libraries/fbx/src/GLTFSerializer.cpp | 12 ++--- libraries/fbx/src/OBJSerializer.cpp | 10 ++-- libraries/hfm/src/hfm/HFMFormatRegistry.cpp | 30 ++++++------ libraries/hfm/src/hfm/HFMFormatRegistry.h | 22 ++++----- libraries/hfm/src/hfm/HFMSimpleFormat.h | 14 +++--- .../src/model-networking/ModelLoader.cpp | 2 +- ...METypeLibrary.cpp => MediaTypeLibrary.cpp} | 44 ++++++++--------- .../{MIMETypeLibrary.h => MediaTypeLibrary.h} | 48 +++++++++---------- 9 files changed, 97 insertions(+), 97 deletions(-) rename libraries/shared/src/shared/{MIMETypeLibrary.cpp => MediaTypeLibrary.cpp} (53%) rename libraries/shared/src/shared/{MIMETypeLibrary.h => MediaTypeLibrary.h} (57%) diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index b57ff183a0..ccbda9af33 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -1834,14 +1834,14 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr return hfmModelPtr; } -MIMEType getFBXMIMEType() { - MIMEType mimeType("fbx"); - mimeType.extensions.push_back("fbx"); - mimeType.fileSignatures.emplace_back("Kaydara FBX Binary \x00", 0); - return mimeType; +MediaType getFBXMediaType() { + MediaType mediaType("fbx"); + mediaType.extensions.push_back("fbx"); + mediaType.fileSignatures.emplace_back("Kaydara FBX Binary \x00", 0); + return mediaType; } -std::shared_ptr FBXSerializer::FORMAT = std::make_shared>(getFBXMIMEType()); +std::shared_ptr FBXSerializer::FORMAT = std::make_shared>(getFBXMediaType()); HFMModel::Pointer FBXSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { QBuffer buffer(const_cast(&data)); diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index b841226a9e..cfa2124c5d 100644 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -906,14 +906,14 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const QUrl& url) { return true; } -MIMEType getGLTFMIMEType() { - MIMEType mimeType("gltf"); - mimeType.extensions.push_back("gltf"); - mimeType.webMediaTypes.push_back("model/gltf+json"); - return mimeType; +MediaType getGLTFMediaType() { + MediaType mediaType("gltf"); + mediaType.extensions.push_back("gltf"); + mediaType.webMediaTypes.push_back("model/gltf+json"); + return mediaType; } -std::shared_ptr GLTFSerializer::FORMAT = std::make_shared>(getGLTFMIMEType()); +std::shared_ptr GLTFSerializer::FORMAT = std::make_shared>(getGLTFMediaType()); HFMModel::Pointer GLTFSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { diff --git a/libraries/fbx/src/OBJSerializer.cpp b/libraries/fbx/src/OBJSerializer.cpp index 62b33e3690..b85ca7ebca 100644 --- a/libraries/fbx/src/OBJSerializer.cpp +++ b/libraries/fbx/src/OBJSerializer.cpp @@ -652,13 +652,13 @@ done: return result; } -MIMEType getOBJMIMEType() { - MIMEType mimeType("obj"); - mimeType.extensions.push_back("obj"); - return mimeType; +MediaType getOBJMediaType() { + MediaType mediaType("obj"); + mediaType.extensions.push_back("obj"); + return mediaType; } -std::shared_ptr OBJSerializer::FORMAT = std::make_shared>(getOBJMIMEType()); +std::shared_ptr OBJSerializer::FORMAT = std::make_shared>(getOBJMediaType()); HFMModel::Pointer OBJSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { PROFILE_RANGE_EX(resource_parse, __FUNCTION__, 0xffff0000, nullptr); diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp index 8ff11d851d..60606bc018 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp @@ -13,53 +13,53 @@ namespace hfm { -FormatRegistry::MIMETypeID FormatRegistry::registerMIMEType(const MIMEType& mimeType, std::unique_ptr supportedFactory) { +FormatRegistry::MediaTypeID FormatRegistry::registerMediaType(const MediaType& mediaType, std::unique_ptr supportedFactory) { std::lock_guard lock(_libraryLock); - MIMETypeID id = _mimeTypeLibrary.registerMIMEType(mimeType); + MediaTypeID id = _mediaTypeLibrary.registerMediaType(mediaType); _supportedFormats.emplace_back(id, supportedFactory); return id; } -void FormatRegistry::unregisterMIMEType(const MIMETypeID& mimeTypeID) { +void FormatRegistry::unregisterMediaType(const MediaTypeID& mediaTypeID) { std::lock_guard lock(_libraryLock); for (auto it = _supportedFormats.begin(); it != _supportedFormats.end(); it++) { - if ((*it).mimeTypeID == mimeTypeID) { + if ((*it).mediaTypeID == mediaTypeID) { _supportedFormats.erase(it); break; } } - _mimeTypeLibrary.unregisterMIMEType(mimeTypeID); + _mediaTypeLibrary.unregisterMediaType(mediaTypeID); } -std::shared_ptr FormatRegistry::getSerializerForMIMETypeID(FormatRegistry::MIMETypeID mimeTypeID) const { +std::shared_ptr FormatRegistry::getSerializerForMediaTypeID(FormatRegistry::MediaTypeID mediaTypeID) const { // TODO: shared_lock in C++14 std::lock_guard lock(*const_cast(&_libraryLock)); for (auto it = _supportedFormats.begin(); it != _supportedFormats.end(); it++) { - if ((*it).mimeTypeID == mimeTypeID) { + if ((*it).mediaTypeID == mediaTypeID) { return (*it).factory->get(); } } return std::shared_ptr(); } -std::shared_ptr FormatRegistry::getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const { - MIMETypeID id; +std::shared_ptr FormatRegistry::getSerializerForMediaType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const { + MediaTypeID id; { // TODO: shared_lock in C++14 std::lock_guard lock(*const_cast(&_libraryLock)); - id = _mimeTypeLibrary.findMIMETypeForData(data); - if (id == INVALID_MIME_TYPE_ID) { - id = _mimeTypeLibrary.findMIMETypeForURL(url); + id = _mediaTypeLibrary.findMediaTypeForData(data); + if (id == INVALID_MEDIA_TYPE_ID) { + id = _mediaTypeLibrary.findMediaTypeForURL(url); } - if (id == INVALID_MIME_TYPE_ID) { - id = _mimeTypeLibrary.findMIMETypeForMediaType(webMediaType); + if (id == INVALID_MEDIA_TYPE_ID) { + id = _mediaTypeLibrary.findMediaTypeForWebID(webMediaType); } } - return getSerializerForMIMETypeID(id); + return getSerializerForMediaTypeID(id); } }; diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.h b/libraries/hfm/src/hfm/HFMFormatRegistry.h index 92076e814c..203c5f5743 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.h +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.h @@ -13,32 +13,32 @@ #define hifi_HFMFormatRegistry_h #include "HFMSerializer.h" -#include +#include #include namespace hfm { class FormatRegistry { public: - using MIMETypeID = MIMETypeLibrary::ID; - static const MIMETypeID INVALID_MIME_TYPE_ID { MIMETypeLibrary::INVALID_ID }; + using MediaTypeID = MediaTypeLibrary::ID; + static const MediaTypeID INVALID_MEDIA_TYPE_ID { MediaTypeLibrary::INVALID_ID }; - MIMETypeID registerMIMEType(const MIMEType& mimeType, std::unique_ptr supportedFactory); - void unregisterMIMEType(const MIMETypeID& id); + MediaTypeID registerMediaType(const MediaType& mediaType, std::unique_ptr supportedFactory); + void unregisterMediaType(const MediaTypeID& id); - std::shared_ptr getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const; - std::shared_ptr getSerializerForMIMETypeID(MIMETypeID id) const; + std::shared_ptr getSerializerForMediaType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const; + std::shared_ptr getSerializerForMediaTypeID(MediaTypeID id) const; protected: - MIMETypeLibrary _mimeTypeLibrary; + MediaTypeLibrary _mediaTypeLibrary; std::mutex _libraryLock; class SupportedFormat { public: - SupportedFormat(const MIMETypeID& mimeTypeID, std::unique_ptr& factory) : - mimeTypeID(mimeTypeID), + SupportedFormat(const MediaTypeID& mediaTypeID, std::unique_ptr& factory) : + mediaTypeID(mediaTypeID), factory(std::move(factory)) { } - MIMETypeID mimeTypeID; + MediaTypeID mediaTypeID; std::unique_ptr factory; }; std::vector _supportedFormats; diff --git a/libraries/hfm/src/hfm/HFMSimpleFormat.h b/libraries/hfm/src/hfm/HFMSimpleFormat.h index c12a7233bf..0ab6636e7d 100644 --- a/libraries/hfm/src/hfm/HFMSimpleFormat.h +++ b/libraries/hfm/src/hfm/HFMSimpleFormat.h @@ -26,21 +26,21 @@ namespace hfm { template // T is an implementation of hfm::Serializer class SimpleFormat : public Format { public: - SimpleFormat(const MIMEType& mimeType) : Format(), - _mimeType(mimeType) { + SimpleFormat(const MediaType& mediaType) : Format(), + _mediaType(mediaType) { } void registerFormat(FormatRegistry& registry) override { - _mimeTypeID = registry.registerMIMEType(_mimeType, std::make_unique>()); + _mediaTypeID = registry.registerMediaType(_mediaType, std::make_unique>()); } void unregisterFormat(FormatRegistry& registry) override { - registry.unregisterMIMEType(_mimeTypeID); - _mimeTypeID = hfm::FormatRegistry::INVALID_MIME_TYPE_ID; + registry.unregisterMediaType(_mediaTypeID); + _mediaTypeID = hfm::FormatRegistry::INVALID_MEDIA_TYPE_ID; } protected: - MIMEType _mimeType; - hfm::FormatRegistry::MIMETypeID _mimeTypeID; + MediaType _mediaType; + hfm::FormatRegistry::MediaTypeID _mediaTypeID; }; }; diff --git a/libraries/model-networking/src/model-networking/ModelLoader.cpp b/libraries/model-networking/src/model-networking/ModelLoader.cpp index a69559ad38..1ef8e8ae85 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.cpp +++ b/libraries/model-networking/src/model-networking/ModelLoader.cpp @@ -16,7 +16,7 @@ hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { - auto serializer = DependencyManager::get()->getSerializerForMIMEType(data, url, webMediaType); + auto serializer = DependencyManager::get()->getSerializerForMediaType(data, url, webMediaType); if (!serializer) { return hfm::Model::Pointer(); } diff --git a/libraries/shared/src/shared/MIMETypeLibrary.cpp b/libraries/shared/src/shared/MediaTypeLibrary.cpp similarity index 53% rename from libraries/shared/src/shared/MIMETypeLibrary.cpp rename to libraries/shared/src/shared/MediaTypeLibrary.cpp index 5ae4016c54..790897c3e2 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.cpp +++ b/libraries/shared/src/shared/MediaTypeLibrary.cpp @@ -1,5 +1,5 @@ // -// MIMETypeLibrary.cpp +// MediaTypeLibrary.cpp // libraries/shared/src/shared // // Created by Sabrina Shanman on 2018/11/29. @@ -9,41 +9,41 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "MIMETypeLibrary.h" +#include "MediaTypeLibrary.h" -MIMEType MIMEType::NONE = MIMEType(""); +MediaType MediaType::NONE = MediaType(""); -MIMETypeLibrary::ID MIMETypeLibrary::registerMIMEType(const MIMEType& mimeType) { +MediaTypeLibrary::ID MediaTypeLibrary::registerMediaType(const MediaType& mediaType) { ID id = nextID++; - _mimeTypes.emplace_back(id, mimeType); + _mediaTypes.emplace_back(id, mediaType); return id; } -void MIMETypeLibrary::unregisterMIMEType(const MIMETypeLibrary::ID& id) { - for (auto it = _mimeTypes.begin(); it != _mimeTypes.end(); it++) { +void MediaTypeLibrary::unregisterMediaType(const MediaTypeLibrary::ID& id) { + for (auto it = _mediaTypes.begin(); it != _mediaTypes.end(); it++) { if ((*it).id == id) { - _mimeTypes.erase(it); + _mediaTypes.erase(it); break; } } } -MIMEType MIMETypeLibrary::getMIMEType(const MIMETypeLibrary::ID& id) const { - for (auto& supportedFormat : _mimeTypes) { +MediaType MediaTypeLibrary::getMediaType(const MediaTypeLibrary::ID& id) const { + for (auto& supportedFormat : _mediaTypes) { if (supportedFormat.id == id) { - return supportedFormat.mimeType; + return supportedFormat.mediaType; } } - return MIMEType::NONE; + return MediaType::NONE; } -MIMETypeLibrary::ID MIMETypeLibrary::findMIMETypeForData(const hifi::ByteArray& data) const { +MediaTypeLibrary::ID MediaTypeLibrary::findMediaTypeForData(const hifi::ByteArray& data) const { // Check file contents - for (auto& mimeType : _mimeTypes) { - for (auto& fileSignature : mimeType.mimeType.fileSignatures) { + for (auto& mediaType : _mediaTypes) { + for (auto& fileSignature : mediaType.mediaType.fileSignatures) { auto testBytes = data.mid(fileSignature.byteOffset, (int)fileSignature.bytes.size()).toStdString(); if (testBytes == fileSignature.bytes) { - return mimeType.id; + return mediaType.id; } } } @@ -51,14 +51,14 @@ MIMETypeLibrary::ID MIMETypeLibrary::findMIMETypeForData(const hifi::ByteArray& return INVALID_ID; } -MIMETypeLibrary::ID MIMETypeLibrary::findMIMETypeForURL(const hifi::URL& url) const { +MediaTypeLibrary::ID MediaTypeLibrary::findMediaTypeForURL(const hifi::URL& url) const { // Check file extension std::string urlString = url.path().toStdString(); std::size_t extensionSeparator = urlString.rfind('.'); if (extensionSeparator != std::string::npos) { std::string detectedExtension = urlString.substr(extensionSeparator + 1); - for (auto& supportedFormat : _mimeTypes) { - for (auto& extension : supportedFormat.mimeType.extensions) { + for (auto& supportedFormat : _mediaTypes) { + for (auto& extension : supportedFormat.mediaType.extensions) { if (extension == detectedExtension) { return supportedFormat.id; } @@ -69,11 +69,11 @@ MIMETypeLibrary::ID MIMETypeLibrary::findMIMETypeForURL(const hifi::URL& url) co return INVALID_ID; } -MIMETypeLibrary::ID MIMETypeLibrary::findMIMETypeForMediaType(const std::string& webMediaType) const { +MediaTypeLibrary::ID MediaTypeLibrary::findMediaTypeForWebID(const std::string& webMediaType) const { // Check web media type if (webMediaType != "") { - for (auto& supportedFormat : _mimeTypes) { - for (auto& candidateWebMediaType : supportedFormat.mimeType.webMediaTypes) { + for (auto& supportedFormat : _mediaTypes) { + for (auto& candidateWebMediaType : supportedFormat.mediaType.webMediaTypes) { if (candidateWebMediaType == webMediaType) { return supportedFormat.id; } diff --git a/libraries/shared/src/shared/MIMETypeLibrary.h b/libraries/shared/src/shared/MediaTypeLibrary.h similarity index 57% rename from libraries/shared/src/shared/MIMETypeLibrary.h rename to libraries/shared/src/shared/MediaTypeLibrary.h index 5066e859fb..c87da01fa1 100644 --- a/libraries/shared/src/shared/MIMETypeLibrary.h +++ b/libraries/shared/src/shared/MediaTypeLibrary.h @@ -1,5 +1,5 @@ // -// MIMETypeLibrary.h +// MediaTypeLibrary.h // libraries/shared/src/shared // // Created by Sabrina Shanman on 2018/11/28. @@ -9,8 +9,8 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#ifndef hifi_MIMETypeLibrary_h -#define hifi_MIMETypeLibrary_h +#ifndef hifi_MediaTypeLibrary_h +#define hifi_MediaTypeLibrary_h #include #include @@ -36,20 +36,20 @@ public: }; // A named file extension with a list of known ways to positively identify the file type -class MIMEType { +class MediaType { public: - MIMEType(const std::string& name) : + MediaType(const std::string& name) : name(name) { } - MIMEType() {}; - MIMEType(const MIMEType& mimeType) : - name(mimeType.name), - extensions(mimeType.extensions), - webMediaTypes(mimeType.webMediaTypes), - fileSignatures(mimeType.fileSignatures) { + MediaType() {}; + MediaType(const MediaType& mediaType) : + name(mediaType.name), + extensions(mediaType.extensions), + webMediaTypes(mediaType.webMediaTypes), + fileSignatures(mediaType.fileSignatures) { } - static MIMEType NONE; + static MediaType NONE; std::string name; std::vector extensions; @@ -57,34 +57,34 @@ public: std::vector fileSignatures; }; -class MIMETypeLibrary { +class MediaTypeLibrary { public: using ID = unsigned int; static const ID INVALID_ID { 0 }; - ID registerMIMEType(const MIMEType& mimeType); - void unregisterMIMEType(const ID& id); + ID registerMediaType(const MediaType& mediaType); + void unregisterMediaType(const ID& id); - MIMEType getMIMEType(const ID& id) const; + MediaType getMediaType(const ID& id) const; - ID findMIMETypeForData(const hifi::ByteArray& data) const; - ID findMIMETypeForURL(const hifi::URL& url) const; - ID findMIMETypeForMediaType(const std::string& webMediaType) const; + ID findMediaTypeForData(const hifi::ByteArray& data) const; + ID findMediaTypeForURL(const hifi::URL& url) const; + ID findMediaTypeForWebID(const std::string& webMediaType) const; protected: ID nextID { 1 }; class Entry { public: - Entry(const ID& id, const MIMEType& mimeType) : + Entry(const ID& id, const MediaType& mediaType) : id(id), - mimeType(mimeType) { + mediaType(mediaType) { } ID id; - MIMEType mimeType; + MediaType mediaType; }; - std::vector _mimeTypes; + std::vector _mediaTypes; }; -#endif // hifi_MIMETypeLibrary_h +#endif // hifi_MeidaTypeLibrary_h From ca0133a2a64420731dba8972ced4c46e7668ac2b Mon Sep 17 00:00:00 2001 From: amantley Date: Thu, 6 Dec 2018 16:24:06 -0800 Subject: [PATCH 59/79] put the lean joint back in --- libraries/fbx/src/FBXSerializer.cpp | 6 ++++++ libraries/fbx/src/GLTFSerializer.cpp | 1 + libraries/hfm/src/hfm/HFM.h | 1 + 3 files changed, 8 insertions(+) diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index 1581204819..37108ba5d2 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -482,6 +482,7 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr QString jointEyeRightName = "EyeRight"; QString jointNeckName = "Neck"; QString jointRootName = "Hips"; + QString jointLeanName = "Spine"; QString jointHeadName = "Head"; QString jointLeftHandName = "LeftHand"; QString jointRightHandName = "RightHand"; @@ -489,6 +490,7 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr QString jointEyeRightID; QString jointNeckID; QString jointRootID; + QString jointLeanID; QString jointHeadID; QString jointLeftHandID; QString jointRightHandID; @@ -612,6 +614,9 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr } else if (name == jointRootName || (hfmModel.hfmToHifiJointNameMapping.contains(jointRootName) && (name == hfmModel.hfmToHifiJointNameMapping[jointRootName]))) { jointRootID = getID(object.properties); + } else if (name == jointLeanName || (hfmModel.hfmToHifiJointNameMapping.contains(jointLeanName) && (name == hfmModel.hfmToHifiJointNameMapping[jointLeanName]))) { + jointLeanID = getID(object.properties); + } else if ((name == jointHeadName) || (hfmModel.hfmToHifiJointNameMapping.contains(jointHeadName) && (name == hfmModel.hfmToHifiJointNameMapping[jointHeadName]))) { jointHeadID = getID(object.properties); @@ -1449,6 +1454,7 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr hfmModel.rightEyeJointIndex = modelIDs.indexOf(jointEyeRightID); hfmModel.neckJointIndex = modelIDs.indexOf(jointNeckID); hfmModel.rootJointIndex = modelIDs.indexOf(jointRootID); + hfmModel.leanJointIndex = modelIDs.indexOf(jointLeanID); hfmModel.headJointIndex = modelIDs.indexOf(jointHeadID); hfmModel.leftHandJointIndex = modelIDs.indexOf(jointLeftHandID); hfmModel.rightHandJointIndex = modelIDs.indexOf(jointRightHandID); diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 5485f46905..28d377c605 100644 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -1186,6 +1186,7 @@ void GLTFSerializer::hfmDebugDump(const HFMModel& hfmModel) { qCDebug(modelformat) << " rightEyeJointIndex =" << hfmModel.rightEyeJointIndex; qCDebug(modelformat) << " neckJointIndex =" << hfmModel.neckJointIndex; qCDebug(modelformat) << " rootJointIndex =" << hfmModel.rootJointIndex; + qCDebug(modelformat) << " leanJointIndex =" << hfmModel.leanJointIndex; qCDebug(modelformat) << " headJointIndex =" << hfmModel.headJointIndex; qCDebug(modelformat) << " leftHandJointIndex" << hfmModel.leftHandJointIndex; qCDebug(modelformat) << " rightHandJointIndex" << hfmModel.rightHandJointIndex; diff --git a/libraries/hfm/src/hfm/HFM.h b/libraries/hfm/src/hfm/HFM.h index 3cc12724d5..de58d864b3 100644 --- a/libraries/hfm/src/hfm/HFM.h +++ b/libraries/hfm/src/hfm/HFM.h @@ -274,6 +274,7 @@ public: int rightEyeJointIndex = -1; int neckJointIndex = -1; int rootJointIndex = -1; + int leanJointIndex = -1; int headJointIndex = -1; int leftHandJointIndex = -1; int rightHandJointIndex = -1; From 0d419d4dcfe2f5ce80174769191f5bba5c51270c Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Thu, 6 Dec 2018 17:16:15 -0800 Subject: [PATCH 60/79] Pass on dropFaceTracking flag in ScriptableAvatar::toByteArrayStateful() --- assignment-client/src/avatars/ScriptableAvatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assignment-client/src/avatars/ScriptableAvatar.cpp b/assignment-client/src/avatars/ScriptableAvatar.cpp index bf5d87a6bf..bcc21116ec 100644 --- a/assignment-client/src/avatars/ScriptableAvatar.cpp +++ b/assignment-client/src/avatars/ScriptableAvatar.cpp @@ -26,7 +26,7 @@ ScriptableAvatar::ScriptableAvatar() { QByteArray ScriptableAvatar::toByteArrayStateful(AvatarDataDetail dataDetail, bool dropFaceTracking) { _globalPosition = getWorldPosition(); - return AvatarData::toByteArrayStateful(dataDetail); + return AvatarData::toByteArrayStateful(dataDetail, dropFaceTracking); } From 46017a70d1b01165eb3219a07344de6b8cd0c0f0 Mon Sep 17 00:00:00 2001 From: David Back Date: Thu, 6 Dec 2018 17:18:55 -0800 Subject: [PATCH 61/79] remove unneeded files and add unity project files to gitignore --- .gitignore | 5 + .../Unity.PackageManagerUI.Editor.csproj | 402 ----------------- .../Unity.TextMeshPro.Editor.csproj | 403 ------------------ .../Unity.TextMeshPro.csproj | 400 ----------------- .../UnityEditor.StandardEvents.csproj | 359 ---------------- .../avatarExporter.unitypackage | Bin 2836 -> 2828 bytes .../unity-avatar-exporter.Editor.csproj | 386 ----------------- .../unity-avatar-exporter.sln | 44 -- 8 files changed, 5 insertions(+), 1994 deletions(-) delete mode 100644 tools/unity-avatar-exporter/Unity.PackageManagerUI.Editor.csproj delete mode 100644 tools/unity-avatar-exporter/Unity.TextMeshPro.Editor.csproj delete mode 100644 tools/unity-avatar-exporter/Unity.TextMeshPro.csproj delete mode 100644 tools/unity-avatar-exporter/UnityEditor.StandardEvents.csproj delete mode 100644 tools/unity-avatar-exporter/unity-avatar-exporter.Editor.csproj delete mode 100644 tools/unity-avatar-exporter/unity-avatar-exporter.sln diff --git a/.gitignore b/.gitignore index 8d92fe770b..ef1a7b215e 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,8 @@ interface/resources/GPUCache/* # package lock file for JSDoc tool tools/jsdoc/package-lock.json + +# ignore unneeded unity project files for avatar exporter +tools/unity-avatar-exporter/Library +tools/unity-avatar-exporter/Packages +tools/unity-avatar-exporter/ProjectSettings diff --git a/tools/unity-avatar-exporter/Unity.PackageManagerUI.Editor.csproj b/tools/unity-avatar-exporter/Unity.PackageManagerUI.Editor.csproj deleted file mode 100644 index 69a90a40fc..0000000000 --- a/tools/unity-avatar-exporter/Unity.PackageManagerUI.Editor.csproj +++ /dev/null @@ -1,402 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20506 - 2.0 - {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D} - Library - Unity.PackageManagerUI.Editor - 512 - {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - .NETFramework - v3.5 - Unity Full v3.5 - - Editor:5 - StandaloneWindows64:19 - 2018.2.18f1 - - 4 - - - pdbonly - false - Temp\UnityVS_bin\Debug\ - Temp\UnityVS_obj\Debug\ - prompt - 4 - DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - pdbonly - false - Temp\UnityVS_bin\Release\ - Temp\UnityVS_obj\Release\ - prompt - 4 - TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - - - - - - - - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll - - - C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll - - - C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll - - - C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll - - - C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\mscorlib.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Core.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Runtime.Serialization.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.Linq.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.Lang.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\Boo.Lang.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/unity-avatar-exporter/Unity.TextMeshPro.Editor.csproj b/tools/unity-avatar-exporter/Unity.TextMeshPro.Editor.csproj deleted file mode 100644 index e73e797cbe..0000000000 --- a/tools/unity-avatar-exporter/Unity.TextMeshPro.Editor.csproj +++ /dev/null @@ -1,403 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20506 - 2.0 - {3A848AB7-9891-EDDA-D555-BF184C2F81F4} - Library - Unity.TextMeshPro.Editor - 512 - {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - .NETFramework - v3.5 - Unity Full v3.5 - - Editor:5 - StandaloneWindows64:19 - 2018.2.18f1 - - 4 - - - pdbonly - false - Temp\UnityVS_bin\Debug\ - Temp\UnityVS_obj\Debug\ - prompt - 4 - DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - pdbonly - false - Temp\UnityVS_bin\Release\ - Temp\UnityVS_obj\Release\ - prompt - 4 - TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - - - - - - - - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll - - - C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll - - - C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll - - - C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll - - - C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\mscorlib.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Core.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Runtime.Serialization.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.Linq.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.Lang.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\Boo.Lang.dll - - - - - {07A21C90-D344-AE1A-8456-9910C203B41A} - Unity.TextMeshPro - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/unity-avatar-exporter/Unity.TextMeshPro.csproj b/tools/unity-avatar-exporter/Unity.TextMeshPro.csproj deleted file mode 100644 index 971a6148b1..0000000000 --- a/tools/unity-avatar-exporter/Unity.TextMeshPro.csproj +++ /dev/null @@ -1,400 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20506 - 2.0 - {07A21C90-D344-AE1A-8456-9910C203B41A} - Library - Unity.TextMeshPro - 512 - {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - .NETFramework - v3.5 - Unity Subset v3.5 - - Game:1 - StandaloneWindows64:19 - 2018.2.18f1 - - 4 - - - pdbonly - false - Temp\UnityVS_bin\Debug\ - Temp\UnityVS_obj\Debug\ - prompt - 4 - DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - pdbonly - false - Temp\UnityVS_bin\Release\ - Temp\UnityVS_obj\Release\ - prompt - 4 - TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - - - - - - - - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll - - - C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll - - - C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll - - - C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll - - - C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\mscorlib.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.Core.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.Runtime.Serialization.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.Xml.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\System.Xml.Linq.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\UnityScript.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\UnityScript.Lang.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unity\Boo.Lang.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/unity-avatar-exporter/UnityEditor.StandardEvents.csproj b/tools/unity-avatar-exporter/UnityEditor.StandardEvents.csproj deleted file mode 100644 index 6489fc514a..0000000000 --- a/tools/unity-avatar-exporter/UnityEditor.StandardEvents.csproj +++ /dev/null @@ -1,359 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20506 - 2.0 - {6800202F-4402-D405-F8CB-03DC7BD78B92} - Library - UnityEditor.StandardEvents - 512 - {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - .NETFramework - v3.5 - Unity Full v3.5 - - Editor:5 - StandaloneWindows64:19 - 2018.2.18f1 - - 4 - - - pdbonly - false - Temp\UnityVS_bin\Debug\ - Temp\UnityVS_obj\Debug\ - prompt - 4 - DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - pdbonly - false - Temp\UnityVS_bin\Release\ - Temp\UnityVS_obj\Release\ - prompt - 4 - TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - - - - - - - - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll - - - C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll - - - C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll - - - C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll - - - C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\mscorlib.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Core.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Runtime.Serialization.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.Linq.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.Lang.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\Boo.Lang.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/unity-avatar-exporter/avatarExporter.unitypackage b/tools/unity-avatar-exporter/avatarExporter.unitypackage index afddc4498b7357fd9ebd188871140616118db852..e4f78ab6e99c8139e9192dcbf83574a94bafa823 100644 GIT binary patch delta 2522 zcmV<02_^QF7K|2uABzYG&&df~1OQ=jV`y|`ZE!AhVR8WNTitTwG!*W2o zcH2;x?j~ge{n?={471zWQEa6Vbu5o9w=v5;85cYfufUPypUAS4c3H{{L<6-Wopbc* z=;+gt?HzQcy>4$0clYWkG$AjnCA)RMr&~@6R-P-wo`=#CPxA*q;;3|uDP47Fs ze!JW2_xCy=*Xi~;ogFmTd4dv!90xmq;Qv`R&OZ)A!mS12c;{nFyVG7f|J^}9oB#Ge z%zwYT_iP6}$(;Pp=YK|Ba?FAS=0B1kq|7@&-P%n=oddKfG-@;EIwUv}0djz164pj! zh9j3x7CsAqI0+7F2$3b+c-TFk{z7aX9-#Lhpf(CgFv1)kAow98>_y}`E;+*sQmp$C z2NZi8s&}^Klb21C-10G>doV3KA73`D|8{3k;D5LuY}fx&6uElC*4Uw(1v}gFe=GJL z?)9hSd3V~wWH9Ix+}_{Yf7aXY^r!9Tz1hE&|8)m{+x+h-%EtMZJMqrnD(m^b+j%zV z74pAcZ?CuI|EDN_{{Ba+h0xI*1~-hCDsi*yu-0nTM8nH~U``w~jnN3-Q3t)i_AO!_ z>OMzj><)F?o##rB`EfvR=3G{xS8$7tsY6`K<0hJTww0P3(U1pp8VR$J2N@*dbApb1 zY{TV$gxbUlNfXI*RPNMAu`@^XB3F-9yvbI$#PR_p%$ z-onzL#e$obtBi)NMDj~vbj}xUtrmsC%#{Zy$KDO~$Z)kvZHsBuMI3Un(0^Hz^FqZ- z=DLvT0`}1QmUtwf_OMp-qbZ<3whQa2;B9n&fKHjmUXVFBm_-44Uqet54G2#Tml2gF zaS(q6-h=L%NL{~1S7(#UpWj`czk4+~p1k|+d~$aA?(FDvj1G}U?$>CFj*{}e{&G%2 zUT>oMg%4in)IT&=8eb9YK%2Z4TBsjFi@fSBCuGLa1m<@sXB@jACM#cI&yn@LDh2p| z3w~J;heGTbYTZh;*8yA7MM+Pc5|tCmxl2m0y{6u6+^f{kz!`eoO1%u7p;LzLlsZl+ zI@QptP+0>{HFv8Nb9|;!8NeSz$eZv)b+1a?gqACHE0i)=MTIg@m-A>bEkPygdsPaR zxMXX$N-aZXsFXk($HH=YYqlRVCRSg6cCSff)>nHnB~I8q9LIx2ZYLn{vqJEM+@ykV zYYJV=StQQ)N+|zrN?tM|I3T@$fy0skUirQT4sJ_@Qeeq%1KJs}Z=qRU^_CxC%P|;7 z)#j8_siFmeso1Sl%)-D_>X=F<@2KjWc&c^EA?DOmt(jpowMsCW>?5m9`Z1M%)`3** zB`8e>GS$jp<{Xr(U;?2teKER!}S3uxh2DtcK$f2OHw# zhdH{(VYUj=PK1GmwlqF})7M4{=p!dK?V>odsaex>HWvA8HCe6lUcB;{0s&c~k4u)d zE8}n4*So_9*#vt+4UU)mn5wrXKT!@O$j3_#CtWcQ28c@A%B7F7ohlT}>T98B_D~;# zuJ)mp-xbVAc3E9V6$_(0{za&Y*G;bjA`aJ~gpA&+^;qx&e(-#Mm4r+-eR;@a_N)^K zW0?`2&l+`WHeJ?tg+spV6r)HzaJb@BtVj#e2j9i!BH0t9ZU~ZE6ksVD6@@(aWQAoK1A_j z2eityA%G$17e+nk3Hv_8bf^e;#sXCzDk3FI3cN}^G^aBP0py@NcuqBo(SnBJSym#P z8dvB>B(wvnSbJWqI7FFSi)};Q%nP7%VBaZRPO%S)MR{p|AlF*+087CL% zs_+Pb=Yyz`VUmczCn>V>eFM!i`9mqG& zk#*TbK*PGp-I9GscZ+r8I1Npwsep?=(!^#e7EnLat-fR)$J7hICvihP{oDPx<#9PD z0TKJX$B?jGlg>jiC3x)0*nnAO-=6}sH1wpXJD&o!Jcc|e?5+vB)lvyy4l6$*p@!1h zl^}(X2YEYySO9ITN_2JwgDPQ-)WTcptNKo@a(%o>!Cj-nLQCrH>tVIJ^#fV3lhp?x z0<<8L_Xj{chh@2wB$tQek2uds^$02?YUsD$3a8$Or1rV@j+OHc(^oTN?~Vq{6Kw*Y zYE}uIDRAKv8`h5!vQFbslXD0p9j;8pD6JQO^!y!tf$FV#*`m&rEcF&J``ys74@;A@ z2qZ#kU?nPQEQPUsk%ycZfdz7PJ(@)LS!2<4*nrkjH%pn3M4HKLO0y(VIfb^!w`P>M zP6)$*|9r$|0_`snl9gZb#cqd z5*!Npa06jRLa5&zt{;tiH9?$P z+Z@aVS#9i^ym)V)6LJ$(E2cLEN-k<_IFrc%iY`~TjvUh(_?UT6FL*OQbr-~Vq4jhgssY4f-KaGn7kpuZAlr3aLrdVU}? zSg$~eApYiB8X-t<*7>D zEIYR9cAQ9V)cTT%?RGkeCj*g?g_UVTW{fNx$o~NxQXw_0LPYz0=;?+k>kt+BLoJ z^mf|aPJ5@<-`#3=y1jOH3-!02phO|Z!4@F+Jj>eo$6-jgH76WzeQarW+AHV3+uu?1 z-`?x*?sY+aN6!C~%*kgy|5NIcV;0OY|A_=4W!?em)@~x|9H4cfQJXT?A;FOdkOLHx zur?%99JzddJoj0^NpMg@h%Dg7!|wUyS7P(<0KNYJwNXfdA?El1!4DZ>&m+%q$r+xL zV%<+TpxEP3y|pQyysVq#mXG<&gK63N__A*Ow>$j;|L?RryPNg@6h*Gyur+chXTjE{ zd~U_w!@ZpedDfluFzNSq2yXB1?eF&XJ3Ev1v)=T7zsmnQyPN#)DazXUmpk#+KPs#F zzuVdE_tNyJNMErgElFt}l~P>GvmhqYF#CK_G@1asn`NsNa0 zjymW$wr>&hQ1=-+V|S?A?mSb1%#QcV|bZBXo#7a=$`T zbd;3$^%pY|@_G~1FMRMqr~aY2)cBHM2ioMd&_ewXTI5x4IU!Sy#xTDNIpf#`F8;s*%$Qhx*}W!_SzqqSlsIAca2yZjxt)N( z&kDg4a+3Hm9OWm1=adxddL3 zjZCEyfC(RE_ohV3Ncj&knDV57<$rR0bNmanTDYnc^dW9*Qa#Q-lBq!OD zu~Q}r_vKXPO1x+cS!koKCEzWUYoar9pCq64?dy`B?ighFN)|+wWMeze6O* zQqU>7CkV1_I81ozQ8NmYA*IF=r@y&I;$e6w{7sUy-jW*MUyX<1AQKM=j{;8#TPMW3 zfjRmXwKJ!z_sW&;z^K{e~?UX3-<@pfKSur7rhA|o9RG0Z5Vbw}Q zSq;Y}4mQNe4|8;n!)z6Qq@4%@4Q*+Bp|6b;&__;e+C_0@Q?sV&Y%KEGYO-48y?Es@ z0Rpl_AD1j^SH|D8ueS#evI+Kt8XPbAF;#C(ex@8qkdGD|PP$?q3=oyJl}jIEJ5?x{ z)z?DN?4dpeUF}0HzblxL?6SO$Di%h0{EJW(ubW;4L>#U|2^qbASL?Ch2mIjqDhZiv z`tp#;>{%xe#xf&3pEl~&bh4;#3x|B&DMpcc;BdvMSdkW_559}zA;m7cY1BtSz~rX) z$|Zm*@u%Q0u$V3!&JxE9!SmZXU^3@sP~z@W20W0yx!z2-bPf}#%`v#h2@`qAVp%pYaC=r(q{z0J3C6;5c>e-!j z8N{&CU|)?$BkQt>fQEIG+a>#u?iTCFaT=OVQvnx$q>1%ZETDd&TYbSij;R;^NaBWi z`nUaY%j0rnMgk)CdygSuC!L34O7Pf~u?DlszCQ(MY3NB&cRmGdc?@|{*j*ELtECda z99DirLJg(0EkOz)5At>ZF$daMmgsB?235iusfD-HSM{A*<@$J&g1bhCg_hLY*Mn+x z>ou9Plg$Sp0yHO+?*~9U2W7dFB$tQek2uds^$02?YUuah3#Z!~GEFOKJ}$75gR7*71v z4BorF^+FrFqN?-O6ZUh}44zqvUYac4dUbKj$pRb-`fv#YVMaoz-yW`zZ7#x+XUC)BRd=g?zq^YkBUD10n(prTu%cwn#wUv`H3N3#VXns*| z2F_T$Y)8+;%Xa3K+r8%glD+-`=Pfni@(FCZoId%iZ`~Ti<&-nhov$y&F z>nX~L@Bi0@MooORwEkOvIL`nN(BFu&)B{RSJ+H|W)+>-Ah`+g(Mu;5=t~?JMFpJty zM{S|?9uAXS@aK34)ti4t@JTMpx=DVL@Be#y#`pid&G-LLQnc^?TgGRgTbr^eo3bgJ Q^8YM<1L&^uivT_V0KfkAJpcdz diff --git a/tools/unity-avatar-exporter/unity-avatar-exporter.Editor.csproj b/tools/unity-avatar-exporter/unity-avatar-exporter.Editor.csproj deleted file mode 100644 index 8f91ea20bb..0000000000 --- a/tools/unity-avatar-exporter/unity-avatar-exporter.Editor.csproj +++ /dev/null @@ -1,386 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20506 - 2.0 - {C03F9C15-54AA-E5FF-7017-7CEBE37FC988} - Library - Assembly-CSharp-Editor - 512 - {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - .NETFramework - v3.5 - Unity Full v3.5 - - Editor:5 - StandaloneWindows64:19 - 2018.2.18f1 - - 4 - - - pdbonly - false - Temp\UnityVS_bin\Debug\ - Temp\UnityVS_obj\Debug\ - prompt - 4 - DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - pdbonly - false - Temp\UnityVS_bin\Release\ - Temp\UnityVS_obj\Release\ - prompt - 4 - TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_2_18;UNITY_2018_2;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU - true - - - - - - - - - - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ARModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AnimationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.AudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.BaselibModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClothModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CoreModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.DirectorModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FacebookModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GameCenterModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.GridModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.HotReloadModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.IMGUIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.InputModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.LocalizationModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.PhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.Physics2DModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ProfilerModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StreamingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.SubstanceModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TLSModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TilemapModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.TimelineModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UIElementsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UNETModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UmbraModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VehiclesModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.VideoModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.WindModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEngine/UnityEngine.XRModule.dll - - - C:\Program Files\Unity\Editor\Data\Managed/UnityEditor.dll - - - C:\Program Files\Unity\Editor\Data\Managed/Unity.Locator.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/Editor/UnityEditor.TestRunner.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/UnityEngine.TestRunner.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/net35/unity-custom/nunit.framework.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll - - - C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll - - - C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll - - - C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll - - - C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/Editor/UnityEditor.Analytics.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll - - - C:/Users/davidback/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\mscorlib.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Core.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Runtime.Serialization.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\System.Xml.Linq.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\UnityScript.Lang.dll - - - C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0-api\Boo.Lang.dll - - - - - {6800202F-4402-D405-F8CB-03DC7BD78B92} - UnityEditor.StandardEvents - - - {3A848AB7-9891-EDDA-D555-BF184C2F81F4} - Unity.TextMeshPro.Editor - - - {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D} - Unity.PackageManagerUI.Editor - - - {07A21C90-D344-AE1A-8456-9910C203B41A} - Unity.TextMeshPro - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/unity-avatar-exporter/unity-avatar-exporter.sln b/tools/unity-avatar-exporter/unity-avatar-exporter.sln deleted file mode 100644 index 9f608ed5c3..0000000000 --- a/tools/unity-avatar-exporter/unity-avatar-exporter.sln +++ /dev/null @@ -1,44 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2017 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.TextMeshPro", "Unity.TextMeshPro.csproj", "{07A21C90-D344-AE1A-8456-9910C203B41A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.PackageManagerUI.Editor", "Unity.PackageManagerUI.Editor.csproj", "{6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.TextMeshPro.Editor", "Unity.TextMeshPro.Editor.csproj", "{3A848AB7-9891-EDDA-D555-BF184C2F81F4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor.StandardEvents", "UnityEditor.StandardEvents.csproj", "{6800202F-4402-D405-F8CB-03DC7BD78B92}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "unity-avatar-exporter.Editor", "unity-avatar-exporter.Editor.csproj", "{C03F9C15-54AA-E5FF-7017-7CEBE37FC988}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {07A21C90-D344-AE1A-8456-9910C203B41A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {07A21C90-D344-AE1A-8456-9910C203B41A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {07A21C90-D344-AE1A-8456-9910C203B41A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {07A21C90-D344-AE1A-8456-9910C203B41A}.Release|Any CPU.Build.0 = Release|Any CPU - {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6877705C-FBD9-0C4F-5AFB-6FB431E5D39D}.Release|Any CPU.Build.0 = Release|Any CPU - {3A848AB7-9891-EDDA-D555-BF184C2F81F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3A848AB7-9891-EDDA-D555-BF184C2F81F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3A848AB7-9891-EDDA-D555-BF184C2F81F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3A848AB7-9891-EDDA-D555-BF184C2F81F4}.Release|Any CPU.Build.0 = Release|Any CPU - {6800202F-4402-D405-F8CB-03DC7BD78B92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6800202F-4402-D405-F8CB-03DC7BD78B92}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6800202F-4402-D405-F8CB-03DC7BD78B92}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6800202F-4402-D405-F8CB-03DC7BD78B92}.Release|Any CPU.Build.0 = Release|Any CPU - {C03F9C15-54AA-E5FF-7017-7CEBE37FC988}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C03F9C15-54AA-E5FF-7017-7CEBE37FC988}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C03F9C15-54AA-E5FF-7017-7CEBE37FC988}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C03F9C15-54AA-E5FF-7017-7CEBE37FC988}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal From f8ae0227c30f269a3fa0f5afcb603b8ecb6e761c Mon Sep 17 00:00:00 2001 From: amantley Date: Thu, 6 Dec 2018 20:16:03 -0800 Subject: [PATCH 62/79] added the lean joint back and fixed a name mapping reversal in fbxserializer.cpp --- libraries/fbx/src/FBXSerializer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index 37108ba5d2..67220342b8 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -1418,7 +1418,7 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr joint.bindTransformFoundInCluster = false; hfmModel.joints.append(joint); - hfmModel.jointIndices.insert(fbxModel.name, hfmModel.joints.size()); + hfmModel.jointIndices.insert(joint.name, hfmModel.joints.size()); QString rotationID = localRotations.value(modelID); AnimationCurve xRotCurve = animationCurves.value(xComponents.value(rotationID)); @@ -1843,7 +1843,7 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr glm::quat rotationOffset = itr.value(); int jointIndex = hfmModel.getJointIndex(jointName); if (hfmModel.hfmToHifiJointNameMapping.contains(jointName)) { - jointIndex = hfmModel.getJointIndex(hfmModel.hfmToHifiJointNameMapping[jointName]); + jointIndex = hfmModel.getJointIndex(jointName); } if (jointIndex != -1) { hfmModel.jointRotationOffsets.insert(jointIndex, rotationOffset); From 72a91668a5d43f3e6245e26e30645192d90e4de4 Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Sat, 13 Oct 2018 00:14:33 +0300 Subject: [PATCH 63/79] FB19219 Make avatarapp to handle wearables update via drag&drop --- libraries/entities/src/EntityItem.cpp | 5 ++ libraries/entities/src/EntityItem.h | 2 +- .../entities/src/EntityScriptingInterface.cpp | 14 +++++ .../entities/src/EntityScriptingInterface.h | 27 ++++++++ libraries/entities/src/EntityTree.cpp | 1 + libraries/entities/src/EntityTree.h | 1 + libraries/entities/src/ModelEntityItem.cpp | 5 ++ libraries/entities/src/ModelEntityItem.h | 1 + scripts/system/avatarapp.js | 61 ++++++++++++++----- 9 files changed, 101 insertions(+), 16 deletions(-) diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index 5855306994..35c491a331 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -3277,4 +3277,9 @@ void EntityItem::prepareForSimulationOwnershipBid(EntityItemProperties& properti properties.setEntityHostType(getEntityHostType()); properties.setOwningAvatarID(getOwningAvatarID()); setLastBroadcast(now); // for debug/physics status icons +} + +bool EntityItem::isWearable() const { + return isVisible() && getParentJointIndex() != INVALID_JOINT_INDEX + && (getParentID() == DependencyManager::get()->getSessionUUID() || getParentID() == AVATAR_SELF_ID); } \ No newline at end of file diff --git a/libraries/entities/src/EntityItem.h b/libraries/entities/src/EntityItem.h index 8c78dd1cd6..eb1cdf24e4 100644 --- a/libraries/entities/src/EntityItem.h +++ b/libraries/entities/src/EntityItem.h @@ -489,7 +489,7 @@ public: void scriptHasUnloaded(); void setScriptHasFinishedPreload(bool value); bool isScriptPreloadFinished(); - + virtual bool isWearable() const; bool isDomainEntity() const { return _hostType == entity::HostType::DOMAIN; } bool isAvatarEntity() const { return _hostType == entity::HostType::AVATAR; } bool isLocalEntity() const { return _hostType == entity::HostType::LOCAL; } diff --git a/libraries/entities/src/EntityScriptingInterface.cpp b/libraries/entities/src/EntityScriptingInterface.cpp index 4a634899c4..1b1853762b 100644 --- a/libraries/entities/src/EntityScriptingInterface.cpp +++ b/libraries/entities/src/EntityScriptingInterface.cpp @@ -114,6 +114,8 @@ bool EntityScriptingInterface::canReplaceContent() { void EntityScriptingInterface::setEntityTree(EntityTreePointer elementTree) { if (_entityTree) { + disconnect(_entityTree.get(), &EntityTree::addingEntityPointer, this, &EntityScriptingInterface::onAddingEntity); + disconnect(_entityTree.get(), &EntityTree::deletingEntityPointer, this, &EntityScriptingInterface::onDeletingEntity); disconnect(_entityTree.get(), &EntityTree::addingEntity, this, &EntityScriptingInterface::addingEntity); disconnect(_entityTree.get(), &EntityTree::deletingEntity, this, &EntityScriptingInterface::deletingEntity); disconnect(_entityTree.get(), &EntityTree::clearingEntities, this, &EntityScriptingInterface::clearingEntities); @@ -122,6 +124,8 @@ void EntityScriptingInterface::setEntityTree(EntityTreePointer elementTree) { _entityTree = elementTree; if (_entityTree) { + connect(_entityTree.get(), &EntityTree::addingEntityPointer, this, &EntityScriptingInterface::onAddingEntity, Qt::DirectConnection); + connect(_entityTree.get(), &EntityTree::deletingEntityPointer, this, &EntityScriptingInterface::onDeletingEntity, Qt::DirectConnection); connect(_entityTree.get(), &EntityTree::addingEntity, this, &EntityScriptingInterface::addingEntity); connect(_entityTree.get(), &EntityTree::deletingEntity, this, &EntityScriptingInterface::deletingEntity); connect(_entityTree.get(), &EntityTree::clearingEntities, this, &EntityScriptingInterface::clearingEntities); @@ -1060,7 +1064,17 @@ void EntityScriptingInterface::handleEntityScriptCallMethodPacket(QSharedPointer } } +void EntityScriptingInterface::onAddingEntity(EntityItem* entity) { + if (entity->isWearable()) { + emit addingWearable(entity->getEntityItemID()); + } +} +void EntityScriptingInterface::onDeletingEntity(EntityItem* entity) { + if (entity->isWearable()) { + emit deletingWearable(entity->getEntityItemID()); + } +} QUuid EntityScriptingInterface::findClosestEntity(const glm::vec3& center, float radius) const { PROFILE_RANGE(script_entities, __FUNCTION__); diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index ff1149fb06..0cea005ddd 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -1908,6 +1908,31 @@ signals: */ void addingEntity(const EntityItemID& entityID); + /**jsdoc + * Triggered when an 'wearable' entity is deleted. + * @function Entities.deletingWearable + * @param {Uuid} entityID - The ID of the 'wearable' entity deleted. + * @returns {Signal} + * @example Report when an 'wearable' entity is deleted. + * Entities.deletingWearable.connect(function (entityID) { + * print("Deleted wearable: " + entityID); + * }); + */ + void deletingWearable(const EntityItemID& entityID); + + /**jsdoc + * Triggered when an 'wearable' entity is added to Interface's local in-memory tree of entities it knows about. This may occur when + * 'wearable' entities are added to avatar + * @function Entities.addingWearable + * @param {Uuid} entityID - The ID of the 'wearable' entity added. + * @returns {Signal} + * @example Report when an 'wearable' entity is added. + * Entities.addingWearable.connect(function (entityID) { + * print("Added wearable: " + entityID); + * }); + */ + void addingWearable(const EntityItemID& entityID); + /**jsdoc * Triggered when you disconnect from a domain, at which time Interface's local in-memory tree of entities it knows about * is cleared. @@ -1938,6 +1963,8 @@ protected: private slots: void handleEntityScriptCallMethodPacket(QSharedPointer receivedMessage, SharedNodePointer senderNode); + void onAddingEntity(EntityItem* entity); + void onDeletingEntity(EntityItem* entity); private: bool actionWorker(const QUuid& entityID, std::function actor); diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index b23be66ade..dd020da5a0 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -305,6 +305,7 @@ void EntityTree::postAddEntity(EntityItemPointer entity) { fixupNeedsParentFixups(); emit addingEntity(entity->getEntityItemID()); + emit addingEntityPointer(entity.get()); } bool EntityTree::updateEntity(const EntityItemID& entityID, const EntityItemProperties& properties, const SharedNodePointer& senderNode) { diff --git a/libraries/entities/src/EntityTree.h b/libraries/entities/src/EntityTree.h index c6a590ec71..d7f93b1eb2 100644 --- a/libraries/entities/src/EntityTree.h +++ b/libraries/entities/src/EntityTree.h @@ -309,6 +309,7 @@ signals: void deletingEntity(const EntityItemID& entityID); void deletingEntityPointer(EntityItem* entityID); void addingEntity(const EntityItemID& entityID); + void addingEntityPointer(EntityItem* entityID); void editingEntityPointer(const EntityItemPointer& entityID); void entityScriptChanging(const EntityItemID& entityItemID, const bool reload); void entityServerScriptChanging(const EntityItemID& entityItemID, const bool reload); diff --git a/libraries/entities/src/ModelEntityItem.cpp b/libraries/entities/src/ModelEntityItem.cpp index b4b00e57a7..caa67ade9a 100644 --- a/libraries/entities/src/ModelEntityItem.cpp +++ b/libraries/entities/src/ModelEntityItem.cpp @@ -519,6 +519,11 @@ QVector ModelEntityItem::getJointTranslationsSet() const { return result; } +bool ModelEntityItem::isWearable() const +{ + return isVisible() && (getParentJointIndex() != INVALID_JOINT_INDEX || getRelayParentJoints()) + && (getParentID() == DependencyManager::get()->getSessionUUID() || getParentID() == AVATAR_SELF_ID); +} bool ModelEntityItem::hasModel() const { return resultWithReadLock([&] { diff --git a/libraries/entities/src/ModelEntityItem.h b/libraries/entities/src/ModelEntityItem.h index 5ca3e2caa1..3de1ebdbdc 100644 --- a/libraries/entities/src/ModelEntityItem.h +++ b/libraries/entities/src/ModelEntityItem.h @@ -123,6 +123,7 @@ public: QVector getJointTranslations() const; QVector getJointTranslationsSet() const; + virtual bool isWearable() const override; private: void setAnimationSettings(const QString& value); // only called for old bitstream format bool applyNewAnimationProperties(AnimationPropertyGroup newProperties); diff --git a/scripts/system/avatarapp.js b/scripts/system/avatarapp.js index 81a6447aae..65abf791a5 100644 --- a/scripts/system/avatarapp.js +++ b/scripts/system/avatarapp.js @@ -69,12 +69,12 @@ function getMyAvatarSettings() { } } -function updateAvatarWearables(avatar, bookmarkAvatarName, callback) { +function updateAvatarWearables(avatar, callback) { executeLater(function() { var wearables = getMyAvatarWearables(); avatar[ENTRY_AVATAR_ENTITIES] = wearables; - sendToQml({'method' : 'wearablesUpdated', 'wearables' : wearables, 'avatarName' : bookmarkAvatarName}) + sendToQml({'method' : 'wearablesUpdated', 'wearables' : wearables}) if(callback) callback(); @@ -188,7 +188,11 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See sendToQml(message) break; case 'selectAvatar': + Entities.addingWearable.disconnect(onAddingWearable); + Entities.deletingWearable.disconnect(onDeletingWearable); AvatarBookmarks.loadBookmark(message.name); + Entities.addingWearable.connect(onAddingWearable); + Entities.deletingWearable.connect(onDeletingWearable); break; case 'deleteAvatar': AvatarBookmarks.removeBookmark(message.name); @@ -223,7 +227,7 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See // revert changes using snapshot of wearables if(currentAvatarWearablesBackup !== null) { AvatarBookmarks.updateAvatarEntities(currentAvatarWearablesBackup); - updateAvatarWearables(currentAvatar, message.avatarName); + updateAvatarWearables(currentAvatar); } } else { sendToQml({'method' : 'updateAvatarInBookmarks'}); @@ -256,8 +260,11 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See parentJointIndex: hipsIndex }; + Entities.addingWearable.disconnect(onAddingWearable); var entityID = Entities.addEntity(properties, true); - updateAvatarWearables(currentAvatar, message.avatarName, function() { + Entities.addingWearable.connect(onAddingWearable); + + updateAvatarWearables(currentAvatar, function() { onSelectedEntity(entityID); }); break; @@ -265,8 +272,12 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See ensureWearableSelected(message.entityID); break; case 'deleteWearable': + + Entities.deletingWearable.disconnect(onDeletingWearable); Entities.deleteEntity(message.entityID); - updateAvatarWearables(currentAvatar, message.avatarName); + Entities.deletingWearable.connect(onDeletingWearable); + + updateAvatarWearables(currentAvatar); break; case 'changeDisplayName': if (MyAvatar.displayName !== message.displayName) { @@ -380,6 +391,18 @@ function onSelectedEntity(entityID, pointerEvent) { } } +function onAddingWearable(entityID) { + updateAvatarWearables(currentAvatar, function() { + sendToQml({'method' : 'updateAvatarInBookmarks'}); + }); +} + +function onDeletingWearable(entityID) { + updateAvatarWearables(currentAvatar, function() { + sendToQml({'method' : 'updateAvatarInBookmarks'}); + }); +} + function handleWearableMessages(channel, message, sender) { if (channel !== 'Hifi-Object-Manipulation') { return; @@ -485,6 +508,8 @@ function off() { AvatarBookmarks.bookmarkDeleted.disconnect(onBookmarkDeleted); AvatarBookmarks.bookmarkAdded.disconnect(onBookmarkAdded); + Entities.addingWearable.disconnect(onAddingWearable); + Entities.deletingWearable.disconnect(onDeletingWearable); MyAvatar.skeletonModelURLChanged.disconnect(onSkeletonModelURLChanged); MyAvatar.dominantHandChanged.disconnect(onDominantHandChanged); MyAvatar.collisionsEnabledChanged.disconnect(onCollisionsEnabledChanged); @@ -495,16 +520,23 @@ function off() { } function on() { - AvatarBookmarks.bookmarkLoaded.connect(onBookmarkLoaded); - AvatarBookmarks.bookmarkDeleted.connect(onBookmarkDeleted); - AvatarBookmarks.bookmarkAdded.connect(onBookmarkAdded); - MyAvatar.skeletonModelURLChanged.connect(onSkeletonModelURLChanged); - MyAvatar.dominantHandChanged.connect(onDominantHandChanged); - MyAvatar.collisionsEnabledChanged.connect(onCollisionsEnabledChanged); - MyAvatar.newCollisionSoundURL.connect(onNewCollisionSoundUrl); - MyAvatar.animGraphUrlChanged.connect(onAnimGraphUrlChanged); - MyAvatar.targetScaleChanged.connect(onTargetScaleChanged); + if (!isWired) { // It is not ok to connect these twice, hence guard. + isWired = true; + + AvatarBookmarks.bookmarkLoaded.connect(onBookmarkLoaded); + AvatarBookmarks.bookmarkDeleted.connect(onBookmarkDeleted); + AvatarBookmarks.bookmarkAdded.connect(onBookmarkAdded); + + Entities.addingWearable.connect(onAddingWearable); + Entities.deletingWearable.connect(onDeletingWearable); + MyAvatar.skeletonModelURLChanged.connect(onSkeletonModelURLChanged); + MyAvatar.dominantHandChanged.connect(onDominantHandChanged); + MyAvatar.collisionsEnabledChanged.connect(onCollisionsEnabledChanged); + MyAvatar.newCollisionSoundURL.connect(onNewCollisionSoundUrl); + MyAvatar.animGraphUrlChanged.connect(onAnimGraphUrlChanged); + MyAvatar.targetScaleChanged.connect(onTargetScaleChanged); + } } function onTabletButtonClicked() { @@ -514,7 +546,6 @@ function onTabletButtonClicked() { } else { ContextOverlay.enabled = false; tablet.loadQMLSource(AVATARAPP_QML_SOURCE); - isWired = true; } } var hasEventBridge = false; From 600d09e533e2c3c27ff9dbdf5c6ee44c31b36c1e Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Mon, 19 Nov 2018 00:53:51 +0530 Subject: [PATCH 64/79] relax 'isWearable()' condition to match latest changes in 'master' --- libraries/entities/src/EntityItem.cpp | 3 +-- libraries/entities/src/ModelEntityItem.cpp | 6 ------ libraries/entities/src/ModelEntityItem.h | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index 35c491a331..94d0024fd5 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -3280,6 +3280,5 @@ void EntityItem::prepareForSimulationOwnershipBid(EntityItemProperties& properti } bool EntityItem::isWearable() const { - return isVisible() && getParentJointIndex() != INVALID_JOINT_INDEX - && (getParentID() == DependencyManager::get()->getSessionUUID() || getParentID() == AVATAR_SELF_ID); + return isVisible() && (getParentID() == DependencyManager::get()->getSessionUUID() || getParentID() == AVATAR_SELF_ID); } \ No newline at end of file diff --git a/libraries/entities/src/ModelEntityItem.cpp b/libraries/entities/src/ModelEntityItem.cpp index caa67ade9a..e68e287ee2 100644 --- a/libraries/entities/src/ModelEntityItem.cpp +++ b/libraries/entities/src/ModelEntityItem.cpp @@ -519,12 +519,6 @@ QVector ModelEntityItem::getJointTranslationsSet() const { return result; } -bool ModelEntityItem::isWearable() const -{ - return isVisible() && (getParentJointIndex() != INVALID_JOINT_INDEX || getRelayParentJoints()) - && (getParentID() == DependencyManager::get()->getSessionUUID() || getParentID() == AVATAR_SELF_ID); -} - bool ModelEntityItem::hasModel() const { return resultWithReadLock([&] { return !_modelURL.isEmpty(); diff --git a/libraries/entities/src/ModelEntityItem.h b/libraries/entities/src/ModelEntityItem.h index 3de1ebdbdc..5ca3e2caa1 100644 --- a/libraries/entities/src/ModelEntityItem.h +++ b/libraries/entities/src/ModelEntityItem.h @@ -123,7 +123,6 @@ public: QVector getJointTranslations() const; QVector getJointTranslationsSet() const; - virtual bool isWearable() const override; private: void setAnimationSettings(const QString& value); // only called for old bitstream format bool applyNewAnimationProperties(AnimationPropertyGroup newProperties); From 92117d602c30146b88bcddc2b61a6ae17060c9ea Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Wed, 5 Dec 2018 11:20:18 -0800 Subject: [PATCH 65/79] remove cruft --- interface/src/Application_render.cpp | 240 ---------------------- interface/src/graphics/GraphicsEngine.cpp | 4 + 2 files changed, 4 insertions(+), 240 deletions(-) delete mode 100644 interface/src/Application_render.cpp diff --git a/interface/src/Application_render.cpp b/interface/src/Application_render.cpp deleted file mode 100644 index ea672e3510..0000000000 --- a/interface/src/Application_render.cpp +++ /dev/null @@ -1,240 +0,0 @@ -// -// Application_render.cpp -// interface/src -// -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "Application.h" -#include - -#include -#include -#include -#include -#include "ui/Stats.h" -#include "Util.h" - -//void Application::paintGL() { -// // Some plugins process message events, allowing paintGL to be called reentrantly. -// -// _renderFrameCount++; -// // SG: Moved into the RenderEventHandler -// //_lastTimeRendered.start(); -// -// auto lastPaintBegin = usecTimestampNow(); -// PROFILE_RANGE_EX(render, __FUNCTION__, 0xff0000ff, (uint64_t)_renderFrameCount); -// PerformanceTimer perfTimer("paintGL"); -// -// if (nullptr == _displayPlugin) { -// return; -// } -// -// DisplayPluginPointer displayPlugin; -// { -// PROFILE_RANGE(render, "/getActiveDisplayPlugin"); -// displayPlugin = getActiveDisplayPlugin(); -// } -// -// { -// PROFILE_RANGE(render, "/pluginBeginFrameRender"); -// // If a display plugin loses it's underlying support, it -// // needs to be able to signal us to not use it -// if (!displayPlugin->beginFrameRender(_renderFrameCount)) { -// QMetaObject::invokeMethod(this, "updateDisplayMode"); -// return; -// } -// } -// -// RenderArgs renderArgs; -// glm::mat4 HMDSensorPose; -// glm::mat4 eyeToWorld; -// glm::mat4 sensorToWorld; -// ViewFrustum viewFrustum; -// -// bool isStereo; -// glm::mat4 stereoEyeOffsets[2]; -// glm::mat4 stereoEyeProjections[2]; -// -// { -// QMutexLocker viewLocker(&_renderArgsMutex); -// renderArgs = _appRenderArgs._renderArgs; -// -// // don't render if there is no context. -// if (!_appRenderArgs._renderArgs._context) { -// return; -// } -// -// HMDSensorPose = _appRenderArgs._headPose; -// eyeToWorld = _appRenderArgs._eyeToWorld; -// sensorToWorld = _appRenderArgs._sensorToWorld; -// isStereo = _appRenderArgs._isStereo; -// for_each_eye([&](Eye eye) { -// stereoEyeOffsets[eye] = _appRenderArgs._eyeOffsets[eye]; -// stereoEyeProjections[eye] = _appRenderArgs._eyeProjections[eye]; -// }); -// viewFrustum = _appRenderArgs._renderArgs.getViewFrustum(); -// } -// -// { -// PROFILE_RANGE(render, "/gpuContextReset"); -// _graphicsEngine.getGPUContext()->beginFrame(_appRenderArgs._view, HMDSensorPose); -// // Reset the gpu::Context Stages -// // Back to the default framebuffer; -// gpu::doInBatch("Application_render::gpuContextReset", _graphicsEngine.getGPUContext(), [&](gpu::Batch& batch) { -// batch.resetStages(); -// }); -// -// if (isStereo) { -// renderArgs._context->enableStereo(true); -// renderArgs._context->setStereoProjections(stereoEyeProjections); -// renderArgs._context->setStereoViews(stereoEyeOffsets); -// } -// } -// -// gpu::FramebufferPointer finalFramebuffer; -// QSize finalFramebufferSize; -// { -// PROFILE_RANGE(render, "/getOutputFramebuffer"); -// // Primary rendering pass -// auto framebufferCache = DependencyManager::get(); -// finalFramebufferSize = framebufferCache->getFrameBufferSize(); -// // Final framebuffer that will be handed to the display-plugin -// finalFramebuffer = framebufferCache->getFramebuffer(); -// } -// -// if (!_programsCompiled.load()) { -// gpu::doInBatch("splashFrame", _gpuContext, [&](gpu::Batch& batch) { -// batch.setFramebuffer(finalFramebuffer); -// batch.enableSkybox(true); -// batch.enableStereo(isStereo); -// batch.setViewportTransform({ 0, 0, finalFramebuffer->getSize() }); -// _splashScreen->render(batch, viewFrustum); -// }); -// } else { -// { -// PROFILE_RANGE(render, "/renderOverlay"); -// PerformanceTimer perfTimer("renderOverlay"); -// // NOTE: There is no batch associated with this renderArgs -// // the ApplicationOverlay class assumes it's viewport is setup to be the device size -// renderArgs._viewport = glm::ivec4(0, 0, getDeviceSize()); -// _applicationOverlay.renderOverlay(&renderArgs); -// } -// -// { -// PROFILE_RANGE(render, "/updateCompositor"); -// getApplicationCompositor().setFrameInfo(_renderFrameCount, eyeToWorld, sensorToWorld); -// } -// -// { -// PROFILE_RANGE(render, "/runRenderFrame"); -// renderArgs._hudOperator = displayPlugin->getHUDOperator(); -// renderArgs._hudTexture = _applicationOverlay.getOverlayTexture(); -// renderArgs._blitFramebuffer = finalFramebuffer; -// runRenderFrame(&renderArgs); -// } -// } -// -// auto frame = _graphicsEngine.getGPUContext()->endFrame(); -// frame->frameIndex = _renderFrameCount; -// frame->framebuffer = finalFramebuffer; -// frame->framebufferRecycler = [](const gpu::FramebufferPointer& framebuffer) { -// auto frameBufferCache = DependencyManager::get(); -// if (frameBufferCache) { -// frameBufferCache->releaseFramebuffer(framebuffer); -// } -// }; -// // deliver final scene rendering commands to the display plugin -// { -// PROFILE_RANGE(render, "/pluginOutput"); -// PerformanceTimer perfTimer("pluginOutput"); -// _renderLoopCounter.increment(); -// displayPlugin->submitFrame(frame); -// } -// -// // Reset the framebuffer and stereo state -// renderArgs._blitFramebuffer.reset(); -// renderArgs._context->enableStereo(false); -// -//#if !defined(DISABLE_QML) -// { -// auto stats = Stats::getInstance(); -// if (stats) { -// stats->setRenderDetails(renderArgs._details); -// } -// } -//#endif -// -// uint64_t lastPaintDuration = usecTimestampNow() - lastPaintBegin; -// _frameTimingsScriptingInterface.addValue(lastPaintDuration); -//} - -// WorldBox Render Data & rendering functions -// -//class WorldBoxRenderData { -//public: -// typedef render::Payload Payload; -// typedef Payload::DataPointer Pointer; -// -// int _val = 0; -// static render::ItemID _item; // unique WorldBoxRenderData -//}; -// -//render::ItemID WorldBoxRenderData::_item{ render::Item::INVALID_ITEM_ID }; -// -//namespace render { -// template <> const ItemKey payloadGetKey(const WorldBoxRenderData::Pointer& stuff) { return ItemKey::Builder::opaqueShape().withTagBits(ItemKey::TAG_BITS_0 | ItemKey::TAG_BITS_1); } -// template <> const Item::Bound payloadGetBound(const WorldBoxRenderData::Pointer& stuff) { return Item::Bound(); } -// template <> void payloadRender(const WorldBoxRenderData::Pointer& stuff, RenderArgs* args) { -// if (Menu::getInstance()->isOptionChecked(MenuOption::WorldAxes)) { -// PerformanceTimer perfTimer("worldBox"); -// -// auto& batch = *args->_batch; -// DependencyManager::get()->bindSimpleProgram(batch); -// renderWorldBox(args, batch); -// } -// } -//} -// -//void Application::runRenderFrame(RenderArgs* renderArgs) { -// PROFILE_RANGE(render, __FUNCTION__); -// PerformanceTimer perfTimer("display"); -// PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::runRenderFrame()"); -// -// // The pending changes collecting the changes here -// render::Transaction transaction; -// -// if (DependencyManager::get()->shouldRenderEntities()) { -// // render models... -// PerformanceTimer perfTimer("entities"); -// PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), -// "Application::runRenderFrame() ... entities..."); -// -// RenderArgs::DebugFlags renderDebugFlags = RenderArgs::RENDER_DEBUG_NONE; -// -// renderArgs->_debugFlags = renderDebugFlags; -// } -// -// // Make sure the WorldBox is in the scene -// // For the record, this one RenderItem is the first one we created and added to the scene. -// // We could move that code elsewhere but you know... -// if (!render::Item::isValidID(WorldBoxRenderData::_item)) { -// auto worldBoxRenderData = std::make_shared(); -// auto worldBoxRenderPayload = std::make_shared(worldBoxRenderData); -// -// WorldBoxRenderData::_item = _main3DScene->allocateID(); -// -// transaction.resetItem(WorldBoxRenderData::_item, worldBoxRenderPayload); -// _main3DScene->enqueueTransaction(transaction); -// } -// -// { -// PerformanceTimer perfTimer("EngineRun"); -// _renderEngine->getRenderContext()->args = renderArgs; -// _renderEngine->run(); -// } -//} - diff --git a/interface/src/graphics/GraphicsEngine.cpp b/interface/src/graphics/GraphicsEngine.cpp index b7a5e89d35..36bf3a1b97 100644 --- a/interface/src/graphics/GraphicsEngine.cpp +++ b/interface/src/graphics/GraphicsEngine.cpp @@ -56,6 +56,10 @@ void GraphicsEngine::initializeGPU(GLWidget* glwidget) { glwidget->makeCurrent(); _gpuContext = std::make_shared(); + _gpuContext->pushProgramsToSync(shader::allPrograms(), [this] { + _programsCompiled.store(true); + }, 1); + DependencyManager::get()->setGPUContext(_gpuContext); } From 8431b3b0c187db5f97566e98b960205c32316c9d Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Fri, 7 Dec 2018 10:39:10 -0800 Subject: [PATCH 66/79] correct order of mixes --- libraries/gpu/src/gpu/Color.slh | 4 ++-- libraries/render-utils/src/simple_textured.slf | 2 +- libraries/render-utils/src/simple_textured_fade.slf | 4 ++-- libraries/render-utils/src/simple_textured_unlit.slf | 4 ++-- libraries/render-utils/src/simple_textured_unlit_fade.slf | 4 ++-- libraries/render-utils/src/simple_transparent_textured.slf | 2 +- .../render-utils/src/simple_transparent_textured_fade.slf | 2 +- .../render-utils/src/simple_transparent_textured_unlit.slf | 2 +- .../src/simple_transparent_textured_unlit_fade.slf | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libraries/gpu/src/gpu/Color.slh b/libraries/gpu/src/gpu/Color.slh index 16eb7487ed..65ddc0b01e 100644 --- a/libraries/gpu/src/gpu/Color.slh +++ b/libraries/gpu/src/gpu/Color.slh @@ -18,8 +18,8 @@ float color_scalar_sRGBToLinear(float value) { const float SRGB_ELBOW = 0.04045; - - return (value <= SRGB_ELBOW) ? value / 12.92 : pow((value + 0.055) / 1.055, 2.4); + + return mix(pow((value + 0.055) / 1.055, 2.4), value / 12.92, float(value <= SRGB_ELBOW)); } vec3 color_sRGBToLinear(vec3 srgb) { diff --git a/libraries/render-utils/src/simple_textured.slf b/libraries/render-utils/src/simple_textured.slf index 9494edb890..dbc49fcb5d 100644 --- a/libraries/render-utils/src/simple_textured.slf +++ b/libraries/render-utils/src/simple_textured.slf @@ -29,7 +29,7 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; void main(void) { vec4 texel = texture(originalTexture, _texCoord0); - texel = mix(color_sRGBAToLinear(texel), texel, float(_color.a <= 0.0)); + texel = mix(texel, color_sRGBAToLinear(texel), float(_color.a <= 0.0)); texel.rgb *= _color.rgb; packDeferredFragment( diff --git a/libraries/render-utils/src/simple_textured_fade.slf b/libraries/render-utils/src/simple_textured_fade.slf index 5ca21a71ac..5a9eb0688e 100644 --- a/libraries/render-utils/src/simple_textured_fade.slf +++ b/libraries/render-utils/src/simple_textured_fade.slf @@ -41,9 +41,9 @@ void main(void) { applyFade(fadeParams, _positionWS.xyz, fadeEmissive); vec4 texel = texture(originalTexture, _texCoord0); - texel = mix(color_sRGBAToLinear(texel), texel, float(_color.a <= 0.0)); + texel = mix(texel, color_sRGBAToLinear(texel), float(_color.a <= 0.0)); texel.rgb *= _color.rgb; - texel.a = abs(_color.a); + texel.a *= abs(_color.a); const float ALPHA_THRESHOLD = 0.999; if (texel.a < ALPHA_THRESHOLD) { diff --git a/libraries/render-utils/src/simple_textured_unlit.slf b/libraries/render-utils/src/simple_textured_unlit.slf index 2d8f228f1c..475428f0ae 100644 --- a/libraries/render-utils/src/simple_textured_unlit.slf +++ b/libraries/render-utils/src/simple_textured_unlit.slf @@ -29,9 +29,9 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; void main(void) { vec4 texel = texture(originalTexture, _texCoord0); - texel = mix(color_sRGBAToLinear(texel), texel, float(_color.a <= 0.0)); + texel = mix(texel, color_sRGBAToLinear(texel), float(_color.a <= 0.0)); texel.rgb *= _color.rgb; - texel.a = abs(_color.a); + texel.a *= abs(_color.a); const float ALPHA_THRESHOLD = 0.999; if (texel.a < ALPHA_THRESHOLD) { diff --git a/libraries/render-utils/src/simple_textured_unlit_fade.slf b/libraries/render-utils/src/simple_textured_unlit_fade.slf index 442be14a8e..d0ba4c13fe 100644 --- a/libraries/render-utils/src/simple_textured_unlit_fade.slf +++ b/libraries/render-utils/src/simple_textured_unlit_fade.slf @@ -41,9 +41,9 @@ void main(void) { applyFade(fadeParams, _positionWS.xyz, fadeEmissive); vec4 texel = texture(originalTexture, _texCoord0); - texel = mix(color_sRGBAToLinear(texel), texel, float(_color.a <= 0.0)); + texel = mix(texel, color_sRGBAToLinear(texel), float(_color.a <= 0.0)); texel.rgb *= _color.rgb; - texel.a = abs(_color.a); + texel.a *= abs(_color.a); const float ALPHA_THRESHOLD = 0.999; if (texel.a < ALPHA_THRESHOLD) { diff --git a/libraries/render-utils/src/simple_transparent_textured.slf b/libraries/render-utils/src/simple_transparent_textured.slf index 1a9d14e2fa..bd29ff2ec9 100644 --- a/libraries/render-utils/src/simple_transparent_textured.slf +++ b/libraries/render-utils/src/simple_transparent_textured.slf @@ -29,7 +29,7 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01; void main(void) { vec4 texel = texture(originalTexture, _texCoord0); - texel = mix(color_sRGBAToLinear(texel), texel, float(_color.a <= 0.0)); + texel = mix(texel, color_sRGBAToLinear(texel), float(_color.a <= 0.0)); texel.rgb *= _color.rgb; texel.a *= abs(_color.a); diff --git a/libraries/render-utils/src/simple_transparent_textured_fade.slf b/libraries/render-utils/src/simple_transparent_textured_fade.slf index 75a88dc581..d401989f90 100644 --- a/libraries/render-utils/src/simple_transparent_textured_fade.slf +++ b/libraries/render-utils/src/simple_transparent_textured_fade.slf @@ -47,7 +47,7 @@ void main(void) { applyFade(fadeParams, _positionWS.xyz, fadeEmissive); vec4 texel = texture(originalTexture, _texCoord0); - texel = mix(color_sRGBAToLinear(texel), texel, float(_color.a <= 0.0)); + texel = mix(texel, color_sRGBAToLinear(texel), float(_color.a <= 0.0)); texel.rgb *= _color.rgb; texel.a *= abs(_color.a); diff --git a/libraries/render-utils/src/simple_transparent_textured_unlit.slf b/libraries/render-utils/src/simple_transparent_textured_unlit.slf index 3f4abfc730..42a8270274 100644 --- a/libraries/render-utils/src/simple_transparent_textured_unlit.slf +++ b/libraries/render-utils/src/simple_transparent_textured_unlit.slf @@ -28,7 +28,7 @@ layout(location=0) out vec4 _fragColor0; void main(void) { vec4 texel = texture(originalTexture, _texCoord0); - texel = mix(color_sRGBAToLinear(texel), texel, float(_color.a <= 0.0)); + texel = mix(texel, color_sRGBAToLinear(texel), float(_color.a <= 0.0)); texel.rgb *= _color.rgb; texel.a *= abs(_color.a); diff --git a/libraries/render-utils/src/simple_transparent_textured_unlit_fade.slf b/libraries/render-utils/src/simple_transparent_textured_unlit_fade.slf index e46426ec7a..afc0c94575 100644 --- a/libraries/render-utils/src/simple_transparent_textured_unlit_fade.slf +++ b/libraries/render-utils/src/simple_transparent_textured_unlit_fade.slf @@ -40,7 +40,7 @@ void main(void) { applyFade(fadeParams, _positionWS.xyz, fadeEmissive); vec4 texel = texture(originalTexture, _texCoord0); - texel = mix(color_sRGBAToLinear(texel), texel, float(_color.a <= 0.0)); + texel = mix(texel, color_sRGBAToLinear(texel), float(_color.a <= 0.0)); texel.rgb *= _color.rgb; texel.a *= abs(_color.a); From e5792aa85f50be800d01973bfbf565afcf5397c6 Mon Sep 17 00:00:00 2001 From: David Back Date: Fri, 7 Dec 2018 11:01:54 -0800 Subject: [PATCH 67/79] remove scene --- .../unity-avatar-exporter/Assets/Scenes.meta | 8 - .../Assets/Scenes/SampleScene.unity | 258 ------------------ .../Assets/Scenes/SampleScene.unity.meta | 7 - .../avatarExporter.unitypackage | Bin 2828 -> 2830 bytes 4 files changed, 273 deletions(-) delete mode 100644 tools/unity-avatar-exporter/Assets/Scenes.meta delete mode 100644 tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity delete mode 100644 tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity.meta diff --git a/tools/unity-avatar-exporter/Assets/Scenes.meta b/tools/unity-avatar-exporter/Assets/Scenes.meta deleted file mode 100644 index 17072cfd6a..0000000000 --- a/tools/unity-avatar-exporter/Assets/Scenes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4f704ae4b4f98ae41a0bce26658850c1 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity b/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity deleted file mode 100644 index 6511ad2971..0000000000 --- a/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity +++ /dev/null @@ -1,258 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 10 - m_Resolution: 2 - m_BakeResolution: 10 - m_AtlasSize: 512 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 256 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &170076733 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 170076735} - - component: {fileID: 170076734} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &170076734 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 170076733} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 1 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &170076735 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 170076733} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &534669902 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 534669905} - - component: {fileID: 534669904} - - component: {fileID: 534669903} - m_Layer: 0 - m_Name: Main Camera - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &534669903 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 534669902} - m_Enabled: 1 ---- !u!20 &534669904 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 534669902} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &534669905 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 534669902} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity.meta b/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity.meta deleted file mode 100644 index 9531828bcd..0000000000 --- a/tools/unity-avatar-exporter/Assets/Scenes/SampleScene.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 99c9720ab356a0642a771bea13969a05 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/tools/unity-avatar-exporter/avatarExporter.unitypackage b/tools/unity-avatar-exporter/avatarExporter.unitypackage index e4f78ab6e99c8139e9192dcbf83574a94bafa823..bb25cb4072569356c49f6eaf24d334a65827ec0e 100644 GIT binary patch literal 2830 zcmV+p3-R?KJ&rO1(Lk+8yQ@dLtJTWZ z4LZ|ax3`D8`}^Ig)9>%&!E@}8&NDLTI&IQ!?fm`HZui@JdwcMdMSG_8POsnY4*H!z z8|XUSUVE^E20KqsqLAZY2N3)}%SQX-FeKbs5RP{~wzNC#b@mr_SN8Aq`|W|Sf4{r; zYzIAwP5$ThpHY__vtWVwk0b~w^A1qAb`w$O0Bv%O+Kjml366w=9H5wlwGo-&$mNrT z&jL<@gBn6)2^9~!=hI(^&BFuq{sXi|Aqhs9;{yagq=&tTJjW$xctMJ7KjMI5k3;j$ zwtVuk$;d4q^SK9R+4=agY5li5gF^g=dS|=-pQ6as8@9#{z%27aCqN*M(FUu!q*S z#3KQAZKDHp$~^Xh%t65{3efu+f|786dvbV;s1%8V_$$yJ4A(^J z`8B#an_T|GY~IwdS8lyjGqV0%ry+qhTBp@B2_x|MtxI)kSS-6?gPQgo`LSHZFdp6c#a zG3NM8rZRv(2$whEiRNAvxd|<2>Q*piu!;<2pf2apVp@Vqw)d(SDsjo)ZWUXG%wQ>j zHjahlv}*PrGbUDFR@W#p>8m4|6esK+j^n{1mlF{9SwVP0Zc;+1nnV|K7K!t{BFcZ8 zl$VT%7?9Rq;IL$ZSH7=-gK8;J3M~0;KszJ$Ep*GL-tz-&IYz`$t$E0)WYL_!Wb9Tl zW^Q0IbxbBR?x^NG@Kp1ZL(D@@HD`v=nMjj9z1)d_dPKb8{Hu@U1Go@_S%9ZcHtT&rS(LK~Q zQm-kB#{k%95=Fjh522hj21z&!V~A5-rhkN0FAZfg9G5uA5GOy((LD~cRgexM1T?gz z@tM9hQa~SR*mQ`ZWmB=H=xi?X-D>sP|xw6AxE50VM;1RESL z`7u>rO@5*rf*>C+Ih=Hb9SjhavXx37BRgd%h}G9ZQS6~U2c7LhEw2^C$mp`Vjw%*L zx&I4S6`z}42SgmMLkStZSL?B$2mD}rmAFi1zT9OpdDaQIvCIh1XN|fwn=b3SLLpyv zie98%I9zcmR-^^#gYV*aM6t_m8uf7yFuCcyb_t+L^eJK(NK6+FXNlqk;rVSHFqyU) zmZd#DI^Tee1*$z%fs`yM#8v8{Ih|2(AP3#Sd#YKC7Bm#^vJ&D{xI#A~p&d{awdci#LzJnt z*f-S0ynt{H(RT`uQ|tp{kzNYOxz@bEQZP@GscwAV)yTCfG(zD0AZlcoBqGpBimZI! zK=X|LP*N(iB1{fT$fbh66DV_vRbQ-ncV}G&F|0J$S0mEMhHN4T!@9`bl6^>5i*@8U z4UMO%fQvs;#O6>epnj%HeaSqIsTY1v;)Z(rxBGF+<8n>{BKCWaAt5KVLop?I?8?}H zS!Lg!0<;wLq^LWe0=7JcJSpt13A@!&31AK@KO&)q;@XuU1(64NJAha~*jT0L?1~7g zh_#>=-cnz+cWRaE<4p?g8XXpTQf*%ktJ$p|$b#LG+%iS=XxXq2b5Pf2#4hc!04k2U zH3P!LG@?*6F*{lih`8F{ocSi%}i9Uf(b*qHVB)IU24eLh{S*P(Rm70Ujfvbd2WuS_qk!hq^1SG?_ zuFq^?n9Hp)IwJy!vCgIoT`|QdZ5M#_{2hIP>aBX&qRyBs^%XGt-O#ZQOS2INRKmpx zJ67q2{9FfX7V-<5h=q)A0zw?&+UyQoG@w9D`Kn_jENU)=xqXqloS1`0=WpN*AraGkXAs*te5G?~|>3*bCVZJfRP!{CmW0 z)D@y+YRF}_Jf78?`tbF7VaHk>Bz-w_cqrcvfoG+=x1^HCBpZWE!TkVdZPc!3PGG(X zF$`()Yg1R@z36GJf}3TbJ@vJ{| zA9nxipS}Ozd)6!7|L=9S_rIQ`thxWc$u(-?*3#y?{&1dwI6!|T&dLZVJ@x!RX0To% zC<6JLYbk`-k%*P&fdgVu8``KXxZcBIl8g8`8A0>*pAmeLvdPF#a{s@#XWakqZ}0y< gNzv~Aw~T9`JKM4?+p;a&^4~0f0Sl$rssKI!0NoC4l>h($ literal 2828 zcmV+n3-k0JiwFqM$q8Hp0AX@tXmn+5a4vLVascgH-E!kJ6z+ANLga>Y2+sd@+fbP9 zCS?Qt*`X~Av)kEGY^4!(ERQX>G0Q#~7d#TLz>(yi$g-1mS;`DV1GOWabM)!x=+lwy z9dxF>Zf_5F_xHO~r{CYlgXh>Goo8gwb=sue+WGsX-R`&d_V(Z^i*`-#JH39p+w1rD zIw05S_Bx#%G}w895``QGJAmN-SvJl;4nxAN1>tz-V@tc!UOWHYK|h=S_CU;kzq|Kr z2R+H0{LklqMqP5uf(7P3k|3naJ3!sqO+=jov?(-dGv+!ZI1&MJfMOEXMr4K~mroWx z3pfc5Y6y`f+<4eMpZ-E@9v-0gAD}i0Nif13A0YT4BkV=wIW9TF3sS865eF1|9IAJ= z<&&39licz#pL;MZJ0D**t^amsP~d;KA8gnEQxv&+!`9fLoCQ1E@_#G#9`5z0OMzj><)F? zo##rB`EfvR=3G{xS8$7tsY6`K<0hJTww0P3(U1pp8VR$J2N@*dbApb1Y{TV*+QbV< z6UlT`^kcOxsdhn#6vVd87C!c3>fInnUqNT`a(s3%Ml3*c&i#W{>;C@U!qT9{f}57B zjE1d5@=IZK&KGX27KOshl?N!t-VOE0aJ5Qpi)qzG9CEVIe_50BLd8qwx{&Gu_R#v4 zcqE|quvYVMbW^#?b`kcPVEayC5bjUt!OY^}Q+u_zQkn5QjqS8EV~1 zwbub#(nU#6of4H3%DGEQu)U_M97=)M0Kx9+=P}Zbt{xISVe_0P?z&)F)cwQ>w8rSmAGVUw@NKTW~h`v z8^^+OdTX{HGbUDFcCSff)>nHnB~I8q9LIx2ZYLn{vqJEM+@ykVYYJV=StQQ)N+|zr zN?tM|I3T@$fy0skUirQT4sJ_@Qeeq%1KJs}Z=qRU^_CxC%P|;7)#j8_siFmeso1Sl z%)-D_>X=F<@2KjWc&c^EA?DOmt(jpowMsCW>?5m9`Z1N(fmH1!C`|@3)yiPz9F(i% zBvhqP4N$a}z$@^Op;7|PU?NqUQ&FW#H9FZ`0Z?7h!aF~e)ghzp=gsl_e-M}1ujoO)0HhbmDcVN_;r$@;>bZ(?y zQxuN@uyIP1`09KJ=d78KM8lX2ajMJwkFaW`p{$1E5(gXNY#(oTedhPE_5 z)7M4{=p!dK?V>odsaex>HWvA8HCe6lUcB;{0s&c~k4u)dE8}n4*So_9*#vt+4UU)m zn5wrXKT!@O$j3_#CtWcQ28c@A%B7F7ohlT}>T98B_D~;#uJ)mp-xbVAc3E9V6$_(0 z{za&Y*G;bjA`aJ~gpA&+^;qx&e(-#igiJPldB|k;tP==hnGv4P8g*+nUDkJnL%!@3 zqewk)xZ+f-NDI;j-^KBWVwc@C>f<0_a?^Y55J1_;j^v>7;q8LwbSd2rxh;4i5xMRs88ljm4j((nRX7&*=t7d# zW$Y95Sz)9{tF6|nXo0=I37jj;pNA;3jf8PAXVN}I@nZ+H%C#YYA?O!IJ?IJhKE!mW z2zbTUPBAgmm=td;81FBeiUaUAonOlo( zL*2{^pmSi~DO^sm4~j*3X&~2H^8ic1JWYnW@p)Gx_p0y+f#-v$kztaEz$YoP@_hr% zGx**mL_ov3$=#BDNOy~MTI8KhnfzDi%;b)2+T_9>>%RzbA1+J^kDLxaDyjiC3x)0*nnAO z-=6}sH1wpXJD&o!Jcc|e?5+vB)lvyy4l6$*p@!1hl^}(X2YEYySO9ITN_2JwgDPQ- z)WTcptNKo@a(%o>!Cj-nLQCrH>tVIJ^#fV3JCe^#(LGu=?86w;XES1#c3A*7j{0f_ zjEP}Hp{QbZv>?F1i7+&z8y`&04eTW1vkY*Z+Utd`;J#$?np&5_x%U({pa}l=lQhVU zv-B)86+wC~EG1To*^xs7=${3#*z$*ExsxQ9hvbhq&q?(NDkN&?x8Dk<-iM_2x%ZBh z^A6KjGh^?L2Fw#}0-tJD37si$;S(Fyj}o#@<56lg2b}{~38BhBl}01;NV5n?(zx!= zY+;zot&*J)fy7u>(~Yi7#VD;8fb{$weSzw&dfB4Rlq~fYF#Fxmu@6hL5eHnt#R)rB z>4tn=2WuAc3!8|AjBf%$91+^=4nj1bAWivdU?nPQEQPUsk%ycZfdz7PJ(@)LS!2<4 z*nrkjH%pn3M4HKLO0y(VIfb^!w`P>MP6)$*|9r$|0!~GEFOKJ}$75gR7*71f9NxRV^+FrFqN?-O6ZUh}44zqvUYai7dUbKj$r2n2`fvkb zMnb6H9j+g+o?D7BXM;5pt2-QMObN`aGiT{s9Qi-%WWf$2MpV`$5~#$V zIx}yK)ai0lq&DRqW5auIAuXE=g;30)TVk!I>c3NPY;hlOcLoTdAba)tTCBtuz9kj^2>Qu_CZ+o&r< z$#|+DZCw=_6oVBc7&w{{w5@JlG zsjm%P(R(q{T7@vns6CCfwY!s=#C$CrJ}~{vdNKH}hCa5`5q1Nh$7Jn>NaT`DbT8fr zpqNF-rMINGbiWa3epYV=&RD%{N6*B|cILI)z2^Rsz5W5`Ej8it32eHYKKwJEKR@jI zuYdOY|K77+@%#T?XZ!uvlaw{z|8EM7n)qsI^SAzRo&g@9zY=Gq2b7+AejqbguRw|* z{^nX5A$BCV@;q?BENVj?wT0GuI81WEpOX<(Z~qy=Cn=jI`ANS2@9i1i|M$1w|3695 ezW;9-pMmad%eHLGwrtCPv-|}xbZ8R*J^%pmU3K~Z From 4cc5fc755f00ac6feedfeb7e44de31cf605c43c3 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 7 Dec 2018 11:42:03 -0800 Subject: [PATCH 68/79] Fix MS20208: Change an instance of 'ASSETS' to 'INVENTORY' --- interface/resources/qml/hifi/dialogs/security/Security.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/dialogs/security/Security.qml b/interface/resources/qml/hifi/dialogs/security/Security.qml index 5c52af1c05..a7a0d461a2 100644 --- a/interface/resources/qml/hifi/dialogs/security/Security.qml +++ b/interface/resources/qml/hifi/dialogs/security/Security.qml @@ -328,7 +328,7 @@ Rectangle { HifiStylesUit.RalewayRegular { text: "Your wallet is not set up.\n" + - "Open the ASSETS app to get started."; + "Open the INVENTORY app to get started."; // Anchors anchors.fill: parent; // Text size From 177a94b9a990a79056d090c9aaa3ef7fd5cfc5c2 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 6 Dec 2018 14:01:29 -0800 Subject: [PATCH 69/79] fix realod all scripts functionality --- libraries/script-engine/src/ScriptEngines.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/script-engine/src/ScriptEngines.cpp b/libraries/script-engine/src/ScriptEngines.cpp index 399ccf1919..e198502b3d 100644 --- a/libraries/script-engine/src/ScriptEngines.cpp +++ b/libraries/script-engine/src/ScriptEngines.cpp @@ -31,6 +31,8 @@ static const QUrl DEFAULT_SCRIPTS_LOCATION { "file:///~//defaultScripts.js" }; // Using a QVariantList so this is human-readable in the settings file static Setting::Handle runningScriptsHandle(SETTINGS_KEY, { QVariant(DEFAULT_SCRIPTS_LOCATION) }); +const int RELOAD_ALL_SCRIPTS_TIMEOUT = 1000; + ScriptsModel& getScriptsModel() { static ScriptsModel scriptsModel; @@ -386,15 +388,10 @@ void ScriptEngines::stopAllScripts(bool restart) { // queue user scripts if restarting if (restart && scriptEngine->isUserLoaded()) { _isReloading = true; - bool lastScript = (it == _scriptEnginesHash.constEnd() - 1); ScriptEngine::Type type = scriptEngine->getType(); - connect(scriptEngine.data(), &ScriptEngine::finished, this, [this, type, lastScript] (QString scriptName) { + connect(scriptEngine.data(), &ScriptEngine::finished, this, [this, type] (QString scriptName) { reloadScript(scriptName, true)->setType(type); - - if (lastScript) { - _isReloading = false; - } }); } @@ -404,6 +401,9 @@ void ScriptEngines::stopAllScripts(bool restart) { if (restart) { qCDebug(scriptengine) << "stopAllScripts -- emitting scriptsReloading"; + QTimer::singleShot(RELOAD_ALL_SCRIPTS_TIMEOUT, this, [&] { + _isReloading = false; + }); emit scriptsReloading(); } } From 7cbe3776f5b6e58793840bcecf16fc5354ecbd72 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Fri, 7 Dec 2018 11:47:32 -0800 Subject: [PATCH 70/79] Simplify serializer registration process --- interface/src/Application.cpp | 6 +-- libraries/fbx/src/FBXSerializer.cpp | 7 ++-- libraries/fbx/src/FBXSerializer.h | 4 +- libraries/fbx/src/GLTFSerializer.cpp | 7 ++-- libraries/fbx/src/GLTFSerializer.h | 5 +-- libraries/fbx/src/OBJSerializer.cpp | 7 ++-- libraries/fbx/src/OBJSerializer.h | 5 +-- .../hfm/src/hfm/FormatSerializerRegister.cpp | 29 +++++++++++++ .../hfm/src/hfm/FormatSerializerRegister.h | 35 ++++++++++++++++ libraries/hfm/src/hfm/HFMFormat.h | 25 ----------- libraries/hfm/src/hfm/HFMFormatRegistry.h | 3 +- libraries/hfm/src/hfm/HFMSerializer.h | 11 +++++ libraries/hfm/src/hfm/ModelFormatRegistry.cpp | 20 +++++++++ libraries/hfm/src/hfm/ModelFormatRegistry.h | 30 ++++++++++++++ .../src/model-networking/ModelCache.cpp | 9 ++++ .../src/model-networking/ModelCache.h | 1 + .../model-networking/ModelFormatRegistry.cpp | 41 ------------------- .../model-networking/ModelFormatRegistry.h | 32 --------------- .../src/model-networking/ModelLoader.cpp | 2 +- 19 files changed, 159 insertions(+), 120 deletions(-) create mode 100644 libraries/hfm/src/hfm/FormatSerializerRegister.cpp create mode 100644 libraries/hfm/src/hfm/FormatSerializerRegister.h delete mode 100644 libraries/hfm/src/hfm/HFMFormat.h create mode 100644 libraries/hfm/src/hfm/ModelFormatRegistry.cpp create mode 100644 libraries/hfm/src/hfm/ModelFormatRegistry.h delete mode 100644 libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp delete mode 100644 libraries/model-networking/src/model-networking/ModelFormatRegistry.h diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 6ff8618918..1570b6fe95 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -101,7 +101,7 @@ #include #include #include -#include +#include #include #include #include @@ -884,7 +884,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { DependencyManager::set(NodeType::Agent, listenPort); DependencyManager::set(); DependencyManager::set(); - DependencyManager::set(); + DependencyManager::set(); // ModelFormatRegistry must be defined before ModelCache. See the ModelCache constructor. DependencyManager::set(); DependencyManager::set(); DependencyManager::set(); @@ -2747,9 +2747,9 @@ Application::~Application() { DependencyManager::destroy(); DependencyManager::destroy(); DependencyManager::destroy(); - DependencyManager::destroy(); DependencyManager::destroy(); DependencyManager::destroy(); + DependencyManager::destroy(); DependencyManager::destroy(); DependencyManager::destroy(); DependencyManager::destroy(); diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index ccbda9af33..ac338407f4 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -33,7 +33,6 @@ #include #include -#include #include // TOOL: Uncomment the following line to enable the filtering of all the unkwnon fields of a node so we can break point easily while loading a model with problems... @@ -1834,14 +1833,16 @@ HFMModel* FBXSerializer::extractHFMModel(const QVariantHash& mapping, const QStr return hfmModelPtr; } -MediaType getFBXMediaType() { +MediaType FBXSerializer::getMediaType() const { MediaType mediaType("fbx"); mediaType.extensions.push_back("fbx"); mediaType.fileSignatures.emplace_back("Kaydara FBX Binary \x00", 0); return mediaType; } -std::shared_ptr FBXSerializer::FORMAT = std::make_shared>(getFBXMediaType()); +std::unique_ptr FBXSerializer::getFactory() const { + return std::make_unique>(); +} HFMModel::Pointer FBXSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { QBuffer buffer(const_cast(&data)); diff --git a/libraries/fbx/src/FBXSerializer.h b/libraries/fbx/src/FBXSerializer.h index e66a6b911a..a76fb8f9bf 100644 --- a/libraries/fbx/src/FBXSerializer.h +++ b/libraries/fbx/src/FBXSerializer.h @@ -28,7 +28,6 @@ #include "FBX.h" #include -#include #include #include @@ -97,7 +96,8 @@ class ExtractedMesh; class FBXSerializer : public HFMSerializer { public: - static std::shared_ptr FORMAT; + MediaType getMediaType() const override; + std::unique_ptr getFactory() const override; HFMModel* _hfmModel; /// Reads HFMModel from the supplied model and mapping data. diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index cfa2124c5d..e254a91eb0 100644 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -34,7 +34,6 @@ #include #include "FBXSerializer.h" -#include bool GLTFSerializer::getStringVal(const QJsonObject& object, const QString& fieldname, QString& value, QMap& defined) { @@ -906,14 +905,16 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const QUrl& url) { return true; } -MediaType getGLTFMediaType() { +MediaType GLTFSerializer::getMediaType() const { MediaType mediaType("gltf"); mediaType.extensions.push_back("gltf"); mediaType.webMediaTypes.push_back("model/gltf+json"); return mediaType; } -std::shared_ptr GLTFSerializer::FORMAT = std::make_shared>(getGLTFMediaType()); +std::unique_ptr GLTFSerializer::getFactory() const { + return std::make_unique>(); +} HFMModel::Pointer GLTFSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { diff --git a/libraries/fbx/src/GLTFSerializer.h b/libraries/fbx/src/GLTFSerializer.h index fffb192b5b..5fca77c4fd 100644 --- a/libraries/fbx/src/GLTFSerializer.h +++ b/libraries/fbx/src/GLTFSerializer.h @@ -16,8 +16,6 @@ #include #include #include -#include -#include "FBXSerializer.h" struct GLTFAsset { @@ -704,7 +702,8 @@ struct GLTFFile { class GLTFSerializer : public QObject, public HFMSerializer { Q_OBJECT public: - static std::shared_ptr FORMAT; + MediaType getMediaType() const override; + std::unique_ptr getFactory() const override; HFMModel::Pointer read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url = QUrl()) override; private: diff --git a/libraries/fbx/src/OBJSerializer.cpp b/libraries/fbx/src/OBJSerializer.cpp index b85ca7ebca..9c92466565 100644 --- a/libraries/fbx/src/OBJSerializer.cpp +++ b/libraries/fbx/src/OBJSerializer.cpp @@ -28,7 +28,6 @@ #include #include "FBXSerializer.h" -#include #include #include @@ -652,13 +651,15 @@ done: return result; } -MediaType getOBJMediaType() { +MediaType OBJSerializer::getMediaType() const { MediaType mediaType("obj"); mediaType.extensions.push_back("obj"); return mediaType; } -std::shared_ptr OBJSerializer::FORMAT = std::make_shared>(getOBJMediaType()); +std::unique_ptr OBJSerializer::getFactory() const { + return std::make_unique>(); +} HFMModel::Pointer OBJSerializer::read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url) { PROFILE_RANGE_EX(resource_parse, __FUNCTION__, 0xffff0000, nullptr); diff --git a/libraries/fbx/src/OBJSerializer.h b/libraries/fbx/src/OBJSerializer.h index cbf6ee3ce2..3723b0e569 100644 --- a/libraries/fbx/src/OBJSerializer.h +++ b/libraries/fbx/src/OBJSerializer.h @@ -14,8 +14,6 @@ #include #include -#include -#include "FBXSerializer.h" class OBJTokenizer { public: @@ -93,7 +91,8 @@ public: class OBJSerializer: public QObject, public HFMSerializer { // QObject so we can make network requests. Q_OBJECT public: - static std::shared_ptr FORMAT; + MediaType getMediaType() const override; + std::unique_ptr getFactory() const; typedef QVector FaceGroup; QVector vertices; diff --git a/libraries/hfm/src/hfm/FormatSerializerRegister.cpp b/libraries/hfm/src/hfm/FormatSerializerRegister.cpp new file mode 100644 index 0000000000..09c858b79d --- /dev/null +++ b/libraries/hfm/src/hfm/FormatSerializerRegister.cpp @@ -0,0 +1,29 @@ +// +// FormatSerializerRegister.cpp +// libraries/hfm/src/hfm +// +// Created by Sabrina Shanman on 2018/12/07. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#include "FormatSerializerRegister.h" + +#include "ModelFormatRegistry.h" + +namespace hfm { + +DoFormatSerializerRegister::DoFormatSerializerRegister(const MediaType& mediaType, std::unique_ptr factory) { + auto registry = DependencyManager::get(); + _mediaTypeID = registry->_hfmFormatRegistry.registerMediaType(mediaType, std::move(factory)); +} + +void DoFormatSerializerRegister::unregisterFormat() { + auto registry = DependencyManager::get(); + registry->_hfmFormatRegistry.unregisterMediaType(_mediaTypeID); + _mediaTypeID = hfm::FormatRegistry::INVALID_MEDIA_TYPE_ID; +} + +}; diff --git a/libraries/hfm/src/hfm/FormatSerializerRegister.h b/libraries/hfm/src/hfm/FormatSerializerRegister.h new file mode 100644 index 0000000000..5971d678c8 --- /dev/null +++ b/libraries/hfm/src/hfm/FormatSerializerRegister.h @@ -0,0 +1,35 @@ +// +// FormatSerializerRegister.h +// libraries/hfm/src/hfm +// +// Created by Sabrina Shanman on 2018/11/30. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_HFMFormat_h +#define hifi_HFMFormat_h + +#include "HFMFormatRegistry.h" +#include "HFMSerializer.h" + +namespace hfm { + // A helper class which allows early de-registration of a Serializer from ModelFormatRegistry + class FormatSerializerRegister { + public: + virtual void unregisterFormat() = 0; + }; + + class DoFormatSerializerRegister : public FormatSerializerRegister { + public: + DoFormatSerializerRegister(const MediaType& mediaType, std::unique_ptr factory); + + void unregisterFormat() override; + protected: + FormatRegistry::MediaTypeID _mediaTypeID { FormatRegistry::INVALID_MEDIA_TYPE_ID }; + }; +}; + +#endif // hifi_HFMFormat_h diff --git a/libraries/hfm/src/hfm/HFMFormat.h b/libraries/hfm/src/hfm/HFMFormat.h deleted file mode 100644 index 4430bca3f4..0000000000 --- a/libraries/hfm/src/hfm/HFMFormat.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// HFMFormat.h -// libraries/hfm/src/hfm -// -// Created by Sabrina Shanman on 2018/11/30. -// Copyright 2018 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_HFMFormat_h -#define hifi_HFMFormat_h - -#include "HFMFormatRegistry.h" - -namespace hfm { - class Format { - public: - virtual void registerFormat(FormatRegistry& registry) = 0; - virtual void unregisterFormat(FormatRegistry& registry) = 0; - }; -}; - -#endif // hifi_HFMFormat_h diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.h b/libraries/hfm/src/hfm/HFMFormatRegistry.h index 203c5f5743..a437e9ac37 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.h +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.h @@ -27,9 +27,10 @@ public: void unregisterMediaType(const MediaTypeID& id); std::shared_ptr getSerializerForMediaType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const; - std::shared_ptr getSerializerForMediaTypeID(MediaTypeID id) const; protected: + std::shared_ptr getSerializerForMediaTypeID(MediaTypeID id) const; + MediaTypeLibrary _mediaTypeLibrary; std::mutex _libraryLock; class SupportedFormat { diff --git a/libraries/hfm/src/hfm/HFMSerializer.h b/libraries/hfm/src/hfm/HFMSerializer.h index a8ff4a3fa0..868ec3dd45 100644 --- a/libraries/hfm/src/hfm/HFMSerializer.h +++ b/libraries/hfm/src/hfm/HFMSerializer.h @@ -15,6 +15,7 @@ #include #include "HFM.h" +#include namespace hfm { @@ -25,6 +26,16 @@ public: virtual std::shared_ptr get() = 0; }; + template + class SimpleFactory : public Factory { + std::shared_ptr get() override { + return std::make_shared(); + } + }; + + virtual MediaType getMediaType() const = 0; + virtual std::unique_ptr getFactory() const = 0; + virtual Model::Pointer read(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url = hifi::URL()) = 0; }; diff --git a/libraries/hfm/src/hfm/ModelFormatRegistry.cpp b/libraries/hfm/src/hfm/ModelFormatRegistry.cpp new file mode 100644 index 0000000000..5520307a9b --- /dev/null +++ b/libraries/hfm/src/hfm/ModelFormatRegistry.cpp @@ -0,0 +1,20 @@ +// +// ModelFormatRegistry.cpp +// libraries/model-networking/src/model-networking +// +// Created by Sabrina Shanman on 2018/11/30. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#include "ModelFormatRegistry.h" + +std::unique_ptr ModelFormatRegistry::addFormat(const hfm::Serializer& serializer) { + return std::make_unique(serializer.getMediaType(), serializer.getFactory()); +} + +std::shared_ptr ModelFormatRegistry::getSerializerForMediaType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const { + return _hfmFormatRegistry.getSerializerForMediaType(data, url, webMediaType); +} diff --git a/libraries/hfm/src/hfm/ModelFormatRegistry.h b/libraries/hfm/src/hfm/ModelFormatRegistry.h new file mode 100644 index 0000000000..4116869390 --- /dev/null +++ b/libraries/hfm/src/hfm/ModelFormatRegistry.h @@ -0,0 +1,30 @@ +// +// ModelFormatRegistry.h +// libraries/hfm/src/hfm +// +// Created by Sabrina Shanman on 2018/11/30. +// Copyright 2018 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_ModelFormatRegistry_h +#define hifi_ModelFormatRegistry_h + +#include "FormatSerializerRegister.h" +#include "HFMFormatRegistry.h" + +#include + +class ModelFormatRegistry : public Dependency { +public: + std::unique_ptr addFormat(const hfm::Serializer& serializer); + std::shared_ptr getSerializerForMediaType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const; + +protected: + friend class hfm::DoFormatSerializerRegister; + hfm::FormatRegistry _hfmFormatRegistry; +}; + +#endif // hifi_ModelFormatRegistry_h diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 8dc483e43b..2c82401ad0 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -23,6 +23,10 @@ #include "ModelNetworkingLogging.h" #include #include +#include +#include +#include +#include Q_LOGGING_CATEGORY(trace_resource_parse_geometry, "trace.resource.parse.geometry") @@ -308,6 +312,11 @@ ModelCache::ModelCache() { const qint64 GEOMETRY_DEFAULT_UNUSED_MAX_SIZE = DEFAULT_UNUSED_MAX_SIZE; setUnusedResourceCacheSize(GEOMETRY_DEFAULT_UNUSED_MAX_SIZE); setObjectName("ModelCache"); + + auto modelFormatRegistry = DependencyManager::get(); + modelFormatRegistry->addFormat(FBXSerializer()); + modelFormatRegistry->addFormat(OBJSerializer()); + modelFormatRegistry->addFormat(GLTFSerializer()); } QSharedPointer ModelCache::createResource(const QUrl& url, const QSharedPointer& fallback, diff --git a/libraries/model-networking/src/model-networking/ModelCache.h b/libraries/model-networking/src/model-networking/ModelCache.h index 1018bdecd5..5f583d82d9 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.h +++ b/libraries/model-networking/src/model-networking/ModelCache.h @@ -21,6 +21,7 @@ #include "FBXSerializer.h" #include "TextureCache.h" #include "ModelLoader.h" +#include "hfm/FormatSerializerRegister.h" // Alias instead of derive to avoid copying diff --git a/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp b/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp deleted file mode 100644 index 8adc4ea5d9..0000000000 --- a/libraries/model-networking/src/model-networking/ModelFormatRegistry.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// -// ModelFormatRegistry.cpp -// libraries/model-networking/src/model-networking -// -// Created by Sabrina Shanman on 2018/11/30. -// Copyright 2018 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "ModelFormatRegistry.h" - -#include "FBXSerializer.h" -#include "OBJSerializer.h" -#include "GLTFSerializer.h" - -ModelFormatRegistry::ModelFormatRegistry() : hfm::FormatRegistry() { - addDefaultFormats(); -} - -void ModelFormatRegistry::addDefaultFormats() { - addFormat(FBXSerializer::FORMAT); - addFormat(OBJSerializer::FORMAT); - addFormat(GLTFSerializer::FORMAT); -} - -void ModelFormatRegistry::addFormat(const std::shared_ptr& format) { - format->registerFormat(*this); - { - std::lock_guard lock(_formatsLock); - formats.push_back(format); - } -} - -ModelFormatRegistry::~ModelFormatRegistry() { - for (auto& format : formats) { - format->unregisterFormat(*this); - } - formats.clear(); -} diff --git a/libraries/model-networking/src/model-networking/ModelFormatRegistry.h b/libraries/model-networking/src/model-networking/ModelFormatRegistry.h deleted file mode 100644 index ec1ce79b43..0000000000 --- a/libraries/model-networking/src/model-networking/ModelFormatRegistry.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// ModelFormatRegistry.h -// libraries/model-networking/src/model-networking -// -// Created by Sabrina Shanman on 2018/11/30. -// Copyright 2018 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_ModelFormatRegistry_h -#define hifi_ModelFormatRegistry_h - -#include -#include - -#include - -class ModelFormatRegistry : public hfm::FormatRegistry, public Dependency { -public: - ModelFormatRegistry(); - ~ModelFormatRegistry(); - void addFormat(const std::shared_ptr& format); - -protected: - void addDefaultFormats(); - std::vector> formats; - std::mutex _formatsLock; -}; - -#endif // hifi_ModelFormatRegistry_h diff --git a/libraries/model-networking/src/model-networking/ModelLoader.cpp b/libraries/model-networking/src/model-networking/ModelLoader.cpp index 1ef8e8ae85..65314633c9 100644 --- a/libraries/model-networking/src/model-networking/ModelLoader.cpp +++ b/libraries/model-networking/src/model-networking/ModelLoader.cpp @@ -12,7 +12,7 @@ #include "ModelLoader.h" #include -#include "ModelFormatRegistry.h" +#include hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const { From f2e69aec5ea22e0927652cd4c7ff5db8e58e6754 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Fri, 7 Dec 2018 13:41:33 -0800 Subject: [PATCH 71/79] Fix mac warning for OBJSerializer::getFactory not marked with override --- libraries/fbx/src/OBJSerializer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fbx/src/OBJSerializer.h b/libraries/fbx/src/OBJSerializer.h index 3723b0e569..c4f8025e66 100644 --- a/libraries/fbx/src/OBJSerializer.h +++ b/libraries/fbx/src/OBJSerializer.h @@ -92,7 +92,7 @@ class OBJSerializer: public QObject, public HFMSerializer { // QObject so we can Q_OBJECT public: MediaType getMediaType() const override; - std::unique_ptr getFactory() const; + std::unique_ptr getFactory() const override; typedef QVector FaceGroup; QVector vertices; From 031085b3843700ee01ac42dc2eab9962ddfea6ec Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Fri, 7 Dec 2018 16:17:33 -0800 Subject: [PATCH 72/79] Remove now unused HFMSimpleFormat --- libraries/hfm/src/hfm/HFMSimpleFormat.h | 47 ------------------------- 1 file changed, 47 deletions(-) delete mode 100644 libraries/hfm/src/hfm/HFMSimpleFormat.h diff --git a/libraries/hfm/src/hfm/HFMSimpleFormat.h b/libraries/hfm/src/hfm/HFMSimpleFormat.h deleted file mode 100644 index 0ab6636e7d..0000000000 --- a/libraries/hfm/src/hfm/HFMSimpleFormat.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// HFMSimpleFormat.h -// libraries/hfm/src/hfm -// -// Created by Sabrina Shanman on 2018/11/30. -// Copyright 2018 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_HFMSimpleFormat_h -#define hifi_HFMSimpleFormat_h - -#include "HFMFormat.h" -#include "HFMSerializer.h" - -namespace hfm { - template - class SimpleFactory : public Serializer::Factory { - std::shared_ptr get() override { - return std::make_shared(); - } - }; - - template // T is an implementation of hfm::Serializer - class SimpleFormat : public Format { - public: - SimpleFormat(const MediaType& mediaType) : Format(), - _mediaType(mediaType) { - } - - void registerFormat(FormatRegistry& registry) override { - _mediaTypeID = registry.registerMediaType(_mediaType, std::make_unique>()); - } - - void unregisterFormat(FormatRegistry& registry) override { - registry.unregisterMediaType(_mediaTypeID); - _mediaTypeID = hfm::FormatRegistry::INVALID_MEDIA_TYPE_ID; - } - protected: - MediaType _mediaType; - hfm::FormatRegistry::MediaTypeID _mediaTypeID; - }; -}; - -#endif // hifi_HFMSimpleFormat_h From c1e2653526ee334e83cf8eee6b7e132abb893c47 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Sat, 8 Dec 2018 07:42:03 -0800 Subject: [PATCH 73/79] check for and break parenting loops in hasAncestorOfType, findAncestorOfType, isParentPathComplete --- libraries/shared/src/SpatiallyNestable.cpp | 52 +++++++++++++++------- libraries/shared/src/SpatiallyNestable.h | 8 ++-- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/libraries/shared/src/SpatiallyNestable.cpp b/libraries/shared/src/SpatiallyNestable.cpp index 97e20f5627..d704498143 100644 --- a/libraries/shared/src/SpatiallyNestable.cpp +++ b/libraries/shared/src/SpatiallyNestable.cpp @@ -748,6 +748,18 @@ const Transform SpatiallyNestable::getTransform() const { return result; } +void SpatiallyNestable::breakParentingLoop() const { + // someone created a loop. break it... + qCDebug(shared) << "Parenting loop detected: " << getID(); + SpatiallyNestablePointer _this = getThisPointer(); + _this->setParentID(QUuid()); + bool setPositionSuccess; + AACube aaCube = getQueryAACube(setPositionSuccess); + if (setPositionSuccess) { + _this->setWorldPosition(aaCube.calcCenter()); + } +} + const Transform SpatiallyNestable::getTransform(int jointIndex, bool& success, int depth) const { // this returns the world-space transform for this object. It finds its parent's transform (which may // cause this object's parent to query its parent, etc) and multiplies this object's local transform onto it. @@ -755,15 +767,7 @@ const Transform SpatiallyNestable::getTransform(int jointIndex, bool& success, i if (depth > MAX_PARENTING_CHAIN_SIZE) { success = false; - // someone created a loop. break it... - qCDebug(shared) << "Parenting loop detected: " << getID(); - SpatiallyNestablePointer _this = getThisPointer(); - _this->setParentID(QUuid()); - bool setPositionSuccess; - AACube aaCube = getQueryAACube(setPositionSuccess); - if (setPositionSuccess) { - _this->setWorldPosition(aaCube.calcCenter()); - } + breakParentingLoop(); return jointInWorldFrame; } @@ -1208,8 +1212,12 @@ AACube SpatiallyNestable::getQueryAACube() const { return result; } -bool SpatiallyNestable::hasAncestorOfType(NestableType nestableType) const { - bool success; +bool SpatiallyNestable::hasAncestorOfType(NestableType nestableType, int depth) const { + if (depth > MAX_PARENTING_CHAIN_SIZE) { + breakParentingLoop(); + return false; + } + if (nestableType == NestableType::Avatar) { QUuid parentID = getParentID(); if (parentID == AVATAR_SELF_ID) { @@ -1217,6 +1225,7 @@ bool SpatiallyNestable::hasAncestorOfType(NestableType nestableType) const { } } + bool success; SpatiallyNestablePointer parent = getParentPointer(success); if (!success || !parent) { return false; @@ -1226,11 +1235,14 @@ bool SpatiallyNestable::hasAncestorOfType(NestableType nestableType) const { return true; } - return parent->hasAncestorOfType(nestableType); + return parent->hasAncestorOfType(nestableType, depth + 1); } -const QUuid SpatiallyNestable::findAncestorOfType(NestableType nestableType) const { - bool success; +const QUuid SpatiallyNestable::findAncestorOfType(NestableType nestableType, int depth) const { + if (depth > MAX_PARENTING_CHAIN_SIZE) { + breakParentingLoop(); + return QUuid(); + } if (nestableType == NestableType::Avatar) { QUuid parentID = getParentID(); @@ -1239,6 +1251,7 @@ const QUuid SpatiallyNestable::findAncestorOfType(NestableType nestableType) con } } + bool success; SpatiallyNestablePointer parent = getParentPointer(success); if (!success || !parent) { return QUuid(); @@ -1248,7 +1261,7 @@ const QUuid SpatiallyNestable::findAncestorOfType(NestableType nestableType) con return parent->getID(); } - return parent->findAncestorOfType(nestableType); + return parent->findAncestorOfType(nestableType, depth + 1); } void SpatiallyNestable::getLocalTransformAndVelocities( @@ -1336,7 +1349,12 @@ void SpatiallyNestable::dump(const QString& prefix) const { } } -bool SpatiallyNestable::isParentPathComplete() const { +bool SpatiallyNestable::isParentPathComplete(int depth) const { + if (depth > MAX_PARENTING_CHAIN_SIZE) { + breakParentingLoop(); + return false; + } + static const QUuid IDENTITY; QUuid parentID = getParentID(); if (parentID.isNull() || parentID == IDENTITY) { @@ -1349,5 +1367,5 @@ bool SpatiallyNestable::isParentPathComplete() const { return false; } - return parent->isParentPathComplete(); + return parent->isParentPathComplete(depth + 1); } diff --git a/libraries/shared/src/SpatiallyNestable.h b/libraries/shared/src/SpatiallyNestable.h index 03ed97afbd..aafcfa10eb 100644 --- a/libraries/shared/src/SpatiallyNestable.h +++ b/libraries/shared/src/SpatiallyNestable.h @@ -75,7 +75,7 @@ public: static QString nestableTypeToString(NestableType nestableType); - virtual bool isParentPathComplete() const; + virtual bool isParentPathComplete(int depth = 0) const; // world frame @@ -187,8 +187,8 @@ public: bool isParentIDValid() const { bool success = false; getParentPointer(success); return success; } virtual SpatialParentTree* getParentTree() const { return nullptr; } - bool hasAncestorOfType(NestableType nestableType) const; - const QUuid findAncestorOfType(NestableType nestableType) const; + bool hasAncestorOfType(NestableType nestableType, int depth = 0) const; + const QUuid findAncestorOfType(NestableType nestableType, int depth = 0) const; SpatiallyNestablePointer getParentPointer(bool& success) const; static SpatiallyNestablePointer findByID(QUuid id, bool& success); @@ -246,6 +246,8 @@ private: mutable bool _parentKnowsMe { false }; bool _isDead { false }; bool _queryAACubeIsPuffed { false }; + + void breakParentingLoop() const; }; From ead49e5f03acb79d3aae01e76673d3832e65c314 Mon Sep 17 00:00:00 2001 From: vladest Date: Sat, 8 Dec 2018 16:49:34 +0100 Subject: [PATCH 74/79] Added missed header --- interface/src/graphics/RenderEventHandler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/src/graphics/RenderEventHandler.h b/interface/src/graphics/RenderEventHandler.h index 93f8b548d0..1c531adbad 100644 --- a/interface/src/graphics/RenderEventHandler.h +++ b/interface/src/graphics/RenderEventHandler.h @@ -10,6 +10,7 @@ #ifndef hifi_RenderEventHandler_h #define hifi_RenderEventHandler_h +#include #include #include #include "gl/OffscreenGLCanvas.h" @@ -49,4 +50,4 @@ private: bool event(QEvent* event) override; }; -#endif // #include hifi_RenderEventHandler_h \ No newline at end of file +#endif // #include hifi_RenderEventHandler_h From 8792824960aa9fc8774c4f85735d1296a8a6d0aa Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 10 Dec 2018 09:58:59 -0800 Subject: [PATCH 75/79] Remove FormatSerializerRegister as it is unused --- .../hfm/src/hfm/FormatSerializerRegister.cpp | 29 --------------- .../hfm/src/hfm/FormatSerializerRegister.h | 35 ------------------- libraries/hfm/src/hfm/ModelFormatRegistry.cpp | 4 +-- libraries/hfm/src/hfm/ModelFormatRegistry.h | 4 +-- .../src/model-networking/ModelCache.h | 1 - 5 files changed, 3 insertions(+), 70 deletions(-) delete mode 100644 libraries/hfm/src/hfm/FormatSerializerRegister.cpp delete mode 100644 libraries/hfm/src/hfm/FormatSerializerRegister.h diff --git a/libraries/hfm/src/hfm/FormatSerializerRegister.cpp b/libraries/hfm/src/hfm/FormatSerializerRegister.cpp deleted file mode 100644 index 09c858b79d..0000000000 --- a/libraries/hfm/src/hfm/FormatSerializerRegister.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// -// FormatSerializerRegister.cpp -// libraries/hfm/src/hfm -// -// Created by Sabrina Shanman on 2018/12/07. -// Copyright 2018 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "FormatSerializerRegister.h" - -#include "ModelFormatRegistry.h" - -namespace hfm { - -DoFormatSerializerRegister::DoFormatSerializerRegister(const MediaType& mediaType, std::unique_ptr factory) { - auto registry = DependencyManager::get(); - _mediaTypeID = registry->_hfmFormatRegistry.registerMediaType(mediaType, std::move(factory)); -} - -void DoFormatSerializerRegister::unregisterFormat() { - auto registry = DependencyManager::get(); - registry->_hfmFormatRegistry.unregisterMediaType(_mediaTypeID); - _mediaTypeID = hfm::FormatRegistry::INVALID_MEDIA_TYPE_ID; -} - -}; diff --git a/libraries/hfm/src/hfm/FormatSerializerRegister.h b/libraries/hfm/src/hfm/FormatSerializerRegister.h deleted file mode 100644 index 5971d678c8..0000000000 --- a/libraries/hfm/src/hfm/FormatSerializerRegister.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// FormatSerializerRegister.h -// libraries/hfm/src/hfm -// -// Created by Sabrina Shanman on 2018/11/30. -// Copyright 2018 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_HFMFormat_h -#define hifi_HFMFormat_h - -#include "HFMFormatRegistry.h" -#include "HFMSerializer.h" - -namespace hfm { - // A helper class which allows early de-registration of a Serializer from ModelFormatRegistry - class FormatSerializerRegister { - public: - virtual void unregisterFormat() = 0; - }; - - class DoFormatSerializerRegister : public FormatSerializerRegister { - public: - DoFormatSerializerRegister(const MediaType& mediaType, std::unique_ptr factory); - - void unregisterFormat() override; - protected: - FormatRegistry::MediaTypeID _mediaTypeID { FormatRegistry::INVALID_MEDIA_TYPE_ID }; - }; -}; - -#endif // hifi_HFMFormat_h diff --git a/libraries/hfm/src/hfm/ModelFormatRegistry.cpp b/libraries/hfm/src/hfm/ModelFormatRegistry.cpp index 5520307a9b..b4d7c5849f 100644 --- a/libraries/hfm/src/hfm/ModelFormatRegistry.cpp +++ b/libraries/hfm/src/hfm/ModelFormatRegistry.cpp @@ -11,8 +11,8 @@ #include "ModelFormatRegistry.h" -std::unique_ptr ModelFormatRegistry::addFormat(const hfm::Serializer& serializer) { - return std::make_unique(serializer.getMediaType(), serializer.getFactory()); +void ModelFormatRegistry::addFormat(const hfm::Serializer& serializer) { + _hfmFormatRegistry.registerMediaType(serializer.getMediaType(), std::move(serializer.getFactory())); } std::shared_ptr ModelFormatRegistry::getSerializerForMediaType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const { diff --git a/libraries/hfm/src/hfm/ModelFormatRegistry.h b/libraries/hfm/src/hfm/ModelFormatRegistry.h index 4116869390..1228465298 100644 --- a/libraries/hfm/src/hfm/ModelFormatRegistry.h +++ b/libraries/hfm/src/hfm/ModelFormatRegistry.h @@ -12,18 +12,16 @@ #ifndef hifi_ModelFormatRegistry_h #define hifi_ModelFormatRegistry_h -#include "FormatSerializerRegister.h" #include "HFMFormatRegistry.h" #include class ModelFormatRegistry : public Dependency { public: - std::unique_ptr addFormat(const hfm::Serializer& serializer); + void addFormat(const hfm::Serializer& serializer); std::shared_ptr getSerializerForMediaType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const; protected: - friend class hfm::DoFormatSerializerRegister; hfm::FormatRegistry _hfmFormatRegistry; }; diff --git a/libraries/model-networking/src/model-networking/ModelCache.h b/libraries/model-networking/src/model-networking/ModelCache.h index 5f583d82d9..1018bdecd5 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.h +++ b/libraries/model-networking/src/model-networking/ModelCache.h @@ -21,7 +21,6 @@ #include "FBXSerializer.h" #include "TextureCache.h" #include "ModelLoader.h" -#include "hfm/FormatSerializerRegister.h" // Alias instead of derive to avoid copying From b960b66542d6c5faf55bf2296dbf1febe8c2dc8f Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 10 Dec 2018 11:10:29 -0800 Subject: [PATCH 76/79] Fix mac warning for std::move on temporary object --- libraries/hfm/src/hfm/ModelFormatRegistry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/hfm/src/hfm/ModelFormatRegistry.cpp b/libraries/hfm/src/hfm/ModelFormatRegistry.cpp index b4d7c5849f..d95453161a 100644 --- a/libraries/hfm/src/hfm/ModelFormatRegistry.cpp +++ b/libraries/hfm/src/hfm/ModelFormatRegistry.cpp @@ -12,7 +12,7 @@ #include "ModelFormatRegistry.h" void ModelFormatRegistry::addFormat(const hfm::Serializer& serializer) { - _hfmFormatRegistry.registerMediaType(serializer.getMediaType(), std::move(serializer.getFactory())); + _hfmFormatRegistry.registerMediaType(serializer.getMediaType(), serializer.getFactory()); } std::shared_ptr ModelFormatRegistry::getSerializerForMediaType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const { From ed99da2165ab7c0938508e0525c13ec43eed4050 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 10 Dec 2018 11:15:27 -0800 Subject: [PATCH 77/79] Fix MS20215: Fix incorrect display of unavailable items on Marketplace main page --- scripts/system/html/js/marketplacesInject.js | 40 +++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index e3da1c2577..f1931192e4 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -251,19 +251,39 @@ $(this).closest('.col-xs-3').attr("class", 'col-xs-6'); var priceElement = $(this).find('.price'); - priceElement.css({ - "padding": "3px 5px", - "height": "40px", - "background": "linear-gradient(#00b4ef, #0093C5)", - "color": "#FFF", - "font-weight": "600", - "line-height": "34px" - }); + var available = true; + + if (priceElement.text() === 'invalidated' || + priceElement.text() === 'sold out' || + priceElement.text() === 'not for sale') { + available = false; + priceElement.css({ + "padding": "3px 5px 10px 5px", + "height": "40px", + "background": "linear-gradient(#a2a2a2, #fefefe)", + "color": "#000", + "font-weight": "600", + "line-height": "34px" + }); + } else { + priceElement.css({ + "padding": "3px 5px", + "height": "40px", + "background": "linear-gradient(#00b4ef, #0093C5)", + "color": "#FFF", + "font-weight": "600", + "line-height": "34px" + }); + } if (parseInt(cost) > 0) { priceElement.css({ "width": "auto" }); - priceElement.html(' ' + cost); + + if (available) { + priceElement.html(' ' + cost); + } + priceElement.css({ "min-width": priceElement.width() + 30 }); } }); From 31d15127013b38e887e8ca3b912027ecab9c9b06 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 10 Dec 2018 16:12:23 -0800 Subject: [PATCH 78/79] Simplify url empty check in GeometryReader::run --- libraries/model-networking/src/model-networking/ModelCache.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 2c82401ad0..dfee4750f5 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -193,8 +193,7 @@ void GeometryReader::run() { return; } - QString urlname = _url.path().toLower(); - if (urlname.isEmpty() || _url.path().isEmpty()) { + if (_url.path().isEmpty()) { throw QString("url is invalid"); } From 79e9bff225f8af6db38a72d0aa833adb43b9f9ba Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 10 Dec 2018 16:18:11 -0800 Subject: [PATCH 79/79] Nest if statement for invalid id checking in hfm::FormatRegistry::getSerializerForMediaType --- libraries/hfm/src/hfm/HFMFormatRegistry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp index 60606bc018..1328369cff 100644 --- a/libraries/hfm/src/hfm/HFMFormatRegistry.cpp +++ b/libraries/hfm/src/hfm/HFMFormatRegistry.cpp @@ -54,9 +54,9 @@ std::shared_ptr FormatRegistry::getSerializerForMediaType(const hifi id = _mediaTypeLibrary.findMediaTypeForData(data); if (id == INVALID_MEDIA_TYPE_ID) { id = _mediaTypeLibrary.findMediaTypeForURL(url); - } - if (id == INVALID_MEDIA_TYPE_ID) { - id = _mediaTypeLibrary.findMediaTypeForWebID(webMediaType); + if (id == INVALID_MEDIA_TYPE_ID) { + id = _mediaTypeLibrary.findMediaTypeForWebID(webMediaType); + } } } return getSerializerForMediaTypeID(id);