瀏覽代碼

Merge pull request #3460 from MalcolmTyrrell/readFbxWeightsInConfig

AI_CONFIG_IMPORT_FBX_READ_WEIGHTS
Kim Kulling 4 年之前
父節點
當前提交
18471a39ca
共有 2 個文件被更改,包括 10 次插入0 次删除
  1. 1 0
      code/AssetLib/FBX/FBXImporter.cpp
  2. 9 0
      include/assimp/config.h.in

+ 1 - 0
code/AssetLib/FBX/FBXImporter.cpp

@@ -130,6 +130,7 @@ void FBXImporter::SetupProperties(const Importer *pImp) {
 	settings.readCameras = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_READ_CAMERAS, true);
 	settings.readLights = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_READ_LIGHTS, true);
 	settings.readAnimations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS, true);
+	settings.readWeights = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_READ_WEIGHTS, true);
 	settings.strictMode = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_STRICT_MODE, false);
 	settings.preservePivots = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS, true);
 	settings.optimizeEmptyAnimationCurves = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES, true);

+ 9 - 0
include/assimp/config.h.in

@@ -615,6 +615,15 @@ enum aiComponent
 #define AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS \
     "IMPORT_FBX_READ_ANIMATIONS"
 
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will read weights.
+ *
+ * The default value is true (1)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_READ_WEIGHTS \
+    "IMPORT_FBX_READ_WEIGHTS"
+
 // ---------------------------------------------------------------------------
 /** @brief Set whether the fbx importer will act in strict mode in which only
  *    FBX 2013 is supported and any other sub formats are rejected. FBX 2013