snapshot referenced locally, won't work on OS

This commit is contained in:
Elisa Lupin-Jimenez 2018-01-30 17:49:30 -08:00
parent cc4bafb46f
commit f71d9e4d6a
7 changed files with 10 additions and 7 deletions

View file

@ -183,7 +183,7 @@ Windows.ScrollingWindow {
if (defaultURL.endsWith(".jpg") || defaultURL.endsWith(".png")) {
var name = assetProxyModel.data(treeView.selection.currentIndex);
var modelURL = "https://hifi-content.s3.amazonaws.com/elisalj/image_entity/snapshot.fbx";
var modelURL = "qrc:///snapshot/snapshot.fbx";
var textures = JSON.stringify({ "tex.picture": defaultURL});
var shapeType = "box";
var dynamic = false;

View file

@ -184,7 +184,7 @@ Rectangle {
if (defaultURL.endsWith(".jpg") || defaultURL.endsWith(".png")) {
var name = assetProxyModel.data(treeView.selection.currentIndex);
var modelURL = "https://hifi-content.s3.amazonaws.com/elisalj/image_entity/snapshot.fbx";
var modelURL = "qrc:///snapshot/snapshot.fbx";
var textures = JSON.stringify({ "tex.picture": defaultURL});
var shapeType = "box";
var dynamic = false;

Binary file not shown.

View file

@ -6525,7 +6525,7 @@ void Application::addAssetToWorldAddEntity(QString filePath, QString mapping) {
QJsonObject textures {
{"tex.picture", QString("atp:" + mapping) }
};
properties.setModelURL("https://hifi-content.s3.amazonaws.com/elisalj/image_entity/snapshot.fbx");
properties.setModelURL("qrc:///snapshot/snapshot.fbx");
properties.setTextures(QJsonDocument(textures).toJson(QJsonDocument::Compact));
properties.setShapeType(SHAPE_TYPE_BOX);
} else {

View file

@ -548,9 +548,9 @@ var toolBar = (function () {
z: 2.58
},
shapeType: "box",
modelURL: "https://hifi-content.s3.amazonaws.com/elisalj/image_entity/snapshot.fbx",
modelURL: 'qrc:///snapshot/snapshot.fbx',
// change to another default image
textures: JSON.stringify({ "tex.picture": "https://hifi-content.s3.amazonaws.com/elisalj/image_entity/dog.jpg" })
textures: JSON.stringify({ "tex.picture": 'qrc:///snapshot/img/no-image.jpg' })
});
});

View file

@ -156,7 +156,9 @@ function loaded() {
var urlParts = url.split('/');
var filename = urlParts[urlParts.length - 1];
if (url === "https://hifi-content.s3.amazonaws.com/elisalj/image_entity/snapshot.fbx") {
var snapURL = 'qrc:///snapshot/snapshot.fbx';
if (url === snapURL) {
type = "Image";
}

View file

@ -797,7 +797,8 @@ function loaded() {
elID.value = properties.id;
// HTML workaround since image is not yet a separate entity type
if (properties.type === "Model" && properties.modelURL === "https://hifi-content.s3.amazonaws.com/elisalj/image_entity/snapshot.fbx") {
var snapURL = 'qrc:///snapshot/snapshot.fbx';
if (properties.type === "Model" && properties.modelURL === snapURL) {
properties.type = "Image";
}