Skip to content

Commit c2b5963

Browse files
committed
VRM1のVMCをそのまま読めるようにした
1 parent 421aaed commit c2b5963

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Source/VRM4UCapture/Private/AnimNode_VrmVMC.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,14 @@ void FAnimNode_VrmVMC::EvaluateSkeletalControl_AnyThread(FComponentSpacePoseCont
183183
f.Transform.SetTranslation(v);
184184
}
185185

186-
{
186+
if (bIgnoreLocalRotation){
187187
auto r_refg = RefSkeletonTransform_global[index].GetRotation();
188188
auto r_ref = RefSkeletonTransform[index].GetRotation();
189189
auto r_vmc = f.Transform.GetRotation();
190190

191191
auto r_dif = r_refg.Inverse() * r_vmc * r_refg;
192192

193193
f.Transform.SetRotation(r_ref * r_dif);
194-
195194
}
196195
//f.Transform.SetTranslation(RefSkeletonTransform[index].GetLocation());
197196
tmpOutTransform.Add(f);

Source/VRM4UCapture/Public/AnimNode_VrmVMC.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ struct VRM4UCAPTURE_API FAnimNode_VrmVMC : public FAnimNode_SkeletalControlBase
2323
{
2424
GENERATED_USTRUCT_BODY()
2525

26-
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Skeleton, meta=(PinHiddenByDefault))
27-
const UVrmMetaObject *VrmMetaObject = nullptr;
28-
2926
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Skeleton, meta = (PinHiddenByDefault))
3027
bool EnableAutoSearchMetaData = true;
3128

29+
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Skeleton, meta=(PinHiddenByDefault))
30+
const UVrmMetaObject *VrmMetaObject = nullptr;
31+
3232
#if UE_VERSION_OLDER_THAN(5,0,0)
3333
TAssetPtr<UVrmMetaObject> VrmMetaObject_Internal = nullptr;
3434
TAssetPtr<UVrmAssetListObject> VrmAssetListObject_Internal = nullptr;
@@ -46,6 +46,9 @@ struct VRM4UCAPTURE_API FAnimNode_VrmVMC : public FAnimNode_SkeletalControlBase
4646
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Skeleton, meta = (PinShownByDefault))
4747
float ModelRelativeScale = 1.f;
4848

49+
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Skeleton, meta = (PinShownByDefault))
50+
bool bIgnoreLocalRotation = false;
51+
4952
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Skeleton, meta = (PinShownByDefault))
5053
FString ServerAddress = "127.0.0.1";
5154

0 commit comments

Comments
 (0)