mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 05:53:10 +02:00
Merge pull request #9004 from highfidelity/rc-26
Beta Release 26 - Includes up to Developer Release 5648
This commit is contained in:
commit
25b9b97609
76 changed files with 824 additions and 221 deletions
|
@ -88,6 +88,10 @@ void Agent::playAvatarSound(SharedSoundPointer sound) {
|
|||
QMetaObject::invokeMethod(this, "playAvatarSound", Q_ARG(SharedSoundPointer, sound));
|
||||
return;
|
||||
} else {
|
||||
// TODO: seems to add occasional artifact in tests. I believe it is
|
||||
// correct to do this, but need to figure out for sure, so commenting this
|
||||
// out until I verify.
|
||||
// _numAvatarSoundSentBytes = 0;
|
||||
setAvatarSound(sound);
|
||||
}
|
||||
}
|
||||
|
@ -404,8 +408,37 @@ QUuid Agent::getSessionUUID() const {
|
|||
return DependencyManager::get<NodeList>()->getSessionUUID();
|
||||
}
|
||||
|
||||
void Agent::setIsListeningToAudioStream(bool isListeningToAudioStream) {
|
||||
// this must happen on Agent's main thread
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMetaObject::invokeMethod(this, "setIsListeningToAudioStream", Q_ARG(bool, isListeningToAudioStream));
|
||||
return;
|
||||
}
|
||||
if (_isListeningToAudioStream) {
|
||||
// have to tell just the audio mixer to KillAvatar.
|
||||
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
nodeList->eachMatchingNode(
|
||||
[&](const SharedNodePointer& node)->bool {
|
||||
return (node->getType() == NodeType::AudioMixer) && node->getActiveSocket();
|
||||
},
|
||||
[&](const SharedNodePointer& node) {
|
||||
qDebug() << "sending KillAvatar message to Audio Mixers";
|
||||
auto packet = NLPacket::create(PacketType::KillAvatar, NUM_BYTES_RFC4122_UUID, true);
|
||||
packet->write(getSessionUUID().toRfc4122());
|
||||
nodeList->sendPacket(std::move(packet), *node);
|
||||
});
|
||||
|
||||
}
|
||||
_isListeningToAudioStream = isListeningToAudioStream;
|
||||
}
|
||||
|
||||
void Agent::setIsAvatar(bool isAvatar) {
|
||||
// this must happen on Agent's main thread
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMetaObject::invokeMethod(this, "setIsAvatar", Q_ARG(bool, isAvatar));
|
||||
return;
|
||||
}
|
||||
_isAvatar = isAvatar;
|
||||
|
||||
if (_isAvatar && !_avatarIdentityTimer) {
|
||||
|
@ -435,14 +468,16 @@ void Agent::setIsAvatar(bool isAvatar) {
|
|||
// when we stop sending identity, but then get woken up again by the mixer itself, which sends
|
||||
// identity packets to everyone. Here we explicitly tell the mixer to kill the entry for us.
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
auto packetList = NLPacketList::create(PacketType::KillAvatar, QByteArray(), true, true);
|
||||
packetList->write(getSessionUUID().toRfc4122());
|
||||
nodeList->eachMatchingNode(
|
||||
[&](const SharedNodePointer& node)->bool {
|
||||
return node->getType() == NodeType::AvatarMixer && node->getActiveSocket();
|
||||
return (node->getType() == NodeType::AvatarMixer || node->getType() == NodeType::AudioMixer)
|
||||
&& node->getActiveSocket();
|
||||
},
|
||||
[&](const SharedNodePointer& node) {
|
||||
nodeList->sendPacketList(std::move(packetList), *node);
|
||||
qDebug() << "sending KillAvatar message to Avatar and Audio Mixers";
|
||||
auto packet = NLPacket::create(PacketType::KillAvatar, NUM_BYTES_RFC4122_UUID, true);
|
||||
packet->write(getSessionUUID().toRfc4122());
|
||||
nodeList->sendPacket(std::move(packet), *node);
|
||||
});
|
||||
}
|
||||
emit stopAvatarAudioTimer();
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
bool isPlayingAvatarSound() const { return _avatarSound != NULL; }
|
||||
|
||||
bool isListeningToAudioStream() const { return _isListeningToAudioStream; }
|
||||
void setIsListeningToAudioStream(bool isListeningToAudioStream) { _isListeningToAudioStream = isListeningToAudioStream; }
|
||||
void setIsListeningToAudioStream(bool isListeningToAudioStream);
|
||||
|
||||
float getLastReceivedAudioLoudness() const { return _lastReceivedAudioLoudness; }
|
||||
QUuid getSessionUUID() const;
|
||||
|
|
|
@ -93,6 +93,7 @@ AudioMixer::AudioMixer(ReceivedMessage& message) :
|
|||
packetReceiver.registerListener(PacketType::NegotiateAudioFormat, this, "handleNegotiateAudioFormat");
|
||||
packetReceiver.registerListener(PacketType::MuteEnvironment, this, "handleMuteEnvironmentPacket");
|
||||
packetReceiver.registerListener(PacketType::NodeIgnoreRequest, this, "handleNodeIgnoreRequestPacket");
|
||||
packetReceiver.registerListener(PacketType::KillAvatar, this, "handleKillAvatarPacket");
|
||||
|
||||
connect(nodeList.data(), &NodeList::nodeKilled, this, &AudioMixer::handleNodeKilled);
|
||||
}
|
||||
|
@ -598,6 +599,21 @@ void AudioMixer::handleNodeKilled(SharedNodePointer killedNode) {
|
|||
});
|
||||
}
|
||||
|
||||
void AudioMixer::handleKillAvatarPacket(QSharedPointer<ReceivedMessage> packet, SharedNodePointer sendingNode) {
|
||||
auto clientData = dynamic_cast<AudioMixerClientData*>(sendingNode->getLinkedData());
|
||||
if (clientData) {
|
||||
clientData->removeAgentAvatarAudioStream();
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
nodeList->eachNode([sendingNode](const SharedNodePointer& node){
|
||||
auto listenerClientData = dynamic_cast<AudioMixerClientData*>(node->getLinkedData());
|
||||
if (listenerClientData) {
|
||||
listenerClientData->removeHRTFForStream(sendingNode->getUUID());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AudioMixer::handleNodeIgnoreRequestPacket(QSharedPointer<ReceivedMessage> packet, SharedNodePointer sendingNode) {
|
||||
sendingNode->parseIgnoreRequestMessage(packet);
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ private slots:
|
|||
void handleNegotiateAudioFormat(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
|
||||
void handleNodeKilled(SharedNodePointer killedNode);
|
||||
void handleNodeIgnoreRequestPacket(QSharedPointer<ReceivedMessage> packet, SharedNodePointer sendingNode);
|
||||
void handleKillAvatarPacket(QSharedPointer<ReceivedMessage> packet, SharedNodePointer sendingNode);
|
||||
|
||||
void removeHRTFsForFinishedInjector(const QUuid& streamID);
|
||||
|
||||
|
|
|
@ -73,11 +73,19 @@ void AudioMixerClientData::removeHRTFForStream(const QUuid& nodeID, const QUuid&
|
|||
}
|
||||
}
|
||||
|
||||
void AudioMixerClientData::removeAgentAvatarAudioStream() {
|
||||
QWriteLocker writeLocker { &_streamsLock };
|
||||
auto it = _audioStreams.find(QUuid());
|
||||
if (it != _audioStreams.end()) {
|
||||
_audioStreams.erase(it);
|
||||
}
|
||||
writeLocker.unlock();
|
||||
}
|
||||
|
||||
int AudioMixerClientData::parseData(ReceivedMessage& message) {
|
||||
PacketType packetType = message.getType();
|
||||
|
||||
if (packetType == PacketType::AudioStreamStats) {
|
||||
|
||||
// skip over header, appendFlag, and num stats packed
|
||||
message.seek(sizeof(quint8) + sizeof(quint16));
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ public:
|
|||
// removes an AudioHRTF object for a given stream
|
||||
void removeHRTFForStream(const QUuid& nodeID, const QUuid& streamID = QUuid());
|
||||
|
||||
void removeAgentAvatarAudioStream();
|
||||
|
||||
int parseData(ReceivedMessage& message) override;
|
||||
|
||||
// attempt to pop a frame from each audio stream, and return the number of streams from this client
|
||||
|
|
|
@ -14,7 +14,7 @@ endif ()
|
|||
|
||||
if (HIFI_MEMORY_DEBUGGING)
|
||||
if (UNIX)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -U_FORTIFY_SOURCE -fno-stack-protector -fno-omit-frame-pointer")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libasan -static-libstdc++ -fsanitize=address")
|
||||
endif (UNIX)
|
||||
endif ()
|
||||
|
|
|
@ -571,7 +571,9 @@ Function HandlePostInstallOptions
|
|||
; both launches use the explorer trick in case the user has elevated permissions for the installer
|
||||
; it won't be possible to use this approach if either application should be launched with a command line param
|
||||
${If} ${SectionIsSelected} ${@SERVER_COMPONENT_NAME@}
|
||||
Exec '"$WINDIR\explorer.exe" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"'
|
||||
; create shortcut with ARGUMENTS
|
||||
CreateShortCut "$TEMP\SandboxShortcut.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@" "-- --launchInterface"
|
||||
Exec '"$WINDIR\explorer.exe" "$TEMP\SandboxShortcut.lnk"'
|
||||
${Else}
|
||||
Exec '"$WINDIR\explorer.exe" "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@"'
|
||||
${EndIf}
|
||||
|
|
22
cmake/templates/VersionInfo.rc.in
Normal file
22
cmake/templates/VersionInfo.rc.in
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Language and character set information as described at
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa381049(v=vs.85).aspx
|
||||
#define US_ENGLISH_UNICODE "040904B0"
|
||||
|
||||
// More information about the format of this file can be found at
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa381058(v=vs.85).aspx
|
||||
1 VERSIONINFO
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK US_ENGLISH_UNICODE
|
||||
BEGIN
|
||||
VALUE "CompanyName", "@BUILD_ORGANIZATION@"
|
||||
VALUE "FileDescription", "@APP_FULL_NAME@"
|
||||
VALUE "FileVersion", "@BUILD_VERSION@"
|
||||
VALUE "InternalName", "@TARGET_NAME@"
|
||||
VALUE "OriginalFilename", "@TARGET_NAME@.exe"
|
||||
VALUE "ProductName", "@APP_FULL_NAME@"
|
||||
VALUE "ProductVersion", "@BUILD_VERSION@"
|
||||
END
|
||||
END
|
||||
END
|
|
@ -237,6 +237,7 @@ void DomainGatekeeper::updateNodePermissions() {
|
|||
userPerms.permissions |= NodePermissions::Permission::canAdjustLocks;
|
||||
userPerms.permissions |= NodePermissions::Permission::canRezPermanentEntities;
|
||||
userPerms.permissions |= NodePermissions::Permission::canRezTemporaryEntities;
|
||||
userPerms.permissions |= NodePermissions::Permission::canWriteToAssetServer;
|
||||
} else {
|
||||
// this node is an agent
|
||||
const QHostAddress& addr = node->getLocalSocket().getAddress();
|
||||
|
@ -312,6 +313,7 @@ SharedNodePointer DomainGatekeeper::processAssignmentConnectRequest(const NodeCo
|
|||
userPerms.permissions |= NodePermissions::Permission::canAdjustLocks;
|
||||
userPerms.permissions |= NodePermissions::Permission::canRezPermanentEntities;
|
||||
userPerms.permissions |= NodePermissions::Permission::canRezTemporaryEntities;
|
||||
userPerms.permissions |= NodePermissions::Permission::canWriteToAssetServer;
|
||||
newNode->setPermissions(userPerms);
|
||||
return newNode;
|
||||
}
|
||||
|
|
|
@ -133,8 +133,12 @@ elseif (WIN32)
|
|||
set(CONFIGURE_ICON_RC_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Icon.rc")
|
||||
configure_file("${HF_CMAKE_DIR}/templates/Icon.rc.in" ${CONFIGURE_ICON_RC_OUTPUT})
|
||||
|
||||
set(APP_FULL_NAME "High Fidelity Interface")
|
||||
set(CONFIGURE_VERSION_INFO_RC_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.rc")
|
||||
configure_file("${HF_CMAKE_DIR}/templates/VersionInfo.rc.in" ${CONFIGURE_VERSION_INFO_RC_OUTPUT})
|
||||
|
||||
# add an executable that also has the icon itself and the configured rc file as resources
|
||||
add_executable(${TARGET_NAME} WIN32 ${INTERFACE_SRCS} ${QM} ${CONFIGURE_ICON_RC_OUTPUT})
|
||||
add_executable(${TARGET_NAME} WIN32 ${INTERFACE_SRCS} ${QM} ${CONFIGURE_ICON_RC_OUTPUT} ${CONFIGURE_VERSION_INFO_RC_OUTPUT})
|
||||
|
||||
if (NOT DEV_BUILD)
|
||||
add_custom_command(
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
{ "from": "OculusTouch.LT", "to": "Standard.LT" },
|
||||
{ "from": "OculusTouch.LS", "to": "Standard.LS" },
|
||||
{ "from": "OculusTouch.LeftGrip", "filters": { "type": "deadZone", "min": 0.5 }, "to": "Standard.LeftGrip" },
|
||||
{ "from": "OculusTouch.LeftHand", "to": "Standard.LeftHand" },
|
||||
{ "from": "OculusTouch.LeftHand", "to": "Standard.LeftHand", "when": [ "Application.InHMD" ] },
|
||||
|
||||
{ "from": "OculusTouch.RY", "to": "Standard.RY",
|
||||
"filters": [
|
||||
|
@ -39,7 +39,7 @@
|
|||
{ "from": "OculusTouch.RT", "to": "Standard.RT" },
|
||||
{ "from": "OculusTouch.RS", "to": "Standard.RS" },
|
||||
{ "from": "OculusTouch.RightGrip", "filters": { "type": "deadZone", "min": 0.5 }, "to": "Standard.RightGrip" },
|
||||
{ "from": "OculusTouch.RightHand", "to": "Standard.RightHand" },
|
||||
{ "from": "OculusTouch.RightHand", "to": "Standard.RightHand", "when": [ "Application.InHMD" ] },
|
||||
|
||||
{ "from": "OculusTouch.LeftApplicationMenu", "to": "Standard.Back" },
|
||||
{ "from": "OculusTouch.RightApplicationMenu", "to": "Standard.Start" },
|
||||
|
@ -58,4 +58,3 @@
|
|||
{ "from": "OculusTouch.RightIndexPoint", "to": "Standard.RightIndexPoint" }
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -50,21 +50,33 @@
|
|||
function showKbm() {
|
||||
document.getElementById("main_image").setAttribute("src", "img/controls-help-keyboard.png");
|
||||
}
|
||||
function showHandControllers() {
|
||||
function showViveControllers() {
|
||||
document.getElementById("main_image").setAttribute("src", "img/controls-help-vive.png");
|
||||
}
|
||||
function showGameController() {
|
||||
function showXboxController() {
|
||||
document.getElementById("main_image").setAttribute("src", "img/controls-help-gamepad.png");
|
||||
}
|
||||
function load() {
|
||||
console.log("In help.html: ", window.location.href);
|
||||
parts = window.location.href.split("?");
|
||||
if (parts.length > 0) {
|
||||
var defaultTab = parts[1];
|
||||
if (defaultTab == "xbox") {
|
||||
showXboxController();
|
||||
} else if (defaultTab == "vive") {
|
||||
showViveControllers();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body onload="load()">
|
||||
<div id="image_area">
|
||||
<img id="main_image" src="img/controls-help-keyboard.png" width="1024px" height="720px"></img>
|
||||
<a href="#" id="kbm_button" onmousedown="showKbm()"></a>
|
||||
<a href="#" id="hand_controllers_button" onmousedown="showHandControllers()"></a>
|
||||
<a href="#" id="game_controller_button" onmousedown="showGameController()"></a>
|
||||
<a href="#" id="hand_controllers_button" onmousedown="showViveControllers()"></a>
|
||||
<a href="#" id="game_controller_button" onmousedown="showXboxController()"></a>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -95,46 +95,10 @@ Hifi.AvatarInputs {
|
|||
anchors.fill: parent
|
||||
color: root.mirrorVisible ? (root.audioClipping ? "red" : "#696969") : "#00000000"
|
||||
|
||||
Image {
|
||||
id: faceMute
|
||||
width: root.iconSize
|
||||
height: root.iconSize
|
||||
visible: root.cameraEnabled
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: root.iconPadding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: root.cameraMuted ? "../images/face-mute.svg" : "../images/face.svg"
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
root.toggleCameraMute()
|
||||
}
|
||||
onDoubleClicked: {
|
||||
root.resetSensors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: micMute
|
||||
width: root.iconSize
|
||||
height: root.iconSize
|
||||
anchors.left: root.cameraEnabled ? faceMute.right : parent.left
|
||||
anchors.leftMargin: root.iconPadding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: root.audioMuted ? "../images/mic-mute.svg" : "../images/mic.svg"
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
root.toggleAudioMute()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: audioMeter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: micMute.right
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: root.iconPadding
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: root.iconPadding
|
||||
|
|
|
@ -20,10 +20,10 @@ ScrollingWindow {
|
|||
anchors.centerIn: parent
|
||||
UpdateDialog {
|
||||
id: updateDialog
|
||||
|
||||
|
||||
implicitWidth: backgroundRectangle.width
|
||||
implicitHeight: backgroundRectangle.height
|
||||
|
||||
|
||||
readonly property int contentWidth: 500
|
||||
readonly property int logoSize: 60
|
||||
readonly property int borderWidth: 30
|
||||
|
@ -36,7 +36,7 @@ ScrollingWindow {
|
|||
|
||||
signal triggerBuildDownload
|
||||
signal closeUpdateDialog
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: backgroundRectangle
|
||||
color: "#ffffff"
|
||||
|
@ -47,7 +47,7 @@ ScrollingWindow {
|
|||
|
||||
Image {
|
||||
id: logo
|
||||
source: "../images/interface-logo.svg"
|
||||
source: "../images/hifi-logo.svg"
|
||||
width: updateDialog.logoSize
|
||||
height: updateDialog.logoSize
|
||||
anchors {
|
||||
|
@ -65,7 +65,7 @@ ScrollingWindow {
|
|||
topMargin: updateDialog.borderWidth
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: header
|
||||
width: parent.width - updateDialog.logoSize - updateDialog.inputSpacing
|
||||
|
|
|
@ -113,9 +113,8 @@ Rectangle {
|
|||
}
|
||||
FiraSansRegular {
|
||||
id: users;
|
||||
visible: action === 'concurrency';
|
||||
text: onlineUsers;
|
||||
size: textSize;
|
||||
text: (action === 'concurrency') ? onlineUsers : 'snapshot';
|
||||
size: (action === 'concurrency') ? textSize : textSizeSmall;
|
||||
color: hifi.colors.white;
|
||||
anchors {
|
||||
verticalCenter: usersImage.verticalCenter;
|
||||
|
|
|
@ -51,27 +51,41 @@ OriginalDesktop.Desktop {
|
|||
Toolbar {
|
||||
id: sysToolbar;
|
||||
objectName: "com.highfidelity.interface.toolbar.system";
|
||||
// These values will be overridden by sysToolbar.x/y if there is a saved position in Settings
|
||||
// On exit, the sysToolbar position is saved to settings
|
||||
x: 30
|
||||
anchors.horizontalCenter: settings.constrainToolbarToCenterX ? desktop.horizontalCenter : undefined;
|
||||
// Literal 50 is overwritten by settings from previous session, and sysToolbar.x comes from settings when not constrained.
|
||||
x: sysToolbar.x
|
||||
y: 50
|
||||
}
|
||||
Settings {
|
||||
id: settings;
|
||||
category: "toolbar";
|
||||
property bool constrainToolbarToCenterX: true;
|
||||
}
|
||||
function setConstrainToolbarToCenterX(constrain) { // Learn about c++ preference change.
|
||||
settings.constrainToolbarToCenterX = constrain;
|
||||
}
|
||||
property var toolbars: (function (map) { // answer dictionary preloaded with sysToolbar
|
||||
map[sysToolbar.objectName] = sysToolbar;
|
||||
return map; })({});
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
WebEngine.settings.javascriptCanOpenWindows = true;
|
||||
WebEngine.settings.javascriptCanAccessClipboard = false;
|
||||
WebEngine.settings.spatialNavigationEnabled = false;
|
||||
WebEngine.settings.localContentCanAccessRemoteUrls = true;
|
||||
|
||||
var toggleHudButton = sysToolbar.addButton({
|
||||
objectName: "hudToggle",
|
||||
imageURL: "../../../icons/hud.svg",
|
||||
visible: true,
|
||||
pinned: true,
|
||||
[ // Allocate the standard buttons in the correct order. They will get images, etc., via scripts.
|
||||
"hmdToggle", "mute", "mod", "help",
|
||||
"hudToggle",
|
||||
"com.highfidelity.interface.system.editButton", "marketplace", "snapshot", "goto"
|
||||
].forEach(function (name) {
|
||||
sysToolbar.addButton({objectName: name});
|
||||
});
|
||||
var toggleHudButton = sysToolbar.findButton("hudToggle");
|
||||
toggleHudButton.imageURL = "../../../icons/hud.svg";
|
||||
toggleHudButton.pinned = true;
|
||||
sysToolbar.updatePinned(); // automatic when adding buttons only IFF button is pinned at creation.
|
||||
|
||||
toggleHudButton.buttonState = Qt.binding(function(){
|
||||
return desktop.pinned ? 1 : 0
|
||||
|
|
|
@ -17,7 +17,7 @@ PreferencesDialog {
|
|||
id: root
|
||||
objectName: "GeneralPreferencesDialog"
|
||||
title: "General Settings"
|
||||
showCategories: ["Snapshots", "Scripts", "Privacy", "Octree", "HMD", "Sixense Controllers"]
|
||||
showCategories: ["UI", "Snapshots", "Scripts", "Privacy", "Octree", "HMD", "Sixense Controllers"]
|
||||
property var settings: Settings {
|
||||
category: root.objectName
|
||||
property alias x: root.x
|
||||
|
|
|
@ -114,6 +114,9 @@ Window {
|
|||
// and allow scripts to be idempotent so they don't duplicate buttons if they're reloaded
|
||||
var result = findButton(properties.objectName);
|
||||
if (result) {
|
||||
for (var property in properties) {
|
||||
result[property] = properties[property];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
properties.toolbar = this;
|
||||
|
|
|
@ -523,6 +523,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
_mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)),
|
||||
_previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION),
|
||||
_fieldOfView("fieldOfView", DEFAULT_FIELD_OF_VIEW_DEGREES),
|
||||
_constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true),
|
||||
_scaleMirror(1.0f),
|
||||
_rotateMirror(0.0f),
|
||||
_raiseMirror(0.0f),
|
||||
|
@ -1145,7 +1146,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
});
|
||||
|
||||
// If the user clicks somewhere where there is NO entity at all, we will release focus
|
||||
connect(getEntities(), &EntityTreeRenderer::mousePressOffEntity, [=]() {
|
||||
connect(getEntities().data(), &EntityTreeRenderer::mousePressOffEntity, [=]() {
|
||||
setKeyboardFocusEntity(UNKNOWN_ENTITY_ID);
|
||||
});
|
||||
|
||||
|
@ -2150,12 +2151,27 @@ void Application::setFieldOfView(float fov) {
|
|||
}
|
||||
}
|
||||
|
||||
void Application::setSettingConstrainToolbarPosition(bool setting) {
|
||||
_constrainToolbarPosition.set(setting);
|
||||
DependencyManager::get<OffscreenUi>()->setConstrainToolbarToCenterX(setting);
|
||||
}
|
||||
|
||||
void Application::aboutApp() {
|
||||
InfoView::show(INFO_WELCOME_PATH);
|
||||
}
|
||||
|
||||
void Application::showHelp() {
|
||||
InfoView::show(INFO_HELP_PATH);
|
||||
static const QString QUERY_STRING_XBOX = "xbox";
|
||||
static const QString QUERY_STRING_VIVE = "vive";
|
||||
|
||||
QString queryString = "";
|
||||
if (PluginUtils::isViveControllerAvailable()) {
|
||||
queryString = QUERY_STRING_VIVE;
|
||||
} else if (PluginUtils::isXboxControllerAvailable()) {
|
||||
queryString = QUERY_STRING_XBOX;
|
||||
}
|
||||
|
||||
InfoView::show(INFO_HELP_PATH, false, queryString);
|
||||
}
|
||||
|
||||
void Application::resizeEvent(QResizeEvent* event) {
|
||||
|
@ -3472,7 +3488,7 @@ void Application::init() {
|
|||
|
||||
// connect the _entityCollisionSystem to our EntityTreeRenderer since that's what handles running entity scripts
|
||||
connect(_entitySimulation.get(), &EntitySimulation::entityCollisionWithEntity,
|
||||
getEntities(), &EntityTreeRenderer::entityCollisionWithEntity);
|
||||
getEntities().data(), &EntityTreeRenderer::entityCollisionWithEntity);
|
||||
|
||||
// connect the _entities (EntityTreeRenderer) to our script engine's EntityScriptingInterface for firing
|
||||
// of events related clicking, hovering over, and entering entities
|
||||
|
|
|
@ -180,7 +180,7 @@ public:
|
|||
void copyDisplayViewFrustum(ViewFrustum& viewOut) const;
|
||||
void copyShadowViewFrustum(ViewFrustum& viewOut) const override;
|
||||
const OctreePacketProcessor& getOctreePacketProcessor() const { return _octreeProcessor; }
|
||||
EntityTreeRenderer* getEntities() const { return DependencyManager::get<EntityTreeRenderer>().data(); }
|
||||
QSharedPointer<EntityTreeRenderer> getEntities() const { return DependencyManager::get<EntityTreeRenderer>(); }
|
||||
QUndoStack* getUndoStack() { return &_undoStack; }
|
||||
MainWindow* getWindow() const { return _window; }
|
||||
EntityTreePointer getEntityClipboard() const { return _entityClipboard; }
|
||||
|
@ -206,6 +206,9 @@ public:
|
|||
float getFieldOfView() { return _fieldOfView.get(); }
|
||||
void setFieldOfView(float fov);
|
||||
|
||||
float getSettingConstrainToolbarPosition() { return _constrainToolbarPosition.get(); }
|
||||
void setSettingConstrainToolbarPosition(bool setting);
|
||||
|
||||
NodeToOctreeSceneStats* getOcteeSceneStats() { return &_octreeServerSceneStats; }
|
||||
|
||||
virtual controller::ScriptingInterface* getControllerScriptingInterface() { return _controllerScriptingInterface; }
|
||||
|
@ -506,6 +509,7 @@ private:
|
|||
|
||||
Setting::Handle<QString> _previousScriptLocation;
|
||||
Setting::Handle<float> _fieldOfView;
|
||||
Setting::Handle<bool> _constrainToolbarPosition;
|
||||
|
||||
float _scaleMirror;
|
||||
float _rotateMirror;
|
||||
|
|
|
@ -29,7 +29,7 @@ SpatiallyNestableWeakPointer InterfaceParentFinder::find(QUuid parentID, bool& s
|
|||
if (entityTree) {
|
||||
parent = entityTree->findByID(parentID);
|
||||
} else {
|
||||
EntityTreeRenderer* treeRenderer = qApp->getEntities();
|
||||
auto treeRenderer = qApp->getEntities();
|
||||
EntityTreePointer tree = treeRenderer ? treeRenderer->getTree() : nullptr;
|
||||
parent = tree ? tree->findEntityByEntityItemID(parentID) : nullptr;
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ Avatar::Avatar(RigPointer rig) :
|
|||
Avatar::~Avatar() {
|
||||
assert(isDead()); // mark dead before calling the dtor
|
||||
|
||||
EntityTreeRenderer* treeRenderer = qApp->getEntities();
|
||||
auto treeRenderer = qApp->getEntities();
|
||||
EntityTreePointer entityTree = treeRenderer ? treeRenderer->getTree() : nullptr;
|
||||
if (entityTree) {
|
||||
entityTree->withWriteLock([&] {
|
||||
|
@ -199,7 +199,7 @@ void Avatar::updateAvatarEntities() {
|
|||
return; // wait until MyAvatar gets an ID before doing this.
|
||||
}
|
||||
|
||||
EntityTreeRenderer* treeRenderer = qApp->getEntities();
|
||||
auto treeRenderer = qApp->getEntities();
|
||||
EntityTreePointer entityTree = treeRenderer ? treeRenderer->getTree() : nullptr;
|
||||
if (!entityTree) {
|
||||
return;
|
||||
|
|
|
@ -472,7 +472,7 @@ void MyAvatar::simulate(float deltaTime) {
|
|||
|
||||
locationChanged();
|
||||
// if a entity-child of this avatar has moved outside of its queryAACube, update the cube and tell the entity server.
|
||||
EntityTreeRenderer* entityTreeRenderer = qApp->getEntities();
|
||||
auto entityTreeRenderer = qApp->getEntities();
|
||||
EntityTreePointer entityTree = entityTreeRenderer ? entityTreeRenderer->getTree() : nullptr;
|
||||
if (entityTree) {
|
||||
bool flyingAllowed = true;
|
||||
|
@ -1938,7 +1938,7 @@ void MyAvatar::setCharacterControllerEnabled(bool enabled) {
|
|||
}
|
||||
|
||||
bool ghostingAllowed = true;
|
||||
EntityTreeRenderer* entityTreeRenderer = qApp->getEntities();
|
||||
auto entityTreeRenderer = qApp->getEntities();
|
||||
if (entityTreeRenderer) {
|
||||
std::shared_ptr<ZoneEntityItem> zone = entityTreeRenderer->myAvatarZone();
|
||||
if (zone) {
|
||||
|
@ -2289,7 +2289,7 @@ void MyAvatar::removeHoldAction(AvatarActionHold* holdAction) {
|
|||
}
|
||||
|
||||
void MyAvatar::updateHoldActions(const AnimPose& prePhysicsPose, const AnimPose& postUpdatePose) {
|
||||
EntityTreeRenderer* entityTreeRenderer = qApp->getEntities();
|
||||
auto entityTreeRenderer = qApp->getEntities();
|
||||
EntityTreePointer entityTree = entityTreeRenderer ? entityTreeRenderer->getTree() : nullptr;
|
||||
if (entityTree) {
|
||||
// lateAvatarUpdate will modify entity position & orientation, so we need an entity write lock
|
||||
|
|
|
@ -92,13 +92,19 @@ void OctreePacketProcessor::processPacket(QSharedPointer<ReceivedMessage> messag
|
|||
switch(packetType) {
|
||||
case PacketType::EntityErase: {
|
||||
if (DependencyManager::get<SceneScriptingInterface>()->shouldRenderEntities()) {
|
||||
qApp->getEntities()->processEraseMessage(*message, sendingNode);
|
||||
auto renderer = qApp->getEntities();
|
||||
if (renderer) {
|
||||
renderer->processEraseMessage(*message, sendingNode);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
||||
case PacketType::EntityData: {
|
||||
if (DependencyManager::get<SceneScriptingInterface>()->shouldRenderEntities()) {
|
||||
qApp->getEntities()->processDatagram(*message, sendingNode);
|
||||
auto renderer = qApp->getEntities();
|
||||
if (renderer) {
|
||||
renderer->processDatagram(*message, sendingNode);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
||||
|
|
|
@ -68,6 +68,13 @@ void setupPreferences() {
|
|||
preferences->addPreference(new CheckPreference(AVATAR_BASICS, "Clear overlays when moving", getter, setter));
|
||||
}
|
||||
|
||||
// UI
|
||||
{
|
||||
auto getter = []()->bool { return qApp->getSettingConstrainToolbarPosition(); };
|
||||
auto setter = [](bool value) { qApp->setSettingConstrainToolbarPosition(value); };
|
||||
preferences->addPreference(new CheckPreference("UI", "Constrain Toolbar Position to Horizontal Center", getter, setter));
|
||||
}
|
||||
|
||||
// Snapshots
|
||||
static const QString SNAPSHOTS { "Snapshots" };
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ QTemporaryFile* Snapshot::saveTempSnapshot(QImage image) {
|
|||
QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) {
|
||||
|
||||
// adding URL to snapshot
|
||||
QUrl currentURL = DependencyManager::get<AddressManager>()->currentAddress();
|
||||
QUrl currentURL = DependencyManager::get<AddressManager>()->currentShareableAddress();
|
||||
shot.setText(URL, currentURL.toString());
|
||||
|
||||
QString username = DependencyManager::get<AccountManager>()->getAccountInfo().getUsername();
|
||||
|
@ -146,7 +146,10 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) {
|
|||
void Snapshot::uploadSnapshot(const QString& filename) {
|
||||
|
||||
const QString SNAPSHOT_UPLOAD_URL = "/api/v1/snapshots";
|
||||
static SnapshotUploader uploader;
|
||||
// Alternatively to parseSnapshotData, we could pass the inWorldLocation through the call chain. This way is less disruptive to existing code.
|
||||
SnapshotMetaData* snapshotData = Snapshot::parseSnapshotData(filename);
|
||||
SnapshotUploader* uploader = new SnapshotUploader(snapshotData->getURL(), filename);
|
||||
delete snapshotData;
|
||||
|
||||
QFile* file = new QFile(filename);
|
||||
Q_ASSERT(file->exists());
|
||||
|
@ -163,7 +166,7 @@ void Snapshot::uploadSnapshot(const QString& filename) {
|
|||
multiPart->append(imagePart);
|
||||
|
||||
auto accountManager = DependencyManager::get<AccountManager>();
|
||||
JSONCallbackParameters callbackParams(&uploader, "uploadSuccess", &uploader, "uploadFailure");
|
||||
JSONCallbackParameters callbackParams(uploader, "uploadSuccess", uploader, "uploadFailure");
|
||||
|
||||
accountManager->sendRequest(SNAPSHOT_UPLOAD_URL,
|
||||
AccountManagerAuth::Required,
|
||||
|
|
|
@ -15,9 +15,13 @@
|
|||
#include "scripting/WindowScriptingInterface.h"
|
||||
#include "SnapshotUploader.h"
|
||||
|
||||
SnapshotUploader::SnapshotUploader(QUrl inWorldLocation, QString pathname) :
|
||||
_inWorldLocation(inWorldLocation),
|
||||
_pathname(pathname) {
|
||||
}
|
||||
|
||||
void SnapshotUploader::uploadSuccess(QNetworkReply& reply) {
|
||||
const QString STORY_UPLOAD_URL = "/api/v1/user_stories";
|
||||
static SnapshotUploader uploader;
|
||||
|
||||
// parse the reply for the thumbnail_url
|
||||
QByteArray contents = reply.readAll();
|
||||
|
@ -28,11 +32,8 @@ void SnapshotUploader::uploadSuccess(QNetworkReply& reply) {
|
|||
QString thumbnailUrl = dataObject.value("thumbnail_url").toString();
|
||||
QString imageUrl = dataObject.value("image_url").toString();
|
||||
auto addressManager = DependencyManager::get<AddressManager>();
|
||||
QString placeName = addressManager->getPlaceName();
|
||||
if (placeName.isEmpty()) {
|
||||
placeName = addressManager->getHost();
|
||||
}
|
||||
QString currentPath = addressManager->currentPath(true);
|
||||
QString placeName = _inWorldLocation.authority(); // We currently only upload shareable places, in which case this is just host.
|
||||
QString currentPath = _inWorldLocation.path();
|
||||
|
||||
// create json post data
|
||||
QJsonObject rootObject;
|
||||
|
@ -48,7 +49,7 @@ void SnapshotUploader::uploadSuccess(QNetworkReply& reply) {
|
|||
rootObject.insert("user_story", userStoryObject);
|
||||
|
||||
auto accountManager = DependencyManager::get<AccountManager>();
|
||||
JSONCallbackParameters callbackParams(&uploader, "createStorySuccess", &uploader, "createStoryFailure");
|
||||
JSONCallbackParameters callbackParams(this, "createStorySuccess", this, "createStoryFailure");
|
||||
|
||||
accountManager->sendRequest(STORY_UPLOAD_URL,
|
||||
AccountManagerAuth::Required,
|
||||
|
@ -56,20 +57,23 @@ void SnapshotUploader::uploadSuccess(QNetworkReply& reply) {
|
|||
callbackParams,
|
||||
QJsonDocument(rootObject).toJson());
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(contents);
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
||||
void SnapshotUploader::uploadFailure(QNetworkReply& reply) {
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(reply.readAll());
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(reply.readAll()); // maybe someday include _inWorldLocation, _filename?
|
||||
delete this;
|
||||
}
|
||||
|
||||
void SnapshotUploader::createStorySuccess(QNetworkReply& reply) {
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(QString());
|
||||
delete this;
|
||||
}
|
||||
|
||||
void SnapshotUploader::createStoryFailure(QNetworkReply& reply) {
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(reply.readAll());
|
||||
emit DependencyManager::get<WindowScriptingInterface>()->snapshotShared(reply.readAll());
|
||||
delete this;
|
||||
}
|
|
@ -14,13 +14,19 @@
|
|||
|
||||
#include <QObject>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
#include <QtCore/QUrl>
|
||||
|
||||
class SnapshotUploader : public QObject {
|
||||
Q_OBJECT
|
||||
public slots:
|
||||
public:
|
||||
SnapshotUploader(QUrl inWorldLocation, QString pathname);
|
||||
public slots:
|
||||
void uploadSuccess(QNetworkReply& reply);
|
||||
void uploadFailure(QNetworkReply& reply);
|
||||
void createStorySuccess(QNetworkReply& reply);
|
||||
void createStoryFailure(QNetworkReply& reply);
|
||||
private:
|
||||
QUrl _inWorldLocation;
|
||||
QString _pathname;
|
||||
};
|
||||
#endif // hifi_SnapshotUploader_h
|
|
@ -118,11 +118,26 @@ void AnimSkeleton::convertAbsoluteRotationsToRelative(std::vector<glm::quat>& ro
|
|||
}
|
||||
}
|
||||
|
||||
void AnimSkeleton::saveNonMirroredPoses(const AnimPoseVec& poses) const {
|
||||
_nonMirroredPoses.clear();
|
||||
for (int i = 0; i < (int)_nonMirroredIndices.size(); ++i) {
|
||||
_nonMirroredPoses.push_back(poses[_nonMirroredIndices[i]]);
|
||||
}
|
||||
}
|
||||
|
||||
void AnimSkeleton::restoreNonMirroredPoses(AnimPoseVec& poses) const {
|
||||
for (int i = 0; i < (int)_nonMirroredIndices.size(); ++i) {
|
||||
int index = _nonMirroredIndices[i];
|
||||
poses[index] = _nonMirroredPoses[i];
|
||||
}
|
||||
}
|
||||
|
||||
void AnimSkeleton::mirrorRelativePoses(AnimPoseVec& poses) const {
|
||||
saveNonMirroredPoses(poses);
|
||||
convertRelativePosesToAbsolute(poses);
|
||||
mirrorAbsolutePoses(poses);
|
||||
convertAbsolutePosesToRelative(poses);
|
||||
restoreNonMirroredPoses(poses);
|
||||
}
|
||||
|
||||
void AnimSkeleton::mirrorAbsolutePoses(AnimPoseVec& poses) const {
|
||||
|
@ -189,8 +204,14 @@ void AnimSkeleton::buildSkeletonFromJoints(const std::vector<FBXJoint>& joints)
|
|||
}
|
||||
|
||||
// build mirror map.
|
||||
_nonMirroredIndices.clear();
|
||||
_mirrorMap.reserve(_joints.size());
|
||||
for (int i = 0; i < (int)joints.size(); i++) {
|
||||
if (_joints[i].name.endsWith("tEye")) {
|
||||
// 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");
|
||||
|
|
|
@ -57,6 +57,9 @@ public:
|
|||
|
||||
void convertAbsoluteRotationsToRelative(std::vector<glm::quat>& rotations) const;
|
||||
|
||||
void saveNonMirroredPoses(const AnimPoseVec& poses) const;
|
||||
void restoreNonMirroredPoses(AnimPoseVec& poses) const;
|
||||
|
||||
void mirrorRelativePoses(AnimPoseVec& poses) const;
|
||||
void mirrorAbsolutePoses(AnimPoseVec& poses) const;
|
||||
|
||||
|
@ -75,6 +78,8 @@ protected:
|
|||
AnimPoseVec _absoluteDefaultPoses;
|
||||
AnimPoseVec _relativePreRotationPoses;
|
||||
AnimPoseVec _relativePostRotationPoses;
|
||||
mutable AnimPoseVec _nonMirroredPoses;
|
||||
std::vector<int> _nonMirroredIndices;
|
||||
std::vector<int> _mirrorMap;
|
||||
|
||||
// no copies
|
||||
|
|
|
@ -85,18 +85,26 @@ public:
|
|||
}
|
||||
|
||||
void beforeAboutToQuit() {
|
||||
Lock lock(_checkDevicesMutex);
|
||||
_quit = true;
|
||||
}
|
||||
|
||||
void run() override {
|
||||
while (!_quit) {
|
||||
while (true) {
|
||||
{
|
||||
Lock lock(_checkDevicesMutex);
|
||||
if (_quit) {
|
||||
break;
|
||||
}
|
||||
_audioClient->checkDevices();
|
||||
}
|
||||
QThread::msleep(DEVICE_CHECK_INTERVAL_MSECS);
|
||||
_audioClient->checkDevices();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
AudioClient* _audioClient { nullptr };
|
||||
Mutex _checkDevicesMutex;
|
||||
bool _quit { false };
|
||||
};
|
||||
|
||||
|
|
|
@ -520,7 +520,7 @@ const FBXGeometry* EntityTreeRenderer::getGeometryForEntity(EntityItemPointer en
|
|||
std::shared_ptr<RenderableModelEntityItem> modelEntityItem =
|
||||
std::dynamic_pointer_cast<RenderableModelEntityItem>(entityItem);
|
||||
assert(modelEntityItem); // we need this!!!
|
||||
ModelPointer model = modelEntityItem->getModel(this);
|
||||
ModelPointer model = modelEntityItem->getModel(getSharedFromThis());
|
||||
if (model && model->isLoaded()) {
|
||||
result = &model->getFBXGeometry();
|
||||
}
|
||||
|
@ -533,7 +533,7 @@ ModelPointer EntityTreeRenderer::getModelForEntityItem(EntityItemPointer entityI
|
|||
if (entityItem->getType() == EntityTypes::Model) {
|
||||
std::shared_ptr<RenderableModelEntityItem> modelEntityItem =
|
||||
std::dynamic_pointer_cast<RenderableModelEntityItem>(entityItem);
|
||||
result = modelEntityItem->getModel(this);
|
||||
result = modelEntityItem->getModel(getSharedFromThis());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,10 @@ public:
|
|||
AbstractScriptingServicesInterface* scriptingServices);
|
||||
virtual ~EntityTreeRenderer();
|
||||
|
||||
QSharedPointer<EntityTreeRenderer> getSharedFromThis() {
|
||||
return qSharedPointerCast<EntityTreeRenderer>(sharedFromThis());
|
||||
}
|
||||
|
||||
virtual char getMyNodeType() const override { return NodeType::EntityServer; }
|
||||
virtual PacketType getMyQueryMessageType() const override { return PacketType::EntityQuery; }
|
||||
virtual PacketType getExpectedPacketType() const override { return PacketType::EntityData; }
|
||||
|
|
|
@ -55,7 +55,10 @@ void RenderableModelEntityItem::setModelURL(const QString& url) {
|
|||
auto& currentURL = getParsedModelURL();
|
||||
ModelEntityItem::setModelURL(url);
|
||||
|
||||
if (currentURL != getParsedModelURL() || !_model) {
|
||||
if (currentURL != getParsedModelURL()) {
|
||||
_needsModelReload = true;
|
||||
}
|
||||
if (_needsModelReload || !_model) {
|
||||
EntityTreePointer tree = getTree();
|
||||
if (tree) {
|
||||
QMetaObject::invokeMethod(tree.get(), "callLoader", Qt::QueuedConnection, Q_ARG(EntityItemID, getID()));
|
||||
|
@ -65,7 +68,7 @@ void RenderableModelEntityItem::setModelURL(const QString& url) {
|
|||
|
||||
void RenderableModelEntityItem::loader() {
|
||||
_needsModelReload = true;
|
||||
EntityTreeRenderer* renderer = DependencyManager::get<EntityTreeRenderer>().data();
|
||||
auto renderer = DependencyManager::get<EntityTreeRenderer>();
|
||||
assert(renderer);
|
||||
{
|
||||
PerformanceTimer perfTimer("getModel");
|
||||
|
@ -368,7 +371,7 @@ void RenderableModelEntityItem::render(RenderArgs* args) {
|
|||
if (!_model || _needsModelReload) {
|
||||
// TODO: this getModel() appears to be about 3% of model render time. We should optimize
|
||||
PerformanceTimer perfTimer("getModel");
|
||||
EntityTreeRenderer* renderer = static_cast<EntityTreeRenderer*>(args->_renderer);
|
||||
auto renderer = qSharedPointerCast<EntityTreeRenderer>(args->_renderer);
|
||||
getModel(renderer);
|
||||
|
||||
// Remap textures immediately after loading to avoid flicker
|
||||
|
@ -470,7 +473,7 @@ void RenderableModelEntityItem::render(RenderArgs* args) {
|
|||
}
|
||||
}
|
||||
|
||||
ModelPointer RenderableModelEntityItem::getModel(EntityTreeRenderer* renderer) {
|
||||
ModelPointer RenderableModelEntityItem::getModel(QSharedPointer<EntityTreeRenderer> renderer) {
|
||||
if (!renderer) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -495,7 +498,7 @@ ModelPointer RenderableModelEntityItem::getModel(EntityTreeRenderer* renderer) {
|
|||
_needsInitialSimulation = true;
|
||||
// If we need to change URLs, update it *after rendering* (to avoid access violations)
|
||||
} else if (QUrl(getModelURL()) != _model->getURL()) {
|
||||
QMetaObject::invokeMethod(_myRenderer, "updateModel", Qt::QueuedConnection,
|
||||
QMetaObject::invokeMethod(_myRenderer.data(), "updateModel", Qt::QueuedConnection,
|
||||
Q_ARG(ModelPointer, _model),
|
||||
Q_ARG(const QString&, getModelURL()));
|
||||
_needsInitialSimulation = true;
|
||||
|
@ -523,17 +526,24 @@ bool RenderableModelEntityItem::needsToCallUpdate() const {
|
|||
}
|
||||
|
||||
void RenderableModelEntityItem::update(const quint64& now) {
|
||||
if (!_dimensionsInitialized && _model && _model->isActive()) {
|
||||
if (_model->isLoaded()) {
|
||||
EntityItemProperties properties;
|
||||
properties.setLastEdited(usecTimestampNow()); // we must set the edit time since we're editing it
|
||||
auto extents = _model->getMeshExtents();
|
||||
properties.setDimensions(extents.maximum - extents.minimum);
|
||||
qCDebug(entitiesrenderer) << "Autoresizing:" << (!getName().isEmpty() ? getName() : getModelURL());
|
||||
QMetaObject::invokeMethod(DependencyManager::get<EntityScriptingInterface>().data(), "editEntity",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(QUuid, getEntityItemID()),
|
||||
Q_ARG(EntityItemProperties, properties));
|
||||
if (!_dimensionsInitialized) {
|
||||
if (_model) {
|
||||
if (_model->isActive() && _model->isLoaded()) {
|
||||
EntityItemProperties properties;
|
||||
properties.setLastEdited(usecTimestampNow()); // we must set the edit time since we're editing it
|
||||
auto extents = _model->getMeshExtents();
|
||||
properties.setDimensions(extents.maximum - extents.minimum);
|
||||
qCDebug(entitiesrenderer) << "Autoresizing:" << (!getName().isEmpty() ? getName() : getModelURL());
|
||||
QMetaObject::invokeMethod(DependencyManager::get<EntityScriptingInterface>().data(), "editEntity",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(QUuid, getEntityItemID()),
|
||||
Q_ARG(EntityItemProperties, properties));
|
||||
}
|
||||
} else if (_needsModelReload) {
|
||||
EntityTreePointer tree = getTree();
|
||||
if (tree) {
|
||||
QMetaObject::invokeMethod(tree.get(), "callLoader", Qt::QueuedConnection, Q_ARG(EntityItemID, getID()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
||||
BoxFace& face, glm::vec3& surfaceNormal,
|
||||
void** intersectedObject, bool precisionPicking) const override;
|
||||
ModelPointer getModel(EntityTreeRenderer* renderer);
|
||||
ModelPointer getModel(QSharedPointer<EntityTreeRenderer> renderer);
|
||||
|
||||
virtual bool needsToCallUpdate() const override;
|
||||
virtual void update(const quint64& now) override;
|
||||
|
@ -105,7 +105,7 @@ private:
|
|||
ModelPointer _model = nullptr;
|
||||
bool _needsInitialSimulation = true;
|
||||
bool _needsModelReload = true;
|
||||
EntityTreeRenderer* _myRenderer = nullptr;
|
||||
QSharedPointer<EntityTreeRenderer> _myRenderer;
|
||||
QString _lastTextures;
|
||||
QVariantMap _currentTextures;
|
||||
QVariantMap _originalTextures;
|
||||
|
|
|
@ -1035,50 +1035,53 @@ void RenderablePolyVoxEntityItem::copyUpperEdgesFromNeighbors() {
|
|||
return;
|
||||
}
|
||||
|
||||
EntityItemPointer currentXPNeighbor = _xPNeighbor.lock();
|
||||
EntityItemPointer currentYPNeighbor = _yPNeighbor.lock();
|
||||
EntityItemPointer currentZPNeighbor = _zPNeighbor.lock();
|
||||
auto currentXPNeighbor = getXPNeighbor();
|
||||
auto currentYPNeighbor = getYPNeighbor();
|
||||
auto currentZPNeighbor = getZPNeighbor();
|
||||
|
||||
if (currentXPNeighbor) {
|
||||
auto polyVoxXPNeighbor = std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(currentXPNeighbor);
|
||||
if (polyVoxXPNeighbor->getVoxelVolumeSize() == _voxelVolumeSize) {
|
||||
withWriteLock([&] {
|
||||
if (currentXPNeighbor && currentXPNeighbor->getVoxelVolumeSize() == _voxelVolumeSize) {
|
||||
withWriteLock([&] {
|
||||
for (int y = 0; y < _volData->getHeight(); y++) {
|
||||
for (int z = 0; z < _volData->getDepth(); z++) {
|
||||
uint8_t neighborValue = currentXPNeighbor->getVoxel(0, y, z);
|
||||
if ((y == 0 || z == 0) && _volData->getVoxelAt(_volData->getWidth() - 1, y, z) != neighborValue) {
|
||||
bonkNeighbors();
|
||||
}
|
||||
_volData->setVoxelAt(_volData->getWidth() - 1, y, z, neighborValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (currentYPNeighbor && currentYPNeighbor->getVoxelVolumeSize() == _voxelVolumeSize) {
|
||||
withWriteLock([&] {
|
||||
for (int x = 0; x < _volData->getWidth(); x++) {
|
||||
for (int z = 0; z < _volData->getDepth(); z++) {
|
||||
uint8_t neighborValue = currentYPNeighbor->getVoxel(x, 0, z);
|
||||
if ((x == 0 || z == 0) && _volData->getVoxelAt(x, _volData->getHeight() - 1, z) != neighborValue) {
|
||||
bonkNeighbors();
|
||||
}
|
||||
_volData->setVoxelAt(x, _volData->getHeight() - 1, z, neighborValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (currentZPNeighbor && currentZPNeighbor->getVoxelVolumeSize() == _voxelVolumeSize) {
|
||||
withWriteLock([&] {
|
||||
for (int x = 0; x < _volData->getWidth(); x++) {
|
||||
for (int y = 0; y < _volData->getHeight(); y++) {
|
||||
for (int z = 0; z < _volData->getDepth(); z++) {
|
||||
uint8_t neighborValue = polyVoxXPNeighbor->getVoxel(0, y, z);
|
||||
_volData->setVoxelAt(_volData->getWidth() - 1, y, z, neighborValue);
|
||||
uint8_t neighborValue = currentZPNeighbor->getVoxel(x, y, 0);
|
||||
_volData->setVoxelAt(x, y, _volData->getDepth() - 1, neighborValue);
|
||||
if ((x == 0 || y == 0) && _volData->getVoxelAt(x, y, _volData->getDepth() - 1) != neighborValue) {
|
||||
bonkNeighbors();
|
||||
}
|
||||
_volData->setVoxelAt(x, y, _volData->getDepth() - 1, neighborValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (currentYPNeighbor) {
|
||||
auto polyVoxYPNeighbor = std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(currentYPNeighbor);
|
||||
if (polyVoxYPNeighbor->getVoxelVolumeSize() == _voxelVolumeSize) {
|
||||
withWriteLock([&] {
|
||||
for (int x = 0; x < _volData->getWidth(); x++) {
|
||||
for (int z = 0; z < _volData->getDepth(); z++) {
|
||||
uint8_t neighborValue = polyVoxYPNeighbor->getVoxel(x, 0, z);
|
||||
_volData->setVoxelAt(x, _volData->getWidth() - 1, z, neighborValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (currentZPNeighbor) {
|
||||
auto polyVoxZPNeighbor = std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(currentZPNeighbor);
|
||||
if (polyVoxZPNeighbor->getVoxelVolumeSize() == _voxelVolumeSize) {
|
||||
withWriteLock([&] {
|
||||
for (int x = 0; x < _volData->getWidth(); x++) {
|
||||
for (int y = 0; y < _volData->getHeight(); y++) {
|
||||
uint8_t neighborValue = polyVoxZPNeighbor->getVoxel(x, y, 0);
|
||||
_volData->setVoxelAt(x, y, _volData->getDepth() - 1, neighborValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1393,25 +1396,46 @@ void RenderablePolyVoxEntityItem::setZPNeighborID(const EntityItemID& zPNeighbor
|
|||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> RenderablePolyVoxEntityItem::getXNNeighbor() {
|
||||
return std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(_xNNeighbor.lock());
|
||||
}
|
||||
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> RenderablePolyVoxEntityItem::getYNNeighbor() {
|
||||
return std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(_yNNeighbor.lock());
|
||||
}
|
||||
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> RenderablePolyVoxEntityItem::getZNNeighbor() {
|
||||
return std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(_zNNeighbor.lock());
|
||||
}
|
||||
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> RenderablePolyVoxEntityItem::getXPNeighbor() {
|
||||
return std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(_xPNeighbor.lock());
|
||||
}
|
||||
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> RenderablePolyVoxEntityItem::getYPNeighbor() {
|
||||
return std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(_yPNeighbor.lock());
|
||||
}
|
||||
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> RenderablePolyVoxEntityItem::getZPNeighbor() {
|
||||
return std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(_zPNeighbor.lock());
|
||||
}
|
||||
|
||||
|
||||
void RenderablePolyVoxEntityItem::bonkNeighbors() {
|
||||
// flag neighbors to the negative of this entity as needing to rebake their meshes.
|
||||
cacheNeighbors();
|
||||
|
||||
EntityItemPointer currentXNNeighbor = _xNNeighbor.lock();
|
||||
EntityItemPointer currentYNNeighbor = _yNNeighbor.lock();
|
||||
EntityItemPointer currentZNNeighbor = _zNNeighbor.lock();
|
||||
auto currentXNNeighbor = getXNNeighbor();
|
||||
auto currentYNNeighbor = getYNNeighbor();
|
||||
auto currentZNNeighbor = getZNNeighbor();
|
||||
|
||||
if (currentXNNeighbor && currentXNNeighbor->getType() == EntityTypes::PolyVox) {
|
||||
auto polyVoxXNNeighbor = std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(currentXNNeighbor);
|
||||
polyVoxXNNeighbor->setVolDataDirty();
|
||||
if (currentXNNeighbor) {
|
||||
currentXNNeighbor->setVolDataDirty();
|
||||
}
|
||||
if (currentYNNeighbor && currentYNNeighbor->getType() == EntityTypes::PolyVox) {
|
||||
auto polyVoxYNNeighbor = std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(currentYNNeighbor);
|
||||
polyVoxYNNeighbor->setVolDataDirty();
|
||||
if (currentYNNeighbor) {
|
||||
currentYNNeighbor->setVolDataDirty();
|
||||
}
|
||||
if (currentZNNeighbor && currentZNNeighbor->getType() == EntityTypes::PolyVox) {
|
||||
auto polyVoxZNNeighbor = std::dynamic_pointer_cast<RenderablePolyVoxEntityItem>(currentZNNeighbor);
|
||||
polyVoxZNNeighbor->setVolDataDirty();
|
||||
if (currentZNNeighbor) {
|
||||
currentZNNeighbor->setVolDataDirty();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,6 +116,13 @@ public:
|
|||
virtual void setYPNeighborID(const EntityItemID& yPNeighborID) override;
|
||||
virtual void setZPNeighborID(const EntityItemID& zPNeighborID) override;
|
||||
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> getXNNeighbor();
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> getYNNeighbor();
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> getZNNeighbor();
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> getXPNeighbor();
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> getYPNeighbor();
|
||||
std::shared_ptr<RenderablePolyVoxEntityItem> getZPNeighbor();
|
||||
|
||||
virtual void updateRegistrationPoint(const glm::vec3& value) override;
|
||||
|
||||
void setVoxelsFromData(QByteArray uncompressedData, quint16 voxelXSize, quint16 voxelYSize, quint16 voxelZSize);
|
||||
|
|
|
@ -64,7 +64,7 @@ RenderableWebEntityItem::~RenderableWebEntityItem() {
|
|||
}
|
||||
}
|
||||
|
||||
bool RenderableWebEntityItem::buildWebSurface(EntityTreeRenderer* renderer) {
|
||||
bool RenderableWebEntityItem::buildWebSurface(QSharedPointer<EntityTreeRenderer> renderer) {
|
||||
if (_currentWebCount >= MAX_CONCURRENT_WEB_VIEWS) {
|
||||
qWarning() << "Too many concurrent web views to create new view";
|
||||
return false;
|
||||
|
@ -139,10 +139,11 @@ bool RenderableWebEntityItem::buildWebSurface(EntityTreeRenderer* renderer) {
|
|||
handlePointerEvent(event);
|
||||
}
|
||||
};
|
||||
_mousePressConnection = QObject::connect(renderer, &EntityTreeRenderer::mousePressOnEntity, forwardPointerEvent);
|
||||
_mouseReleaseConnection = QObject::connect(renderer, &EntityTreeRenderer::mouseReleaseOnEntity, forwardPointerEvent);
|
||||
_mouseMoveConnection = QObject::connect(renderer, &EntityTreeRenderer::mouseMoveOnEntity, forwardPointerEvent);
|
||||
_hoverLeaveConnection = QObject::connect(renderer, &EntityTreeRenderer::hoverLeaveEntity, [=](const EntityItemID& entityItemID, const PointerEvent& event) {
|
||||
_mousePressConnection = QObject::connect(renderer.data(), &EntityTreeRenderer::mousePressOnEntity, forwardPointerEvent);
|
||||
_mouseReleaseConnection = QObject::connect(renderer.data(), &EntityTreeRenderer::mouseReleaseOnEntity, forwardPointerEvent);
|
||||
_mouseMoveConnection = QObject::connect(renderer.data(), &EntityTreeRenderer::mouseMoveOnEntity, forwardPointerEvent);
|
||||
_hoverLeaveConnection = QObject::connect(renderer.data(), &EntityTreeRenderer::hoverLeaveEntity,
|
||||
[=](const EntityItemID& entityItemID, const PointerEvent& event) {
|
||||
if (this->_pressed && this->getID() == entityItemID) {
|
||||
// If the user mouses off the entity while the button is down, simulate a touch end.
|
||||
QTouchEvent::TouchPoint point;
|
||||
|
@ -190,7 +191,8 @@ void RenderableWebEntityItem::render(RenderArgs* args) {
|
|||
#endif
|
||||
|
||||
if (!_webSurface) {
|
||||
if (!buildWebSurface(static_cast<EntityTreeRenderer*>(args->_renderer))) {
|
||||
auto renderer = qSharedPointerCast<EntityTreeRenderer>(args->_renderer);
|
||||
if (!buildWebSurface(renderer)) {
|
||||
return;
|
||||
}
|
||||
_fadeStartTime = usecTimestampNow();
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
virtual bool isTransparent() override;
|
||||
|
||||
private:
|
||||
bool buildWebSurface(EntityTreeRenderer* renderer);
|
||||
bool buildWebSurface(QSharedPointer<EntityTreeRenderer> renderer);
|
||||
void destroyWebSurface();
|
||||
glm::vec2 getWindowSize() const;
|
||||
|
||||
|
|
|
@ -123,7 +123,9 @@ glm::vec3 OBJTokenizer::getVec3() {
|
|||
return v;
|
||||
}
|
||||
glm::vec2 OBJTokenizer::getVec2() {
|
||||
auto v = glm::vec2(getFloat(), 1.0f - getFloat()); // OBJ has an odd sense of u, v. Also N.B.: getFloat() has side-effect
|
||||
float uCoord = getFloat();
|
||||
float vCoord = 1.0f - getFloat();
|
||||
auto v = glm::vec2(uCoord, vCoord);
|
||||
while (isNextTokenFloat()) {
|
||||
// there can be a w, but we don't handle that
|
||||
nextToken();
|
||||
|
|
|
@ -111,7 +111,7 @@ float GLTexture::getMemoryPressure() {
|
|||
}
|
||||
#else
|
||||
// Hardcode texture limit for sparse textures at 1 GB for now
|
||||
availableTextureMemory = GPU_MEMORY_RESERVE_BYTES;
|
||||
availableTextureMemory = TEXTURE_MEMORY_MIN_BYTES;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -322,7 +322,9 @@ void GL45Texture::withPreservedTexture(std::function<void()> f) const {
|
|||
}
|
||||
|
||||
void GL45Texture::generateMips() const {
|
||||
qCDebug(gpugl45logging) << "Generating mipmaps for " << _source.c_str();
|
||||
if (_transferrable) {
|
||||
qCDebug(gpugl45logging) << "Generating mipmaps for " << _source.c_str();
|
||||
}
|
||||
glGenerateTextureMipmap(_id);
|
||||
(void)CHECK_GL_ERROR();
|
||||
}
|
||||
|
|
|
@ -508,12 +508,16 @@ std::vector<HifiSockAddr> Socket::getConnectionSockAddrs() {
|
|||
}
|
||||
|
||||
void Socket::handleSocketError(QAbstractSocket::SocketError socketError) {
|
||||
qCWarning(networking) << "udt::Socket error -" << socketError;
|
||||
static const QString SOCKET_REGEX = "udt::Socket error - ";
|
||||
static QString repeatedMessage
|
||||
= LogHandler::getInstance().addRepeatedMessageRegex(SOCKET_REGEX);
|
||||
|
||||
qCDebug(networking) << "udt::Socket error - " << socketError;
|
||||
}
|
||||
|
||||
void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) {
|
||||
if (socketState != QAbstractSocket::BoundState) {
|
||||
qCWarning(networking) << "udt::Socket state changed - state is now" << socketState;
|
||||
qCDebug(networking) << "udt::Socket state changed - state is now" << socketState;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -451,6 +451,9 @@ bool OctreePacketData::appendValue(const QVector<bool>& value) {
|
|||
bit = 0;
|
||||
}
|
||||
}
|
||||
if (bit != 0) {
|
||||
destinationBuffer++;
|
||||
}
|
||||
int boolsSize = destinationBuffer - start;
|
||||
success = append(start, boolsSize);
|
||||
if (success) {
|
||||
|
@ -683,6 +686,10 @@ int OctreePacketData::unpackDataFromBytes(const unsigned char *dataBytes, QVecto
|
|||
uint16_t length;
|
||||
memcpy(&length, dataBytes, sizeof(uint16_t));
|
||||
dataBytes += sizeof(length);
|
||||
if (length * sizeof(glm::vec3) > MAX_OCTREE_UNCOMRESSED_PACKET_SIZE) {
|
||||
result.resize(0);
|
||||
return sizeof(uint16_t);
|
||||
}
|
||||
result.resize(length);
|
||||
memcpy(result.data(), dataBytes, length * sizeof(glm::vec3));
|
||||
return sizeof(uint16_t) + length * sizeof(glm::vec3);
|
||||
|
@ -692,6 +699,10 @@ int OctreePacketData::unpackDataFromBytes(const unsigned char *dataBytes, QVecto
|
|||
uint16_t length;
|
||||
memcpy(&length, dataBytes, sizeof(uint16_t));
|
||||
dataBytes += sizeof(length);
|
||||
if (length * sizeof(glm::quat) > MAX_OCTREE_UNCOMRESSED_PACKET_SIZE) {
|
||||
result.resize(0);
|
||||
return sizeof(uint16_t);
|
||||
}
|
||||
result.resize(length);
|
||||
|
||||
const unsigned char *start = dataBytes;
|
||||
|
@ -706,6 +717,10 @@ int OctreePacketData::unpackDataFromBytes(const unsigned char* dataBytes, QVecto
|
|||
uint16_t length;
|
||||
memcpy(&length, dataBytes, sizeof(uint16_t));
|
||||
dataBytes += sizeof(length);
|
||||
if (length * sizeof(float) > MAX_OCTREE_UNCOMRESSED_PACKET_SIZE) {
|
||||
result.resize(0);
|
||||
return sizeof(uint16_t);
|
||||
}
|
||||
result.resize(length);
|
||||
memcpy(result.data(), dataBytes, length * sizeof(float));
|
||||
return sizeof(uint16_t) + length * sizeof(float);
|
||||
|
@ -715,6 +730,10 @@ int OctreePacketData::unpackDataFromBytes(const unsigned char* dataBytes, QVecto
|
|||
uint16_t length;
|
||||
memcpy(&length, dataBytes, sizeof(uint16_t));
|
||||
dataBytes += sizeof(length);
|
||||
if (length / 8 > MAX_OCTREE_UNCOMRESSED_PACKET_SIZE) {
|
||||
result.resize(0);
|
||||
return sizeof(uint16_t);
|
||||
}
|
||||
result.resize(length);
|
||||
|
||||
int bit = 0;
|
||||
|
|
|
@ -216,7 +216,7 @@ bool OctreeRenderer::renderOperation(OctreeElementPointer element, void* extraDa
|
|||
|
||||
void OctreeRenderer::render(RenderArgs* renderArgs) {
|
||||
if (_tree) {
|
||||
renderArgs->_renderer = this;
|
||||
renderArgs->_renderer = sharedFromThis();
|
||||
_tree->withReadLock([&] {
|
||||
_tree->recurseTreeWithOperation(renderOperation, renderArgs);
|
||||
});
|
||||
|
|
|
@ -29,7 +29,7 @@ class OctreeRenderer;
|
|||
|
||||
|
||||
// Generic client side Octree renderer class.
|
||||
class OctreeRenderer : public QObject {
|
||||
class OctreeRenderer : public QObject, public QEnableSharedFromThis<OctreeRenderer> {
|
||||
Q_OBJECT
|
||||
public:
|
||||
OctreeRenderer();
|
||||
|
|
|
@ -21,6 +21,9 @@ public:
|
|||
virtual void pluginFocusOutEvent() = 0;
|
||||
virtual void pluginUpdate(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) = 0;
|
||||
|
||||
// Some input plugins are comprised of multiple subdevices (SDL2, for instance).
|
||||
// If an input plugin is only a single device, it will only return it's primary name.
|
||||
virtual QStringList getSubdeviceNames() { return { getName() }; };
|
||||
virtual bool isHandController() const = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ const LoaderList& getLoadedPlugins() {
|
|||
QString pluginPath = QCoreApplication::applicationDirPath() + "/plugins/";
|
||||
#endif
|
||||
QDir pluginDir(pluginPath);
|
||||
pluginDir.setSorting(QDir::Name);
|
||||
pluginDir.setFilter(QDir::Files);
|
||||
if (pluginDir.exists()) {
|
||||
qInfo() << "Loading runtime plugins from " << pluginPath;
|
||||
|
|
|
@ -32,3 +32,26 @@ bool PluginUtils::isHandControllerAvailable() {
|
|||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
bool isSubdeviceContainingNameAvailable(QString name) {
|
||||
for (auto& inputPlugin : PluginManager::getInstance()->getInputPlugins()) {
|
||||
if (inputPlugin->isActive()) {
|
||||
auto subdeviceNames = inputPlugin->getSubdeviceNames();
|
||||
for (auto& subdeviceName : subdeviceNames) {
|
||||
if (subdeviceName.contains(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
bool PluginUtils::isViveControllerAvailable() {
|
||||
return isSubdeviceContainingNameAvailable("OpenVR");
|
||||
};
|
||||
|
||||
bool PluginUtils::isXboxControllerAvailable() {
|
||||
return isSubdeviceContainingNameAvailable("X360 Controller");
|
||||
};
|
||||
|
||||
|
|
|
@ -16,4 +16,6 @@ class PluginUtils {
|
|||
public:
|
||||
static bool isHMDAvailable(const QString& pluginName = "");
|
||||
static bool isHandControllerAvailable();
|
||||
static bool isViveControllerAvailable();
|
||||
static bool isXboxControllerAvailable();
|
||||
};
|
||||
|
|
|
@ -37,29 +37,30 @@ glm::quat Quat::lookAt(const glm::vec3& eye, const glm::vec3& center, const glm:
|
|||
glm::quat Quat::lookAtSimple(const glm::vec3& eye, const glm::vec3& center) {
|
||||
auto dir = glm::normalize(center - eye);
|
||||
// if the direction is nearly aligned with the Y axis, then use the X axis for 'up'
|
||||
if (dir.x < 0.001f && dir.z < 0.001f) {
|
||||
const float MAX_ABS_Y_COMPONENT = 0.9999991f;
|
||||
if (fabsf(dir.y) > MAX_ABS_Y_COMPONENT) {
|
||||
return lookAt(eye, center, Vectors::UNIT_X);
|
||||
}
|
||||
return lookAt(eye, center, Vectors::UNIT_Y);
|
||||
}
|
||||
|
||||
glm::quat Quat::multiply(const glm::quat& q1, const glm::quat& q2) {
|
||||
return q1 * q2;
|
||||
glm::quat Quat::multiply(const glm::quat& q1, const glm::quat& q2) {
|
||||
return q1 * q2;
|
||||
}
|
||||
|
||||
glm::quat Quat::fromVec3Degrees(const glm::vec3& eulerAngles) {
|
||||
return glm::quat(glm::radians(eulerAngles));
|
||||
glm::quat Quat::fromVec3Degrees(const glm::vec3& eulerAngles) {
|
||||
return glm::quat(glm::radians(eulerAngles));
|
||||
}
|
||||
|
||||
glm::quat Quat::fromVec3Radians(const glm::vec3& eulerAngles) {
|
||||
return glm::quat(eulerAngles);
|
||||
glm::quat Quat::fromVec3Radians(const glm::vec3& eulerAngles) {
|
||||
return glm::quat(eulerAngles);
|
||||
}
|
||||
|
||||
glm::quat Quat::fromPitchYawRollDegrees(float pitch, float yaw, float roll) {
|
||||
glm::quat Quat::fromPitchYawRollDegrees(float pitch, float yaw, float roll) {
|
||||
return glm::quat(glm::radians(glm::vec3(pitch, yaw, roll)));
|
||||
}
|
||||
|
||||
glm::quat Quat::fromPitchYawRollRadians(float pitch, float yaw, float roll) {
|
||||
glm::quat Quat::fromPitchYawRollRadians(float pitch, float yaw, float roll) {
|
||||
return glm::quat(glm::vec3(pitch, yaw, roll));
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,15 @@
|
|||
|
||||
#include <QtCore/QtGlobal>
|
||||
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <atlbase.h>
|
||||
#include <Wbemidl.h>
|
||||
#include <string>
|
||||
|
||||
//#include <atlbase.h>
|
||||
//#include <Wbemidl.h>
|
||||
|
||||
#include <dxgi1_3.h>
|
||||
#pragma comment(lib, "dxgi.lib")
|
||||
|
||||
#elif defined(Q_OS_MAC)
|
||||
#include <OpenGL/OpenGL.h>
|
||||
|
@ -53,9 +59,101 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
|||
CGLDestroyRendererInfo(rendererInfo);
|
||||
|
||||
#elif defined(Q_OS_WIN)
|
||||
|
||||
struct ConvertLargeIntegerToQString {
|
||||
QString convert(const LARGE_INTEGER& version) {
|
||||
QString value;
|
||||
value.append(QString::number(uint32_t(((version.HighPart & 0xFFFF0000) >> 16) & 0x0000FFFF)));
|
||||
value.append(".");
|
||||
value.append(QString::number(uint32_t((version.HighPart) & 0x0000FFFF)));
|
||||
value.append(".");
|
||||
value.append(QString::number(uint32_t(((version.LowPart & 0xFFFF0000) >> 16) & 0x0000FFFF)));
|
||||
value.append(".");
|
||||
value.append(QString::number(uint32_t((version.LowPart) & 0x0000FFFF)));
|
||||
return value;
|
||||
}
|
||||
} convertDriverVersionToString;
|
||||
|
||||
// Create the DXGI factory
|
||||
// Let s get into DXGI land:
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
IDXGIFactory1* pFactory = nullptr;
|
||||
hr = CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)(&pFactory) );
|
||||
if (hr != S_OK || pFactory == nullptr) {
|
||||
qCDebug(shared) << "Unable to create DXGI";
|
||||
return this;
|
||||
}
|
||||
|
||||
std::vector<int> validAdapterList;
|
||||
using AdapterEntry = std::pair<std::pair<DXGI_ADAPTER_DESC1, LARGE_INTEGER>, std::vector<DXGI_OUTPUT_DESC>>;
|
||||
std::vector<AdapterEntry> adapterToOutputs;
|
||||
// Enumerate adapters and outputs
|
||||
{
|
||||
UINT adapterNum = 0;
|
||||
IDXGIAdapter1* pAdapter = nullptr;
|
||||
while (pFactory->EnumAdapters1(adapterNum, &pAdapter) != DXGI_ERROR_NOT_FOUND) {
|
||||
|
||||
// Found an adapter, get descriptor
|
||||
DXGI_ADAPTER_DESC1 adapterDesc;
|
||||
pAdapter->GetDesc1(&adapterDesc);
|
||||
|
||||
LARGE_INTEGER version;
|
||||
hr = pAdapter->CheckInterfaceSupport(__uuidof(IDXGIDevice), &version);
|
||||
|
||||
std::wstring wDescription (adapterDesc.Description);
|
||||
std::string description(wDescription.begin(), wDescription.end());
|
||||
qCDebug(shared) << "Found adapter: " << description.c_str()
|
||||
<< " Driver version: " << convertDriverVersionToString.convert(version);
|
||||
|
||||
AdapterEntry adapterEntry;
|
||||
adapterEntry.first.first = adapterDesc;
|
||||
adapterEntry.first.second = version;
|
||||
|
||||
|
||||
|
||||
UINT outputNum = 0;
|
||||
IDXGIOutput * pOutput;
|
||||
bool hasOutputConnectedToDesktop = false;
|
||||
while (pAdapter->EnumOutputs(outputNum, &pOutput) != DXGI_ERROR_NOT_FOUND) {
|
||||
|
||||
// FOund an output attached to the adapter, get descriptor
|
||||
DXGI_OUTPUT_DESC outputDesc;
|
||||
pOutput->GetDesc(&outputDesc);
|
||||
|
||||
adapterEntry.second.push_back(outputDesc);
|
||||
|
||||
std::wstring wDeviceName(outputDesc.DeviceName);
|
||||
std::string deviceName(wDeviceName.begin(), wDeviceName.end());
|
||||
qCDebug(shared) << " Found output: " << deviceName.c_str() << " desktop: " << (outputDesc.AttachedToDesktop ? "true" : "false")
|
||||
<< " Rect [ l=" << outputDesc.DesktopCoordinates.left << " r=" << outputDesc.DesktopCoordinates.right
|
||||
<< " b=" << outputDesc.DesktopCoordinates.bottom << " t=" << outputDesc.DesktopCoordinates.top << " ]";
|
||||
|
||||
hasOutputConnectedToDesktop |= (bool) outputDesc.AttachedToDesktop;
|
||||
|
||||
pOutput->Release();
|
||||
outputNum++;
|
||||
}
|
||||
|
||||
adapterToOutputs.push_back(adapterEntry);
|
||||
|
||||
// add this adapter to the valid list if has output
|
||||
if (hasOutputConnectedToDesktop && !adapterEntry.second.empty()) {
|
||||
validAdapterList.push_back(adapterNum);
|
||||
}
|
||||
|
||||
pAdapter->Release();
|
||||
adapterNum++;
|
||||
}
|
||||
}
|
||||
pFactory->Release();
|
||||
|
||||
|
||||
// THis was the previous technique used to detect the platform we are running on on windows.
|
||||
/*
|
||||
// COM must be initialized already using CoInitialize. E.g., by the audio subsystem.
|
||||
CComPtr<IWbemLocator> spLoc = NULL;
|
||||
HRESULT hr = CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_SERVER, IID_IWbemLocator, (LPVOID *)&spLoc);
|
||||
hr = CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_SERVER, IID_IWbemLocator, (LPVOID *)&spLoc);
|
||||
if (hr != S_OK || spLoc == NULL) {
|
||||
qCDebug(shared) << "Unable to connect to WMI";
|
||||
return this;
|
||||
|
@ -139,7 +237,7 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
|||
var.ChangeType(CIM_UINT64); // We're going to receive some integral type, but it might not be uint.
|
||||
// We might be hosed here. The parameter is documented to be UINT32, but that's only 4 GB!
|
||||
const ULONGLONG BYTES_PER_MEGABYTE = 1024 * 1024;
|
||||
_dedicatedMemoryMB = (uint) (var.ullVal / BYTES_PER_MEGABYTE);
|
||||
_dedicatedMemoryMB = (uint64_t) (var.ullVal / BYTES_PER_MEGABYTE);
|
||||
}
|
||||
else {
|
||||
qCDebug(shared) << "Unable to get video AdapterRAM";
|
||||
|
@ -149,6 +247,22 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
|||
}
|
||||
hr = spEnumInst->Next(WBEM_INFINITE, 1, &spInstance.p, &uNumOfInstances);
|
||||
}
|
||||
*/
|
||||
|
||||
if (!validAdapterList.empty()) {
|
||||
auto& adapterEntry = adapterToOutputs[validAdapterList.front()];
|
||||
|
||||
std::wstring wDescription(adapterEntry.first.first.Description);
|
||||
std::string description(wDescription.begin(), wDescription.end());
|
||||
_name = QString(description.c_str());
|
||||
|
||||
_driver = convertDriverVersionToString.convert(adapterEntry.first.second);
|
||||
|
||||
const ULONGLONG BYTES_PER_MEGABYTE = 1024 * 1024;
|
||||
_dedicatedMemoryMB = (uint64_t)(adapterEntry.first.first.DedicatedVideoMemory / BYTES_PER_MEGABYTE);
|
||||
_isValid = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -14,17 +14,19 @@
|
|||
#ifndef hifi_GPUIdent_h
|
||||
#define hifi_GPUIdent_h
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class GPUIdent
|
||||
{
|
||||
public:
|
||||
unsigned int getMemory() { return _dedicatedMemoryMB; }
|
||||
uint64_t getMemory() { return _dedicatedMemoryMB; }
|
||||
QString getName() { return _name; }
|
||||
QString getDriver() { return _driver; }
|
||||
bool isValid() { return _isValid; }
|
||||
// E.g., GPUIdent::getInstance()->getMemory();
|
||||
static GPUIdent* getInstance(const QString& vendor = "", const QString& renderer = "") { return _instance.ensureQuery(vendor, renderer); }
|
||||
private:
|
||||
uint _dedicatedMemoryMB { 0 };
|
||||
uint64_t _dedicatedMemoryMB { 0 };
|
||||
QString _name { "" };
|
||||
QString _driver { "" };
|
||||
bool _isQueried { false };
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
};
|
||||
|
||||
RenderArgs(std::shared_ptr<gpu::Context> context = nullptr,
|
||||
OctreeRenderer* renderer = nullptr,
|
||||
QSharedPointer<OctreeRenderer> renderer = QSharedPointer<OctreeRenderer>(nullptr),
|
||||
float sizeScale = 1.0f,
|
||||
int boundaryLevelAdjust = 0,
|
||||
RenderMode renderMode = DEFAULT_RENDER_MODE,
|
||||
|
@ -110,7 +110,7 @@ public:
|
|||
std::shared_ptr<gpu::Context> _context = nullptr;
|
||||
std::shared_ptr<gpu::Framebuffer> _blitFramebuffer = nullptr;
|
||||
std::shared_ptr<render::ShapePipeline> _pipeline = nullptr;
|
||||
OctreeRenderer* _renderer = nullptr;
|
||||
QSharedPointer<OctreeRenderer> _renderer;
|
||||
std::stack<ViewFrustum> _viewFrustums;
|
||||
glm::ivec4 _viewport{ 0.0f, 0.0f, 1.0f, 1.0f };
|
||||
glm::vec3 _boomOffset{ 0.0f, 0.0f, 1.0f };
|
||||
|
|
|
@ -37,7 +37,7 @@ QString fetchVersion(const QUrl& url) {
|
|||
return r.trimmed();
|
||||
}
|
||||
|
||||
void InfoView::show(const QString& path, bool firstOrChangedOnly) {
|
||||
void InfoView::show(const QString& path, bool firstOrChangedOnly, QString urlQuery) {
|
||||
static bool registered{ false };
|
||||
if (!registered) {
|
||||
registerType();
|
||||
|
@ -49,6 +49,8 @@ void InfoView::show(const QString& path, bool firstOrChangedOnly) {
|
|||
} else {
|
||||
url = QUrl::fromLocalFile(path);
|
||||
}
|
||||
url.setQuery(urlQuery);
|
||||
|
||||
if (firstOrChangedOnly) {
|
||||
const QString lastVersion = infoVersion.get();
|
||||
const QString version = fetchVersion(url);
|
||||
|
|
|
@ -22,7 +22,7 @@ class InfoView : public QQuickItem {
|
|||
static const QString NAME;
|
||||
public:
|
||||
static void registerType();
|
||||
static void show(const QString& path, bool firstOrChangedOnly = false);
|
||||
static void show(const QString& path, bool firstOrChangedOnly = false, QString urlQuery = "");
|
||||
|
||||
InfoView(QQuickItem* parent = nullptr);
|
||||
QUrl url();
|
||||
|
|
|
@ -371,6 +371,13 @@ void OffscreenUi::setPinned(bool pinned) {
|
|||
}
|
||||
}
|
||||
|
||||
void OffscreenUi::setConstrainToolbarToCenterX(bool constrained) {
|
||||
bool invokeResult = QMetaObject::invokeMethod(_desktop, "setConstrainToolbarToCenterX", Q_ARG(QVariant, constrained));
|
||||
if (!invokeResult) {
|
||||
qWarning() << "Failed to set toolbar constraint";
|
||||
}
|
||||
}
|
||||
|
||||
void OffscreenUi::addMenuInitializer(std::function<void(VrMenu*)> f) {
|
||||
if (!_vrMenu) {
|
||||
_queuedMenuInitializers.push_back(f);
|
||||
|
|
|
@ -52,6 +52,7 @@ public:
|
|||
void setPinned(bool pinned = true);
|
||||
|
||||
void togglePinned();
|
||||
void setConstrainToolbarToCenterX(bool constrained);
|
||||
|
||||
bool eventFilter(QObject* originalDestination, QEvent* event) override;
|
||||
void addMenuInitializer(std::function<void(VrMenu*)> f);
|
||||
|
|
|
@ -31,6 +31,8 @@ public:
|
|||
|
||||
const QString& getName() const { return _name; }
|
||||
|
||||
SDL_GameController* getGameController() { return _sdlGameController; }
|
||||
|
||||
// Device functions
|
||||
virtual controller::Input::NamedVector getAvailableInputs() const override;
|
||||
virtual QString getDefaultMappingConfig() const override;
|
||||
|
|
|
@ -65,8 +65,10 @@ void SDL2Manager::init() {
|
|||
_openJoysticks[id] = joystick;
|
||||
auto userInputMapper = DependencyManager::get<controller::UserInputMapper>();
|
||||
userInputMapper->registerDevice(joystick);
|
||||
auto name = SDL_GameControllerName(controller);
|
||||
_subdeviceNames << name;
|
||||
emit joystickAdded(joystick.get());
|
||||
emit subdeviceConnected(getName(), SDL_GameControllerName(controller));
|
||||
emit subdeviceConnected(getName(), name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -78,6 +80,10 @@ void SDL2Manager::init() {
|
|||
}
|
||||
}
|
||||
|
||||
QStringList SDL2Manager::getSubdeviceNames() {
|
||||
return _subdeviceNames;
|
||||
}
|
||||
|
||||
void SDL2Manager::deinit() {
|
||||
_openJoysticks.clear();
|
||||
|
||||
|
@ -157,15 +163,19 @@ void SDL2Manager::pluginUpdate(float deltaTime, const controller::InputCalibrati
|
|||
Joystick::Pointer joystick = std::make_shared<Joystick>(id, controller);
|
||||
_openJoysticks[id] = joystick;
|
||||
userInputMapper->registerDevice(joystick);
|
||||
QString name = SDL_GameControllerName(controller);
|
||||
emit joystickAdded(joystick.get());
|
||||
emit subdeviceConnected(getName(), SDL_GameControllerName(controller));
|
||||
emit subdeviceConnected(getName(), name);
|
||||
_subdeviceNames << name;
|
||||
}
|
||||
} else if (event.type == SDL_CONTROLLERDEVICEREMOVED) {
|
||||
if (_openJoysticks.contains(event.cdevice.which)) {
|
||||
Joystick::Pointer joystick = _openJoysticks[event.cdevice.which];
|
||||
_openJoysticks.remove(event.cdevice.which);
|
||||
userInputMapper->removeDevice(joystick->getDeviceID());
|
||||
QString name = SDL_GameControllerName(joystick->getGameController());
|
||||
emit joystickRemoved(joystick.get());
|
||||
_subdeviceNames.removeOne(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ public:
|
|||
bool isSupported() const override;
|
||||
const QString& getName() const override { return NAME; }
|
||||
|
||||
QStringList getSubdeviceNames() override;
|
||||
bool isHandController() const override { return false; }
|
||||
|
||||
void init() override;
|
||||
|
@ -79,6 +80,7 @@ private:
|
|||
QMap<SDL_JoystickID, Joystick::Pointer> _openJoysticks;
|
||||
bool _isInitialized { false } ;
|
||||
static const QString NAME;
|
||||
QStringList _subdeviceNames;
|
||||
};
|
||||
|
||||
#endif // hifi__SDL2Manager_h
|
||||
|
|
|
@ -117,6 +117,17 @@ void OculusControllerManager::stopHapticPulse(bool leftHand) {
|
|||
}
|
||||
}
|
||||
|
||||
QStringList OculusControllerManager::getSubdeviceNames() {
|
||||
QStringList devices;
|
||||
if (_touch) {
|
||||
devices << _touch->getName();
|
||||
}
|
||||
if (_remote) {
|
||||
devices << _remote->getName();
|
||||
}
|
||||
return devices;
|
||||
}
|
||||
|
||||
using namespace controller;
|
||||
|
||||
static const std::vector<std::pair<ovrButton, StandardButtonChannel>> BUTTON_MAP { {
|
||||
|
|
|
@ -27,6 +27,7 @@ public:
|
|||
const QString& getName() const override { return NAME; }
|
||||
|
||||
bool isHandController() const override { return _touch != nullptr; }
|
||||
QStringList getSubdeviceNames() override;
|
||||
|
||||
bool activate() override;
|
||||
void deactivate() override;
|
||||
|
|
|
@ -32,7 +32,8 @@ var DEFAULT_SCRIPTS = [
|
|||
"system/controllers/toggleAdvancedMovementForHandControllers.js",
|
||||
"system/dialTone.js",
|
||||
"system/firstPersonHMD.js",
|
||||
"system/snapshot.js"
|
||||
"system/snapshot.js",
|
||||
"system/help.js"
|
||||
];
|
||||
|
||||
// add a menu item for debugging
|
||||
|
|
110
scripts/system/assets/images/tools/help.svg
Normal file
110
scripts/system/assets/images/tools/help.svg
Normal file
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 50 200.1" style="enable-background:new 0 0 50 200.1;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#414042;}
|
||||
.st1{fill:#FFFFFF;}
|
||||
.st2{fill:#1E1E1E;}
|
||||
.st3{fill:#333333;}
|
||||
</style>
|
||||
<g id="Layer_2">
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M50.1,146.1c0,2.2-1.8,4-4,4h-42c-2.2,0-4-1.8-4-4v-42c0-2.2,1.8-4,4-4h42c2.2,0,4,1.8,4,4V146.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M50,196.1c0,2.2-1.8,4-4,4H4c-2.2,0-4-1.8-4-4v-42c0-2.2,1.8-4,4-4h42c2.2,0,4,1.8,4,4V196.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st1" d="M50,46c0,2.2-1.8,4-4,4H4c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h42c2.2,0,4,1.8,4,4V46z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st2" d="M50,96.1c0,2.2-1.8,4-4,4H4c-2.2,0-4-1.8-4-4v-42c0-2.2,1.8-4,4-4h42c2.2,0,4,1.8,4,4V96.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Layer_3">
|
||||
</g>
|
||||
<g>
|
||||
<path class="st1" d="M20.1,86v6.4h-1.2v-2.7H16v2.7h-1.2V86H16v2.6h2.9V86H20.1z"/>
|
||||
<path class="st1" d="M26.1,91.3v1.1h-4.4V86H26v1.1h-3.1v1.5h2.7v1h-2.7v1.7H26.1z"/>
|
||||
<path class="st1" d="M27.3,92.4V86h1.2v5.3h3.3v1.1H27.3z"/>
|
||||
<path class="st1" d="M32.8,92.4V86h2.7c0.3,0,0.6,0.1,0.8,0.2s0.5,0.3,0.6,0.5c0.2,0.2,0.3,0.4,0.4,0.7c0.1,0.3,0.2,0.5,0.2,0.8
|
||||
c0,0.3,0,0.5-0.1,0.8c-0.1,0.3-0.2,0.5-0.4,0.7c-0.2,0.2-0.4,0.4-0.6,0.5c-0.2,0.1-0.5,0.2-0.8,0.2h-1.5v2.1H32.8z M34.1,89.2h1.4
|
||||
c0.2,0,0.4-0.1,0.6-0.3c0.2-0.2,0.2-0.4,0.2-0.8c0-0.2,0-0.3-0.1-0.4c0-0.1-0.1-0.2-0.2-0.3c-0.1-0.1-0.2-0.2-0.3-0.2
|
||||
c-0.1,0-0.2-0.1-0.3-0.1h-1.4V89.2z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st1" d="M35.1,60.2c0.2,0,0.4,0.1,0.4,0.3v18.5c0,0.2-0.2,0.3-0.4,0.3H16.6c-0.2,0-0.3-0.2-0.3-0.3V60.5
|
||||
c0-0.2,0.2-0.3,0.3-0.3H35.1 M35.1,58.5H16.6c-1.1,0-2.1,0.9-2.1,2v18.5c0,1.1,0.9,2.1,2.1,2.1h18.5c1.1,0,2.1-0.9,2.1-2.1V60.5
|
||||
C37.2,59.3,36.2,58.5,35.1,58.5L35.1,58.5z"/>
|
||||
<g>
|
||||
<path class="st1" d="M21.6,64c2-0.6,2.9-0.8,4.8-0.8c2.8,0,4.1,0.9,4.1,3.5v0.4c0,1.7-0.6,2.4-1.7,2.8c-0.9,0.3-1.6,0.5-2.6,0.8
|
||||
v1.8h-2l-0.3-3.1c1.2-0.4,2.2-0.7,3-1c0.8-0.3,1.1-0.7,1.1-1.3v-0.4c0-1.3-0.4-1.6-1.8-1.6c-1,0-1.6,0.1-2.4,0.4l-0.2,1.2h-2V64z
|
||||
M23.8,75.3c0-0.9,0.4-1.3,1.4-1.3c1,0,1.4,0.4,1.4,1.3c0,0.9-0.5,1.3-1.4,1.3C24.2,76.6,23.8,76.2,23.8,75.3z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st3" d="M20.1,36.3v6.4h-1.2V40H16v2.7h-1.2v-6.4H16v2.6h2.9v-2.6H20.1z"/>
|
||||
<path class="st3" d="M26.1,41.6v1.1h-4.4v-6.4H26v1.1h-3.1v1.5h2.7v1h-2.7v1.7H26.1z"/>
|
||||
<path class="st3" d="M27.3,42.7v-6.4h1.2v5.3h3.3v1.1H27.3z"/>
|
||||
<path class="st3" d="M32.8,42.7v-6.4h2.7c0.3,0,0.6,0.1,0.8,0.2s0.5,0.3,0.6,0.5c0.2,0.2,0.3,0.4,0.4,0.7c0.1,0.3,0.2,0.5,0.2,0.8
|
||||
c0,0.3,0,0.5-0.1,0.8c-0.1,0.3-0.2,0.5-0.4,0.7c-0.2,0.2-0.4,0.4-0.6,0.5c-0.2,0.1-0.5,0.2-0.8,0.2h-1.5v2.1H32.8z M34.1,39.5h1.4
|
||||
c0.2,0,0.4-0.1,0.6-0.3c0.2-0.2,0.2-0.4,0.2-0.8c0-0.2,0-0.3-0.1-0.4c0-0.1-0.1-0.2-0.2-0.3c-0.1-0.1-0.2-0.2-0.3-0.2
|
||||
c-0.1,0-0.2-0.1-0.3-0.1h-1.4V39.5z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st3" d="M35.1,10.5c0.2,0,0.4,0.1,0.4,0.3v18.5c0,0.2-0.2,0.3-0.4,0.3H16.6c-0.2,0-0.3-0.2-0.3-0.3V10.7
|
||||
c0-0.2,0.2-0.3,0.3-0.3H35.1 M35.1,8.7H16.6c-1.1,0-2.1,0.9-2.1,2v18.5c0,1.1,0.9,2.1,2.1,2.1h18.5c1.1,0,2.1-0.9,2.1-2.1V10.7
|
||||
C37.2,9.6,36.2,8.7,35.1,8.7L35.1,8.7z"/>
|
||||
<g>
|
||||
<path class="st3" d="M21.6,14.3c2-0.6,2.9-0.8,4.8-0.8c2.8,0,4.1,0.9,4.1,3.5v0.4c0,1.7-0.6,2.4-1.7,2.8c-0.9,0.3-1.6,0.5-2.6,0.8
|
||||
v1.8h-2l-0.3-3.1c1.2-0.4,2.2-0.7,3-1c0.8-0.3,1.1-0.7,1.1-1.3v-0.4c0-1.3-0.4-1.6-1.8-1.6c-1,0-1.6,0.1-2.4,0.4l-0.2,1.2h-2V14.3
|
||||
z M23.8,25.6c0-0.9,0.4-1.3,1.4-1.3c1,0,1.4,0.4,1.4,1.3c0,0.9-0.5,1.3-1.4,1.3C24.2,26.9,23.8,26.5,23.8,25.6z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st1" d="M20.1,136v6.4h-1.2v-2.7H16v2.7h-1.2V136H16v2.6h2.9V136H20.1z"/>
|
||||
<path class="st1" d="M26.1,141.3v1.1h-4.4V136H26v1.1h-3.1v1.5h2.7v1h-2.7v1.7H26.1z"/>
|
||||
<path class="st1" d="M27.3,142.4V136h1.2v5.3h3.3v1.1H27.3z"/>
|
||||
<path class="st1" d="M32.8,142.4V136h2.7c0.3,0,0.6,0.1,0.8,0.2s0.5,0.3,0.6,0.5c0.2,0.2,0.3,0.4,0.4,0.7c0.1,0.3,0.2,0.5,0.2,0.8
|
||||
c0,0.3,0,0.5-0.1,0.8c-0.1,0.3-0.2,0.5-0.4,0.7c-0.2,0.2-0.4,0.4-0.6,0.5c-0.2,0.1-0.5,0.2-0.8,0.2h-1.5v2.1H32.8z M34.1,139.2h1.4
|
||||
c0.2,0,0.4-0.1,0.6-0.3c0.2-0.2,0.2-0.4,0.2-0.8c0-0.2,0-0.3-0.1-0.4c0-0.1-0.1-0.2-0.2-0.3c-0.1-0.1-0.2-0.2-0.3-0.2
|
||||
c-0.1,0-0.2-0.1-0.3-0.1h-1.4V139.2z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st1" d="M36.4,108.9c0.2,0,0.4,0.1,0.4,0.3v21c0,0.2-0.2,0.4-0.4,0.4h-21c-0.2,0-0.4-0.2-0.4-0.4v-21
|
||||
c0-0.2,0.2-0.3,0.4-0.3H36.4 M36.4,106.9h-21c-1.3,0-2.3,1-2.3,2.3v21c0,1.3,1.1,2.3,2.3,2.3h21c1.3,0,2.4-1.1,2.4-2.3v-21
|
||||
C38.8,107.9,37.7,106.9,36.4,106.9L36.4,106.9z"/>
|
||||
<g>
|
||||
<path class="st1" d="M21,113.2c2.3-0.7,3.3-0.9,5.5-0.9c3.2,0,4.6,1.1,4.6,4v0.5c0,2-0.7,2.8-2,3.2c-1,0.4-1.9,0.6-2.9,0.9v2H24
|
||||
l-0.3-3.5c1.4-0.4,2.5-0.8,3.4-1.1c1-0.4,1.3-0.8,1.3-1.5v-0.5c0-1.5-0.4-1.8-2.1-1.8c-1.1,0-1.9,0.1-2.7,0.5l-0.2,1.4H21V113.2z
|
||||
M23.5,126.1c0-1,0.5-1.5,1.6-1.5c1.1,0,1.6,0.5,1.6,1.5c0,1-0.6,1.5-1.6,1.5C24,127.6,23.5,127.1,23.5,126.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st1" d="M20.1,186.1v6.4h-1.2v-2.7H16v2.7h-1.2v-6.4H16v2.6h2.9v-2.6H20.1z"/>
|
||||
<path class="st1" d="M26.1,191.4v1.1h-4.4v-6.4H26v1.1h-3.1v1.5h2.7v1h-2.7v1.7H26.1z"/>
|
||||
<path class="st1" d="M27.3,192.5v-6.4h1.2v5.3h3.3v1.1H27.3z"/>
|
||||
<path class="st1" d="M32.8,192.5v-6.4h2.7c0.3,0,0.6,0.1,0.8,0.2s0.5,0.3,0.6,0.5c0.2,0.2,0.3,0.4,0.4,0.7c0.1,0.3,0.2,0.5,0.2,0.8
|
||||
c0,0.3,0,0.5-0.1,0.8c-0.1,0.3-0.2,0.5-0.4,0.7c-0.2,0.2-0.4,0.4-0.6,0.5c-0.2,0.1-0.5,0.2-0.8,0.2h-1.5v2.1H32.8z M34.1,189.2h1.4
|
||||
c0.2,0,0.4-0.1,0.6-0.3c0.2-0.2,0.2-0.4,0.2-0.8c0-0.2,0-0.3-0.1-0.4c0-0.1-0.1-0.2-0.2-0.3c-0.1-0.1-0.2-0.2-0.3-0.2
|
||||
c-0.1,0-0.2-0.1-0.3-0.1h-1.4V189.2z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st1" d="M35.1,160.3c0.2,0,0.4,0.1,0.4,0.3V179c0,0.2-0.2,0.3-0.4,0.3H16.6c-0.2,0-0.3-0.2-0.3-0.3v-18.5
|
||||
c0-0.2,0.2-0.3,0.3-0.3H35.1 M35.1,158.5H16.6c-1.1,0-2.1,0.9-2.1,2V179c0,1.1,0.9,2.1,2.1,2.1h18.5c1.1,0,2.1-0.9,2.1-2.1v-18.5
|
||||
C37.2,159.4,36.2,158.5,35.1,158.5L35.1,158.5z"/>
|
||||
<g>
|
||||
<path class="st1" d="M21.6,164.1c2-0.6,2.9-0.8,4.8-0.8c2.8,0,4.1,0.9,4.1,3.5v0.4c0,1.7-0.6,2.4-1.7,2.8
|
||||
c-0.9,0.3-1.6,0.5-2.6,0.8v1.8h-2l-0.3-3.1c1.2-0.4,2.2-0.7,3-1c0.8-0.3,1.1-0.7,1.1-1.3v-0.4c0-1.3-0.4-1.6-1.8-1.6
|
||||
c-1,0-1.6,0.1-2.4,0.4l-0.2,1.2h-2V164.1z M23.8,175.3c0-0.9,0.4-1.3,1.4-1.3c1,0,1.4,0.4,1.4,1.3c0,0.9-0.5,1.3-1.4,1.3
|
||||
C24.2,176.7,23.8,176.2,23.8,175.3z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.3 KiB |
41
scripts/system/help.js
Normal file
41
scripts/system/help.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
"use strict";
|
||||
|
||||
//
|
||||
// help.js
|
||||
// scripts/system/
|
||||
//
|
||||
// Created by Howard Stearns on 2 Nov 2016
|
||||
// Copyright 2016 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
|
||||
//
|
||||
|
||||
(function() { // BEGIN LOCAL_SCOPE
|
||||
|
||||
var toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
|
||||
var buttonName = "help"; // matching location reserved in Desktop.qml
|
||||
var button = toolBar.addButton({
|
||||
objectName: buttonName,
|
||||
imageURL: Script.resolvePath("assets/images/tools/help.svg"),
|
||||
visible: true,
|
||||
hoverState: 2,
|
||||
defaultState: 1,
|
||||
buttonState: 1,
|
||||
alpha: 0.9
|
||||
});
|
||||
|
||||
// TODO: make button state reflect whether the window is opened or closed (independently from us).
|
||||
|
||||
function onClicked(){
|
||||
Menu.triggerOption('Help...')
|
||||
}
|
||||
|
||||
button.clicked.connect(onClicked);
|
||||
|
||||
Script.scriptEnding.connect(function () {
|
||||
toolBar.removeButton(buttonName);
|
||||
button.clicked.disconnect(onClicked);
|
||||
});
|
||||
|
||||
}()); // END LOCAL_SCOPE
|
|
@ -1492,7 +1492,7 @@ function loaded() {
|
|||
var lis = dropdown.parentNode.getElementsByTagName("li");
|
||||
var text = "";
|
||||
for (var i = 0; i < lis.length; i++) {
|
||||
if (lis[i].getAttribute("value") === dropdown.value) {
|
||||
if (String(lis[i].getAttribute("value")) === String(dropdown.value)) {
|
||||
text = lis[i].textContent;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ if (osType == "Darwin") {
|
|||
} else if (osType == "Windows_NT") {
|
||||
options["version-string"] = {
|
||||
CompanyName: "High Fidelity, Inc.",
|
||||
FileDescription: SHORT_NAME,
|
||||
FileDescription: FULL_NAME,
|
||||
ProductName: FULL_NAME,
|
||||
OriginalFilename: EXEC_NAME + ".exe"
|
||||
}
|
||||
|
|
|
@ -868,6 +868,12 @@ function onContentLoaded() {
|
|||
homeServer.start();
|
||||
}
|
||||
|
||||
// If we were launched with the launchInterface option, then we need to launch interface now
|
||||
if (argv.launchInterface) {
|
||||
log.debug("Interface launch requested... argv.launchInterface:", argv.launchInterface);
|
||||
startInterface();
|
||||
}
|
||||
|
||||
// If we were launched with the shutdownWatcher option, then we need to watch for the interface app
|
||||
// shutting down. The interface app will regularly update a running state file which we will check.
|
||||
// If the file doesn't exist or stops updating for a significant amount of time, we will shut down.
|
||||
|
|
|
@ -3,7 +3,7 @@ AUTOSCRIBE_SHADER_LIB(gpu model render-utils)
|
|||
# This is not a testcase -- just set it up as a regular hifi project
|
||||
setup_hifi_project(Quick Gui OpenGL Script Widgets)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
|
||||
link_hifi_libraries(networking gl gpu gpu-gl procedural shared fbx model model-networking animation script-engine render render-utils )
|
||||
link_hifi_libraries(networking gl gpu gpu-gl procedural shared fbx model model-networking animation script-engine render render-utils octree )
|
||||
package_libraries_for_deployment()
|
||||
|
||||
target_nsight()
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <QtCore/QFile>
|
||||
|
||||
#include <FBXReader.h>
|
||||
#include <OctreeRenderer.h>
|
||||
|
||||
struct MyVertex {
|
||||
vec3 position;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <DeferredLightingEffect.h>
|
||||
#include <FramebufferCache.h>
|
||||
#include <TextureCache.h>
|
||||
#include <OctreeRenderer.h>
|
||||
|
||||
#ifdef DEFERRED_LIGHTING
|
||||
extern void initDeferredPipelines(render::ShapePlumber& plumber);
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <TextureCache.h>
|
||||
#include <PerfStat.h>
|
||||
#include <PathUtils.h>
|
||||
#include <OctreeRenderer.h>
|
||||
#include <RenderArgs.h>
|
||||
#include <ViewFrustum.h>
|
||||
|
||||
|
|
|
@ -642,7 +642,7 @@ private:
|
|||
_renderCount = _renderThread._presentCount.load();
|
||||
update();
|
||||
|
||||
RenderArgs renderArgs(_renderThread._gpuContext, _octree.data(), DEFAULT_OCTREE_SIZE_SCALE,
|
||||
RenderArgs renderArgs(_renderThread._gpuContext, _octree, DEFAULT_OCTREE_SIZE_SCALE,
|
||||
0, RenderArgs::DEFAULT_RENDER_MODE,
|
||||
RenderArgs::MONO, RenderArgs::RENDER_DEBUG_NONE);
|
||||
|
||||
|
|
|
@ -715,7 +715,8 @@ var stepTurnAround = function(name) {
|
|||
this.tempTag = name + "-temporary";
|
||||
|
||||
this.onActionBound = this.onAction.bind(this);
|
||||
this.numTimesTurnPressed = 0;
|
||||
this.numTimesSnapTurnPressed = 0;
|
||||
this.numTimesSmoothTurnPressed = 0;
|
||||
}
|
||||
stepTurnAround.prototype = {
|
||||
start: function(onFinish) {
|
||||
|
@ -724,19 +725,26 @@ stepTurnAround.prototype = {
|
|||
|
||||
showEntitiesWithTag(this.tag);
|
||||
|
||||
this.numTimesTurnPressed = 0;
|
||||
this.numTimesSnapTurnPressed = 0;
|
||||
this.numTimesSmoothTurnPressed = 0;
|
||||
this.smoothTurnDown = false;
|
||||
Controller.actionEvent.connect(this.onActionBound);
|
||||
|
||||
this.interval = Script.setInterval(function() {
|
||||
debug("TurnAround | Checking if finished", this.numTimesTurnPressed);
|
||||
debug("TurnAround | Checking if finished",
|
||||
this.numTimesSnapTurnPressed, this.numTimesSmoothTurnPressed);
|
||||
var FORWARD_THRESHOLD = 90;
|
||||
var REQ_NUM_TIMES_PRESSED = 3;
|
||||
var REQ_NUM_TIMES_SNAP_TURN_PRESSED = 3;
|
||||
var REQ_NUM_TIMES_SMOOTH_TURN_PRESSED = 2;
|
||||
|
||||
var dir = Quat.getFront(MyAvatar.orientation);
|
||||
var angle = Math.atan2(dir.z, dir.x);
|
||||
var angleDegrees = ((angle / Math.PI) * 180);
|
||||
|
||||
if (this.numTimesTurnPressed >= REQ_NUM_TIMES_PRESSED && Math.abs(angleDegrees) < FORWARD_THRESHOLD) {
|
||||
var hasTurnedEnough = this.numTimesSnapTurnPressed >= REQ_NUM_TIMES_SNAP_TURN_PRESSED
|
||||
|| this.numTimesSmoothTurnPressed >= REQ_NUM_TIMES_SMOOTH_TURN_PRESSED;
|
||||
var facingForward = Math.abs(angleDegrees) < FORWARD_THRESHOLD
|
||||
if (hasTurnedEnough && facingForward) {
|
||||
Script.clearInterval(this.interval);
|
||||
this.interval = null;
|
||||
playSuccessSound();
|
||||
|
@ -746,9 +754,19 @@ stepTurnAround.prototype = {
|
|||
},
|
||||
onAction: function(action, value) {
|
||||
var STEP_YAW_ACTION = 6;
|
||||
var SMOOTH_YAW_ACTION = 4;
|
||||
|
||||
if (action == STEP_YAW_ACTION && value != 0) {
|
||||
debug("TurnAround | Got yaw action");
|
||||
this.numTimesTurnPressed += 1;
|
||||
debug("TurnAround | Got step yaw action");
|
||||
++this.numTimesSnapTurnPressed;
|
||||
} else if (action == SMOOTH_YAW_ACTION) {
|
||||
debug("TurnAround | Got smooth yaw action");
|
||||
if (this.smoothTurnDown && value === 0) {
|
||||
this.smoothTurnDown = false;
|
||||
++this.numTimesSmoothTurnPressed;
|
||||
} else if (!this.smoothTurnDown && value !== 0) {
|
||||
this.smoothTurnDown = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
cleanup: function() {
|
||||
|
@ -971,6 +989,7 @@ TutorialManager = function() {
|
|||
var currentStep = null;
|
||||
var startedTutorialAt = 0;
|
||||
var startedLastStepAt = 0;
|
||||
var didFinishTutorial = false;
|
||||
|
||||
var wentToEntryStepNum;
|
||||
var VERSION = 1;
|
||||
|
@ -1032,6 +1051,7 @@ TutorialManager = function() {
|
|||
info("DONE WITH TUTORIAL");
|
||||
currentStepNum = -1;
|
||||
currentStep = null;
|
||||
didFinishTutorial = true;
|
||||
return false;
|
||||
} else {
|
||||
info("Starting step", currentStepNum);
|
||||
|
@ -1069,8 +1089,11 @@ TutorialManager = function() {
|
|||
// This is a message sent from the "entry" portal in the courtyard,
|
||||
// after the tutorial has finished.
|
||||
this.enteredEntryPortal = function() {
|
||||
info("Got enteredEntryPortal, tracking");
|
||||
this.trackStep("wentToEntry", wentToEntryStepNum);
|
||||
info("Got enteredEntryPortal");
|
||||
if (didFinishTutorial) {
|
||||
info("Tracking wentToEntry");
|
||||
this.trackStep("wentToEntry", wentToEntryStepNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue