mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 23:16:20 +02:00
* Removed validation logic from Resource class, Qt does this internally and is more standards compliant. This should result in more accurate caching and faster resource fetching when cache is stale and validation fails. * Added loaded and failed slots to Resource class, so it does not have to be polled. * NetworkGeometry now uses multiple Resource objects to download the fst/mapping file and the fbx/obj models. * NetworkGeometry is no longer a subclass of Resource * NetworkGeometry now has signals for success and failure, you no longer have to poll it to determine when loading is complete (except for textures *sigh*) Some functionality was removed * NetworkGeometry no longer has a fallback * NetworkGeometry no longer loads LODs or has lod logic. * The number of FBXGeometry copies is greatly reduced. * Model::setURL no supports fallback URL, delayLoad or retainCurrent option. This can result in a pop when switching avatars, and there's no longer a default if avatar loading fails.
49 lines
1 KiB
C++
49 lines
1 KiB
C++
//
|
|
// ModelPackager.h
|
|
//
|
|
//
|
|
// Created by Clement on 3/9/15.
|
|
// Copyright 2015 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_ModelPackager_h
|
|
#define hifi_ModelPackager_h
|
|
|
|
#include <QFileInfo>
|
|
#include <QVariantHash>
|
|
|
|
#include "ui/ModelsBrowser.h"
|
|
|
|
class ModelPackager : public QObject {
|
|
public:
|
|
static bool package();
|
|
|
|
private:
|
|
bool selectModel();
|
|
|
|
bool loadModel();
|
|
bool editProperties();
|
|
bool zipModel();
|
|
|
|
void populateBasicMapping(QVariantHash& mapping, QString filename, const FBXGeometry& geometry);
|
|
|
|
void listTextures();
|
|
bool copyTextures(const QString& oldDir, const QDir& newDir);
|
|
|
|
QFileInfo _modelFile;
|
|
QFileInfo _fbxInfo;
|
|
FSTReader::ModelType _modelType;
|
|
QString _texDir;
|
|
|
|
QVariantHash _mapping;
|
|
std::unique_ptr<FBXGeometry> _geometry;
|
|
QStringList _textures;
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // hifi_ModelPackager_h
|