History

Merge pull request #14524 from SamGondelman/NOverlays3

Case 20132, Case 16928: First class Image Entities

Shannon Romano committed 7 years ago

Commit 21ec4e02 parents b6d1607 e890fc637 files · +1152 −231Browse files

Showing the changes to interface/src/Application.cpp (1 of 37 files). Show all

Unified · Split

interface/src/Application.cpp+8−7
@@ -2315,6 +2315,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 2314 unmodified lines
23152315 DependencyManager::get<PickManager>()->setPrecisionPicking(rayPickID, value);
23162316 });
23172317
2318+ EntityTreeRenderer::setGetAvatarUpOperator([] {
2319+ return DependencyManager::get<AvatarManager>()->getMyAvatar()->getWorldOrientation() * Vectors::UP;
2320+ });
2321+
23182322 // Preload Tablet sounds
23192323 DependencyManager::get<TabletScriptingInterface>()->preloadSounds();
23202324 DependencyManager::get<Keyboard>()->createKeyboard();
@@ -7685,16 +7689,13 @@ void Application::addAssetToWorldSetMapping(QString filePath, QString mapping, Q · 5364 unmodified lines
76857689
76867690 void Application::addAssetToWorldAddEntity(QString filePath, QString mapping) {
76877691 EntityItemProperties properties;
7688− properties.setType(EntityTypes::Model);
76897692 properties.setName(mapping.right(mapping.length() - 1));
76907693 if (filePath.toLower().endsWith(PNG_EXTENSION) || filePath.toLower().endsWith(JPG_EXTENSION)) {
7691− QJsonObject textures {
7692− {"tex.picture", QString("atp:" + mapping) }
7693− };
7694− properties.setModelURL("https://hifi-content.s3.amazonaws.com/DomainContent/production/default-image-model.fbx");
7695− properties.setTextures(QJsonDocument(textures).toJson(QJsonDocument::Compact));
7696− properties.setShapeType(SHAPE_TYPE_BOX);
7694+ properties.setType(EntityTypes::Image);
7695+ properties.setImageURL(QString("atp:" + mapping));
7696+ properties.setKeepAspectRatio(false);
76977697 } else {
7698+ properties.setType(EntityTypes::Model);
76987699 properties.setModelURL("atp:" + mapping);
76997700 properties.setShapeType(SHAPE_TYPE_SIMPLE_COMPOUND);
77007701 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t