// // FBXBaker.h // tools/baking/src // // Created by Stephen Birarda on 3/30/17. // Copyright 2017 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_FBXBaker_h #define hifi_FBXBaker_h #include #include #include #include #include "Baker.h" #include "TextureBaker.h" #include "ModelBaker.h" #include "ModelBakingLoggingCategory.h" #include #include static const QString BAKED_FBX_EXTENSION = ".baked.fbx"; using TextureBakerThreadGetter = std::function; class FBXBaker : public ModelBaker { Q_OBJECT public: using ModelBaker::ModelBaker; public slots: virtual void bake() override; signals: void sourceCopyReadyToLoad(); private slots: void bakeSourceCopy(); void handleFBXNetworkReply(); private: void setupOutputFolder(); void loadSourceFBX(); void importScene(); void rewriteAndBakeSceneModels(); void rewriteAndBakeSceneTextures(); void exportScene(); FBXNode _rootNode; FBXGeometry* _geometry; QHash _textureNameMatchCount; QHash _remappedTexturePaths; bool _pendingErrorEmission { false }; }; #endif // hifi_FBXBaker_h