mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 19:34:23 +02:00
moved FBXBaker::abort() to ModelBaker::abort()
This commit is contained in:
parent
10eb258d3b
commit
6c553e5923
5 changed files with 23 additions and 12 deletions
libraries/baking/src
|
@ -51,15 +51,15 @@ FBXBaker::~FBXBaker() {
|
|||
}
|
||||
}
|
||||
|
||||
void FBXBaker::abort() {
|
||||
Baker::abort();
|
||||
|
||||
// tell our underlying TextureBaker instances to abort
|
||||
// the FBXBaker will wait until all are aborted before emitting its own abort signal
|
||||
for (auto& textureBaker : bakingTextures) {
|
||||
textureBaker->abort();
|
||||
}
|
||||
}
|
||||
//void FBXBaker::abort() {
|
||||
// Baker::abort();
|
||||
//
|
||||
// // tell our underlying TextureBaker instances to abort
|
||||
// // the FBXBaker will wait until all are aborted before emitting its own abort signal
|
||||
// for (auto& textureBaker : bakingTextures) {
|
||||
// textureBaker->abort();
|
||||
// }
|
||||
//}
|
||||
|
||||
void FBXBaker::bake() {
|
||||
qDebug() << "FBXBaker" << modelURL << "bake starting";
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
public slots:
|
||||
virtual void bake() override;
|
||||
virtual void abort() override;
|
||||
//virtual void abort() override;
|
||||
|
||||
signals:
|
||||
void sourceCopyReadyToLoad();
|
||||
|
|
|
@ -41,6 +41,16 @@ ModelBaker::ModelBaker(const QUrl& modelURL, TextureBakerThreadGetter textureThr
|
|||
|
||||
void ModelBaker::bake() {}
|
||||
|
||||
void ModelBaker::abort() {
|
||||
Baker::abort();
|
||||
|
||||
// tell our underlying TextureBaker instances to abort
|
||||
// the FBXBaker will wait until all are aborted before emitting its own abort signal
|
||||
for (auto& textureBaker : bakingTextures) {
|
||||
textureBaker->abort();
|
||||
}
|
||||
}
|
||||
|
||||
bool ModelBaker::compressMesh(FBXMesh& mesh, bool hasDeformers,FBXNode& dracoMeshNode, getMaterialIDCallback materialIDCallback) {
|
||||
if (mesh.wasCompressed) {
|
||||
handleError("Cannot re-bake a file that contains compressed mesh");
|
||||
|
|
|
@ -55,6 +55,7 @@ protected:
|
|||
|
||||
public slots:
|
||||
virtual void bake() override;
|
||||
virtual void abort() override;
|
||||
|
||||
private slots:
|
||||
void handleBakedTexture();
|
||||
|
|
|
@ -257,7 +257,6 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, FBXGeometry& geometry) {
|
|||
}
|
||||
|
||||
// Generating Texture Node
|
||||
int count = 0;
|
||||
// iterate through mesh parts and process the associated textures
|
||||
for (int i = 0;i < meshParts.size();i++) {
|
||||
QString material = meshParts[i].materialID;
|
||||
|
@ -333,7 +332,8 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, FBXGeometry& geometry) {
|
|||
}
|
||||
|
||||
// Connect textures to materials
|
||||
for (int i = 0;i < _mapTextureMaterial.size();i++) {
|
||||
int mapSize = _mapTextureMaterial.size();
|
||||
for (int i = 0;i < mapSize;i++) {
|
||||
FBXNode cNode2;
|
||||
cNode2.name = C_NODE_NAME;
|
||||
propertyString = CONNECTIONS_NODE_PROPERTY_1;
|
||||
|
|
Loading…
Reference in a new issue