Skip to content

Commit

Permalink
Merge pull request daz3d#23 from David-Vodhanel/master
Browse files Browse the repository at this point in the history
Added David's Changes
  • Loading branch information
samjay3d authored Jul 5, 2021
2 parents ca3b315 + 5821de3 commit 0acc682
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ UObject* FDazToUnrealModule::ImportFromDaz(TSharedPtr<FJsonObject> JsonObject)
// Daz Studio puts the base bone rotations in a different place than Unreal expects them.
if (CachedSettings->FixBoneRotationsOnImport && AssetType == DazAssetType::SkeletalMesh && RootBone)
{
FDazToUnrealFbx::RemoveBindPoses(Scene);
FDazToUnrealFbx::FixClusterTranformLinks(Scene, RootBone);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ void FDazToUnrealFbx::FixClusterTranformLinks(FbxScene* Scene, FbxNode* RootNode
FixClusterTranformLinks(Scene, ChildNode);
}
}
void FDazToUnrealFbx::RemoveBindPoses(FbxScene* Scene)
{
for (int32 PoseIndex = Scene->GetPoseCount() - 1; PoseIndex >= 0; --PoseIndex)
{
Scene->RemovePose(PoseIndex);
}
}

void FDazToUnrealFbx::AddWeightsToAllNodes(FbxNode* Parent)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class FDazToUnrealFbx
public:
static void RenameDuplicateBones(FbxNode* RootNode);
static void FixClusterTranformLinks(FbxScene* Scene, FbxNode* RootNode);
static void RemoveBindPoses(FbxScene* Scene);
static void AddWeightsToAllNodes(FbxNode* Parent);
private:
static void RenameDuplicateBones(FbxNode* RootNode, TMap<FString, int>& ExistingBones);
Expand Down

0 comments on commit 0acc682

Please sign in to comment.