Ver Fonte

Fixed bitmask issue

We are approaching the limit for the number of post processes
RevoluPowered há 5 anos atrás
pai
commit
5155efe888
2 ficheiros alterados com 15 adições e 11 exclusões
  1. 13 10
      include/assimp/postprocess.h
  2. 2 1
      test/unit/utArmaturePopulate.cpp

+ 13 - 10
include/assimp/postprocess.h

@@ -320,6 +320,19 @@ enum aiPostProcessSteps
     */
     aiProcess_FixInfacingNormals = 0x2000,
 
+
+
+    // -------------------------------------------------------------------------
+    /** 
+     * This step generically populates aiBone->mArmature and aiBone->mNode generically
+     * The point of these is it saves you later having to calculate these elements
+     * This is useful when handling rest information or skin information
+     * If you have multiple armatures on your models we strongly recommend enabling this 
+     * Instead of writing your own multi-root, multi-armature lookups we have done the 
+     * hard work for you :)
+   */
+    aiProcess_PopulateArmatureData = 0x4000,
+
     // -------------------------------------------------------------------------
     /** <hr>This step splits meshes with more than one primitive type in
      *  homogeneous sub-meshes.
@@ -538,16 +551,6 @@ enum aiPostProcessSteps
     aiProcess_Debone  = 0x4000000,
 
 
-    // -------------------------------------------------------------------------
-    /** 
-     * This step generically populates aiBone->mArmature and aiBone->mNode generically
-     * The point of these is it saves you later having to calculate these elements
-     * This is useful when handling rest information or skin information
-     * If you have multiple armatures on your models we strongly recommend enabling this 
-     * Instead of writing your own multi-root, multi-armature lookups we have done the 
-     * hard work for you :)
-   */
-    aiProcess_PopulateArmatureData = 0x5000000,
 
     // -------------------------------------------------------------------------
     /** <hr>This step will perform a global scale of the model.

+ 2 - 1
test/unit/utArmaturePopulate.cpp

@@ -64,7 +64,8 @@ class utArmaturePopulate : public ::testing::Test {
 
 TEST_F( utArmaturePopulate, importCheckForArmatureTest) {
     Assimp::Importer importer;
-    const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/FBX/huesitos.fbx", aiProcess_PopulateArmatureData);
+    unsigned int mask = aiProcess_PopulateArmatureData | aiProcess_ValidateDataStructure;
+    const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/FBX/huesitos.fbx", mask);
     EXPECT_NE( nullptr, scene );
     EXPECT_EQ(scene->mNumMeshes, 1u);
     aiMesh* mesh = scene->mMeshes[0];