You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[GLTFExporter] feat: add and implement export options bExportTextureTransforms
commit c2843c8e9c8aa4bc8c50ad61cc4f304125638c43
Author: Aidin Abedi <aidin.abedi[at]animech.com>
Date: Sun, 18 Oct 2020 13:45:52 +0200
feat: add and implement export options bExportTextureTransforms
(cherry picked from commit f6a225f765039a4d23693c9cffc487211075ea3d)
#preflight none
#skipci
[CL 21640396 by aidinabedi in ue5-release-engine-staging branch]
This commit is contained in:
@@ -26,6 +26,7 @@ UGLTFExportOptions::UGLTFExportOptions(const FObjectInitializer& ObjectInitializ
|
||||
bExportAnimationSequences = true;
|
||||
bRetargetBoneTransforms = true;
|
||||
bExportPlaybackSettings = true;
|
||||
bExportTextureTransforms = true;
|
||||
bExportSourceTextures = true;
|
||||
bExportLightmaps = true;
|
||||
TextureHDREncoding = EGLTFExporterTextureHDREncoding::RGBM;
|
||||
|
||||
@@ -1110,6 +1110,12 @@ bool FGLTFMaterialTask::TryGetSourceTexture(const UTexture2D*& OutTexture, int32
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Builder.ExportOptions->bExportTextureTransforms && OutTransform != FGLTFJsonTextureTransform())
|
||||
{
|
||||
Builder.AddWarningMessage(FString::Printf(TEXT("Texture transform for property %s in material %s disabled by export options"), *FGLTFNameUtility::GetName(Property), *Material->GetName()));
|
||||
OutTransform = {};
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1137,6 +1143,12 @@ bool FGLTFMaterialTask::TryGetSourceTexture(const UTexture2D*& OutTexture, int32
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Builder.ExportOptions->bExportTextureTransforms && OutTransform != FGLTFJsonTextureTransform())
|
||||
{
|
||||
Builder.AddWarningMessage(FString::Printf(TEXT("Texture transform for property %s in material %s disabled by export options"), *FGLTFNameUtility::GetName(Property), *Material->GetName()));
|
||||
OutTransform = {};
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,9 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, config, Category = Animation)
|
||||
uint32 bExportPlaybackSettings : 1;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, config, Category = Texture)
|
||||
uint32 bExportTextureTransforms : 1;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, config, Category = Texture)
|
||||
uint32 bExportSourceTextures : 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user