UpTo5.3_PixelStreamingVersion

This commit is contained in:
2026-04-07 17:09:43 +05:00
parent aba033df3d
commit 57748f8026
31 changed files with 256 additions and 1049 deletions
+1
View File
@@ -1 +1,2 @@
[/Script/AdvancedPreviewScene.SharedProfiles]
+24 -24
View File
@@ -45,30 +45,30 @@ bCookAll=True
bCookMapsOnly=True
bSkipEditorContent=False
bSkipMovies=False
-IniKeyBlacklist=KeyStorePassword
-IniKeyBlacklist=KeyPassword
-IniKeyBlacklist=rsa.privateexp
-IniKeyBlacklist=rsa.modulus
-IniKeyBlacklist=rsa.publicexp
-IniKeyBlacklist=aes.key
-IniKeyBlacklist=SigningPublicExponent
-IniKeyBlacklist=SigningModulus
-IniKeyBlacklist=SigningPrivateExponent
-IniKeyBlacklist=EncryptionKey
-IniKeyBlacklist=IniKeyBlacklist
-IniKeyBlacklist=IniSectionBlacklist
+IniKeyBlacklist=KeyStorePassword
+IniKeyBlacklist=KeyPassword
+IniKeyBlacklist=rsa.privateexp
+IniKeyBlacklist=rsa.modulus
+IniKeyBlacklist=rsa.publicexp
+IniKeyBlacklist=aes.key
+IniKeyBlacklist=SigningPublicExponent
+IniKeyBlacklist=SigningModulus
+IniKeyBlacklist=SigningPrivateExponent
+IniKeyBlacklist=EncryptionKey
+IniKeyBlacklist=IniKeyBlacklist
+IniKeyBlacklist=IniSectionBlacklist
-IniKeyDenylist=KeyStorePassword
-IniKeyDenylist=KeyPassword
-IniKeyDenylist=rsa.privateexp
-IniKeyDenylist=rsa.modulus
-IniKeyDenylist=rsa.publicexp
-IniKeyDenylist=aes.key
-IniKeyDenylist=SigningPublicExponent
-IniKeyDenylist=SigningModulus
-IniKeyDenylist=SigningPrivateExponent
-IniKeyDenylist=EncryptionKey
-IniKeyDenylist=IniKeyBlacklist
-IniKeyDenylist=IniSectionBlacklist
+IniKeyDenylist=KeyStorePassword
+IniKeyDenylist=KeyPassword
+IniKeyDenylist=rsa.privateexp
+IniKeyDenylist=rsa.modulus
+IniKeyDenylist=rsa.publicexp
+IniKeyDenylist=aes.key
+IniKeyDenylist=SigningPublicExponent
+IniKeyDenylist=SigningModulus
+IniKeyDenylist=SigningPrivateExponent
+IniKeyDenylist=EncryptionKey
+IniKeyDenylist=IniKeyBlacklist
+IniKeyDenylist=IniSectionBlacklist
+DirectoriesToAlwaysCook=(Path="/Game/Maps/Interior")
[/Script/EngineSettings.GeneralProjectSettings]
Binary file not shown.
-23
View File
@@ -1,23 +0,0 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.22",
"FriendlyName": "Character Creator & iClone Auto Setup",
"Description": "Automatic shader and skeletal assignment for CC Characters and iClone Assets, including Blueprint generation for material properties, texture settings and model configurations. ",
"Category": "Reallusion",
"CreatedBy": "Reallusion",
"CreatedByURL": "",
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "",
"EngineVersion": "4.27.0",
"CanContainContent": false,
"Installed": true,
"Modules": [
{
"Name": "RLPlugin",
"Type": "Editor",
"LoadingPhase": "PreDefault"
}
]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

@@ -1,29 +0,0 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Factories/FbxFactory.h"
#include "Runtime/SlateCore/Public/Styling/SlateTypes.h"
//#include "SlateBasics.h"
#include "Factories/Factory.h"
#include "UObject/ObjectMacros.h"
#include "CCImportUI.h"
#include "CCFbxFactory.generated.h"
class UTextureFactory;
UCLASS(hidecategories = Object)
class UCCFbxFactory : public UFbxFactory
{
GENERATED_UCLASS_BODY()
public:
//~ UFactory Interface
virtual UObject* FactoryCreateFile( UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, const FString& InFilename, const TCHAR* Parms, FFeedbackContext* Warn, bool& bOutOperationCanceled );
virtual void PostInitProperties() override;
void ImportTextureFolder( FString& fbxRootPath, FString& rootGamePath, TArray< TCHAR* > kFileExtension, FString &fbxName, TArray<FString> &kTextureList );
TArray<FString> GetLODPaths( FString &targetFolderPath, FString &FbxName );
void SetShaderType( FString shaderType );
private:
FString m_ShaderType = "Standard";
};
@@ -1,33 +0,0 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "CCImportUI.generated.h"
/**
* TODO:
*/
UCLASS( config = EditorPerProjectUserSettings, AutoExpandCategories = ( FTransform ), HideCategories = Object, MinimalAPI )
class UCCImportUI : public UObject
{
GENERATED_BODY()
public:
UCCImportUI( const FObjectInitializer& kObjectInitializer );
void WriteConfig();
private:
void ReadConfig();
public:
bool isCCAutoSetup;
bool isHQSkin;
bool isLWSkin;
bool isStandardSkin;
bool isCanceled;
bool isCanChangeAutoEnable;
bool hasCCShader;
bool isLiveLink;
};
@@ -1,405 +0,0 @@
#pragma once
#include "CoreMinimal.h"
TMap< FString, FString > g_kTeethMap =
{
{ "Gums Mask", "Teeth Mask Map" },
{ "Gradient AO", "Gradient AO Map" },
{ "MicroNormal", "MicroNormal Map" },
// MicroNormal
{ "Flip MicroNormal Y", "Flip Micro Normal Y" },
{ "Teeth MicroNormal Tiling", "Teeth MicroNormal Tiling" },
{ "Teeth MicroNormal Strength", "Teeth MicroNormal Strength" },
{ "Gums MicroNormal Tiling", "Flesh MicroNormal Tiling" },
{ "Gums MicroNormal Strength", "Flesh MicroNormal Strength" },
// TeethGum
{ "Teeth Edge Color", "Teeth Edge Color" },
{ "Is Upper Teeth", "Is Upper Teeth" },
{ "Teeth Brightness", "Teeth Diffuse Brightness" },
{ "Teeth Desaturation", "Teeth Desaturation" },
{ "Gums Brightness", "Flesh Brightness" },
{ "Gums Desaturation", "Flesh Desaturation" },
{ "Front Roughness", "TeethGum Front Roughness" },
{ "Front Specular", "TeethGum Front Specular" },
// TeethGum-Adv
{ "Front AO", "TeethGum Front AO" },
{ "Back AO", "TeethGum Back AO" },
{ "Back Roughness", "TeethGum Back Roughness" },
{ "Back Specular", "TeethGum Back Specular" },
// SSS
{ "Gums Scatter", "Flesh Scatter" },
{ "Teeth Scatter", "Teeth Scatter" }
};
TMap< FString, FString > g_kTongueMap =
{
{ "MicroNormal", "MicroNormal Map" },
{ "Gradient AO", "Gradient AO Map" },
// MicroNormal
{ "Flip MicroNormal Y", "Flip Micro Normal Y" },
{ "MicroNormal Tiling", "Flesh MicroNormal Tiling" },
{ "MicroNormal Strength", "Flesh MicroNormal Strength" },
// Tongue
{ "_Brightness", "Flesh Brightness" },
{ "_Desaturation", "Flesh Desaturation" },
{ "Front Roughness", "Tongue Front Roughness" },
{ "Front Specular", "Tongue Front Specular" },
// Tongue-Adv
{ "Back Roughness", "Tongue Back Roughness" },
{ "Back Specular", "Tongue Back Specular" },
{ "Front AO", "Tongue Front AO" },
{ "Back AO", "Tongue Back AO" },
// SSS
{ "_Scatter", "Flesh Scatter" }
};
TMap< FString, FString > g_kSkinMap =
{
{ "SSS Map", "SSS Map" },
{ "MicroNormalMask", "MicroNormal Mask Map" },
{ "MicroNormal", "MicroNormal Map" },
{ "RGBA Area Mask", "RGBA Area Mask Map" },
{ "_BaseColorMap Brightness", "BaseColorMap_Brightness" },
{ "_BaseColorMap Saturation", "BaseColorMap_Saturation" },
// MicroNormal
{ "Flip MicroNormal Y", "Flip Micro Normal Y" },
{ "MicroNormal Tiling", "MicroNormal Tiling Value" },
{ "MicroNormal Strength", "MicroNormal Strength" },
// Roughness
{ "Micro Roughness Scale", "Micro Roughness Scale" },
{ "R Channel Roughness Scale", "R Channel Roughness Scale" },
{ "G Channel Roughness Scale", "G Channel Roughness Scale" },
{ "B Channel Roughness Scale", "B Channel Roughness Scale" },
{ "A Channel Roughness Scale", "A Channel Roughness Scale" },
{ "Unmasked Roughness Scale", "Unmask Roughness Scale" },
{ "Edge Roughness Multiplier", "Edge Roughness Multiplier" },
// Specular Metallic
{ "_Specular", "Specular" },
{ "SSS Metallic Threshold", "Metallic SSS Threshold" },
// SSS
{ "G Channel Scatter Scale", "G Channel Scatter" },
{ "R Channel Scatter Scale", "R Channel Scatter" },
{ "B Channel Scatter Scale", "B Channel Scatter" },
{ "A Channel Scatter Scale", "A Channel Scatter" },
{ "Unmasked Scatter Scale", "SSS Unmasked Scale" }
};
TMap< FString, FString > g_kHeadMap =
{
{ "BaseColor Blend2", "Blend Map_2" },
{ "NormalMap Blend", "NormalMap_Blend" },
{ "SSS Map", "SSS Map" },
{ "MicroNormalMask", "MicroNormal Mask Map" },
{ "MicroNormal", "MicroNormal Map" },
{ "Specular Mask", "Specular Cavity Map" },
{ "Mouth Cavity Mask and AO", "Mouth Cavity And AO Map" },
{ "Nose Mouth UpperInnerLid Mask", "NLML Mask Map" },
{ "Cheek Fore UpperLip Chin Mask", "CFUC Mask Map" },
{ "Ear Neck Mask", "EN Mask Map" },
// Blend Map
{ "BaseColor Blend2 Strength", "BaseColor_Blend2_Strength" },
{ "NormalMap Blend Strength", "NormalMap_Blend_Strength" },
{ "_BaseColorMap Brightness", "BaseColorMap_Brightness" },
{ "_BaseColorMap Saturation", "BaseColorMap_Saturation" },
// MicroNormal
{ "Flip MicroNormal Y", "Flip Micro Normal Y" },
{ "MicroNormal Tiling", "MicroNormal Tiling Value" },
{ "MicroNormal Strength", "MicroNormal Strength" },
// Roughness
{ "Micro Roughness Scale", "Micro Roughness Scale" },
{ "Nose Roughness Scale", "Nose Roughness Scale" },
{ "Mouth Roughness Scale", "Mouth Roughness Scale" },
{ "UpperLid Roughness Scale", "UpperLid Roughness Scale" },
{ "InnerLid Roughness Scale", "InnerLid Roughness Scale" },
{ "Ear Roughness Scale", "Ear Roughness Scale" },
{ "Neck Roughness Scale", "Neck Roughness Scale" },
{ "Cheek Roughness Scale", "Cheek Roughness Scale" },
{ "Forehead Roughness Scale", "Forehead Roughness Scale" },
{ "UpperLip Roughness Scale", "UpperLips Roughness Scale" },
{ "Chin Roughness Scale", "Chin Roughness Scale" },
{ "Unmasked Roughness Scale", "Unmask Roughness Scale" },
{ "Edge Roughness Multiplier", "Edge Roughness Multiplier" },
// Specular Metallic
{ "_Specular", "Head Specular" },
{ "SSS Metallic Threshold", "Metallic SSS Threshold" },
{ "Inner Mouth AO", "Inner Mouth AO" },
{ "Nostril AO", "Nostril AO" },
{ "Lips Gap AO", "Lips_Gap_AO" },
// SSS
{ "Nose Scatter Scale", "Nose Scatter Scale" },
{ "Mouth Scatter Scale", "Mouth Scatter Scale" },
{ "UpperLid Scatter Scale", "UpperLid Scatter Scale" },
{ "InnerLid Scatter Scale", "InnerLid Scatter Scale" },
{ "Ear Scatter Scale", "Ear Scatter Scale" },
{ "Neck Scatter Scale", "Neck Scatter Scale" },
{ "Cheek Scatter Scale", "Cheek Scatter Scale" },
{ "Forehead Scatter Scale", "Forehead Scatter Scale" },
{ "UpperLip Scatter Scale", "UpperLips Scatter Scale" },
{ "Chin Scatter Scale", "Chin Scatter Scale" },
{ "Unmasked Scatter Scale", "SSS Unmasked Scale" }
};
TMap< FString, FString > g_kEyeMap =
{
{ "Iris Normal", "Iris Normal Map" },
{ "Sclera Normal", "Normal Map" },
{ "EyeBlendMap2", "EyeBlendMap2" },
{ "Inner Iris Mask", "Inner Iris Mask" },
{ "Sclera", "Sclera Map" },
// Eye
{ "BlendMap2 Strength", "BlendMap2_Strength" },
{ "Shadow Radius", "Shadow Radius" },
{ "Shadow Hardness", "Shadow Hardness" },
{ "Specular Scale", "Specular Multiplier" },
// Eye-Adv
{ "Is Left Eye", "Is Left Eye" },
{ "Eye Corner Darkness Color", "Eye Corner Darkness Color" },
// Iris
{ "Iris Depth Scale", "Iris Depth Scale" },
{ "_Iris Roughness", "Iris Roughness" },
{ "Iris Color Brightness", "Iris Color Brightness" },
{ "Pupil Scale", "Pupil Scale" },
// Iris-Adv
{ "_IoR", "Ior" },
{ "Iris Cloudy Color", "Iris Cloudy Color" },
{ "Iris Inner Color", "Iris Inner Color" },
{ "Iris Inner Scale", "Iris Inner Scale" },
{ "Iris UV Radius", "Iris UV Radius" },
{ "Iris Color", "Iris Color" },
// Limbus
{ "Limbus UV Width Color", "Limbus UV Width Color" },
{ "Limbus Dark Scale", "Limbus Dark Scale" },
// Sclera
{ "ScleraBrightness", "Sclera Brightness" },
{ "Sclera Roughness", "Sclera Roughness" },
// Sclera-Adv
{ "Sclera Flatten Normal", "Sclera Normal" },
{ "Sclera Normal UV Scale", "Sclera Normal UV Scale" },
{ "Sclera UV Radius", "Sclera UV Radius" },
};
#define FLIP_TANGENT_Y "Flip Tangent Y"
#define ACTIVATE_HAIR_COLOR "Activate Hair Color"
TMap< FString, FString > g_kHairMap =
{
{ "Hair Tangent Map" , "Tangent Map" },
{ "Hair Flow Map" , "Flow Map" },
{ "Hair Specular Mask Map", "Specular Map" },
{ "Hair Root Map" , "Root Map" },
{ "Hair ID Map" , "ID Map" },
{ "TangentMapFlipGreen", FLIP_TANGENT_Y },
{ "AO Map Occlude All Lighting", "AO Map Occlude All Lighting" },
{ "Diffuse Strength", "Scatter" },
{ "Hair Roughness Map Strength", "Roughness Multiplier" },
{ "Hair Specular Map Strength", "Specular Multiplier" },
{ "VertexGrayToColor" , "Vertex Color" },
{ "VertexColorStrength" , "Vertex Color Strength" },
{ "ActiveChangeHairColor" , ACTIVATE_HAIR_COLOR },
{ "BaseColorMapStrength" , "Base Color Map Strength" },
// Strand Color
{ "RootColor" , "Root Color" },
{ "TipColor" , "End Color" },
{ "RootTipBlendMode" , "Root End Blend Mode" },
{ "UseRootTipColor" , "Global Strength" },
{ "RootColorStrength" , "Root Color Strength" },
{ "TipColorStrength" , "End Color Strength" },
{ "InvertRootTip" , "Invert Root and End Color" },
// highlight A
{ "_1st Dye Color" , "Highlight A Color" },
{ "_1st Dye Strength" , "Highlight A Strength" },
{ "_1st Dye Distribution from Grayscale", "Highlight A Affected Range" },
{ "_1st BlendMode" , "Highlight A Blend Mode" },
{ "Mask 1st Dye by RootMap" , "Highlight A Overlap End Color" },
{ "Invert 1st Dye RootMap Mask" , "Highlight A Invert End to Root Color" },
{ "_1st Dye add Specular" , "Highlight A Specular Strength" },
// hightlight B
{ "_2nd Dye Color" , "Highlight B Color" },
{ "_2nd Dye Strength" , "Highlight B Strength" },
{ "_2nd Dye Distribution from Grayscale", "Highlight B Affected Range" },
{ "_2nd BlendMode" , "Highlight B Blend Mode" },
{ "Mask 2nd Dye by RootMap" , "Highlight B Overlap End Color" },
{ "Invert 2nd Dye RootMap Mask" , "Highlight B Invert End to Root Color" },
{ "_2nd Dye add Specular" , "Highlight B Specular Strength" },
//
{ "BlackColor Reflection Offset X", "Rotate Vertical by Black ID" },
{ "BlackColor Reflection Offset Y", "Rotate Horizontal by Black ID" },
{ "BlackColor Reflection Offset Z", "Shift by Black ID" },
{ "WhiteColor Reflection Offset X", "Rotate Vertical by White ID" },
{ "WhiteColor Reflection Offset Y", "Rotate Horizontal by White ID" },
{ "WhiteColor Reflection Offset Z", "Shift by White ID" },
};
TMap< FString, FString > g_kEyeOccusionMap =
{
{ "Display Blur Range", "Blur Color" },
{ "Blur Strength", "Blur Strength" },
{ "_Expand", "Expand" },
{ "Top Blur Range", "Top Blur Range" },
{ "Top Blur Contrast", "Top Blur Contrast" },
{ "Bottom Blur Range", "Bottom Blur Range" },
{ "Bottom Blur Contrast", "Bottom Blur Contrast" },
{ "Outer Corner Blur Range", "Outer Corner Blur Range" },
{ "Outer Corner Blur Contrast", "Outer Corner Blur Contrast" },
{ "Tear Duct Position", "Tear Duct Position" },
{ "Tear Duct Contrast", "Tear Duct Contrast" },
{ "Tear Duct Shadow Offset", "Tear Duct Shadow Offset" },
// 1st layer shadow
{ "Shadow Color", "Shadow 1 Color" },
{ "Shadow Strength", "Shadow 1 Strength" },
{ "Shadow Top", "Shadow 1 Top" },
{ "Shadow Top Range", "Shadow 1 Top Range" },
{ "Shadow Top Arc", "Shadow 1 Top Edge" },
{ "Shadow Bottom", "Shadow 1 Bottom" },
{ "Shadow Bottom Range", "Shadow 1 Bottom Range" },
{ "Shadow Bottom Arc", "Shadow 1 Bottom Edge" },
{ "Shadow Inner Corner", "Shadow 1 Inner Corner" },
{ "Shadow Inner Corner Range", "Shadow 1 Inner Corner Range" },
{ "Shadow Outer Corner", "Shadow 1 Outer Corner" },
{ "Shadow Outer Corner Range", "Shadow 1 Outer Corner Range" },
// 2nd_Layer_Shadow
{ "Shadow2 Color", "Shadow 2 Color" },
{ "Shadow2 Strength", "Shadow 2 Strength" },
{ "Shadow2 Top", "Shadow 2 Top" },
{ "Shadow2 Top Range", "Shadow 2 Top Range" },
// Vertex_Offset
{ "Depth Offset", "Depth Offset" },
{ "Fade Distance", "Fade Distance" }, // depth fade distance
{ "Top Offset", "Top Offset" },
{ "Bottom Offset", "Bottom Offset" },
{ "Inner Corner Offset", "Inner Corner Offset" },
{ "Outer Corner Offset", "Outer Corner Offset" },
};
TMap< FString, FString > g_kTearLineMap =
{
{ "Depth Offset", "DepthOffset" },
{ "Detail Amount", "DetailAmount" },
{ "Detail Scale U", "DetailScale_U" },
{ "Detail Scale V", "DetailScale_V" },
{ "Edge Fadeout", "Edge_fadeout" },
{ "_Roughness", "Roughness" }
};
#define AO_MAP_OCCLUDE_ALL_LIGHTS "Occlude All Lighting"
#define FLIP_MICRO_NORMAL_Y "Flip Micro Normal Y"
TMap< FString, FString > g_kGeneralMap =
{
{ "SSS Map", "SSS Map" },
{ "MicroNormalMask", "MicroNormal Mask Map" },
{ "MicroNormal", "MicroNormal Map" },
{ "RGBA Area Mask", "RGBA Area Mask Map" },
{ "_BaseColorMap Brightness", "BaseColorMap_Brightness" },
{ "_BaseColorMap Saturation", "BaseColorMap_Saturation" },
{ "AO Map Affect All Lights", AO_MAP_OCCLUDE_ALL_LIGHTS },
// Micro_Normal
{ "Flip MicroNormal Y", FLIP_MICRO_NORMAL_Y },
{ "MicroNormal Tiling", "MicroNormal Tiling Value" },
{ "MicroNormal Strength", "MicroNormal Strength" },
// _Specular_Roughness
{ "_Specular", "Specular" },
{ "Micro Roughness Scale", "Micro Roughness Scale" },
// _Specular_Roughness-Adv
{ "R Channel Roughness Scale", "R Channel Roughness Scale" },
{ "G Channel Roughness Scale", "G Channel Roughness Scale" },
{ "B Channel Roughness Scale", "B Channel Roughness Scale" },
{ "A Channel Roughness Scale", "A Channel Roughness Scale" },
{ "Unmasked Roughness Scale", "Unmask Roughness Scale" },
{ "Edge Roughness Multiplier", "Edge Roughness Multiplier" },
// SSS
{ "R Channel Scatter Scale", "R Channel Scatter" },
{ "G Channel Scatter Scale", "G Channel Scatter" },
{ "B Channel Scatter Scale", "B Channel Scatter" },
{ "A Channel Scatter Scale", "A Channel Scatter" },
{ "Unmasked Scatter Scale", "SSS Unmasked Scale" },
};
class RLShaderData
{
public:
RLShaderData() {}
~RLShaderData() {}
FString m_strShaderName;
TMap< FString, FString > m_kTexture;
TMap< FString, float > m_kParameter;
TMap< FString, TArray< float > > m_kColorParameter;
};
class RLScatter
{
public:
RLScatter() {}
~RLScatter() {}
RLScatter( FLinearColor sss,
FLinearColor falloff,
float radius,
float distribution,
float IOR,
float extinction,
float normalScale,
float roughness1,
float roughness2,
float lobeMix )
:m_kFalloff( falloff ),
m_fRadius(radius),
m_fDistribution(distribution),
m_fIOR(IOR),
m_kSubsurfaceColor( sss ),
m_fExtinctionScale(extinction),
m_fNormalScale(normalScale),
m_fRoughness0(roughness1),
m_fRoughness1(roughness2),
m_fLobeMix(lobeMix)
{
}
void SetDefaultParameter( FLinearColor kSubsurfaceColor,
float fDistribution,
float fIOR,
float fExtinctionScale,
float fNormalScale,
float fRoughness0,
float fRoughness1,
float fLobeMix )
{
m_kSubsurfaceColor = kSubsurfaceColor;
m_fDistribution = fDistribution;
m_fIOR = fIOR;
m_fExtinctionScale = fExtinctionScale;
m_fNormalScale = fNormalScale;
m_fRoughness0 = fRoughness0;
m_fRoughness1 = fRoughness1;
m_fLobeMix = fLobeMix;
}
FLinearColor m_kFalloff;
float m_fRadius = 0.0f;
float m_fDistribution = 0.0f;
float m_fIOR = 0.0f;
FLinearColor m_kSubsurfaceColor;
float m_fExtinctionScale = 0.0f;
float m_fNormalScale = 0.0f;
float m_fRoughness0 = 0.0f;
float m_fRoughness1 = 0.0f;
float m_fLobeMix = 0.0f;
};
@@ -1,4 +0,0 @@
#pragma once
#define Version_Error_Message "The current procedure has come to a stop because auto-setup is not support for this version of CC / iClone. Please update to the appropriate version."
#define Version_Not_Suitable "Auto-setup is not support for this version of CC / iClone and some issues may occur as a result. Please update to the appropriate version."
@@ -1,53 +0,0 @@
#pragma once
//#include "SlateBasics.h"
class UCCImportUI;
class SCCImportWindow : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SCCImportWindow)
: _ImportUI(NULL)
, _WidgetWindow()
//, _SourcePath()
//, _TargetPath()
{}
SLATE_ARGUMENT(UCCImportUI*, ImportUI)
SLATE_ARGUMENT(TSharedPtr<SWindow>, WidgetWindow)
// SLATE_ARGUMENT(FText, SourcePath)
//SLATE_ARGUMENT(FText, TargetPath)
SLATE_END_ARGS()
public:
void Construct(const FArguments& InArgs);
private:
UCCImportUI* ccImportUI;
TWeakPtr< SWindow > WidgetWindow;
TSharedPtr< SButton > ImportButton;
//FString TargetPath;
bool isCCAutoSetup;
bool isHQSkin;
bool isLWSkin;
bool isStandardSkin;
bool isliveLink;
//TSharedRef<SWidget> GetTestContent() const;
FString skinType = "Standard";
ECheckBoxState IsStandardActive() const;
ECheckBoxState IsHQActive() const;
ECheckBoxState IsLWActive() const;
void OnCCLiveLinkChanged(ECheckBoxState InCheckedState);
void OnCCAutoSetupChanged(ECheckBoxState InCheckedState);
void OnStandardChanged(ECheckBoxState InCheckedState);
void OnHQChanged(ECheckBoxState InCheckedState);
void OnLWChanged(ECheckBoxState InCheckedState);
TSharedPtr< SCheckBox > Standard_CheckBox;
TSharedPtr< SCheckBox > HQ_CheckBox;
TSharedPtr< SCheckBox > LW_CheckBox;
TSharedPtr< SCheckBox > CCAutoSetup_CheckBox;
FReply OnCancel();
FReply OnNext();
FReply OnMore();
};
@@ -1,43 +0,0 @@
#pragma once
#include "RLTextureData.h"
#include "RLPhysicClothData.h"
#include "RLShaderData.h"
enum class ENodeType
{
None,
Hair,
Accessory
};
class RLMaterialData
{
public:
RLMaterialData() {}
~RLMaterialData() {}
void SetShaderData( TSharedPtr< RLShaderData > spShaderData ) { m_spShaderData = spShaderData; }
const RLShaderData* GetShaderData() const { return m_spShaderData ? m_spShaderData.Get() : nullptr; }
RLShaderData* GetShaderData() { return m_spShaderData ? m_spShaderData.Get() : nullptr; }
void SetScatter( TSharedPtr< RLScatter > spScatter ) { m_spScatter = spScatter; }
RLScatter* GetScatter() { return m_spScatter ? m_spScatter.Get() : nullptr; }
bool m_bIsPbr = false;
ENodeType m_eNodeType = ENodeType::None;
bool m_bTwoSide = false;
int m_iUvChannelIndex = 0;
TArray< float > m_kDiffuseColor = { 255.f, 255.f, 255.f };
TArray< float > m_kAmbientColor = { 50.f, 50.f, 50.f };
TArray< float > m_kSpecularColor = { 229.f, 229.f, 229.f };
float m_fOpacity = 1.f;
float m_fSelfIllumination = 0.f;
float m_fSpecular = 0.f;
float m_fGlossiness = 0.f;
TMap< FString, RLTextureData > m_kTextureDatas;
TSharedPtr< RLPhysicClothData > m_spPhysicClothData = nullptr;
private:
TSharedPtr< RLShaderData > m_spShaderData;
TSharedPtr< RLScatter > m_spScatter;
};
@@ -1,28 +0,0 @@
#pragma once
#include "CoreMinimal.h"
class RLPhysicClothData
{
public:
RLPhysicClothData() {}
~RLPhysicClothData() {}
bool m_bActivate = false;
bool m_bUseGlobalGravity = false;
FString m_strWeightMapPath = "";
float m_fMass = 0.f;
float m_fFriction = 0.f;
float m_fDamping = 0.f;
float m_fDrag = 0.f;
float m_fSolverFrequency = 0.f;
float m_fTetherLimit = 0.f;
float m_fElasticity = 0.f;
float m_fStretch = 0.f;
float m_fBending = 0.f;
TArray< float > m_kInertia = { 6.0, 6.0, 6.0 };
bool m_bSoftVsRigidCollision = false;
float m_fSoftVsRigidCollisionMargin = 0.f;
bool m_bSelfCollision = false;
float m_fSelfCollisionMargin = 0.f;
float m_fStiffnessFrequency = 0.f;
};
@@ -1,27 +0,0 @@
#pragma once
#include "CoreMinimal.h"
class RLPhysicsCollisionShapeData
{
public:
RLPhysicsCollisionShapeData() {}
~RLPhysicsCollisionShapeData() {}
FString m_strName = "";
bool m_bBoneActivate = false;
bool m_bIsCCStdBoneAxis = false;
FString m_strBoundType = "";
FString m_strBoundAxis = "";
float m_fMargin = 0.f;
float m_fFriction = 0.f;
float m_fElasticity = 0.f;
TArray< float > m_kWorldTranslate = { 0.0, 0.0, 0.0 };
TArray< float > m_kWorldRotation = { 0.0, 0.0, 0.0, 0.0 };
TArray< float > m_kWorldScale = { 0.0, 0.0, 0.0 };
TArray< float > m_kShapeLocalPosition = { 0.0, 0.0, 0.0 };
TArray< float > m_kExtent = { 0.0, 0.0, 0.0 };
float m_fRadius = 0.f;
float m_fCapsuleLength = 0.f;
};
@@ -1,160 +0,0 @@
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
#include "AssetRegistryModule.h"
#include "ObjectTools.h"
#include "PackageTools.h"
#include "CCImportUI.h"
#include "Editor/UnrealEd/Classes/Factories/FbxFactory.h"
#include "Editor/UnrealEd/Public/Editor.h"
#include "Runtime/Engine/Classes/Engine/Selection.h"
#include "Runtime/Engine/Classes/Materials/MaterialInstanceConstant.h"
#include "Runtime/Engine/Classes/Engine/SkeletalMesh.h"
#include "Runtime/JSon/Public/Dom/JsonObject.h"
#include "RLTextureData.h"
#include "RLMaterialData.h"
#include "RLPhysicCollisionShapeData.h"
#include "Runtime/Engine/Classes/Animation/Rig.h"
#include "Runtime/Launch/Resources/Version.h"
#include <functional>
class FToolBarBuilder;
class FMenuBuilder;
class UClothingAssetCommon;
class UClothLODDataBase;
class CMaterialType
{
public:
CMaterialType( FString strMaterialName, FString strBoneType = "" );
FString GetType() { return m_strMaterialType; }
float GetTilingValue() { return m_fTilingValue; }
private:
FString m_strMaterialType;
float m_fTilingValue = 0.0f;
};
enum class EShaderType
{
Teeth,
Scalp,
Eyelash,
Eye,
Tearline,
Occulsion,
Head,
Skin,
Hair,
GeneralSSS,
PBR,
TRA,
};
class FRLPluginModule : public IModuleInterface
{
public:
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
/** This function will be bound to Command. */
void PluginButtonClicked();
void AutoSetup( TArray<FAssetData>& kAssetDatas,
FString strShaderType,
TArray<FString>& kLODPathList,
bool bIsDragFbx );
bool CheckAutoSetupVersionPass( FString strJsonFilePath );
private:
void AddToolbarExtension( FToolBarBuilder& kBuilder );
void AddMenuExtension( FMenuBuilder& kBuilder );
void CheckWorldGridMaterial(FString &strFbxName, FString &rootGamePath, FString ccMaterialFolderGamePath, UStaticMesh *pMesh, bool isMaterialInstance);
bool CheckShaderTypeChange(FString &strfbxName, FString shaderType, USkeletalMesh *mesh, UMaterial* material, UMaterialInterface* MaterialInterface, RLMaterialData* pMaterialData, int slotID, FString &rootGamePath, bool isMaterialInstance, FString strBoneType );
void DeleteTextureFile( const FString& strDeleteFloderPath, const FString& strCheckFolderPath );
void ShowInfo( const FString& strMessage, const float& fExpireDuration );
FString GetBoneType( const FAssetData& kAssetData );
USkeleton* GetAssetSkeleton( const FAssetData& kAssetData );
bool CreateFolder( FString &path );
void CreateTexturesPathList( const FString &strRootGamePath, TArray <FString> &kTexturesPathList );
void RemoveInvalidTexture( TMap< FString, RLMaterialData >& kMaterialMap, const FString& strTexturePath, const FString& strFbmTexturePath, TArray< FString >& kTexturesPathList );
bool CheckTextureShouldImport( const FString& strFilePath, bool bPbr );
#if ENGINE_MAJOR_VERSION <= 4 && ENGINE_MINOR_VERSION == 24
bool RLPluginImportToLodInternal( USkeletalMesh* SourceMesh, int32 SourceLodIndex, int32 SourceSectionIndex, UClothingAssetCommon* DestAsset, UClothLODDataBase* DestLod, UClothLODDataBase* InParameterRemapSource );
#endif
FString GetMaterialPackagePath( const FString& strRootGamePath, const FString& strMaterialName, const FString& strFbxName, bool bIsMaterialInstance );
void ReplaceMaterial( UMaterialInterface* pMaterialInterface, const FString &strPackagePath, std::function< void( UMaterialInterface* ) > fnReplaceMaterial );
void DeleteUnrealMaterial( const FString &strSourceFolderPath, const FString &strTargetFolderPath, const FString &strFbxName, const FString &strRootGamePath, bool bIsMaterialInstance, std::function< void() > fnReplaceMeshMaterial );
void DeleteDefaultSkeletalMaterial( const FString &strSourceFolderPath, const FString &strTargetFolderPath, const FString &strFbxName, const FString &strRootGamePath, USkeletalMesh *pMesh, bool bIsMaterialInstance );
void DeleteDefaultStaticMaterial( const FString &strSourceFolderPath, const FString &strTargetFolderPath, const FString &strFbxName, const FString &strRootGamePath, UStaticMesh *pMesh, bool bIsMaterialInstance );
void MoveTextureFile( FString& strTargetFolderPath );
void findLODGroupMaterialJson(TMap< FString, RLMaterialData > &kMaterialMap, FString &strFbxName, FString &strRootGamePath, USkeletalMesh *kMesh, bool bIsMaterialInstance);
void findLODGroupMaterial(FString &rootGamePath, USkeletalMesh *mesh );
void SetOrmTextureSetting( UMaterialInstanceConstant* pMaterialInstance, const FString& strTexturePath, const bool bSkin = false );
void ProcessMaterialInstanceConstant( UMaterialInstanceConstant*& pMaterialInstance, UMaterial* pMaterial, UMaterialInterface* pMeshMaterialInterface, UMaterialInterface* pParentInterface, const FString& strCCMaterialFolderPath, std::function< void( UMaterialInstanceConstant* ) > fnMaterialSetting );
void AssignMaterialInstanceJson( UMaterialInstanceConstant*& pInstUMaterialInterface,
const FString& strMaterialName,
RLMaterialData* pMaterialData,
TArray <FString> & texturesPathList,
UMaterial* material,
UMaterialInterface* MaterialInterface,
FString texturesFilesGamePath,
FString texturesFilesGamePathFbm,
FString ccMaterialFolderGamePath,
const FString& strSubsurfaceProfilePath,
FString boneType,
FString shaderType );
void AssignGeneralSss( RLMaterialData* pMaterialData, TArray<FString> &kTexturesPathList, FString strTexturesFilesGamePathFbm, const FString& strMaterialName, FString texturesFilesGamePath, bool bIsHQSkin, const FString& strSubsurfaceProfilePath, FString strTexturePathToLoad, UMaterialInstanceConstant*& pInstUMaterialInterface, UMaterial* pMaterial, UMaterialInterface* pMaterialInterface, FString strCCMaterialFolderGamePath );
void PhysicIniPaser( FString iniPath );
FString GetTexturePath( RLMaterialData *pMaterialData, const FString& strKey, const FString& strTexturesFolderPath, const FString& strMaterialName );
void SetTextureParameter( RLMaterialData *pMaterialData, const FString& strKey, UMaterialInstanceConstant* pMaterialInstance );
void UpdateStaticParameter( UMaterialInstanceConstant* pMaterialInstance, const FString& strParameter, bool bEnable, bool bMarkChanged );
void SetMultiUvIndex( RLMaterialData *pMaterialData, UMaterialInstanceConstant* pMaterialInstance );
void SetBaseColor( RLMaterialData *pMaterialData, UMaterialInstanceConstant* pMaterialInstance, TArray<FString> kTexturesPathList, FString strTexturesFilesGamePathsFbm[2], FString strMaterialName );
void SetNormal( RLMaterialData *pMaterialData, UMaterialInstanceConstant* pMaterialInstance, TArray<FString> kTexturesPathList, FString strTexturesFilesGamePathsFbm[2], FString strMaterialName );
void SetSpecular( RLMaterialData *pMaterialData, UMaterialInstanceConstant* pMaterialInstance, TArray<FString> kTexturesPathList, FString strTexturesFilesGamePathsFbm[2], FString strMaterialName, bool bIsPBR );
void SetOpacity( RLMaterialData *pMaterialData, UMaterialInstanceConstant* pMaterialInstance, TArray<FString> kTexturesPathList, FString strTexturesFilesGamePathsFbm[2], FString strMaterialName );
void SetGlow( RLMaterialData *pMaterialData, UMaterialInstanceConstant* pMaterialInstance, TArray<FString> kTexturesPathList, FString strTexturesFilesGamePaths[2], FString strMaterialName );
void SetBlend( RLMaterialData *pMaterialData, UMaterialInstanceConstant* pMaterialInstance, TArray<FString> kTexturesPathList, FString kTexturesFilesGamePaths[2], FString strMaterialName );
void SetBlendToHairDepthMap( RLMaterialData *pMaterialData, UMaterialInstanceConstant* pMaterialInstance, TArray<FString> kTexturesPathList, FString kTexturesFilesGamePaths[2], FString strMaterialName );
void SetDisplacement( RLMaterialData* pMaterialData, UMaterialInstanceConstant* pMaterialInstance, TArray<FString> kTexturesPathList, FString strTexturesFilesGamePaths[2], FString strMaterialName );
void SetAO( RLMaterialData *pMaterialData, UMaterialInstanceConstant* pMaterialInstance, TArray<FString> kTexturesPathList, FString strTexturesFilesGamePaths[2], FString strMaterialName );
void SetRoughness( RLMaterialData *kMaterialData, UMaterialInstanceConstant* kMaterialInstance, TArray<FString> texturesPathList, FString texturesFilesGamePaths[2], FString materialName, bool isPBR );
void SetMetallic( RLMaterialData *kMaterialData, UMaterialInstanceConstant* kMaterialInstance, TArray<FString> texturesPathList, FString texturesFilesGamePaths[2], FString materialName, bool isPBR );
void CreateCollisionShape(FName strBoneName, FVector kBoundMin, FVector kBoundMax, FVector kScale, FVector kOffset, UBodySetup* pBodySetup, int nShapeType, int nBoundAxis);
void CreateCollisionShapeFromData( RLPhysicsCollisionShapeData* pCollisionShapeData, UBodySetup* pBodySetup, const FTransform* kBoneParentWorldTransform );
void CreateConstraint(FName strBoneName, int nBoneID, USkeletalMesh* pMesh, UPhysicsAsset* pPhysicsAsset);
static bool SetShaderTextureSrgbCompression( UTexture* pTexture, FString strName );
void SetShaderData( RLShaderData* pShaderData, UMaterialInstanceConstant* pMaterialInstance, const FString& strFolder );
void SetScatter( const RLScatter* pScatter, UMaterialInstanceConstant* pMaterialInstance, const FString& strMaterialName, FString strSubsurfaceProfilePath, EShaderType eShaderType );
void GetShaderRenameMap( FString strMaterialName, EShaderType eType, RLShaderData* pShaderData, ENodeType eNodeType, TMap< FString, FString >& kRenameMap );
void ParseJson( const FString& strJsonFilePath, FString& strGeneration, FString& strBoneType, bool& bSupportShaderSelect, TMap< FString, RLMaterialData >& kMaterialMap, TMap< FString, TArray<RLPhysicsCollisionShapeData> >& kCollisionShapeMap );
void ParseJsonShaderData( TSharedPtr< RLMaterialData > spMaterialData, TSharedPtr< FJsonObject > spJsonObject, FString strMaterialName, FString strBoneType );
void ParseJsonScatterData( TSharedPtr< RLMaterialData > spMaterialData, TSharedPtr< FJsonObject > spJsonObject );
void ParseJsonPhysicsData( TSharedPtr<FJsonObject> spPhysicsRoot, TMap< FString, RLMaterialData >& kMaterialMap, TMap< FString, TArray<RLPhysicsCollisionShapeData> >& kCollisionShapeMap, bool bIsCCStdBoneAxis );
void ConvertEyeMaterialName( FString& strMaterialName );
UObject* RLCreatePhysicsAsset( FName InAssetName, UObject* InParent, USkeletalMesh* SkelMesh );
FString GetMaterialTypeByName( FString strName );
EShaderType GetShaderType( RLMaterialData* pMaterialData, FString strMaterialName, FString strBoneType );
EShaderType GetPbrShaderType( const RLShaderData* pShaderData, FString strMaterialName, FString strBoneType );
void UpdateWorld( int32 BoneIndex, FTransform ParentWorld, USkeleton* pSkeleton, const TArray<FTransform>& kBoneTransform, TArray<FTransform>& kBoneWorld );
void CreatePhysicCollisionShape( UPhysicsAsset* pPhysicsAsset, USkeletalMesh* pMesh, USkeleton* pSkeleton, const TMap< FString, TArray<RLPhysicsCollisionShapeData> >& kCollisionShapeMap );
void CreatePhysicSoftCloth( UPhysicsAsset* pPhysicsAsset, USkeletalMesh* pMesh, TMap< FString, RLMaterialData >& kMaterialMap );
TSharedPtr< class FUICommandList > m_kPluginCommands;
static URig* m_pEngineHumanoidRig;
bool m_bIsMaterialInstance = true;
//FString const MATERIAL_FLODER_NAME = "RL_Materials";
};
@@ -1,26 +0,0 @@
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Framework/Commands/Commands.h"
#include "RLPluginStyle.h"
class FRLPluginCommands : public TCommands<FRLPluginCommands>
{
public:
FRLPluginCommands()
: TCommands<FRLPluginCommands>( TEXT( "RLPlugin" ),
NSLOCTEXT( "Contexts", "RLPlugin", "RLPlugin Plugin" ),
NAME_None,
FRLPluginStyle::GetStyleSetName() )
{
}
// TCommands<> interface
virtual void RegisterCommands() override;
public:
TSharedPtr< FUICommandInfo > PluginAction;
};
@@ -1,31 +0,0 @@
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Styling/SlateStyle.h"
class FRLPluginStyle
{
public:
static void Initialize();
static void Shutdown();
/** reloads textures used by slate renderer */
static void ReloadTextures();
/** @return The Slate style set for the Shooter game */
static const ISlateStyle& Get();
static FName GetStyleSetName();
private:
static TSharedRef< class FSlateStyleSet > Create();
private:
static TSharedPtr< class FSlateStyleSet > StyleInstance;
};
@@ -1,20 +0,0 @@
#pragma once
#include "CoreMinimal.h"
class RLTextureData
{
public:
RLTextureData() {}
~RLTextureData() {}
FString m_strTexturePath = "";
bool m_bShareImage = false;
float m_fStrength = 100.f;
TArray< float > m_kOffset = { 0.f, 0.f };
TArray< float > m_kTiling = { 1.f, 1.f };
float m_fTessellationLevel = 0.f;
float m_fTessellationMulitiplier = 0.f;
float m_fGrayScaleBaseValue = 0.f;
FString m_strDisplacementMapType = "";
FString m_strBlendMode = "Multiply";
};
@@ -1,85 +0,0 @@
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class RLPlugin : ModuleRules
{
public RLPlugin(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
bUsePrecompiled = true;
PublicIncludePaths.AddRange(
new string[] {
// ... add public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string[] {
// ... add other private include paths required here ...
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"Projects",
"InputCore",
"UnrealEd",
"LevelEditor",
"CoreUObject",
"RenderCore",
"Engine",
"Slate",
"SlateCore",
"ContentBrowser",
"DesktopPlatform",
"MaterialEditor",
"ImageWrapper",
"EditorStyle",
"RawMesh",
"ClothingSystemEditorInterface",
"SkeletalMeshEditor",
"Json",
"JsonUtilities",
}
);
if( Target.Version.MajorVersion == 4 && Target.Version.MinorVersion <= 23 )
{
PrivateDependencyModuleNames.AddRange(
new string[]
{
"ClothingSystemRuntime"
} );
}
if( Target.Version.MajorVersion == 4 && Target.Version.MinorVersion >= 24 )
{
PrivateDependencyModuleNames.AddRange(
new string[]
{
"ClothingSystemEditor",
"ClothingSystemRuntimeCommon",
"SkeletalMeshUtilitiesCommon",
"ClothingSystemRuntimeInterface",
"ClothingSystemRuntimeNv"
} );
}
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);
}
}
@@ -5,6 +5,21 @@
@Rem Set script location as working directory for commands.
pushd "%~dp0"
@Rem Turned on delayed expansion so we have variables evaluated in nested scope
setlocal EnableDelayedExpansion
@Rem Unset all our variables as these persist between cmd sessions if cmd not closed.
SET "PSInfraOrg="
SET "PSInfraRepo="
SET "PSInfraTagOrBranch="
SET "ReleaseVersion="
SET "ReleaseUrl="
SET "IsTag="
SET "RefType="
SET "Url="
SET "DownloadVersion="
SET "FlagPassed="
:arg_loop_start
SET ARG=%1
if DEFINED ARG (
@@ -13,16 +28,26 @@ if DEFINED ARG (
)
if "%ARG%"=="/v" (
SET UEVersion=%2
SET FlagPassed=1
SHIFT
)
if "%ARG%"=="/b" (
SET PSInfraTagOrBranch=%2
SET IsTag=0
SET FlagPassed=1
SHIFT
)
if "%ARG%"=="/t" (
SET PSInfraTagOrBranch=%2
SET IsTag=1
SET FlagPassed=1
SHIFT
)
if "%ARG%"=="/r" (
SET "ReleaseVersion=%2"
SET "ReleaseUrl=https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/!ReleaseVersion!/!ReleaseVersion!.zip"
SET IsTag=0
SET FlagPassed=1
SHIFT
)
SHIFT
@@ -47,33 +72,95 @@ if DEFINED UEVersion (
SET PSInfraTagOrBranch=UE5.0
SET IsTag=0
)
if "%UEVersion%"=="5.1" (
SET PSInfraTagOrBranch=UE5.1
SET IsTag=0
)
if "%UEVersion%"=="5.2" (
SET PSInfraTagOrBranch=UE5.2
SET IsTag=0
)
if "%UEVersion%"=="5.3" (
SET PSInfraTagOrBranch=UE5.3
SET IsTag=0
)
)
@Rem If no arguments select a specific version, fetch the appropriate default
if NOT DEFINED PSInfraTagOrBranch (
SET PSInfraTagOrBranch=UE5.1
SET PSInfraTagOrBranch=UE5.3
SET IsTag=0
)
echo Tag or branch: !PSInfraTagOrBranch!
@Rem Whether the named reference is a tag or a branch affects the URL we fetch it on
@Rem Whether the named reference is a tag or a branch affects the Url we fetch it on
if %IsTag%==1 (
SET RefType=tags
) else (
SET RefType=heads
)
@Rem Look for a SignallingWebServer directory next to this script
if exist SignallingWebServer\ (
echo SignallingWebServer directory found...skipping install.
@Rem We have a branch, no user-specified release, then check repo for the presence of a RELEASE_VERSION file in the current branch
if %IsTag%==0 (
if NOT DEFINED ReleaseUrl (
@Rem We don't want to auto-set the release version if the user passed an explicit flag.
if NOT DEFINED FlagPassed (
FOR /F "tokens=* USEBACKQ" %%F IN (`curl -s -f -L https://raw.githubusercontent.com/EpicGames/PixelStreamingInfrastructure/%PSInfraTagOrBranch%/RELEASE_VERSION`) DO (
SET "ReleaseVersion=!PSInfraTagOrBranch!-%%F"
SET "ReleaseUrl=https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/!ReleaseVersion!/!ReleaseVersion!.zip"
)
)
)
)
@Rem Set our DownloadVersion here as we use this to check the contents of our DOWNLOAD_VERSION file shortly.
SET "DownloadVersion=%PSInfraTagOrBranch%"
if DEFINED ReleaseVersion (
SET "DownloadVersion=!ReleaseVersion!"
echo Release: !ReleaseVersion!
)
@Rem Check for the existence of a DOWNLOAD_VERSION file and if found, check its contents against our %DownloadVersion%
if exist DOWNLOAD_VERSION (
@Rem Read DOWNLOAD_VERSION file into variable
FOR /F "delims=" %%F IN ( DOWNLOAD_VERSION ) DO (
SET "PreviousDownloadVersion=%%F"
@Rem Remove whitespace
SET "PreviousDownloadVersion=!PreviousDownloadVersion: =!"
)
if !DownloadVersion! == !PreviousDownloadVersion! (
echo Downloaded version ^(!DownloadVersion!^) of PS infra matches release version ^(!PreviousDownloadVersion!^)...skipping install.
goto :EOF
) else (
echo SignallingWebServer directory not found...beginning ps-infra download.
echo There is a newer released version ^(!DownloadVersion!^) - had ^(!PreviousDownloadVersion!^), downloading...
)
) else (
echo DOWNLOAD_VERSION file not found...beginning ps-infra download.
)
@Rem By default set the download url to the .zip of the branch
SET Url=https://github.com/%PSInfraOrg%/%PSInfraRepo%/archive/refs/%RefType%/%PSInfraTagOrBranch%.zip
@Rem If we have a ReleaseUrl then set it to our download url
if DEFINED ReleaseUrl (
SET Url=!ReleaseUrl!
)
@Rem Download ps-infra and follow redirects.
curl -L https://github.com/%PSInfraOrg%/%PSInfraRepo%/archive/refs/%RefType%/%PSInfraTagOrBranch%.zip > ps-infra.zip
echo Attempting downloading Pixel Streaming infrastructure from: !Url!
curl -L !Url! > ps-infra.zip
@Rem Unarchive the .zip
tar -xmf ps-infra.zip || echo bad archive, contents: && type ps-infra.zip && exit 0
@Rem Remove old infra
if exist Frontend\ ( rmdir /s /q Frontend )
if exist Matchmaker\ ( rmdir /s /q Matchmaker )
if exist SignallingWebserver\ ( rmdir /s /q SignallingWebserver )
if exist SFU\ ( rmdir /s /q SFU )
@Rem Rename the extracted, versioned, directory
for /d %%i in ("PixelStreamingInfrastructure-*") do (
for /d %%j in ("%%i/*") do (
@@ -91,9 +178,10 @@ if exist SignallingWebServer\ (
@Rem Delete the downloaded zip
del ps-infra.zip
)
exit 0
@Rem Create a DOWNLOAD_VERSION file, which we use as a comparison file to check if we should auto upgrade when these scripts are run again
echo %DownloadVersion%> DOWNLOAD_VERSION
goto :EOF
:print_help
echo.
@@ -101,10 +189,11 @@ echo Tool for fetching PixelStreaming Infrastructure. If no flags are set speci
echo the recommended version will be chosen as a default.
echo.
echo Usage:
echo %~n0%~x0 [^/h] [^/v ^<UE version^>] [^/b ^<branch^>] [^/t ^<tag^>]
echo %~n0%~x0 [^/h] [^/v ^<UE version^>] [^/b ^<branch^>] [^/t ^<tag^>] [^/r ^<release^>]
echo Where:
echo /v Specify a version of Unreal Engine to download the recommended release for
echo /b Specify a specific branch for the tool to download from repo
echo /t Specify a specific tag for the tool to download from repo
echo /r Specify a specific release url path e.g. https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/${RELEASE_HERE}.zip
echo /h Display this help message
exit 1
goto :EOF
@@ -17,25 +17,37 @@ print_help() {
release for
-b Specify a specific branch for the tool to download from repo
-t Specify a specific tag for the tool to download from repo
-r Specify a specific release url path e.g. https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/<RELEASE_VERSION>/<RELEASE_VERSION>.zip
-h Display this help message
"
exit 1
}
# Set all default variables (e.g. # Name and version of ps-infra that we are downloading)
PSInfraOrg=EpicGames
PSInfraRepo=PixelStreamingInfrastructure
PSInfraTagOrBranch=UE5.3
RefType=heads
IsTag=0
ReleaseUrlBase=https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download
# Unset any variables that don't have defaults that we use that may have persisted between bash terminals.
unset Url
unset DownloadVersion
unset FlagPassed
unset ReleaseVersion
unset ReleaseUrl
while(($#)) ; do
case "$1" in
-h ) print_help;;
-v ) UEVersion="$2"; shift 2;;
-b ) PSInfraTagOrBranch="$2"; IsTag=0; shift 2;;
-t ) PSInfraTagOrBranch="$2"; IsTag=1; shift 2;;
-v ) UEVersion="$2"; FlagPassed=1; shift 2;;
-b ) PSInfraTagOrBranch="$2"; FlagPassed=1; IsTag=0; shift 2;;
-t ) PSInfraTagOrBranch="$2"; FlagPassed=1; IsTag=1; shift 2;;
-r ) ReleaseVersion="$2"; FlagPassed=1; IsTag=0; ReleaseUrl=$ReleaseUrlBase/$ReleaseVersion/$ReleaseVersion.tar.gz; shift 2;;
* ) echo "Unknown command: $1"; shift;;
esac
done
# Name and version of ps-infra that we are downloading
PSInfraOrg=EpicGames
PSInfraRepo=PixelStreamingInfrastructure
# If a UE version is supplied set the right branch or tag to fetch for that version of UE
if [ ! -z "$UEVersion" ]
then
@@ -54,16 +66,32 @@ then
PSInfraTagOrBranch=UE5.0
IsTag=0
fi
if [ "$UEVersion" = "5.1" ]
then
PSInfraTagOrBranch=UE5.1
IsTag=0
fi
if [ "$UEVersion" = "5.2" ]
then
PSInfraTagOrBranch=UE5.2
IsTag=0
fi
if [ "$UEVersion" = "5.3" ]
then
PSInfraTagOrBranch=UE5.3
IsTag=0
fi
fi
# If no arguments select a specific version, fetch the appropriate default
if [ -z "$PSInfraTagOrBranch" ]
then
PSInfraTagOrBranch=UE5.1
PSInfraTagOrBranch=UE5.3
IsTag=0
fi
echo "Tag or branch: $PSInfraTagOrBranch"
# Whether the named reference is a tag or a branch affects the URL we fetch it on
# Whether the named reference is a tag or a branch affects the Url we fetch it on
if [ "$IsTag" -eq 1 ]
then
RefType=tags
@@ -71,15 +99,68 @@ else
RefType=heads
fi
# Look for a SignallingWebServer directory next to this script
if [ -d SignallingWebServer ]
# We have a branch, no user-specified release, then check repo for the presence of a RELEASE_VERSION file in the current branch.
if [ "$IsTag" -eq 0 ] && [ -z "$ReleaseUrl" ] && [ -z "$FlagPassed" ]
then
echo "SignallingWebServer directory found...skipping install."
RelUrl=https://raw.githubusercontent.com/EpicGames/PixelStreamingInfrastructure/$PSInfraTagOrBranch/RELEASE_VERSION
if curl --output /dev/null --silent -r 0-0 --fail "$RelUrl"; then
ReleaseVersion="$PSInfraTagOrBranch-$(curl -L -s $RelUrl)"
ReleaseUrl=https://github.com/EpicGames/PixelStreamingInfrastructure/releases/download/$ReleaseVersion/$ReleaseVersion.tar.gz
echo "Valid RELEASE_VERSION file found in Github repo at $RelUrl"
else
echo "SignallingWebServer directory not found...beginning ps-infra download."
echo "RELEASE_VERSION file does not exist at: $RelUrl"
fi
else
echo "Skipping downloading RELEASE_VERSION file."
fi
# Download ps-infra and follow redirects.
curl -L https://github.com/$PSInfraOrg/$PSInfraRepo/archive/refs/$RefType/$PSInfraTagOrBranch.tar.gz > ps-infra.tar.gz
#Set our DownloadVersion here as we use this to check the contents of our DOWNLOAD_VERSION file shortly.
DownloadVersion="$PSInfraTagOrBranch"
if [ ! -z "$ReleaseVersion" ]
then
DownloadVersion="$ReleaseVersion"
echo "Release: $ReleaseVersion"
fi
#Rem Check for the existence of a DOWNLOAD_VERSION file and if found, check its contents against our $DownloadVersion
if test -f DOWNLOAD_VERSION;
then
PREVIOUS_DOWNLOAD_VERSION=$(cat DOWNLOAD_VERSION)
if [ "$DownloadVersion" = "$PREVIOUS_DOWNLOAD_VERSION" ]
then
echo "Downloaded version ($DownloadVersion) of PS infra matches release version ($PREVIOUS_DOWNLOAD_VERSION)...skipping install."
exit 0
else
echo "There is a newer released version ($DownloadVersion) - had ($PREVIOUS_DOWNLOAD_VERSION), downloading..."
#Remove old infra
rm -rf Frontend
rm -rf Matchmaker
rm -rf SignallingWebServer
rm -rf SFU
fi
else
echo "DOWNLOAD_VERSION file not found..."
fi
# Pre-download - Set the download url to the .zip of the branch
Url=https://github.com/$PSInfraOrg/$PSInfraRepo/archive/refs/$RefType/$PSInfraTagOrBranch.tar.gz
#Check if ReleaseUrl is valid by CURLing with fail fast and if success then set it to our download url
if [ ! -z "$ReleaseUrl" ]
then
echo "Checking if release url is valid, url: $ReleaseUrl"
if curl --output /dev/null --silent -r 0-0 --fail "$ReleaseUrl"; then
echo "Valid release url at: $ReleaseUrl"
Url=$ReleaseUrl
else
echo "Invalid Github release url: $ReleaseUrl"
exit 1
fi
fi
# Download - download ps-infra and follow redirects.
echo "Beginning ps-infra download from: $Url"
curl -L $Url > ps-infra.tar.gz
# Unarchive the .tar
tar -xmf ps-infra.tar.gz || $(echo "bad archive, contents:" && head --lines=20 ps-infra.tar.gz && exit 0)
@@ -92,4 +173,7 @@ else
# Delete the downloaded tar
rm ps-infra.tar.gz
fi
#Create a DOWNLOAD_VERSION file, which we use as a comparison file to check if we should auto upgrade when these scripts are run again
echo "$DownloadVersion" >| DOWNLOAD_VERSION
exit 0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"FileVersion": 3,
"EngineAssociation": "5.1",
"EngineAssociation": "5.3",
"Category": "",
"Description": "",
"Plugins": [