mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into acceleration-and-owner-in-wire-protocol
This commit is contained in:
commit
73a1265624
5 changed files with 29 additions and 21 deletions
|
@ -84,6 +84,7 @@ var SETTING_EASE_ON_FOCUS = "cameraEaseOnFocus";
|
|||
var SETTING_SHOW_LIGHTS_IN_EDIT_MODE = "showLightsInEditMode";
|
||||
|
||||
var INSUFFICIENT_PERMISSIONS_ERROR_MSG = "You do not have the necessary permissions to edit on this domain."
|
||||
var INSUFFICIENT_PERMISSIONS_IMPORT_ERROR_MSG = "You do not have the necessary permissions to place items on this domain."
|
||||
|
||||
var modelURLs = [
|
||||
"Insert the URL to your FBX"
|
||||
|
@ -134,12 +135,19 @@ var toolBar = (function () {
|
|||
newSphereButton,
|
||||
newLightButton,
|
||||
newTextButton,
|
||||
browseModelsButton;
|
||||
browseMarketplaceButton;
|
||||
|
||||
function initialize() {
|
||||
toolBar = new ToolBar(0, 0, ToolBar.VERTICAL);
|
||||
|
||||
// Hide active button for now - this may come back, so not deleting yet.
|
||||
browseMarketplaceButton = toolBar.addTool({
|
||||
imageURL: toolIconUrl + "marketplace.svg",
|
||||
width: toolWidth,
|
||||
height: toolHeight,
|
||||
alpha: 0.9,
|
||||
visible: true,
|
||||
});
|
||||
|
||||
activeButton = toolBar.addTool({
|
||||
imageURL: toolIconUrl + "edit-status.svg",
|
||||
subImage: { x: 0, y: Tool.IMAGE_WIDTH, width: Tool.IMAGE_WIDTH, height: Tool.IMAGE_HEIGHT },
|
||||
|
@ -158,14 +166,6 @@ var toolBar = (function () {
|
|||
visible: false
|
||||
});
|
||||
|
||||
browseModelsButton = toolBar.addTool({
|
||||
imageURL: toolIconUrl + "marketplace.svg",
|
||||
width: toolWidth,
|
||||
height: toolHeight,
|
||||
alpha: 0.9,
|
||||
visible: false
|
||||
});
|
||||
|
||||
newCubeButton = toolBar.addTool({
|
||||
imageURL: toolIconUrl + "add-cube.svg",
|
||||
subImage: { x: 0, y: Tool.IMAGE_WIDTH, width: Tool.IMAGE_WIDTH, height: Tool.IMAGE_HEIGHT },
|
||||
|
@ -237,7 +237,6 @@ var toolBar = (function () {
|
|||
// Sets visibility of tool buttons, excluding the power button
|
||||
that.showTools = function(doShow) {
|
||||
toolBar.showTool(newModelButton, doShow);
|
||||
toolBar.showTool(browseModelsButton, doShow);
|
||||
toolBar.showTool(newCubeButton, doShow);
|
||||
toolBar.showTool(newSphereButton, doShow);
|
||||
toolBar.showTool(newLightButton, doShow);
|
||||
|
@ -309,7 +308,7 @@ var toolBar = (function () {
|
|||
};
|
||||
|
||||
var newModelButtonDown = false;
|
||||
var browseModelsButtonDown = false;
|
||||
var browseMarketplaceButtonDown = false;
|
||||
that.mousePressEvent = function (event) {
|
||||
var clickedOverlay,
|
||||
url,
|
||||
|
@ -328,7 +327,7 @@ var toolBar = (function () {
|
|||
newModelButtonDown = true;
|
||||
return true;
|
||||
}
|
||||
if (browseModelsButton === toolBar.clicked(clickedOverlay)) {
|
||||
if (browseMarketplaceButton === toolBar.clicked(clickedOverlay)) {
|
||||
if (marketplaceWindow.url != MARKETPLACE_URL) {
|
||||
marketplaceWindow.setURL(MARKETPLACE_URL);
|
||||
}
|
||||
|
@ -427,9 +426,9 @@ var toolBar = (function () {
|
|||
}
|
||||
handled = true;
|
||||
}
|
||||
} else if (browseModelsButtonDown) {
|
||||
} else if (browseMarketplaceButtonDown) {
|
||||
var clickedOverlay = Overlays.getOverlayAtPoint({ x: event.x, y: event.y });
|
||||
if (browseModelsButton === toolBar.clicked(clickedOverlay)) {
|
||||
if (browseMarketplaceButton === toolBar.clicked(clickedOverlay)) {
|
||||
url = Window.s3Browse(".*(fbx|FBX|obj|OBJ)");
|
||||
if (url !== null && url !== "") {
|
||||
addModel(url);
|
||||
|
@ -439,7 +438,7 @@ var toolBar = (function () {
|
|||
}
|
||||
|
||||
newModelButtonDown = false;
|
||||
browseModelsButtonDown = false;
|
||||
browseMarketplaceButtonDown = false;
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
@ -961,6 +960,11 @@ function getPositionToCreateEntity() {
|
|||
}
|
||||
|
||||
function importSVO(importURL) {
|
||||
if (!Entities.canAdjustLocks()) {
|
||||
Window.alert(INSUFFICIENT_PERMISSIONS_IMPORT_ERROR_MSG);
|
||||
return;
|
||||
}
|
||||
|
||||
Overlays.editOverlay(importingSVOTextOverlay, { visible: true });
|
||||
Overlays.editOverlay(importingSVOImageOverlay, { visible: true });
|
||||
|
||||
|
|
|
@ -640,6 +640,7 @@ void MyAvatar::saveData() {
|
|||
settings.setValue("firstFrame", pointer->getFirstFrame());
|
||||
settings.setValue("lastFrame", pointer->getLastFrame());
|
||||
settings.setValue("maskedJoints", pointer->getMaskedJoints());
|
||||
settings.setValue("running", pointer->getLoop() && pointer->isRunning());
|
||||
}
|
||||
settings.endArray();
|
||||
|
||||
|
@ -713,6 +714,9 @@ void MyAvatar::loadData() {
|
|||
handle->setFirstFrame(settings.value("firstFrame", 0.0f).toFloat());
|
||||
handle->setLastFrame(settings.value("lastFrame", INT_MAX).toFloat());
|
||||
handle->setMaskedJoints(settings.value("maskedJoints").toStringList());
|
||||
if (settings.value("loop", true).toBool() && settings.value("running", false).toBool()) {
|
||||
handle->setRunning(true);
|
||||
}
|
||||
}
|
||||
settings.endArray();
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ AnimationPanel::AnimationPanel(AnimationsDialog* dialog, const AnimationHandlePo
|
|||
QHBoxLayout* urlBox = new QHBoxLayout();
|
||||
layout->addRow("URL:", urlBox);
|
||||
urlBox->addWidget(_url = new QLineEdit(handle->getURL().toString()), 1);
|
||||
connect(_url, SIGNAL(returnPressed()), SLOT(updateHandle()));
|
||||
connect(_url, SIGNAL(editingFinished()), SLOT(updateHandle()));
|
||||
QPushButton* chooseURL = new QPushButton("Choose");
|
||||
urlBox->addWidget(chooseURL);
|
||||
connect(chooseURL, SIGNAL(clicked(bool)), SLOT(chooseURL()));
|
||||
|
@ -118,7 +118,7 @@ AnimationPanel::AnimationPanel(AnimationsDialog* dialog, const AnimationHandlePo
|
|||
QHBoxLayout* maskedJointBox = new QHBoxLayout();
|
||||
layout->addRow("Masked Joints:", maskedJointBox);
|
||||
maskedJointBox->addWidget(_maskedJoints = new QLineEdit(handle->getMaskedJoints().join(", ")), 1);
|
||||
connect(_maskedJoints, SIGNAL(returnPressed()), SLOT(updateHandle()));
|
||||
connect(_maskedJoints, SIGNAL(editingFinished()), SLOT(updateHandle()));
|
||||
maskedJointBox->addWidget(_chooseMaskedJoints = new QPushButton("Choose"));
|
||||
connect(_chooseMaskedJoints, SIGNAL(clicked(bool)), SLOT(chooseMaskedJoints()));
|
||||
|
||||
|
@ -168,7 +168,7 @@ void AnimationPanel::chooseURL() {
|
|||
}
|
||||
_animationDirectory.set(QFileInfo(filename).path());
|
||||
_url->setText(QUrl::fromLocalFile(filename).toString());
|
||||
emit _url->returnPressed();
|
||||
emit _url->editingFinished();
|
||||
}
|
||||
|
||||
void AnimationPanel::chooseMaskedJoints() {
|
||||
|
|
|
@ -113,7 +113,7 @@ AttachmentPanel::AttachmentPanel(AttachmentsDialog* dialog, const AttachmentData
|
|||
layout->addRow("Model URL:", urlBox);
|
||||
urlBox->addWidget(_modelURL = new QLineEdit(data.modelURL.toString()), 1);
|
||||
_modelURL->setText(data.modelURL.toString());
|
||||
connect(_modelURL, SIGNAL(returnPressed()), SLOT(modelURLChanged()));
|
||||
connect(_modelURL, SIGNAL(editingFinished()), SLOT(modelURLChanged()));
|
||||
QPushButton* chooseURL = new QPushButton("Choose");
|
||||
urlBox->addWidget(chooseURL);
|
||||
connect(chooseURL, SIGNAL(clicked(bool)), SLOT(chooseModelURL()));
|
||||
|
|
|
@ -64,8 +64,8 @@ void AnimationHandle::setRunning(bool running) {
|
|||
if (running) {
|
||||
// move back to the beginning
|
||||
setFrameIndex(getFirstFrame());
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
_animationLoop.setRunning(running);
|
||||
if (isRunning()) {
|
||||
|
|
Loading…
Reference in a new issue