hair particle system hotfix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
This file contains changelog of wiArchive versions
|
||||
|
||||
15: removed redundant matrix store from hair paticle serializator
|
||||
14: serialize emitter property: shaderType
|
||||
13: serialize object property: renderable
|
||||
12: serialize emitter property: DEPTHCOLLISIONS
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
using namespace std;
|
||||
|
||||
// this should always be only INCREMENTED and only if a new serialization is implemeted somewhere!
|
||||
uint64_t __archiveVersion = 14;
|
||||
uint64_t __archiveVersion = 15;
|
||||
// this is the version number of which below the archive is not compatible with the current version
|
||||
uint64_t __archiveVersionBarrier = 1;
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ wiHairParticle::wiHairParticle(const std::string& newName, float newLen, int new
|
||||
object = newObject;
|
||||
materialName = newMat;
|
||||
particleCount = 0;
|
||||
XMStoreFloat4x4(&OriginalMatrix_Inverse, XMMatrixInverse(nullptr, object->getMatrix()));
|
||||
for (MeshSubset& subset : object->mesh->subsets)
|
||||
{
|
||||
if (!newMat.compare(subset.material->name)) {
|
||||
@@ -87,7 +86,6 @@ wiHairParticle::wiHairParticle(const wiHairParticle& other)
|
||||
object = other.object;
|
||||
materialName = other.materialName;
|
||||
particleCount = other.particleCount;
|
||||
XMStoreFloat4x4(&OriginalMatrix_Inverse, XMMatrixInverse(nullptr, object->getMatrix()));
|
||||
material = other.material;
|
||||
|
||||
if (material)
|
||||
@@ -302,6 +300,7 @@ void wiHairParticle::Generate()
|
||||
Mesh* mesh = object->mesh;
|
||||
|
||||
XMMATRIX matr = object->getMatrix();
|
||||
XMStoreFloat4x4(&OriginalMatrix_Inverse, XMMatrixInverse(nullptr, matr));
|
||||
|
||||
int dVG = -1, lVG = -1;
|
||||
if (densityG.compare("")) {
|
||||
@@ -659,7 +658,10 @@ void wiHairParticle::Serialize(wiArchive& archive)
|
||||
archive >> densityG;
|
||||
archive >> lenG;
|
||||
archive >> materialName;
|
||||
archive >> OriginalMatrix_Inverse;
|
||||
if (archive.GetVersion() < 15)
|
||||
{
|
||||
archive >> OriginalMatrix_Inverse;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -669,6 +671,9 @@ void wiHairParticle::Serialize(wiArchive& archive)
|
||||
archive << densityG;
|
||||
archive << lenG;
|
||||
archive << materialName;
|
||||
archive << OriginalMatrix_Inverse;
|
||||
if (archive.GetVersion() < 15)
|
||||
{
|
||||
archive << OriginalMatrix_Inverse;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wiVersion
|
||||
// minor features, major updates
|
||||
const int minor = 14;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 13;
|
||||
const int revision = 14;
|
||||
|
||||
|
||||
long GetVersion()
|
||||
|
||||
Reference in New Issue
Block a user