From b906409ab9edf410bfdb8a2494deb9b16c343edd Mon Sep 17 00:00:00 2001 From: Jeremy HU Date: Fri, 9 Dec 2022 22:18:34 +1100 Subject: [PATCH] Fix bone color update --- application/sources/document.cc | 1 + application/sources/document.h | 1 + application/sources/document_window.cc | 2 ++ 3 files changed, 4 insertions(+) diff --git a/application/sources/document.cc b/application/sources/document.cc index d95f3c05..f5d00c08 100644 --- a/application/sources/document.cc +++ b/application/sources/document.cc @@ -3095,6 +3095,7 @@ void Document::boneReady() } m_resultBodyBonePreviewMesh = m_boneGenerator->takeBodyPreviewMesh(); + emit resultBodyBonePreviewMeshChanged(); // TODO: diff --git a/application/sources/document.h b/application/sources/document.h index 5ad20be4..1fc76582 100644 --- a/application/sources/document.h +++ b/application/sources/document.h @@ -226,6 +226,7 @@ signals: void resultMeshChanged(); void resultComponentPreviewMeshesChanged(); void resultBonePreviewMeshesChanged(); + void resultBodyBonePreviewMeshChanged(); void turnaroundChanged(); void editModeChanged(); void resultTextureChanged(); diff --git a/application/sources/document_window.cc b/application/sources/document_window.cc index 33dc5768..446f213f 100644 --- a/application/sources/document_window.cc +++ b/application/sources/document_window.cc @@ -202,6 +202,7 @@ DocumentWindow::DocumentWindow() m_isLastMeshGenerationSucceed = m_document->isMeshGenerationSucceed(); updateInprogressIndicator(); }); + connect(m_document, &Document::resultBodyBonePreviewMeshChanged, this, &DocumentWindow::updateInprogressIndicator); connect(m_document, &Document::resultComponentPreviewMeshesChanged, this, &DocumentWindow::generateComponentPreviewImages); connect(m_document, &Document::textureChanged, this, &DocumentWindow::generateComponentPreviewImages); connect(m_document, &Document::postProcessing, this, &DocumentWindow::updateInprogressIndicator); @@ -638,6 +639,7 @@ DocumentWindow::DocumentWindow() connect(m_document, &Document::rigChanged, m_document, &Document::generateBone); connect(m_document, &Document::postProcessedResultChanged, m_document, &Document::generateBone); connect(m_document, &Document::resultTextureChanged, this, &DocumentWindow::updateRenderModel); + connect(m_document, &Document::resultBodyBonePreviewMeshChanged, this, &DocumentWindow::updateRenderModel); connect(m_document, &Document::resultMeshChanged, this, &DocumentWindow::updateRenderModel); connect(m_document, &Document::resultMeshChanged, this, &DocumentWindow::updateRenderWireframe);