1
0
This commit is contained in:
2020-12-13 18:01:13 +03:00
commit dd42f84140
3764 changed files with 596895 additions and 0 deletions

View File

@ -0,0 +1,18 @@
//! @file InterpTrackInstSubstanceInput.uc
//! @copyright Allegorithmic. All rights reserved.
//!
class InterpTrackInstSubstanceInput extends InterpTrackInst
native(Interpolation);
cpptext
{
virtual void InitTrackInst(UInterpTrack* Track);
virtual void SaveActorState(UInterpTrack* Track);
virtual void RestoreActorState(UInterpTrack* Track);
}
/** Saved value for restoring state when exiting Matinee. */
var array<int> ResetValue;
var InterpTrackSubstanceInput InstancedTrack;

View File

@ -0,0 +1,29 @@
//! @file InterpTrackSubstanceInput.uc
//! @copyright Allegorithmic. All rights reserved.
//!
class InterpTrackSubstanceInput extends InterpTrackLinearColorBase
native(Interpolation);
cpptext
{
// InterpTrack interface
virtual INT AddKeyframe(FLOAT Time, UInterpTrackInst* TrInst, EInterpCurveMode InitInterpMode);
virtual void PreviewUpdateTrack(FLOAT NewPosition, UInterpTrackInst* TrInst);
virtual void UpdateTrack(FLOAT NewPosition, UInterpTrackInst* TrInst, UBOOL bJump);
virtual void PreEditChange(UProperty* PropertyThatWillChange);
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
INT GetNumSubCurves() const;
}
/** Name of parameter in the GraphInstance which will be modified over time by this track. */
var() name ParamName;
var int NumSubcurve;
defaultproperties
{
TrackInstClass=class'SubstanceAir.InterpTrackInstSubstanceInput'
TrackTitle="Substance Graph Instance Input"
}

View File

@ -0,0 +1,22 @@
//! @file SeqAct_SubstanceRender.uc
//! @author Antoine Gonzalez - Allegorithmic
//! @copyright Allegorithmic. All rights reserved.
//!
//! @brief Kismet sequence action to modify a Substance Air input
class SeqAct_SubstanceRender extends SequenceAction
native(Sequence);
var() bool bSynchronousRendering;
cpptext
{
void Activated();
};
defaultproperties
{
InputLinks(0)=(LinkDesc="Set")
ObjName="Substance Render"
ObjCategory="Substance"
}

View File

@ -0,0 +1,24 @@
//! @file SeqAct_SubstanceSetInputFloat.uc
//! @author Antoine Gonzalez - Allegorithmic
//! @copyright Allegorithmic. All rights reserved.
//!
//! @brief Kismet sequence action to modify a Substance Air input
class SeqAct_SubstanceSetInputFloat extends SequenceAction
native(Sequence);
var() array<SubstanceAirGraphInstance> GraphInstances;
var() Name InputName;
var() array<float> InputValue;
cpptext
{
void Activated();
};
defaultproperties
{
InputLinks(0)=(LinkDesc="Set")
ObjName="Set Input (Float, Float[2], etc.)"
ObjCategory="Substance"
}

View File

@ -0,0 +1,24 @@
//! @file SeqAct_SubstanceSetInputImg.uc
//! @author Antoine Gonzalez - Allegorithmic
//! @copyright Allegorithmic. All rights reserved.
//!
//! @brief Kismet sequence action to modify a Substance Air input
class SeqAct_SubstanceSetInputImg extends SequenceAction
native(Sequence);
var() array<SubstanceAirGraphInstance> GraphInstances;
var() Name InputName;
var() Object InputValue;
cpptext
{
void Activated();
};
defaultproperties
{
InputLinks(0)=(LinkDesc="Set")
ObjName="Set Input (Image)"
ObjCategory="Substance"
}

View File

@ -0,0 +1,24 @@
//! @file SeqAct_SubstanceSetInputInt.uc
//! @author Antoine Gonzalez - Allegorithmic
//! @copyright Allegorithmic. All rights reserved.
//!
//! @brief Kismet sequence action to modify a Substance Air input
class SeqAct_SubstanceSetInputInt extends SequenceAction
native(Sequence);
var() array<SubstanceAirGraphInstance> GraphInstances;
var() Name InputName;
var() array<int> InputValue;
cpptext
{
void Activated();
};
defaultproperties
{
InputLinks(0)=(LinkDesc="Set")
ObjName="Set Input (Int, Int[2], etc.)"
ObjCategory="Substance"
}

View File

@ -0,0 +1,33 @@
//! @file SubstanceAirGraphActor.uc
//! @copyright Allegorithmic. All rights reserved.
//!
//! @brief Utility class designed to allow you to connect a FGraphInstance to a Matinee action.
class SubstanceAirGraphActor extends Actor
native(Actor)
placeable
hidecategories(Movement)
hidecategories(Advanced)
hidecategories(Collision)
hidecategories(Display)
hidecategories(Actor)
hidecategories(Attachment);
/** Pointer to SubstanceAirGraphInstance that we want to control parameters of using Matinee. */
var() SubstanceAirGraphInstance GraphInst;
defaultproperties
{
TickGroup=TG_DuringAsyncWork
Begin Object Class=SpriteComponent Name=Sprite
Sprite=Texture2D'EditorResources.S_Actor'
HiddenGame=true
AlwaysLoadOnClient=False
AlwaysLoadOnServer=False
SpriteCategoryName="Materials"
End Object
Components.Add(Sprite)
bNoDelete=true
}

View File

@ -0,0 +1,61 @@
//! @file SubstanceAirGraphInstance.uc
//! @author Antoine Gonzalez - Allegorithmic
//! @copyright Allegorithmic. All rights reserved.
//!
//! @brief the interface to access a Substance Air Graph Instance
class SubstanceAirGraphInstance extends Object
native(Texture)
hidecategories(Object);
enum SubstanceAirInputType
{
SIT_Float , /**< = 0x0, Float (scalar) type */
SIT_Float2 , /**< = 0x1, 2D Float (vector) type */
SIT_Float3 , /**< = 0x2, 3D Float (vector) type */
SIT_Float4 , /**< = 0x3, 4D Float (vector) type (e.g. color) */
SIT_Integer , /**< = 0x4, Integer type (int 32bits, enum or bool) */
SIT_Image , /**< = 0x5, bitmap/texture data */
SIT_Unused_6 , /** adding some padding in the enum to match the native one*/
SIT_Unused_7 , /** adding some padding in the enum to match the native one*/
SIT_Integer2 , /**< = 0x8, 2D Integer (vector) type */
SIT_Integer3 , /**< = 0x9, 3D Integer (vector) type */
SIT_Integer4 , /**< = 0xA, 4D Integer (vector) type */
};
// Substance graph instance, owned by this object
var native pointer Instance{struct SubstanceAir::FGraphInstance};
// Substance Air Instance factory parent object
var native SubstanceAirInstanceFactory Parent;
// retrieve the input list
native final function array<string> GetInputNames();
// retrieve an input's type
native final function SubstanceAirInputType GetInputType(const string InputName);
// modify the input value of the specified input (by name)
native final function bool SetInputInt(const string InputName, const array<int> Value);
native final function bool SetInputFloat(const string InputName, const array<float> Value);
// modify an image input, object must be a SubstanceAirImageInput or a SubstanceAirTexture2D
native final function bool SetInputImg(const string InputName, Object Value);
// get the input value of the specified input (by name)
native final function array<int> GetInputInt(const string InputName);
native final function array<float> GetInputFloat(const string InputName);
native final function Object GetInputImg(const string InputName);
cpptext
{
public:
virtual void InitializeIntrinsicPropertyValues();
virtual void Serialize(FArchive& Ar);
virtual void BeginDestroy();
virtual void PostLoad();
virtual void PostDuplicate();
virtual void PreEditUndo();
virtual void PostEditUndo();
}

View File

@ -0,0 +1,42 @@
//! @file SubstanceAirImageInput.uc
//! @copyright Allegorithmic. All rights reserved.
//!
class SubstanceAirImageInput extends Object
native(ImageInput)
hidecategories(Object);
// RGB layer compressed image data
var native const UntypedBulkData_Mirror CompressedImageRGB{FByteBulkData};
// Alpha layer compressed image data
var native const UntypedBulkData_Mirror CompressedImageA{FByteBulkData};
var native int CompRGB;
var native int CompA;
// The Output instance to get the Substance data from,
// copy so the original can be updated
var native array<pointer> Inputs{struct SubstanceAir::FImageInputInstance};
var native int SizeX;
var native int SizeY;
// the uncompressed image is a raw RGBA, RGB or G
var native int NumComponents;
// path to the resource used to construct this image input
var() editconst editoronly string SourceFilePath;
// Date/Time-stamp of the file from the last import
var() editconst editoronly string SourceFileTimestamp;
cpptext
{
public:
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
virtual void Serialize(FArchive& Ar);
virtual void StripData(UE3::EPlatformType PlatformsToKeep, UBOOL bStripLargeEditorData);
FString GetDesc();
virtual INT GetResourceSize();
}

View File

@ -0,0 +1,26 @@
//! @file SubstanceAirInstanceFactory.uc
//! @author Antoine Gonzalez - Allegorithmic
//! @copyright Allegorithmic. All rights reserved.
//!
//! @brief the interface to a Substance Air Package
class SubstanceAirInstanceFactory extends Object
native(InstanceFactory)
hidecategories(Object);
// native code structure describing a package
// it contains the Substance Air data, the graphs and their instances
var native pointer SubstancePackage{struct SubstanceAir::FPackage};
cpptext
{
public:
// UObject interface.
virtual void InitializeIntrinsicPropertyValues();
virtual void Serialize(FArchive& Ar);
virtual void BeginDestroy();
virtual void PostDuplicate();
virtual INT GetResourceSize();
}

View File

@ -0,0 +1,38 @@
//! @file SubstanceAirTexture2D.uc
//! @author Antoine Gonzalez - Allegorithmic
//! @copyright Allegorithmic. All rights reserved.
//!
//! @brief class for textures generated from a Substance Air output
class SubstanceAirTexture2D extends Texture2D
native(Texture)
hidecategories(Object)
config(Engine);
// The Output instance to get the Substance data from,
// copy so the original can be updated
var native pointer OutputCopy{struct SubstanceAir::FOutputInstance};
var native guid OutputGuid;
var native SubstanceAirGraphInstance ParentInstance;
cpptext
{
public:
virtual void Serialize(FArchive& Ar);
virtual void BeginDestroy();
virtual void PostLoad();
virtual void PostDuplicate();
virtual UBOOL CanEditChange(const UProperty* InProperty) const;
// UTexture interface.
virtual FTextureResource* CreateResource();
UBOOL HasSourceArt() const;
FString GetDesc();
void StripData(UE3::EPlatformType TargetPlatform, UBOOL bStripLargeEditorData);
// Init function which can be called from outside the main thread
void LighterInit(UINT InSizeX,UINT InSizeY,EPixelFormat InFormat);
}