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,48 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AICommandBase extends Object within AIController
native(AI)
abstract;
/**
* When determining the utility value one can think of it in these terms:
*
* -how important is doing this action compared to other actions
* -how exciting is doing this action compared to other actions
*
* e.g. I have 2 idle actions; reading a newspaper and picking on a pedestrian. Picking on the pedestrian is more existing
* so it should be higher rated than reading the newspaper
*
* e.g. I have an action am drinking ambrosia and responding to a threat. In this case drinking ambrosia is really
* important. At the same importance as "EngageThreat" classification. So we will add EngageThreat.UtilityStartVal
* to our utilty score to represent that.
*
*
* Utility functions should be checking for the data that says whether or not something occured. They should NOT be
* checking for things like: If you were in an Idle Action and/or if your current Action has some property set.
* That is bad as that is causing undue coupling between Actions.
*
* Additionally, the Utilty Function rules all. Period.
*
* If things are not correctly occurring then the utility function is broken in some way.
* One should not try to set special bools on blackboard/controller/active state and then look for them
*
* If the current set of stimuli is not "valid" / "able to have data for the utility" then we need to
* more than likely add some generalized functionality to it.
*
* If that can not be done then we need to start along the "bool cloud" path in the stimulus struct But that should be the last option.
*
*
*
**/
static event int GetUtility( AIController InAI )
{
`warn( "AICommandBase Base Class GetUtility was called. Please have your Parent Type or your indiv AICmd implement this function" );
ScriptTrace();
return -1;
}
defaultproperties
{
}

View File

@ -0,0 +1,358 @@
//=============================================================================
// AIController, the base class of AI.
//
// Controllers are non-physical actors that can be attached to a pawn to control
// its actions. AIControllers implement the artificial intelligence for the pawns they control.
//
//Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
//=============================================================================
class AIController extends Controller
native(AI);
`if(`notdefined(__TW_))
/** auto-adjust around corners, with no hitwall notification for controller or pawn
if wall is hit during a MoveTo() or MoveToward() latent execution. */
var bool bAdjustFromWalls;
`endif
/** skill, scaled by game difficulty (add difficulty to this value) */
var float Skill;
/** Move target from last scripted action */
var Actor ScriptedMoveTarget;
/** Route from last scripted action; if valid, sets ScriptedMoveTarget with the points along the route */
var Route ScriptedRoute;
/** if true, we're following the scripted route in reverse */
var bool bReverseScriptedRoute;
/** if ScriptedRoute is valid, the index of the current point we're moving to */
var int ScriptedRouteIndex;
/** view focus from last scripted action */
var Actor ScriptedFocus;
cpptext
{
INT AcceptNearbyPath(AActor *goal);
#if __TW_PATHFINDING_
virtual void AdjustFromWall(FVector HitNormal, AActor* HitActor);
#else
void AdjustFromWall(FVector HitNormal, AActor* HitActor);
#endif
virtual void SetAdjustLocation(FVector NewLoc,UBOOL bAdjust,UBOOL bOffsetFromBase=FALSE);
virtual FVector DesiredDirection();
/** Called when the AIController is destroyed via script */
virtual void PostScriptDestroyed();
}
event PreBeginPlay()
{
Super.PreBeginPlay();
if ( bDeleteMe )
return;
if ( WorldInfo.Game != None )
Skill += WorldInfo.Game.GetModifiedGameDifficulty();
Skill = FClamp(Skill, 0, 3);
}
`if(`__TW_PATHFINDING_)
// Adding declaration here for easier ability to call this event from native code in Engine
event AILog_Internal( coerce string LogText, optional Name LogCategory, optional bool bForce, optional bool BugIt, optional bool bSkipExtraInfo );
`endif
/* Reset()
reset actor to initial state - used when restarting level without reloading.
*/
function Reset()
{
Super.Reset();
}
/**
* list important AIController variables on canvas. HUD will call DisplayDebug() on the current ViewTarget when
* the ShowDebug exec is used
*
* @param HUD - HUD with canvas to draw on
* @input out_YL - Height of the current font
* @input out_YPos - Y position on Canvas. out_YPos += out_YL, gives position to draw text for next debug line.
*/
simulated function DisplayDebug(HUD HUD, out float out_YL, out float out_YPos)
{
local int i;
local string T;
local Canvas Canvas;
Canvas = HUD.Canvas;
super.DisplayDebug(HUD, out_YL, out_YPos);
if (HUD.ShouldDisplayDebug('AI'))
{
Canvas.DrawColor.B = 255;
if ( (Pawn != None) && (MoveTarget != None) && Pawn.ReachedDestination(MoveTarget) )
Canvas.DrawText(" Skill "$Skill$" NAVIGATION MoveTarget "$GetItemName(String(MoveTarget))$"(REACHED) MoveTimer "$MoveTimer, false);
else
Canvas.DrawText(" Skill "$Skill$" NAVIGATION MoveTarget "$GetItemName(String(MoveTarget))$" MoveTimer "$MoveTimer, false);
out_YPos += out_YL;
Canvas.SetPos(4,out_YPos);
Canvas.DrawText(" Destination "$GetDestinationPosition()$" Focus "$GetItemName(string(Focus))$" Preparing Move "$bPreparingMove, false);
out_YPos += out_YL;
Canvas.SetPos(4,out_YPos);
Canvas.DrawText(" RouteGoal "$GetItemName(string(RouteGoal))$" RouteDist "$RouteDist, false);
out_YPos += out_YL;
Canvas.SetPos(4,out_YPos);
for ( i=0; i<RouteCache.Length; i++ )
{
if ( RouteCache[i] == None )
{
if ( i > 5 )
T = T$"--"$GetItemName(string(RouteCache[i-1]));
break;
}
else if ( i < 5 )
T = T$GetItemName(string(RouteCache[i]))$"-";
}
Canvas.DrawText(" RouteCache: "$T, false);
out_YPos += out_YL;
Canvas.SetPos(4,out_YPos);
}
}
event SetTeam(int inTeamIdx)
{
WorldInfo.Game.ChangeTeam(self,inTeamIdx,true);
}
simulated event GetPlayerViewPoint(out vector out_Location, out Rotator out_Rotation)
{
// AI does things from the Pawn
if (Pawn != None)
{
out_Location = Pawn.Location;
out_Rotation = Pawn.Rotation;
}
else
{
Super.GetPlayerViewPoint(out_Location, out_Rotation);
}
}
/**
* Scripting hook to move this AI to a specific actor.
*/
function OnAIMoveToActor(SeqAct_AIMoveToActor Action)
{
local Actor DestActor;
local SeqVar_Object ObjVar;
// abort any previous latent moves
ClearLatentAction(class'SeqAct_AIMoveToActor',true,Action);
// pick a destination
DestActor = Action.PickDestination(Pawn);
// if we found a valid destination
if (DestActor != None)
{
// set the target and push our movement state
ScriptedRoute = Route(DestActor);
if (ScriptedRoute != None)
{
if (ScriptedRoute.RouteList.length == 0)
{
`warn("Invalid route with empty MoveList for scripted move");
}
else
{
ScriptedRouteIndex = 0;
if (!IsInState('ScriptedRouteMove'))
{
PushState('ScriptedRouteMove');
}
}
}
else
{
ScriptedMoveTarget = DestActor;
if (!IsInState('ScriptedMove'))
{
PushState('ScriptedMove');
}
}
// set AI focus, if one was specified
ScriptedFocus = None;
foreach Action.LinkedVariables(class'SeqVar_Object', ObjVar, "Look At")
{
ScriptedFocus = Actor(ObjVar.GetObjectValue());
if (ScriptedFocus != None)
{
break;
}
}
}
else
{
`warn("Invalid destination for scripted move");
}
}
/**
* Simple scripted movement state, attempts to pathfind to ScriptedMoveTarget and
* returns execution to previous state upon either success/failure.
*/
state ScriptedMove
{
event PoppedState()
{
if (ScriptedRoute == None)
{
// if we still have the move target, then finish the latent move
// otherwise consider it aborted
ClearLatentAction(class'SeqAct_AIMoveToActor', (ScriptedMoveTarget == None));
}
// and clear the scripted move target
ScriptedMoveTarget = None;
}
event PushedState()
{
if (Pawn != None)
{
// make sure the pawn physics are initialized
Pawn.SetMovementPhysics();
}
}
Begin:
// while we have a valid pawn and move target, and
// we haven't reached the target yet
while (Pawn != None &&
ScriptedMoveTarget != None &&
!Pawn.ReachedDestination(ScriptedMoveTarget))
{
// check to see if it is directly reachable
if (ActorReachable(ScriptedMoveTarget))
{
// then move directly to the actor
MoveToward(ScriptedMoveTarget, ScriptedFocus);
}
else
{
// attempt to find a path to the target
MoveTarget = FindPathToward(ScriptedMoveTarget);
if (MoveTarget != None)
{
// move to the first node on the path
MoveToward(MoveTarget, ScriptedFocus);
}
else
{
// abort the move
`warn("Failed to find path to"@ScriptedMoveTarget);
ScriptedMoveTarget = None;
}
}
}
// return to the previous state
PopState();
}
/** scripted route movement state, pushes ScriptedMove for each point along the route */
state ScriptedRouteMove
{
event PoppedState()
{
// if we still have the move target, then finish the latent move
// otherwise consider it aborted
ClearLatentAction(class'SeqAct_AIMoveToActor', (ScriptedRoute == None));
ScriptedRoute = None;
}
Begin:
while (Pawn != None && ScriptedRoute != None && ScriptedRouteIndex < ScriptedRoute.RouteList.length && ScriptedRouteIndex >= 0)
{
ScriptedMoveTarget = ScriptedRoute.RouteList[ScriptedRouteIndex].Actor;
if (ScriptedMoveTarget != None)
{
PushState('ScriptedMove');
}
if (Pawn != None && Pawn.ReachedDestination(ScriptedRoute.RouteList[ScriptedRouteIndex].Actor))
{
if (bReverseScriptedRoute)
{
ScriptedRouteIndex--;
}
else
{
ScriptedRouteIndex++;
}
}
else
{
`warn("Aborting scripted route");
ScriptedRoute = None;
PopState();
}
}
if (Pawn != None && ScriptedRoute != None && ScriptedRoute.RouteList.length > 0)
{
switch (ScriptedRoute.RouteType)
{
case ERT_Linear:
PopState();
break;
case ERT_Loop:
bReverseScriptedRoute = !bReverseScriptedRoute;
// advance index by one to get back into valid range
if (bReverseScriptedRoute)
{
ScriptedRouteIndex--;
}
else
{
ScriptedRouteIndex++;
}
Goto('Begin');
break;
case ERT_Circle:
ScriptedRouteIndex = 0;
Goto('Begin');
break;
default:
`warn("Unknown route type");
ScriptedRoute = None;
PopState();
break;
}
}
else
{
ScriptedRoute = None;
PopState();
}
// should never get here
`warn("Reached end of state execution");
ScriptedRoute = None;
PopState();
}
function NotifyWeaponFired(Weapon W, byte FireMode);
function NotifyWeaponFinishedFiring(Weapon W, byte FireMode);
function bool CanFireWeapon( Weapon Wpn, byte FireModeNum ) { return TRUE; }
defaultproperties
{
bAdjustFromWalls=true
bCanDoSpecial=true
MinHitWall=-0.5f
}

View File

@ -0,0 +1,51 @@
/**
* Copyright 2008 PCF, All Rights Reserved.
* This class is here because Engine needs to hold a pointer to an instance of it.
*/
class AISubsystem extends Subsystem
abstract
native;
var bool bImplementsNavMeshGeneration;
cpptext
{
virtual void Init(UBOOL bEngineStart = FALSE) PURE_VIRTUAL(UAISubsystem::Init,);
virtual void CleanUp(UBOOL bShutDown = FALSE) PURE_VIRTUAL(UAISubsystem::CleanUp,);
/** to be called on new level loading */
virtual void Reset() PURE_VIRTUAL(UAISubsystem::Reset,);
virtual void PrepareMapChange() PURE_VIRTUAL(UAISubsystem::PrepareMapChange,);
/** GC started, after all CALLBACK_PreGarbageCollection */
virtual void OnLevelStreamedOut(ULevel* Level) PURE_VIRTUAL(UAISubsystem::OnLevelStreamedOut,);
/** interface for triggering nav mesh generation */
virtual UBOOL GenerateNavMesh() { return FALSE; }
virtual void OnPIEStart() PURE_VIRTUAL(UAISubsystem::OnPIEStart,);
virtual void OnPIEFinished() PURE_VIRTUAL(UAISubsystem::OnPIEFinished,);
virtual void ToggleNavBy(AActor* Referencer, UBOOL bEnable, BYTE NavFlag=0) PURE_VIRTUAL(UAISubsystem::ToggleNavBy,);
virtual void ToggleNavBy(UComponent* Referencer, UBOOL bEnable, BYTE NavFlag=0) PURE_VIRTUAL(UAISubsystem::ToggleNavBy,);
virtual void ToggleNavBy(ACoverLink* Referencer, INT SlotIdx, UBOOL bEnable, BYTE NavFlag=0) PURE_VIRTUAL(UAISubsystem::ToggleNavBy,);
virtual void UpdateActionAreas() PURE_VIRTUAL(UAISubsystem::UpdateActionAreas,);
}
final native static noexport function ToggleNavByActor(Actor Referencer, bool bEnable);
final native static noexport function ToggleNavByComponent(Component Referencer, bool bEnable);
final native static noexport function ToggleNavByCover(CoverLink Referencer, int SlotIdx, bool bEnable);
`if(`__TW_)
/** Used to access the difficulty values from KFGame for BaseAI */
event float GetDifficultyValue(int Index)
{
return -1;
}
`endif
defaultproperties
{
bImplementsNavMeshGeneration=false
}

View File

@ -0,0 +1,56 @@
//=============================================================================
// AISwitchablePylon
//
// represents a mesh which is turned on/off via an AI triggerable switch at runtime.. e.g. an electronic gate, or a laser fence
//
// Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
//=============================================================================
class AISwitchablePylon extends Pylon
placeable
native(inherit);
cpptext
{
/** returns TRUE if the path from Poly back to start has an edge which is linked to a switch which is linked to this
* pylon
* @param Edge - the edge linking Poly to the next neighbor in question
* @param Poly - the source poly (the current end-of-line poly in the chain)
* @return - TRUE if the previousPath chain of Poly has a switch linked to this pylon in it
*/
UBOOL HasSwitchLinkedToMeInPath(struct FNavMeshEdgeBase* Edge, struct FNavMeshPolyBase* Poly);
// overidden to deny access to edges when we're disabled and the path doesn't incorporate a switch linked to this pylon
virtual UBOOL CostFor( const FNavMeshPathParams& PathParams,
const FVector& PreviousPoint,
FVector& out_PathEdgePoint,
struct FNavMeshEdgeBase* Edge,
struct FNavMeshPolyBase* SourcePoly,
INT& out_Cost);
}
var() bool bOpen;
function PostBeginPlay()
{
Super.PostBeginPlay();
SetEnabled(bOpen);
}
event SetEnabled(bool bEnabled)
{
bOpen = bEnabled;
bForceObstacleMeshCollision = !bOpen;
}
event bool IsEnabled()
{
return bOpen;
}
defaultproperties
{
bNeedsCostCheck=true
bRouteBeginPlayEvenIfStatic=true
}

File diff suppressed because it is too large Load Diff

4269
Engine/Classes/Actor.uc Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorComponent extends Component
native
noexport
abstract;
var native transient const pointer Scene{FSceneInterface};
var transient const Actor Owner;
var native transient const bool bAttached;
var const bool bTickInEditor;
/** Is this component in need of an update? */
var transient const bool bNeedsReattach;
/** Is this component's transform in need of an update? */
var transient const bool bNeedsUpdateTransform;
/** The ticking group this component belongs to */
var const ETickingGroup TickGroup;
/** Changes the ticking group for this component */
native final function SetTickGroup(ETickingGroup NewTickGroup);
/**
* Sets whether or not the physics for this object should be 'fixed' (ie kinematic) or allowed to move with dynamics.
* If bFixed is true, all bodies within this component will be fixed.
* If bFixed is false, bodies will be set back to the default defined by their BodySetup.
*/
native final function SetComponentRBFixed(bool bFixed);
/** force this component to be updated right now
* component must be directly attached to its Owner (not attached to another component)
* @param bTransformOnly - if true, only update transform, otherwise do a full reattachment
*/
native final function ForceUpdate(bool bTransformOnly);
/** detaches the component from whatever it's attached to */
native final function DetachFromAny();
defaultproperties
{
// All things now default to being ticked during async work
TickGroup=TG_DuringAsyncWork
}

View File

@ -0,0 +1,91 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactory extends Object
native
collapsecategories
hidecategories(Object)
editinlinenew
config(Editor)
abstract;
cpptext
{
/** Called to actual create an actor at the supplied location/rotation, using the properties in the ActorFactory */
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
/** Fill in parameters automatically, possibly using the specified selection set. */
virtual void AutoFillFields(class USelection* Selection) {}
/**
* Clears references to resources [usually set by the call to AutoFillFields] when the factory has done its work. The default behavior
* (which is to call AutoFillFields() with an empty selection set) should be sufficient for most factories, but this method is provided
* to allow customized behavior.
*/
virtual void ClearFields();
/** Name to put on context menu. */
virtual FString GetMenuName() { return MenuName; }
/** Initialize NewActorClass if necessary, and return default actor for that class. */
virtual AActor* GetDefaultActor();
protected:
/**
* This will check whether there is enough space to spawn an character.
* Additionally it will check the ActorFactoryData to for any overrides
* ( e.g. bCheckSpawnCollision )
*
* @return if there is enough space to spawn character at this location
**/
UBOOL IsEnoughRoomToSpawnPawn( const FVector* const Location, const class USeqAct_ActorFactory* const ActorFactoryData ) const;
}
/** class to spawn during gameplay; only used if NewActorClass is left at the default */
var class<Actor> GameplayActorClass;
/** Name used as basis for 'New Actor' menu. */
var string MenuName;
/** Indicates how far up the menu item should be. The higher the number, the higher up the list.*/
var config int MenuPriority;
/** DEPRECATED - Alternate value for menu priority; Used to allow things like modifier keys to access items in a different order. */
var deprecated int AlternateMenuPriority;
`if(`__TW_)
var string NewActorClassName;
`else
/** name of actor subclass this actorfactory creates - dynamically loaded. Overrides NewActorClass. */
var config string NewActorClassName;
`endif
/** Actor subclass this ActorFactory creates. */
var class<Actor> NewActorClass;
/** Whether to appear on menu (or this Factory only used through scripts etc.) */
var bool bPlaceable;
/** Whether to appear in the editor add actor quick menu */
var bool bShowInEditorQuickMenu;
/** Allows script to modify new actor */
simulated event PostCreateActor(Actor NewActor, optional const SeqAct_ActorFactory ActorFactoryData);
defaultproperties
{
MenuName="Add Actor"
bPlaceable=true
bShowInEditorQuickMenu=false;
}

View File

@ -0,0 +1,42 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryAI extends ActorFactory
config(Editor)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual AActor* GetDefaultActor();
};
var() class<AIController> ControllerClass;
var() class<Pawn> PawnClass;
var() string PawnName;
/** whether or not to give the spawned Pawn the default inventory for the gametype being played */
var() bool bGiveDefaultInventory;
/** additional inventory to give the Pawn */
var() array< class<Inventory> > InventoryList;
/** what team to put the AI on */
var() int TeamIndex;
defaultproperties
{
ControllerClass=class'AIController'
TeamIndex=255
bPlaceable=false
}

View File

@ -0,0 +1,31 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryActor extends ActorFactory
config(Editor)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual AActor* GetDefaultActor();
};
var() class<Actor> ActorClass;
defaultproperties
{
ActorClass=class'Actor'
bPlaceable=FALSE
}

View File

@ -0,0 +1,39 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*
* The base class of all ambient sound types
*/
class ActorFactoryAmbientSound extends ActorFactory
config( Editor )
collapsecategories
hidecategories( Object )
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
virtual void AutoFillFields( class USelection* Selection );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual FString GetMenuName( void );
void SetSoundCue( class AAmbientSound* NewSound );
}
var() SoundCue AmbientSoundCue;
defaultproperties
{
MenuName="Add AmbientSound"
NewActorClass=class'Engine.AmbientSound'
bShowInEditorQuickMenu=true;
}

View File

@ -0,0 +1,19 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryAmbientSoundMovable extends ActorFactoryAmbientSound
config( Editor )
hidecategories( Object )
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
}
defaultproperties
{
MenuName="Add AmbientSoundMovable"
NewActorClass=class'Engine.AmbientSoundMovable'
bShowInEditorQuickMenu=false;
}

View File

@ -0,0 +1,19 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryAmbientSoundNonLoop extends ActorFactoryAmbientSoundSimple
config( Editor )
collapsecategories
hidecategories( Object )
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
}
defaultproperties
{
MenuName="Add AmbientSoundNonLoop"
NewActorClass=class'Engine.AmbientSoundNonLoop'
}

View File

@ -0,0 +1,19 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryAmbientSoundNonLoopingToggleable extends ActorFactoryAmbientSoundSimpleToggleable
config( Editor )
collapsecategories
hidecategories( Object )
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
}
defaultproperties
{
MenuName="Add AmbientSoundNonLoopingToggleable"
NewActorClass=class'Engine.AmbientSoundNonLoopingToggleable'
}

View File

@ -0,0 +1,36 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryAmbientSoundSimple extends ActorFactory
config( Editor )
collapsecategories
hidecategories( Object )
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
virtual void AutoFillFields( class USelection* Selection );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual FString GetMenuName( void );
void SetSoundSlot( class AAmbientSoundSimple* NewSound );
}
var() SoundNodeWave SoundNodeWave;
defaultproperties
{
MenuName="Add AmbientSoundSimple"
NewActorClass=class'Engine.AmbientSoundSimple'
}

View File

@ -0,0 +1,19 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryAmbientSoundSimpleToggleable extends ActorFactoryAmbientSoundSimple
config( Editor )
collapsecategories
hidecategories( Object )
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
}
defaultproperties
{
MenuName="Add AmbientSoundSimpleToggleable"
NewActorClass=class'Engine.AmbientSoundSimpleToggleable'
}

View File

@ -0,0 +1,66 @@
/*=============================================================================
ActorFactoryApexClothing.uc: Implement APEX Clothing Actor Factory
Copyright 2008-2009 NVIDIA corporation..
=============================================================================*/
class ActorFactoryApexClothing extends ActorFactorySkeletalMesh
config(Editor)
hidecategories(Object)
native(Physics);
/** List of clothing assets associated with each material in this mesh. */
var() array<ApexClothingAsset> ClothingAssets;
/** Allows setting the RBChannel flag on the spawned rigid body's StaticMeshComponent. */
var() const ERBCollisionChannel ClothingRBChannel;
/** Define the channels with which this actor will collide. */
var() const RBCollisionChannelContainer ClothingRBCollideWithChannels;
// NVCHANGE_BEGIN: DJS - Add clothing wind support to clothing actor factory
/** If TRUE, WindVelocity is applied in the local space of the component, rather than world space. */
var() bool bLocalSpaceWind;
/** The Wind Velocity applied to Apex Clothing */
var() vector WindVelocity;
/** Time taken for ApexClothing to reach WindVelocity */
var() float WindVelocityBlendTime;
// NVCHANGE_END: DJS - Add clothing wind support to clothing actor factory
// NVCHANGE_BEGIN: hlanker - Add wind noise
/** Maximum noise amplitude */
var() float WindStrengthNoiseBounds;
/** Maximum wind strength change per second */
var() float WindStrengthNoiseStepSize;
/** Higher probability to stay around the center */
var() bool bWindStrengthNoiseCentered;
/** Maximum angle (in radian) on direction noise*/
var() float WindDirNoiseBounds;
/** Maximum angle change (in radian per second) */
var() float WindDirNoiseStepSize;
/** Higher probability to stay around the center */
var() bool bWindDirNoiseCentered;
// NVCHANGE_END: hlanker - Add wind noise
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
virtual UBOOL CanCreateActor(FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE);
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
defaultproperties
{
MenuName="Add Clothing";
NewActorClass=class'Engine.SkeletalMeshActor'
GameplayActorClass=class'Engine.SkeletalMeshActorSpawnable'
ClothingRBChannel=RBCC_Clothing
ClothingRBCollideWithChannels=(Default=TRUE,BlockingVolume=TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,ClothingCollision=TRUE)
}

View File

@ -0,0 +1,41 @@
/*=============================================================================
ActorFactoryApexDestructible.uc: Apex integration for Destructible Assets
Copyright 2008-2009 NVIDIA corporation..
=============================================================================*/
class ActorFactoryApexDestructible extends ActorFactory
config(Editor)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
virtual UBOOL CanCreateActor(FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE);
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
/** Starts the actor in an awake(dynamic) state */
var() bool bStartAwake;
/** Allows setting the RBChannel flag on the spawned rigid body's StaticMeshComponent. */
var() ERBCollisionChannel RBChannel;
/** Define the channels with which this actor will collide. */
var() const RBCollisionChannelContainer CollideWithChannels;
var() ApexDestructibleAsset DestructibleAsset;
defaultproperties
{
MenuName="Add ApexDestructibleActor"
NewActorClass=class'Engine.ApexDestructibleActor'
GameplayActorClass=class'Engine.ApexDestructibleActorSpawnable'
bStartAwake=FALSE
RBChannel=RBCC_EffectPhysics
CollideWithChannels={(
Default=TRUE,
BlockingVolume=TRUE,
GameplayPhysics=TRUE,
EffectPhysics=TRUE
)}
}

View File

@ -0,0 +1,32 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryArchetype extends ActorFactory
config(Editor)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
virtual AActor* GetDefaultActor();
}
var() Actor ArchetypeActor;
defaultproperties
{
MenuName="Add Archetype"
}

View File

@ -0,0 +1,15 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryCoverLink extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
defaultproperties
{
MenuName="Add CoverLink"
NewActorClass=class'Engine.CoverLink'
bShowInEditorQuickMenu=true
}

View File

@ -0,0 +1,59 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryDecal extends ActorFactory
config(Editor)
native(Decal);
cpptext
{
/**
* Called to create an actor at the supplied location/rotation
*
* @param Location Location to create the actor at
* @param Rotation Rotation to create the actor with
* @param ActorFactoryData Kismet object which spawns actors, could potentially have settings to use/override
*
* @return The newly created actor, NULL if it could not be created
*/
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor(FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE);
/**
* Fill the data fields of this actor with the current selection
*
* @param Selection Selection to use to fill this actor's data fields with
*/
virtual void AutoFillFields(class USelection* Selection);
/**
* Returns the name this factory should show up as in a context-sensitive menu
*
* @return Name this factory should show up as in a menu
*/
virtual FString GetMenuName();
/**
* Clears references to resources [usually set by the call to AutoFillFields] when the factory has done its work. The default behavior
* (which is to call AutoFillFields() with an empty selection set) should be sufficient for most factories, but this method is provided
* to allow customized behavior.
*/
virtual void ClearFields();
}
var() MaterialInterface DecalMaterial;
defaultproperties
{
MenuName="Add Decal"
NewActorClass=class'Engine.DecalActor'
}

View File

@ -0,0 +1,12 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryDecalMovable extends ActorFactoryDecal
config(Editor)
native(Decal);
defaultproperties
{
MenuName="Add Movable Decal"
NewActorClass=class'Engine.DecalActorMovable'
}

View File

@ -0,0 +1,28 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryDominantDirectionalLight extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
cpptext
{
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
}
defaultproperties
{
MenuName="Add Light (DominantDirectionalLight)"
NewActorClass=class'Engine.DominantDirectionalLight'
bShowInEditorQuickMenu=true
}

View File

@ -0,0 +1,27 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryDominantDirectionalLightMovable extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
cpptext
{
/**
* Returns whether the ActorFactory thinks it could create an Actor with the current settings.
* Can be used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If TRUE, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return TRUE if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
}
defaultproperties
{
MenuName="Add Light (DominantDirectionalLightMovable)"
NewActorClass=class'Engine.DominantDirectionalLightMovable'
}

View File

@ -0,0 +1,54 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryDynamicSM extends ActorFactory
config(Editor)
native
abstract;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
virtual void PostLoad();
}
var() StaticMesh StaticMesh;
var() vector DrawScale3D;
/**
* For encroachers, don't do the overlap check when they move. You will not get touch events for this actor moving, but it is much faster.
* So if you want touch events from volumes or triggers you need to set this to be FALSE.
* This is an optimisation for large numbers of PHYS_RigidBody actors for example.
* @see Actor.uc bNoEncroachCheck
*/
var() bool bNoEncroachCheck;
var() bool bNotifyRigidBodyCollision;
var() ECollisionType CollisionType;
var() bool bBlockRigidBody;
/** Try and use physics hardware for this spawned object. */
var() bool bUseCompartment;
/** If false, primitive does not cast dynamic shadows. */
var() bool bCastDynamicShadow;
defaultproperties
{
DrawScale3D=(X=1,Y=1,Z=1)
CollisionType=COLLIDE_NoCollision
bCastDynamicShadow=true
bBlockRigidBody=FALSE
}

View File

@ -0,0 +1,36 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryEmitter extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
var() ParticleSystem ParticleSystem;
defaultproperties
{
MenuName="Add Emitter"
NewActorClass=class'Engine.Emitter'
GameplayActorClass=class'Engine.EmitterSpawnable'
}

View File

@ -0,0 +1,35 @@
/**
* Copyright 1998-2012 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryFlex extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
var() StaticMesh StaticMesh;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
defaultproperties
{
MenuName="Add FlexActor"
NewActorClass=class'Engine.FlexActor'
}

View File

@ -0,0 +1,51 @@
/*=============================================================================
ActorFactoryFlexForceField.uc: Implement Flex force field Actor Factory
Copyright 2008-2011 NVIDIA corporation..
=============================================================================*/
class ActorFactoryFlexForceField extends ActorFactory
config(Editor)
DontCollapseCategories
native(Physics);
/** Rotational field strength */
var(ForceField) float RotationalFieldStrength;
/** Radial field strength */
var(ForceField) float RadialFieldStrength;
/** Lift field strength */
var(ForceField) float LiftFieldStrength;
/** Height of capsule field */
var(ForceField) float CapsuleFieldHeight <ClampMin=0.0>;
/** Bottom radius of capsule field */
var(ForceField) float CapsuleFieldBottomRadius <ClampMin=0.0>;
/** Top radius of capsule field */
var(ForceField) float CapsuleFieldTopRadius <ClampMin=0.0>;
/** Percentage of distance from boundary to center where fade out starts */
var(ForceField) float BoundaryFadePercentage <ClampMin=0.0 | ClampMax=1.0>;
/** Percentage of noise applied to force field. 0 = None 1 = Infinite */
var(ForceField) float Noise <ClampMin=0.0 | ClampMax=1.0>;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
virtual FString GetMenuName();
}
defaultproperties
{
RotationalFieldStrength = 750
RadialFieldStrength = -400
LiftFieldStrength = 0.0
CapsuleFieldHeight = 200.0;
CapsuleFieldBottomRadius = 100.0;
CapsuleFieldTopRadius = 50.0;
BoundaryFadePercentage = 0.1
Noise = 0.0
MenuName="Add FlexForceField"
NewActorClass=class'Engine.FlexForceFieldActor'
}

View File

@ -0,0 +1,29 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryFogVolumeConstantDensityInfo extends ActorFactory
config(Editor)
native(FogVolume);
cpptext
{
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Used to determine if we should add to context menu for example.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly );
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
virtual void AutoFillFields(class USelection* Selection);
}
var MaterialInterface SelectedMaterial;
var bool bNothingSelected;
defaultproperties
{
MenuName="Add FogVolumeConstantDensityInfo"
NewActorClass=class'Engine.FogVolumeConstantDensityInfo'
}

View File

@ -0,0 +1,12 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryFogVolumeLinearHalfspaceDensityInfo extends ActorFactoryFogVolumeConstantDensityInfo
config(Editor)
native(FogVolume);
defaultproperties
{
MenuName="Add FogVolumeLinearHalfspaceDensityInfo"
NewActorClass=class'Engine.FogVolumeLinearHalfspaceDensityInfo'
}

View File

@ -0,0 +1,17 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryFogVolumeSphericalDensityInfo extends ActorFactoryFogVolumeConstantDensityInfo
config(Editor)
native(FogVolume);
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
}
defaultproperties
{
MenuName="Add FogVolumeSphericalDensityInfo"
NewActorClass=class'Engine.FogVolumeSphericalDensityInfo'
}

View File

@ -0,0 +1,35 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryFracturedStaticMesh extends ActorFactory
config(Editor)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
var() FracturedStaticMesh FracturedStaticMesh;
var() vector DrawScale3D;
defaultproperties
{
DrawScale3D=(X=1,Y=1,Z=1)
MenuName="Add FracturedStaticMesh"
NewActorClass=class'Engine.FracturedStaticMeshActor'
}

View File

@ -0,0 +1,12 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryInteractiveFoliage extends ActorFactoryStaticMesh
config(Editor)
native(Foliage);
defaultproperties
{
MenuName="Add InteractiveFoliageActor"
NewActorClass=class'Engine.InteractiveFoliageActor'
}

View File

@ -0,0 +1,35 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryLensFlare extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
var() LensFlare LensFlareObject;
defaultproperties
{
MenuName="Add LensFlare"
NewActorClass=class'Engine.LensFlareSource'
//GameplayActorClass=class'Engine.EmitterSpawnable'
}

View File

@ -0,0 +1,15 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryLight extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
defaultproperties
{
MenuName="Add Light (Point)"
NewActorClass=class'Engine.PointLight'
bShowInEditorQuickMenu=true
}

View File

@ -0,0 +1,14 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryMover extends ActorFactoryDynamicSM
config(Editor)
collapsecategories
hidecategories(Object)
native;
defaultproperties
{
MenuName="Add InterpActor"
NewActorClass=class'Engine.InterpActor'
}

View File

@ -0,0 +1,15 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryPathNode extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
defaultproperties
{
MenuName="Add PathNode"
NewActorClass=class'Engine.PathNode'
bShowInEditorQuickMenu=true
}

View File

@ -0,0 +1,55 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryPhysicsAsset extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
var() PhysicsAsset PhysicsAsset;
var() SkeletalMesh SkeletalMesh;
var() bool bStartAwake;
var() bool bDamageAppliesImpulse;
var() bool bNotifyRigidBodyCollision;
var() vector InitialVelocity;
var() vector DrawScale3D;
/** Try and use physics hardware for this spawned object. */
var() bool bUseCompartment;
/** If false, primitive does not cast dynamic shadows. */
var() bool bCastDynamicShadow;
cpptext
{
virtual void PreSave();
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
defaultproperties
{
MenuName="Add PhysicsAsset"
NewActorClass=class'Engine.KAsset'
GameplayActorClass=class'Engine.KAssetSpawnable'
DrawScale3D=(X=1,Y=1,Z=1)
bStartAwake=true
bDamageAppliesImpulse=true
bCastDynamicShadow=true
}

View File

@ -0,0 +1,15 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryPlayerStart extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
defaultproperties
{
MenuName="Add PlayerStart"
NewActorClass=class'Engine.PlayerStart'
bShowInEditorQuickMenu=true
}

View File

@ -0,0 +1,15 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryPylon extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
defaultproperties
{
MenuName="Add Pylon"
NewActorClass=class'Engine.Pylon'
bShowInEditorQuickMenu=true
}

View File

@ -0,0 +1,80 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryRigidBody extends ActorFactoryDynamicSM
config(Editor)
collapsecategories
hidecategories(Object)
native;
/** Should spawned Actor start simulating as soon as its created, or be 'asleep' until hit. */
var() bool bStartAwake;
/** Sets the bDamageAppliesImpulse flag on the new Actor. */
var() bool bDamageAppliesImpulse;
/** Indicates if the initial velocity settings below should be considered in the world space or local space of the spawn target actor. */
var() bool bLocalSpaceInitialVelocity;
/** Velocity that new rigid bodies will have when created. In the ref frame of the spawn target actor. */
var() vector InitialVelocity;
/**
* If valid, Velocity added to InitialVelocity when creating actor.
* This is here in addition to InitialVelocity to maintain backwards compatibility.
*/
var() DistributionVector AdditionalVelocity;
/**
* If valid, Angular Velocity given to newly spawned Actor.
*/
var() DistributionVector InitialAngularVelocity;
/** Allows setting the RBChannel flag on the spawned rigid body's StaticMeshComponent. */
var() ERBCollisionChannel RBChannel;
/** Enable 'Stay upright' torque, that tries to keep Z axis of KActor pointing along world Z */
var() bool bEnableStayUprightSpring;
/** Torque applied to try and keep KActor horizontal. */
var() float StayUprightTorqueFactor;
/** Max torque that can be applied to try and keep KActor horizontal */
var() float StayUprightMaxTorque;
cpptext
{
// UObject interface
virtual void PostLoad();
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
}
defaultproperties
{
MenuName="Add RigidBody"
NewActorClass=class'Engine.KActor'
GameplayActorClass=class'Engine.KActorSpawnable'
bNoEncroachCheck=true
bStartAwake=true
bDamageAppliesImpulse=true
CollisionType=COLLIDE_BlockAll
RBChannel=RBCC_GameplayPhysics
bBlockRigidBody=TRUE
StayUprightTorqueFactor=1000.0
StayUprightMaxTorque=1500.0
}

View File

@ -0,0 +1,35 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactorySkeletalMesh extends ActorFactory
config(Editor)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
var() SkeletalMesh SkeletalMesh;
var() AnimSet AnimSet;
var() name AnimSequenceName;
defaultproperties
{
MenuName="Add SkeletalMesh"
NewActorClass=class'Engine.SkeletalMeshActor'
GameplayActorClass=class'Engine.SkeletalMeshActorSpawnable'
}

View File

@ -0,0 +1,12 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactorySkeletalMeshCinematic extends ActorFactorySkeletalMesh
config(Editor)
hidecategories(Object);
defaultproperties
{
MenuName="Add SkeletalMeshCinematic"
NewActorClass=class'Engine.SkeletalMeshCinematicActor'
}

View File

@ -0,0 +1,12 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactorySkeletalMeshMAT extends ActorFactorySkeletalMesh
config(Editor)
hidecategories(Object);
defaultproperties
{
MenuName="Add SkeletalMeshMAT"
NewActorClass=class'Engine.SkeletalMeshActorMAT'
}

View File

@ -0,0 +1,35 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryStaticMesh extends ActorFactory
config(Editor)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
var() StaticMesh StaticMesh;
var() vector DrawScale3D;
defaultproperties
{
DrawScale3D=(X=1,Y=1,Z=1)
MenuName="Add StaticMesh"
NewActorClass=class'Engine.StaticMeshActor'
}

View File

@ -0,0 +1,15 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryTrigger extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
defaultproperties
{
MenuName="Add Trigger"
NewActorClass=class'Engine.Trigger'
bShowInEditorQuickMenu=true
}

View File

@ -0,0 +1,31 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class ActorFactoryVehicle extends ActorFactory
config(Editor)
native;
cpptext
{
virtual AActor* CreateActor( const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData );
/**
* If the ActorFactory thinks it could create an Actor with the current settings.
* Can Used to determine if we should add to context menu or if the factory can be used for drag and drop.
*
* @param OutErrorMsg Receives localized error string name if returning FALSE.
* @param bFromAssetOnly If true, the actor factory will check that a valid asset has been assigned from selection. If the factory always requires an asset to be selected, this param does not matter
* @return True if the actor can be created with this factory
*/
virtual UBOOL CanCreateActor( FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE );
virtual AActor* GetDefaultActor();
};
var() class<Vehicle> VehicleClass;
defaultproperties
{
VehicleClass=class'Vehicle'
bPlaceable=false
}

79
Engine/Classes/Admin.uc Normal file
View File

@ -0,0 +1,79 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class Admin extends PlayerController
config(Game);
simulated event PostBeginPlay()
{
Super.PostBeginPlay();
AddCheats();
}
// Execute an administrative console command on the server.
exec function Admin( string CommandLine )
{
ServerAdmin(CommandLine);
}
reliable server function ServerAdmin( string CommandLine )
{
local string Result;
Result = ConsoleCommand( CommandLine );
if( Result!="" )
ClientMessage( Result );
}
exec function KickBan( string S )
{
ServerKickBan(S);
}
reliable server function ServerKickBan( string S )
{
WorldInfo.Game.KickBan(S);
}
exec function Kick( string S )
{
ServerKick(S);
}
reliable server function ServerKick( string S )
{
WorldInfo.Game.Kick(S);
}
exec function PlayerList()
{
local PlayerReplicationInfo PRI;
`log("Player List:");
ForEach DynamicActors(class'PlayerReplicationInfo', PRI)
`log(PRI.PlayerName@"( ping"@PRI.Ping$")");
}
exec function RestartMap()
{
ServerRestartMap();
}
reliable server function ServerRestartMap()
{
ClientTravel( "?restart", TRAVEL_Relative );
}
exec function Switch( string URL )
{
ServerSwitch(URL);
}
reliable server function ServerSwitch(string URL)
{
WorldInfo.ServerTravel(URL);
}
defaultproperties
{
}

View File

@ -0,0 +1,24 @@
//=============================================================================
// AdvancedReachSpec.
//
// An AdvancedReachspec can only be used by Controllers with bCanDoSpecial==true
//
// Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
class AdvancedReachSpec extends ReachSpec
native;
cpptext
{
virtual FPlane PathColor()
{
// purple path = advanced
return FPlane(1.f,0.f,1.f, 0.f);
}
virtual INT CostFor(APawn* P);
}
defaultproperties
{
bCanCutCorners=false
}

25
Engine/Classes/AkBank.uc Normal file
View File

@ -0,0 +1,25 @@
class AkBank extends Object
native;
var() bool AutoLoad; // Auto-load bank when its package is accessed for the first time
var() bool GenerateDefinition; // This bank is part of the 'Generate All Definitions' list
cpptext
{
virtual void PostLoad();
virtual void BeginDestroy();
UBOOL Load();
UBOOL LoadAsync( void* in_pfnBankCallback, void* in_pCookie );
void Unload();
void UnloadAsync( void* in_pfnBankCallback, void* in_pCookie );
void GetEventsReferencingBank( TArray<UAkEvent*>& Events );
void GenerateDefinitionFile();
}
defaultproperties
{
AutoLoad=true
GenerateDefinition=true
}

View File

@ -0,0 +1,13 @@
/**
* Common Base class for AkEvents and SoundCues.
* The goal is mainly to reduce the footprint in the integration.
*/
class AkBaseSoundObject extends Object
native
abstract;
cpptext
{
virtual UBOOL IsAudible( const FVector& SourceLocation, const FVector& ListenerLocation, AActor* SourceActor, INT& bIsOccluded, UBOOL bCheckOcclusion ) {return FALSE;}
}

108
Engine/Classes/AkEvent.uc Normal file
View File

@ -0,0 +1,108 @@
class AkEvent extends AkBaseSoundObject
native;
var() AkBank RequiredBank;
/** The range at which the sound has attenuated completely (-1: no sound; 0: 2D; 3D otherwise) */
var(TW) const float MaxAudibleDistance<EditCondition=bOverrideMaxAudibleDistance>;
/** (Advanced) Check this flag to be able to modify MaxAudibleDistance instead of using the "MaxAttenuation" value from WWise */
var(TW) const bool bOverrideMaxAudibleDistance;
/** How long this event plays for */
var(TW) editconst float Duration;
/** Whether the sound is modified by the distance to listener */
var(TW) const bool bUseListenerDistance;
/** Whether to use the environment this event is played in to determine what sound Wwise should play */
var(TW) const bool bUseEnvironmentReverbSwitchGroup;
/** Whether to have the Doppler effect applied */
var(TW) const bool bUseDoppler;
/** Forces this event to be played at a location (using a pooled component) when played from WwiseClientHearSound */
var(TW) const bool bForceHearSoundLocational;
/** Whether this event needs its occlusion updated over time */
var(TW) const bool bNeedsOcclusionUpdates<EditCondition=!bNeverOcclude>;
/** How often to update occlusion or obstruction on owning component. Zero means never check. */
var const float OcclusionUpdateInterval;
/** If set, skip occlusion trace for updates (overrides bNeedsOcclusionUpdates) AND the initial audible test */
var(TW) const bool bNeverOcclude;
/** Whether this event is a background music track or not (used to set up exit cue callback) */
var(TW) const bool bIsMusicTrack;
struct native EventSwitchInfo
{
var() name SwitchGroupName;
var name SwitchName;
};
struct native EventRTPCInfo
{
var() name RTPCName;
var float RTPCValue;
};
/** Add a tag if you want this event to use a specific Wwise game sync (switch/RTPC).
* In script, you will then have to check for the tag and add a game sync to the
* appropriate custom array.
*/
var(TW) array<Name> CustomTags;
var transient array<EventSwitchInfo> CustomSwitches;
var transient array<EventRTPCInfo> CustomRTPCs;
/** Whether to use advanced sound functionality with the sound
* having a rotational direction, and able to play dynamic
* echo sounds
*/
var(Advanced) bool bUseAdvancedSoundFunctionality;
/** Left Front Echo Sound */
var(Advanced) AkEvent EchoFront<EditCondition=bUseAdvancedSoundFunctionality>;
/** Right Front Echo Sound */
var(Advanced) AkEvent EchoLeft<EditCondition=bUseAdvancedSoundFunctionality>;
/** Left Rear Echo Sound */
var(Advanced) AkEvent EchoRight<EditCondition=bUseAdvancedSoundFunctionality>;
/** Right Rear Echo Sound */
var(Advanced) AkEvent EchoRear<EditCondition=bUseAdvancedSoundFunctionality>;
/** Mono Echo Sound */
var(Advanced) AkEvent EchoMono<EditCondition=bUseAdvancedSoundFunctionality>;
cpptext
{
virtual void PostLoad();
void FixRequiredBank();
UBOOL IsAudible( const FVector& SourceLocation, const FVector& ListenerLocation, AActor* SourceActor, INT& bIsOccluded, UBOOL bCheckOcclusion );
UBOOL LoadBank();
#if __TW_WWISE_ && WITH_EDITOR
void GenerateDefaultSettings();
void GenerateMaxAudibleDistance();
void GenerateMaxDuration();
#endif
};
simulated function SetCustomRTPC( name RTPCName, float RTPCValue )
{
local int RTPCIdx;
RTPCIdx = CustomRTPCs.Find( 'RTPCName', RTPCName );
if( RTPCIdx == INDEX_NONE )
{
CustomRTPCs.Add( 1 );
RTPCIdx = CustomRTPCs.Length - 1;
CustomRTPCs[RTPCIdx].RTPCName = RTPCName;
}
CustomRTPCs[RTPCIdx].RTPCValue = RTPCValue;
}
defaultproperties
{
MaxAudibleDistance=4000.0
OcclusionUpdateInterval=0.2
}

View File

@ -0,0 +1,25 @@
class AlienFXLEDInterface extends PlatformInterfaceBase
native(PlatformInterface);
var int Red;
var int Green;
var int Blue;
/**
* Perform any initialization
*/
native event Init();
native event Activate();
native event bool SetColor(byte RedPercent, byte GreenPercent, byte BluePercent, byte Brightness = 255);
native event bool LedRestoreLighting();
native event bool LedStopEffects();
native function UpdateAlienFX();
//Depreciated dont use
native event bool LEDSetFlashingRBG(byte redPercentage, byte greenPercentage, byte bluePercentage,
int milliSecondsDuration, int milliSecondsInterval);
//Depreciated dont use
native event bool LEDPulseLighting(byte redPercentage, byte greenPercentage, byte bluePercentage, int
milliSecondsDuration, int milliSecondsInterval);

View File

@ -0,0 +1,206 @@
/**
* AmbientOcclusionEffect - A screen space ambient occlusion implementation.
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AmbientOcclusionEffect extends PostProcessEffect
native;
/** The color that will replace scene color where there is a lot of occlusion. */
var(Color) interp LinearColor OcclusionColor;
/**
* Power to apply to the calculated occlusion value.
* Higher powers result in more contrast, but will need other factors like OcclusionScale to be tweaked as well.
*/
var(Color) float OcclusionPower <UIMin=0.1 | UIMax=20.0>;
/** Scale to apply to the calculated occlusion value. */
var(Color) float OcclusionScale <UIMin=0.0 | UIMax=10.0>;
/** Bias to apply to the calculated occlusion value. */
var(Color) float OcclusionBias <UIMin=-1.0 | UIMax=4.0>;
/** Minimum occlusion value after all other transforms have been applied. */
var(Color) float MinOcclusion;
/** SSAO2 is SSAO with quality improvements, it is now the new method so the flag is no longer needed */
var deprecated bool SSAO2;
/** SSAO quality improvements, less noise, more detail, no darkening of flat surfaces, no overbright on convex, parameter retweak needed */
var(Occlusion) bool bAngleBasedSSAO;
/** Distance to check around each pixel for occluders, in world units. */
var(Occlusion) float OcclusionRadius <UIMin=0.0 | UIMax=256.0>;
/** Attenuation factor that determines how much to weigh in samples based on distance, larger values result in a faster falloff over distance. */
var deprecated float OcclusionAttenuation <UIMin=0.0 | UIMax=10.0>;
enum EAmbientOcclusionQuality
{
AO_High,
AO_Medium,
AO_Low
};
/**
* Quality of the ambient occlusion effect. Low quality gives the best performance and is appropriate for gameplay.
* Medium quality smooths noise between frames at a slightly higher performance cost. High quality uses extra samples to preserve detail.
*/
var(Occlusion) EAmbientOcclusionQuality OcclusionQuality;
/**
* Distance at which to start fading out the occlusion factor, in world units.
* This is useful for hiding distant artifacts on skyboxes.
*/
var(Occlusion) float OcclusionFadeoutMinDistance;
/** Distance at which the occlusion factor should be fully faded, in world units. */
var(Occlusion) float OcclusionFadeoutMaxDistance;
/**
* Distance in front of a pixel that an occluder must be to be considered a different object, in world units.
* This threshold is used to identify halo regions around nearby objects, for example a first person weapon.
*/
var(Halo) float HaloDistanceThreshold;
/**
* Scale factor to increase HaloDistanceThreshold for distant pixels.
* A value of .001 would result in HaloDistanceThreshold being 1 unit larger at a distance of 1000 world units.
*/
var(Halo) float HaloDistanceScale;
/**
* Occlusion factor to assign to samples determined to be contributing to a halo.
* 0 would result in full occlusion for that sample, increasing values map to quadratically decreasing occlusion values.
*/
var(Halo) float HaloOcclusion;
/** Difference in depth that two pixels must be to be considered an edge, and therefore not blurred across, in world units. */
var(Filter) float EdgeDistanceThreshold;
/**
* Scale factor to increase EdgeDistanceThreshold for distant pixels.
* A value of .001 would result in EdgeDistanceThreshold being 1 unit larger at a distance of 1000 world units.
*/
var(Filter) float EdgeDistanceScale;
/**
* Distance in world units which should map to the kernel size in screen space.
* This is useful to reduce filter kernel size for distant pixels and keep detail, at the cost of leaving more noise in the result.
*/
var(Filter) float FilterDistanceScale;
/** Size of the blur filter, in pixels. */
var deprecated int FilterSize;
/**
* Time in which the occlusion history should approximately converge.
* Longer times (.5s) allow more smoothing between frames and less noise but history streaking is more noticeable.
* 0 means the feature is off (less GPU performance and memory overhead)
*/
var(History) float HistoryConvergenceTime;
/**
* Time in which the weight history should approximately converge.
*/
var float HistoryWeightConvergenceTime;
`if(`__TW_GAMEWORKS_HBAO_)
/** AO radius in meters */
var(HBAO) float HBAO_Radius;
/** To hide low-tessellation artifacts, 0.0~1.0 */
var(HBAO) float HBAO_Bias;
/** Scale factor for the detail AO, the greater the darker, 0.0~2.0 */
var(HBAO) float HBAO_DetailAO;
/** Scale factor for the coarse AO, the greater the darker, 0.0~2.0 */
var(HBAO) float HBAO_CoarseAO;
/** Final AO output is pow(AO, powerExponent) */
var(HBAO) float HBAO_PowerExponent;
/** To return white AO for ViewDepths > MaxViewDepth */
var(HBAO) bool HBAO_EnableDepthThreshold;
/** Custom view-depth threshold */
var(HBAO) float HBAO_MaxViewDepth;
/** The higher, the sharper the AO-to-white transitions */
var(HBAO) float HBAO_Sharpness;
/** To blur the AO with an edge-preserving blur */
var(HBAO) bool HBAO_EnableBlur;
/** BLUR_RADIUS_2, BLUR_RADIUS_4, or BLUR_RADIUS_8 */
enum EHBAOBlurRadius
{
HBAO_BLUR_RADIUS_2,
HBAO_BLUR_RADIUS_4,
HBAO_BLUR_RADIUS_8
};
var(HBAO) EHBAOBlurRadius HBAO_BlurRadius;
/** The higher, the more the blur preserves edges, 0.0~16.0 */
var(HBAO) float HBAO_BlurSharpness;
`endif
cpptext
{
// UPostProcessEffect interface
/**
* Creates a proxy to represent the render info for a post process effect
* @param WorldSettings - The world's post process settings for the view.
* @return The proxy object.
*/
virtual class FPostProcessSceneProxy* CreateSceneProxy(const FPostProcessSettings* WorldSettings);
/**
* @param View - current view
* @return TRUE if the effect should be rendered
*/
virtual UBOOL IsShown(const FSceneView* View) const;
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
}
defaultproperties
{
bAffectsLightingOnly=TRUE
SceneDPG = SDPG_World;
OcclusionColor=(R=0.0,G=0.0,B=0.0,A=1.0)
OcclusionPower=4.0
OcclusionScale=20.0
OcclusionBias=0
MinOcclusion=.1
OcclusionRadius=25.0
OcclusionQuality=AO_Medium
OcclusionFadeoutMinDistance=4000.0
OcclusionFadeoutMaxDistance=4500.0
HaloDistanceThreshold=40.0
HaloDistanceScale=.1
HaloOcclusion=.04
EdgeDistanceThreshold=10.0
EdgeDistanceScale=.003
FilterDistanceScale=10.0
HistoryConvergenceTime=0
HistoryWeightConvergenceTime=.07
bAngleBasedSSAO=FALSE
`if(`__TW_GAMEWORKS_HBAO_)
HBAO_Radius=1.0
HBAO_Bias=0.1
HBAO_DetailAO=0.0
HBAO_CoarseAO=1.0
HBAO_PowerExponent=2.0
HBAO_EnableDepthThreshold=false
HBAO_MaxViewDepth=0.0
HBAO_Sharpness=100.0
HBAO_EnableBlur=true
HBAO_BlurRadius=HBAO_BLUR_RADIUS_4
HBAO_BlurSharpness=4.0
`endif
}

View File

@ -0,0 +1,46 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
// Base ambient sound actor
class AmbientSound extends Keypoint
AutoExpandCategories( Audio )
ClassGroup(Sounds)
native( Sound );
/** Should the audio component automatically play on load? */
var() bool bAutoPlay;
/** Audio component to play */
var( Audio ) editconst const AudioComponent AudioComponent;
/** Is the audio component currently playing? */
var private bool bIsPlaying;
defaultproperties
{
Begin Object NAME=Sprite
Sprite=Texture2D'EditorResources.AmbientSoundIcons.S_Ambient_Sound'
Scale=0.25
SpriteCategoryName="Sounds"
End Object
Begin Object Class=DrawSoundRadiusComponent Name=DrawSoundRadius0
SphereColor=(R=255,G=153,B=0)
End Object
Components.Add(DrawSoundRadius0)
Begin Object Class=AudioComponent Name=AudioComponent0
PreviewSoundRadius=DrawSoundRadius0
bAutoPlay=false
bStopWhenOwnerDestroyed=true
bShouldRemainActiveIfDropped=true
End Object
AudioComponent=AudioComponent0
Components.Add(AudioComponent0)
bAutoPlay=TRUE
RemoteRole=ROLE_None
}

View File

@ -0,0 +1,25 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
// An ambient sound that moves in the world
class AmbientSoundMovable extends AmbientSound
native( Sound );
defaultproperties
{
Begin Object NAME=Sprite
Sprite=Texture2D'EditorResources.AmbientSoundIcons.S_Ambient_Sound_Moveable'
Scale=0.25
End Object
Begin Object Name=DrawSoundRadius0
SphereColor=(R=102,G=204,B=51)
End Object
TickGroup=TG_DuringAsyncWork
Physics=PHYS_Interpolating
bMovable=TRUE
bStatic=FALSE
}

View File

@ -0,0 +1,30 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
// Version of AmbientSoundSimple that picks a random non-looping sound to play.
class AmbientSoundNonLoop extends AmbientSoundSimple
native( Sound );
defaultproperties
{
DrawScale=2.0
Begin Object NAME=Sprite
Sprite=Texture2D'EditorResources.AmbientSoundIcons.S_Ambient_Sound_Non_Loop'
Scale=0.25
End Object
Begin Object Name=DrawSoundRadius0
SphereColor=(R=255,G=0,B=51)
End Object
Begin Object Name=AudioComponent0
bShouldRemainActiveIfDropped=true
End Object
Begin Object Class=SoundNodeAmbientNonLoop Name=SoundNodeAmbientNonLoop0
End Object
SoundNodeInstance=SoundNodeAmbientNonLoop0
}

View File

@ -0,0 +1,30 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
// Version of AmbientSoundToggleable that picks a random non-looping sound to play.
class AmbientSoundNonLoopingToggleable extends AmbientSoundSimpleToggleable
native( Sound );
defaultproperties
{
DrawScale=1.0
Begin Object NAME=Sprite
Sprite=Texture2D'EditorResources.AmbientSoundIcons.S_Ambient_Sound_Non_Loop'
Scale=0.25
End Object
Begin Object Name=DrawSoundRadius0
SphereColor=(R=255,G=0,B=51)
End Object
Begin Object Name=AudioComponent0
bShouldRemainActiveIfDropped=true
End Object
Begin Object Class=SoundNodeAmbientNonLoopToggle Name=SoundNodeAmbientNonLoopToggle0
End Object
SoundNodeInstance=SoundNodeAmbientNonLoopToggle0
}

View File

@ -0,0 +1,38 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
// A simplified ambient sound actor for enhanced workflow
class AmbientSoundSimple extends AmbientSound
hidecategories( Audio )
AutoExpandCategories( AmbientSoundSimple )
native( Sound );
/** Mirrored property for easier editability, set in Spawned. */
var() editinline editconst SoundNodeAmbient AmbientProperties;
/** Dummy sound cue property to force instantiation of subobject. */
var editinline export const SoundCue SoundCueInstance;
/** Dummy sound node property to force instantiation of subobject. */
var editinline export const SoundNodeAmbient SoundNodeInstance;
defaultproperties
{
Begin Object NAME=Sprite
Sprite=Texture2D'EditorResources.AmbientSoundIcons.S_Ambient_Sound_Simple'
Scale=0.25
End Object
Begin Object Name=DrawSoundRadius0
SphereColor=(R=0,G=102,B=255)
End Object
Begin Object Class=SoundNodeAmbient Name=SoundNodeAmbient0
End Object
SoundNodeInstance=SoundNodeAmbient0
Begin Object Class=SoundCue Name=SoundCue0
SoundClass=Ambient
End Object
SoundCueInstance=SoundCue0
}

View File

@ -0,0 +1,42 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
/**
* The class works similar to AmbientSoundSpline, but it allows to bind many waves as sound sources (instead of single sound cue). Moreover for each wave a range on spline can be defined.
*/
class AmbientSoundSimpleSpline extends AmbientSoundSpline
AutoExpandCategories( AmbientSoundSpline )
native( Sound );
/** Index of currently edited sound-slot */
var(AmbientSoundSpline) editoronly int EditedSlot<ToolTip=Index of currently edited slot.>;
cpptext
{
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
}
defaultproperties
{
Begin Object NAME=Sprite
Sprite=Texture2D'EditorResources.AmbientSoundIcons.S_Ambient_Sound_Simple'
Scale=0.25
End Object
Components.Remove( AudioComponent1 )
Begin Object Name=DrawSoundRadius0
SphereColor=(R=0,G=102,B=255)
End Object
Begin Object Class=SimpleSplineAudioComponent Name=AudioComponent2
PreviewSoundRadius=DrawSoundRadius0
bAutoPlay=false
bStopWhenOwnerDestroyed=true
bShouldRemainActiveIfDropped=true
End Object
AudioComponent=AudioComponent2
Components.Add(AudioComponent2)
}

View File

@ -0,0 +1,29 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AmbientSoundSimpleSplineNonLoop extends AmbientSoundSimpleSpline;
defaultproperties
{
Begin Object Name=DrawSoundRadius0
SphereColor=(R=255,G=0,B=51)
End Object
Begin Object NAME=Sprite
Sprite=Texture2D'EditorResources.AmbientSoundIcons.S_Ambient_Sound_Non_Loop'
Scale=0.25
End Object
Components.Remove( AudioComponent2 )
Begin Object Class=SimpleSplineNonLoopAudioComponent Name=AudioComponent3
PreviewSoundRadius=DrawSoundRadius0
bAutoPlay=false
bStopWhenOwnerDestroyed=true
bShouldRemainActiveIfDropped=true
End Object
AudioComponent=AudioComponent3
Components.Add(AudioComponent3)
}

View File

@ -0,0 +1,146 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
// An ambient sound that can be turned on or off
class AmbientSoundSimpleToggleable extends AmbientSoundSimple
AutoExpandCategories( AmbientSoundSimpleToggleable )
native( Sound );
/** used to update status of toggleable level placed ambient sounds on clients */
var repnotify bool bCurrentlyPlaying;
var() bool bFadeOnToggle;
var() float FadeInDuration;
var() float FadeInVolumeLevel;
var() float FadeOutDuration;
var() float FadeOutVolumeLevel;
/** Used to track whether the sound's auto-play setting should be ignored or not */
var transient bool bIgnoreAutoPlay;
struct CheckpointRecord
{
var bool bCurrentlyPlaying;
};
replication
{
if( Role == ROLE_Authority )
bCurrentlyPlaying;
}
simulated event PostBeginPlay()
{
Super.PostBeginPlay();
bCurrentlyPlaying = AudioComponent.bAutoPlay;
}
simulated event ReplicatedEvent(name VarName)
{
if( VarName == 'bCurrentlyPlaying' )
{
if( bCurrentlyPlaying )
{
StartPlaying();
}
else
{
StopPlaying();
}
}
else
{
Super.ReplicatedEvent( VarName );
}
}
simulated function StartPlaying()
{
if( bFadeOnToggle )
{
AudioComponent.FadeIn( FadeInDuration, FadeInVolumeLevel );
}
else
{
AudioComponent.Play();
}
bCurrentlyPlaying = TRUE;
}
simulated function StopPlaying()
{
if( bFadeOnToggle )
{
AudioComponent.FadeOut( FadeOutDuration, FadeOutVolumeLevel );
}
else
{
AudioComponent.Stop();
}
bCurrentlyPlaying = FALSE;
}
/**
* Handling Toggle event from Kismet.
*/
simulated function OnToggle( SeqAct_Toggle Action )
{
if( Action.InputLinks[0].bHasImpulse || ( Action.InputLinks[2].bHasImpulse && !AudioComponent.bWasPlaying ) )
{
StartPlaying();
}
else
{
// The sound has been intentionally toggled off, ignore autoplay from now on
bIgnoreAutoPlay = TRUE;
StopPlaying();
}
// we now need to replicate this Actor so clients get the updated status
ForceNetRelevant();
}
function CreateCheckpointRecord( out CheckpointRecord Record )
{
Record.bCurrentlyPlaying = bCurrentlyPlaying;
}
function ApplyCheckpointRecord( const out CheckpointRecord Record )
{
bCurrentlyPlaying = Record.bCurrentlyPlaying;
if( bCurrentlyPlaying )
{
StartPlaying();
}
else
{
StopPlaying();
}
}
defaultproperties
{
Begin Object NAME=Sprite
Sprite=Texture2D'EditorResources.AmbientSoundIcons.S_Ambient_Sound_Toggleable'
Scale=0.25
End Object
Begin Object Name=DrawSoundRadius0
SphereColor=(R=255,G=255,B=102)
End Object
bAutoPlay=FALSE
bStatic=false
bNoDelete=true
bIgnoreAutoPlay=FALSE
FadeInDuration=1.f
FadeInVolumeLevel=1.f
FadeOutDuration=1.f
FadeOutVolumeLevel=0.f
}

View File

@ -0,0 +1,61 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
/**
* Sound is emmited by virtual speaker. Virtual speaker is placed in evaluated in the mean loudest position in listener's scope.
* The points used to virtual speaker evaluation are placed on spline.
*/
class AmbientSoundSpline extends AmbientSound
AutoExpandCategories( AmbientSoundSpline )
native( Sound );
/**
* Maximal distance on spline between points, that are used to eval virtual speaker position (Minimal number of points is 3)
* Points are placed on spline automatically.
*/
var(AmbientSoundSpline) editoronly float DistanceBetweenPoints<ToolTip=Maximal distance on spline between points, that are used to eval virtual speaker position (Minimal number of points is 3).>;
/** SplineComponent with spline curve defining the source of sound */
var(AmbientSoundSpline) editoronly SplineComponent SplineComponent;
/** Only to test algorithm finding nearest point. Editor shows virtual speaker position for listener placed in TestPoint.*/
var editoronly vector TestPoint;
cpptext
{
virtual void PostLoad();
virtual void PostEditMove(UBOOL bFinished);
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
#if WITH_EDITOR
virtual void EditorApplyTranslation(const FVector& DeltaTranslation, UBOOL bAltDown, UBOOL bShiftDown, UBOOL bCtrlDown);
/** Force all spline data to be consistent. */
virtual void UpdateSpline();
/** Recalculate spline after any control point was moved. */
virtual void UpdateSplineGeometry();
#endif
}
defaultproperties
{
DistanceBetweenPoints=200.0
Components.Remove( AudioComponent0 )
Begin Object Class=SplineComponentSimplified Name=SplineComponent0
End Object
SplineComponent=SplineComponent0
Components.Add( SplineComponent0 )
Begin Object Class=SplineAudioComponent Name=AudioComponent1
PreviewSoundRadius=DrawSoundRadius0
bAutoPlay=false
bStopWhenOwnerDestroyed=true
bShouldRemainActiveIfDropped=true
End Object
AudioComponent=AudioComponent1
Components.Add(AudioComponent1)
}

View File

@ -0,0 +1,36 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AmbientSoundSplineMultiCue extends AmbientSoundSpline
AutoExpandCategories( AmbientSoundSpline )
native( Sound );
/** Index of currently edited sound-slot */
var(AmbientSoundSpline) editoronly int EditedSlot<ToolTip=Index of currently edited slot.>;
cpptext
{
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
}
defaultproperties
{
Begin Object NAME=Sprite
Sprite=Texture2D'EditorResources.AmbientSoundIcons.S_Ambient_Sound_Simple'
Scale=0.25
End Object
Components.Remove( AudioComponent1 )
Begin Object Class=MultiCueSplineAudioComponent Name=AudioComponent2
PreviewSoundRadius=DrawSoundRadius0
bAutoPlay=false
bStopWhenOwnerDestroyed=true
bShouldRemainActiveIfDropped=true
End Object
AudioComponent=AudioComponent2
Components.Add(AudioComponent2)
}

View File

@ -0,0 +1,225 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*
* This is the base class for per-platform support for uploading analytics events
*/
class AnalyticEventsBase extends PlatformInterfaceBase
native(PlatformInterface)
config(Engine);
/** Named param/value string pairing */
struct native EventStringParam
{
/** parameter name */
var string ParamName;
/** parameter value */
var string ParamValue;
structcpptext
{
FEventStringParam(const FString& InNameStr,const FString& InValueStr)
{
appMemzero(this, sizeof(FEventStringParam));
ParamName = InNameStr;
ParamValue = InValueStr;
}
FEventStringParam(EEventParm)
{
appMemzero(this, sizeof(FEventStringParam));
}
}
};
/** TRUE if a session has been started and is currently in progress */
var const bool bSessionInProgress;
/**
* TRUE if the analytics session should be auto started and stopped on application
* startup. This makes it easier, but some providers may require additional information
* before a session can be started.
*
* For example, Swrve requires a UserId to be set before a session can be started.
* Since this may come from an outside source (backend server), it might not be possible
* to start the analytics session immediately.
*
* If this value is false, StartSession and EndSession must be called manually by the
* game code at some point.
*/
var config bool bAutoStartSession;
/**
* When the app is paused (backgrounded on iOS) for more than the specified number
* of seconds, it signals supporting analytics providers to restart the session.
* Idea is that if a user backgrounds the app for a brief period, the session should
* not end, but if they don't come back to the app for a period of time, it should
* constitute a new session.
*
* A value of zero means the session should not be restarted when paused for any length of time.
*
* Most analytics providers have a built-in timeout for a session that cannot
* be overridden, but it is usually quite long (ie, Swrve times out after 60 minutes).
*
* This is currently only supported on iOS.
*/
var config int SessionPauseThresholdSec;
/** stores the UserId if one has been provided. See SetUserID for details. */
var const string UserId;
/**
* @return TRUE if a session has been started and is currently in progress
*/
function bool IsSessionInProgress()
{
return bSessionInProgress;
}
/**
* Perform any initialization. Called once after singleton instantiation
*/
native event Init();
/**
* Set the UserID for use with analytics. Some providers require a unique ID
* to be provided when supplying events, and some providers create their own.
* If you are using a provider that requires you to supply the ID, use this
* method to set it. It is probably best for online games to use the McpId
*/
native event SetUserId(string NewUserId);
/**
* Start capturing stats for upload
*/
native event StartSession();
/**
* End capturing stats and queue the upload
*/
native event EndSession();
/**
* Adds a named event to the session
*
* @param EventName unique string for named event
* @param bTimed if true then event is logged with timing
*/
native event LogStringEvent(string EventName, bool bTimed);
/**
* Ends a timed string event
*
* @param EventName unique string for named event
*/
native event EndStringEvent(string EventName);
/**
* Adds a named event to the session with a single parameter/value
*
* @param EventName unique string for named
* @param ParamName parameter name for the event
* @param ParamValue parameter value for the event
* @param bTimed if true then event is logged with timing
*/
native event LogStringEventParam(string EventName, string ParamName, string ParamValue, bool bTimed);
/**
* Ends a timed event with a single parameter/value. Param values are updated for ended event.
*
* @param EventName unique string for named
* @param ParamName parameter name for the event
* @param ParamValue parameter value for the event
*/
native event EndStringEventParam(string EventName, string ParamName, string ParamValue);
/**
* Adds a named event to the session with an array of parameter/values
*
* @param EventName unique string for named
* @param ParamArray array of parameter name/value pairs
* @param bTimed if true then event is logged with timing
*/
native event LogStringEventParamArray(string EventName, array<EventStringParam> ParamArray, bool bTimed);
/**
* Ends a timed event with an array of parameter/values. Param values are updated for ended event unless array is empty
*
* @param EventName unique string for named
* @param ParamArray array of parameter name/value pairs. If array is empty ending the event wont update values
*/
native event EndStringEventParamArray(string EventName, array<EventStringParam> ParamArray);
/**
* Adds a named error event with corresponding error message
*
* @param ErrorName unique string for error event
* @param ErrorMessage message detailing the error encountered
*/
native event LogErrorMessage(string ErrorName, string ErrorMessage);
/**
* Update a single user attribute.
*
* Note that not all providers support user attributes. In this case this method
* is equivalent to sending a regular event.
*
* @param AttributeName - the name of the attribute
* @param AttributeValue - the value of the attribute.
*/
native event LogUserAttributeUpdate(string AttributeName, string AttributeValue);
/**
* Update an array of user attributes.
*
* Note that not all providers support user attributes. In this case this method
* is equivalent to sending a regular event.
*
* @param AttributeArray - the array of attribute name/values to set.
*/
native event LogUserAttributeUpdateArray(array<EventStringParam> AttributeArray);
/**
* Record an in-game purchase of a an item.
*
* Note that not all providers support item purchase events. In this case this method
* is equivalent to sending a regular event.
*
* @param ItemId - the ID of the item, should be registered with the provider first.
* @param Currency - the currency of the purchase (ie, Gold, Coins, etc), should be registered with the provider first.
* @param PerItemCost - the cost of one item in the currency given.
* @param ItemQuantity - the number of Items purchased.
*/
native event LogItemPurchaseEvent(string ItemId, string Currency, int PerItemCost, int ItemQuantity);
/**
* Record a purchase of in-game currency using real-world money.
*
* Note that not all providers support currency events. In this case this method
* is equivalent to sending a regular event.
*
* @param GameCurrencyType - type of in game currency purchased, should be registered with the provider first.
* @param GameCurrencyAmount - amount of in game currency purchased.
* @param RealCurrencyType - real-world currency type (like a 3-character ISO 4217 currency code, but provider dependent).
* @param RealMoneyCost - cost of the currency in real world money, expressed in RealCurrencyType units.
* @param PaymentProvider - Provider who brokered the transaction. Generally arbitrary, but examples are PayPal, Facebook Credits, App Store, etc.
*/
native event LogCurrencyPurchaseEvent(string GameCurrencyType, int GameCurrencyAmount, string RealCurrencyType, float RealMoneyCost, string PaymentProvider);
/**
* Record a gift of in-game currency from the game itself.
*
* Note that not all providers support currency events. In this case this method
* is equivalent to sending a regular event.
*
* @param GameCurrencyType - type of in game currency given, should be registered with the provider first.
* @param GameCurrencyAmount - amount of in game currency given.
*/
native event LogCurrencyGivenEvent(string GameCurrencyType, int GameCurrencyAmount);
/**
* Flush any cached events to the analytics provider.
*
* Note that not all providers support explicitly sending any cached events. In this case this method
* does nothing.
*/
native event SendCachedEvents();

View File

@ -0,0 +1,22 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
* Definition of AnimMetaData class
* Warning: those are not instanced per AnimNodeSequence, they are solely attached to an AnimSequence.
* Therefore they can be affecting multiple nodes at the same time!
*/
class AnimMetaData extends Object
native(Anim)
abstract
editinlinenew
hidecategories(Object)
collapsecategories;
cpptext
{
virtual void AnimSet(UAnimNodeSequence* SeqNode);
virtual void AnimUnSet(UAnimNodeSequence* SeqNode);
virtual void TickMetaData(UAnimNodeSequence* SeqNode);
}

View File

@ -0,0 +1,36 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimMetaData_SkelControl extends AnimMetaData
native(Anim);
/** List of Bone Controllers Names to control. */
var() Array<Name> SkelControlNameList;
/**
* If TRUE, then it requires bControlledByAnimMetadata to be set as well on the BoneController.
* It will then affect AnimMetadataWeight instead of ControlStrength.
* And BoneController will only be turned on if there is such metadata present in the animation.
* FALSE will set directly the BoneController's ControlStrength when that metadata is present.
*/
var() bool bFullControlOverController;
// deprecated.
var deprecated name SkelControlName;
cpptext
{
virtual void PostLoad();
virtual void AnimSet(UAnimNodeSequence* SeqNode);
virtual void AnimUnSet(UAnimNodeSequence* SeqNode);
virtual void TickMetaData(UAnimNodeSequence* SeqNode);
virtual UBOOL ShouldCallSkelControlTick(USkelControlBase* SkelControl, UAnimNodeSequence* SeqNode);
virtual void SkelControlTick(USkelControlBase* SkelControl, UAnimNodeSequence* SeqNode);
}
defaultproperties
{
bFullControlOverController=TRUE
}

View File

@ -0,0 +1,20 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimMetaData_SkelControlKeyFrame extends AnimMetaData_SkelControl
native(Anim);
/** Modifiers for what time and what strength for this skelcontrol **/
var() editinline array<TimeModifier> KeyFrames;
cpptext
{
virtual void SkelControlTick(USkelControlBase* SkelControl, UAnimNodeSequence* SeqNode);
}
defaultproperties
{
bFullControlOverController=FALSE
}

284
Engine/Classes/AnimNode.uc Normal file
View File

@ -0,0 +1,284 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNode extends AnimObject
native(Anim)
hidecategories(Object)
abstract;
/** Enumeration for slider types */
enum ESliderType
{
ST_1D,
ST_2D
};
/** Curve Key
@CurveName : Morph Target name to blend
@Weight : Weight of the Morph Target
**/
struct CurveKey
{
var name CurveName;
var float Weight;
};
/** This node is considered 'relevant' - that is, has >0 weight in the final blend. */
var transient const bool bRelevant;
/** set to TRUE when this node became relevant this round of updates. Will be set to false on the next tick. */
var transient const bool bJustBecameRelevant;
/** If TRUE, this node will be ticked, even if bPauseAnims is TRUE on the SkelMeshComp. */
var(Performance) bool bTickDuringPausedAnims;
/** This node is editor only and used for something like placement preview */
var const bool bEditorOnly;
/** Used to avoid ticking a node twice if it has multiple parents. */
var transient const int NodeTickTag;
/** Initialization tag, for deferred InitAnim. */
var transient const INT NodeInitTag;
/** Used to avoid a node triggerring event twice if it has multiple parents. */
var transient const int NodeEndEventTick;
/** Index in AnimTick Array. Serialized, because we serialize TickArrayIndex in UAnimTree. */
var const int TickArrayIndex;
/** Used to indicate whether the BoneAtom cache for this node is up-to-date or not. */
var transient const int NodeCachedAtomsTag;
/** Total apparent weight this node has in the final blend of all animations. */
var const float NodeTotalWeight;
/** Array of Parent nodes, which in most cases only has 1 element. */
var duplicatetransient Array<AnimNodeBlendBase> ParentNodes;
/** This is the name used to find an AnimNode by name from a tree. */
var() name NodeName;
/** Temporarily disable caching when calling Super::GetBoneAtoms so it's not done multiple times. */
var const transient bool bDisableCaching;
/** If a node is linked to more than once in the graph, this is a cache of the results, to avoid re-evaluating the results. */
var transient array<BoneAtom> CachedBoneAtoms;
/** Num Desired Bones used in CachedBoneAtoms. If we request something different, CachedBoneAtoms array is not going to be valid. */
var transient byte CachedNumDesiredBones;
/** Cached root motion delta, to avoid recalculating (see above). */
var transient BoneAtom CachedRootMotionDelta;
/** Cached bool indicating if node supplies root motion, to avoid recalculating (see above). */
var transient int bCachedHasRootMotion;
/** Cached curve keys to avoid recalculating (see above). */
var transient array<CurveKey> CachedCurveKeys;
/** used when iterating over nodes via GetNodes() and related functions to skip nodes that have already been processed */
var transient int SearchTag;
/** Array of blended curve key for editor only **/
var(Morph) editoronly editconst transient array<CurveKey> LastUpdatedAnimMorphKeys;
/** Flags to control if Script Events should be called. Note that those will affect performance, so be careful! */
var() bool bCallScriptEventOnInit;
var() bool bCallScriptEventOnBecomeRelevant;
var() bool bCallScriptEventOnCeaseRelevant;
cpptext
{
UAnimNode * GetAnimNode() { return this;}
// UAnimNode interface
/** Do any initialisation, and then call InitAnim on all children. Should not discard any existing anim state though. */
virtual void InitAnim( USkeletalMeshComponent* meshComp, UAnimNodeBlendBase* Parent );
/** Deferred Initialization, called only when the node is relevant in the tree. */
virtual void DeferredInitAnim() {}
/** Call DeferredInitAnim() if the node required it. Recurses through the Tree. Increase UAnimNode::CurrentSeachTag before calling. */
virtual void CallDeferredInitAnim();
/** AnimSets have been updated, update all animations */
virtual void AnimSetsUpdated() {}
/**
* Called just after a node has been copied from its AnimTreeTemplate version.
* This is called on the copy, and SourceNode is the node within the AnimTreeTemplate.
*/
virtual void PostAnimNodeInstance(UAnimNode* SourceNode, TMap<UAnimNode*,UAnimNode*>& SrcToDestNodeMap) {}
/**
* Called when we need to reset our values to the source. This is called on a node that already has all pointers set up correctly
*/
virtual void ResetAnimNodeToSource(UAnimNode *SourceNode);
/**
* Update this node, then call TickAnim on all children.
* @param DeltaSeconds Amount of time to advance this node.
* @param TotalWeight The eventual weight that this node will have in the final blend. This is the multiplication of weights of all nodes above this one.
*/
virtual void TickAnim(FLOAT DeltaSeconds) {}
/** Parent node is requesting a blend out. Give node a chance to delay that. */
virtual UBOOL CanBlendOutFrom() { return TRUE; }
/** parent node is requesting a blend in. Give node a chance to delay that. */
virtual UBOOL CanBlendTo() { return TRUE; }
/**
* Add this node and all children to array. Node are added so a parent is always before its children in the array.
* @param bForceTraversal Disables optimization when calling this from the root. (precached AnimTickArray returned).
*/
void GetNodes(TArray<UAnimNode*>& Nodes, bool bForceTraversal=FALSE);
/** Add this node and all children of the specified class to array. Node are added so a parent is always before its children in the array. */
void GetNodesByClass(TArray<class UAnimNode*>& Nodes, class UClass* BaseClass);
/** Return an array with all UAnimNodeSequence childs, including this node. */
void GetAnimSeqNodes(TArray<UAnimNodeSequence*>& Nodes, FName InSynchGroupName=NAME_None);
virtual void BuildParentNodesArray();
/** Used for building array of AnimNodes in 'tick' order - that is, all parents of a node are added to array before it. */
virtual void BuildTickArray(TArray<UAnimNode*>& OutTickArray) {}
/**
* Get the local transform for each bone. If a blend, will recursively ask children and blend etc.
* DesiredBones should be in strictly increasing order.
*/
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
/**
* Will copy the cached results into the OutAtoms array if they are up to date and return TRUE
* If cache is not up to date, does nothing and retuns FALSE.
*/
virtual UBOOL GetCachedResults(FBoneAtomArray& OutAtoms, FBoneAtom& OutRootMotionDelta, INT& bOutHasRootMotion, FCurveKeyArray& OutCurveKeys, INT NumDesiredBones);
/** Save the supplied array of BoneAtoms in the CachedBoneAtoms. */
virtual UBOOL ShouldSaveCachedResults();
void SaveCachedResults(const FBoneAtomArray& NewAtoms, const FBoneAtom& NewRootMotionDelta, INT bNewHasRootMotion, const FCurveKeyArray& NewCurveKeys, INT NumDesiredBones);
/**
* Whether we should keep the cached result for the next frame or not
* This is to avoid keeping cached result once it ticks.
* It will release cache result if this returns FALSE
**/
virtual UBOOL ShouldKeepCachedResult() { return FALSE; }
/**
* Clear Cached Result
**/
virtual void ClearCachedResult();
/** Get notification that this node has become relevant for the final blend. ie TotalWeight is now > 0 */
virtual void OnBecomeRelevant();
/** Get notification that this node is no longer relevant for the final blend. ie TotalWeight is now == 0 */
virtual void OnCeaseRelevant();
/** Utility for counting the number of parents of this node that have been ticked. */
UBOOL WereAllParentsTicked() const;
/** Returns TRUE if this node is a child of Node */
UBOOL IsChildOf(UAnimNode* Node);
/** Returns TRUE if this node is a child of Node */
UBOOL IsChildOf_Internal(UAnimNode* Node);
/** Optimisation way to see if this is a UAnimTree */
virtual UAnimTree* GetAnimTree() { return NULL; }
virtual void SetAnim( FName SequenceName ) {}
virtual void SetPosition( FLOAT NewTime, UBOOL bFireNotifies ) {}
/** Override these functions to disable loading of editor only nodes */
virtual UBOOL NeedsLoadForClient() const;
virtual UBOOL NeedsLoadForServer() const;
/// ANIMTREE EDITOR
/**
* Draws this node in the AnimTreeEditor.
*
* @param Canvas The canvas to use.
* @param SelectedNodes Reference to array of all currently selected nodes, potentially including this node
* @param bShowWeight If TRUE, show the global percentage weight of this node, if applicable.
*/
virtual void DrawNode(FCanvas* Canvas, const TArray<UAnimObject*>& SelectedNodes, UBOOL bShowWeight) { DrawAnimNode(Canvas, SelectedNodes, bShowWeight); }
/**
* Draws this anim node in the AnimTreeEditor.
*
* @param Canvas The canvas to use.
* @param SelectedNodes Reference to array of all currently selected nodes, potentially including this node
* @param bShowWeight If TRUE, show the global percentage weight of this node, if applicable.
*/
virtual void DrawAnimNode(FCanvas* Canvas, const TArray<UAnimObject*>& SelectedNodes, UBOOL bShowWeight) {}
/** Return title to display for this Node in the AnimTree editor. */
virtual FString GetNodeTitle() { return TEXT(""); }
/** For editor use. */
virtual FIntPoint GetConnectionLocation(INT ConnType, int ConnIndex);
/** Return the number of sliders */
virtual INT GetNumSliders() const { return 0; }
/** Return the slider type of slider Index */
virtual ESliderType GetSliderType(INT InIndex) const { return ST_1D; }
/** Return current position of slider for this node in the AnimTreeEditor. Return value should be within 0.0 to 1.0 range. */
virtual FLOAT GetSliderPosition(INT SliderIndex, INT ValueIndex) { return 0.f; }
/** Called when slider is moved in the AnimTreeEditor. NewSliderValue is in range 0.0 to 1.0. */
virtual void HandleSliderMove(INT SliderIndex, INT ValueIndex, FLOAT NewSliderValue) {}
/** Get the number to draw under the slider to show the current value being previewed. */
virtual FString GetSliderDrawValue(INT SliderIndex) { return FString(TEXT("")); }
/** internal code for GetNodes(); should only be called from GetNodes() or from the GetNodesInternal() of this node's parent */
virtual void GetNodesInternal(TArray<UAnimNode*>& Nodes);
/** Called after (copy/)pasted - reset values or re-link if needed**/
virtual void OnPaste();
// STATIC ANIMTREE UTILS
/** flag to prevent calling GetNodesInternal() from anywhere besides GetNodes() or another GetNodesInternal(), since
* we can't make it private/protected because UAnimNodeBlendBase needs to be able to call it on its children
*/
static UBOOL bNodeSearching;
/** current tag value used for SearchTag on nodes being iterated over. Incremented every time a new search is started */
static INT CurrentSearchTag;
/** Array to keep track of those nodes requiring an actual clear of the cache */
static TArray<UAnimNode*> NodesRequiringCacheClear;
/**
* Fills the Atoms array with the specified skeletal mesh reference pose.
*
* @param Atoms [out] Output array of relative bone transforms. Must be the same length as RefSkel when calling function.
* @param DesiredBones Indices of bones we want to modify. Parents must occur before children.
* @param RefSkel Input reference skeleton to create atoms from.
*/
static void FillWithRefPose(TArray<FBoneAtom>& Atoms, const TArray<BYTE>& DesiredBones, const TArray<struct FMeshBone>& RefSkel);
static void FillWithRefPose(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, const TArray<struct FMeshBone>& RefSkel);
/** Utility for taking an array of bone indices and ensuring that all parents are present (ie. all bones between those in the array and the root are present). */
static void EnsureParentsPresent( TArray<BYTE>& BoneIndices, USkeletalMesh* SkelMesh );
/** Utility functions to ease off Casting */
virtual class UAnimNodeSlot* GetAnimNodeSlot() { return NULL; }
virtual class UAnimNodeAimOffset* GetAnimNodeAimOffset() { return NULL; }
virtual class UAnimNodeSequence* GetAnimNodeSequence() { return NULL; }
}
/** Called from InitAnim. Allows initialization of script-side properties of this node. */
event OnInit();
/** Get notification that this node has become relevant for the final blend. ie TotalWeight is now > 0 */
event OnBecomeRelevant();
/** Get notification that this node is no longer relevant for the final blend. ie TotalWeight is now == 0 */
event OnCeaseRelevant();
/**
* Find an Animation Node in the Animation Tree whose NodeName matches InNodeName.
* Will search this node and all below it.
* Warning: The search is O(n^2), so for large AnimTrees, cache result.
*/
native final function AnimNode FindAnimNode(name InNodeName);
native function PlayAnim(bool bLoop = false, float Rate = 1.0f, float StartTime = 0.0f);
native function StopAnim();
// calls PlayAnim with the current settings
native function ReplayAnim();

View File

@ -0,0 +1,37 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeAdditiveBlending extends AnimNodeBlend
native(Anim);
/**
* if TRUE, pass through (skip additive animation blending) when mesh is not rendered
*/
var(Performance) bool bPassThroughWhenNotRendered;
cpptext
{
virtual void InitAnim(USkeletalMeshComponent* MeshComp, UAnimNodeBlendBase* Parent);
virtual void TickAnim(FLOAT DeltaSeconds);
void GetChildAtoms(INT ChildIndex, FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
}
/**
* Overridden so we can keep child zero weight at 1.
*/
native function SetBlendTarget( float BlendTarget, float BlendTime );
defaultproperties
{
bPassThroughWhenNotRendered=TRUE
bFixNumChildren=TRUE
Children(0)=(Name="Base Anim Input",Weight=1.f)
Children(1)=(Name="Additive Anim Input",Weight=1.f)
Child2Weight=1.f
Child2WeightTarget=1.f
CategoryDesc = "Additive"
}

View File

@ -0,0 +1,255 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeAimOffset extends AnimNodeBlendBase
native(Anim)
hidecategories(Object);
/**
* 9 control points range:
*
* Left Center Right
*
* LU CU RU Up
* LC CC RC Center
* LD CD RD Down
*/
struct immutablewhencooked native AimTransform
{
var() Quat Quaternion;
var() Vector Translation;
};
/**
* definition of an AimComponent.
*/
struct immutablewhencooked native AimComponent
{
/** Bone transformed */
var() Name BoneName;
/** Left column */
var() AimTransform LU;
var() AimTransform LC;
var() AimTransform LD;
/** Center */
var() AimTransform CU;
var() AimTransform CC;
var() AimTransform CD;
/** Right */
var() AimTransform RU;
var() AimTransform RC;
var() AimTransform RD;
};
/** Handy enum for working with directions. */
enum EAnimAimDir
{
ANIMAIM_LEFTUP,
ANIMAIM_CENTERUP,
ANIMAIM_RIGHTUP,
ANIMAIM_LEFTCENTER,
ANIMAIM_CENTERCENTER,
ANIMAIM_RIGHTCENTER,
ANIMAIM_LEFTDOWN,
ANIMAIM_CENTERDOWN,
ANIMAIM_RIGHTDOWN
};
/** Convert Aim(X,Y) into a an enum that we use for blending into the main loop. */
enum EAimID
{
EAID_LeftUp,
EAID_LeftDown,
EAID_RightUp,
EAID_RightDown,
EAID_ZeroUp,
EAID_ZeroDown,
EAID_ZeroLeft,
EAID_ZeroRight,
EAID_CellLU,
EAID_CellCU,
EAID_CellRU,
EAID_CellLC,
EAID_CellCC,
EAID_CellRC,
EAID_CellLD,
EAID_CellCD,
EAID_CellRD,
};
/** Angle of aiming, between -1..+1 */
var() Vector2d Aim;
/** Angle offset applied to Aim before processing */
var() Vector2d AngleOffset;
/** If true, ignore Aim, and use the ForcedAimDir enum instead to determine which aim direction to draw. */
var() bool bForceAimDir;
/** If the LOD of this skeletal mesh is at or above this LOD, then this node will do nothing. */
var(Performance) int PassThroughAtOrAboveLOD;
/** If bForceAimDir is true, this is the direction to render the character aiming in. */
var() EAnimAimDir ForcedAimDir;
/** Internal, array of required bones. Selected bones and their parents for local to component space transformation. */
var transient Array<byte> RequiredBones;
/** Look Up Table for AimCpnt Indices */
var transient Array<byte> AimCpntIndexLUT;
/**
* Pointer to AimOffset node in package (AnimTreeTemplate), to avoid duplicating profile data.
* Always NULL in AimOffset Editor (in ATE).
*/
var transient AnimNodeAimOffset TemplateNode;
/** Bake offsets from animations. */
var() bool bBakeFromAnimations;
struct immutablewhencooked native AimOffsetProfile
{
/** Name of this aim-offset profile. */
var() const editconst name ProfileName;
/** Maximum horizontal range (min, max) for horizontal aiming. */
var() Vector2d HorizontalRange;
/** Maximum horizontal range (min, max) for vertical aiming. */
var() Vector2d VerticalRange;
/**
* Array of AimComponents.
* Represents the selected bones and their transformations.
*/
var Array<AimComponent> AimComponents;
/**
* Names of animations to use when automatically generating offsets based animations for each direction.
* Animations are not actually used in-game - just for editor.
*/
var() Name AnimName_LU;
var() Name AnimName_LC;
var() Name AnimName_LD;
var() Name AnimName_CU;
var() Name AnimName_CC;
var() Name AnimName_CD;
var() Name AnimName_RU;
var() Name AnimName_RC;
var() Name AnimName_RD;
structdefaultproperties
{
ProfileName="Default"
HorizontalRange=(X=-1,Y=+1)
VerticalRange=(X=-1,Y=+1)
}
};
/** Array of different aiming 'profiles' */
var() editfixedsize array<AimOffsetProfile> Profiles;
/**
* Index of currently active Profile.
* Use the SetActiveProfileByName or SetActiveProfileByIndex function to change.
*/
var() const editconst int CurrentProfileIndex;
/**
* if TRUE, pass through (skip additive animation blending) when mesh is not rendered
*/
var(Performance) bool bPassThroughWhenNotRendered;
/** When moving the slider, keep nodes with same property in sync. */
var(Editor) bool bSynchronizeNodesInEditor;
cpptext
{
// UObject interface
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
/** Deferred Initialization, called only when the node is relevant in the tree. */
virtual void DeferredInitAnim();
/** Used to save pointer to AimOffset node in package, to avoid duplicating profile data. */
virtual void PostAnimNodeInstance(UAnimNode* SourceNode, TMap<UAnimNode*,UAnimNode*>& SrcToDestNodeMap);
/** returns current aim. Override this to pull information from somewhere else, like Pawn actor for example. */
virtual FVector2D GetAim() { return Aim; }
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
/**
* Function called after Aim has been extracted and processed (offsets, range, clamping...).
* Gives a chance to PostProcess it before being used by the AimOffset Node.
* Note that X,Y range should remain [-1,+1].
*/
virtual void PostAimProcessing(FVector2D &AimOffsetPct) {}
/** Util for getting the current AimOffsetProfile. */
FAimOffsetProfile* GetCurrentProfile();
/** Update cached list of required bones, use to transform skeleton from parent space to component space. */
void UpdateListOfRequiredBones();
/** Returns TRUE if AimComponents contains specified bone */
UBOOL ContainsBone(const FName &BoneName);
/** Util for grabbing the quaternion on a specific bone in a specific direction. */
FQuat GetBoneAimQuaternion(INT CompIndex, EAnimAimDir InAimDir);
/** Util for grabbing the translation on a specific bone in a specific direction. */
FVector GetBoneAimTranslation(INT CompIndex, EAnimAimDir InAimDir);
/** Util for setting the quaternion on a specific bone in a specific direction. */
void SetBoneAimQuaternion(INT CompIndex, EAnimAimDir InAimDir, const FQuat & InQuat);
/** Util for setting the translation on a specific bone in a specific direction. */
void SetBoneAimTranslation(INT CompIndex, EAnimAimDir InAimDir, FVector InTrans);
/** Bake in Offsets from supplied Animations. */
void BakeOffsetsFromAnimations();
void ExtractOffsets(TArray<FBoneAtom>& RefBoneAtoms, TArray<FBoneAtom>& BoneAtoms, EAnimAimDir InAimDir);
INT GetComponentIdxFromBoneIdx(const INT BoneIndex, UBOOL bCreateIfNotFound=0);
/**
* Extract Parent Space Bone Atoms from Animation Data specified by Name.
* Returns TRUE if successful.
*/
UBOOL ExtractAnimationData(UAnimNodeSequence *SeqNode, FName AnimationName, TArray<FBoneAtom>& BoneAtoms);
// For slider support
virtual INT GetNumSliders() const { return 1; }
virtual ESliderType GetSliderType(INT InIndex) const { return ST_2D; }
virtual FLOAT GetSliderPosition(INT SliderIndex, INT ValueIndex);
virtual void HandleSliderMove(INT SliderIndex, INT ValueIndex, FLOAT NewSliderValue);
virtual void SynchronizeNodesInEditor();
virtual FString GetSliderDrawValue(INT SliderIndex);
/** Utility functions to ease off Casting */
virtual class UAnimNodeAimOffset* GetAnimNodeAimOffset() { return this; }
}
/**
* Change the currently active profile to the one with the supplied name.
* If a profile with that name does not exist, this does nothing.
*/
native function SetActiveProfileByName(name ProfileName);
/**
* Change the currently active profile to the one with the supplied index.
* If ProfileIndex is outside range, this does nothing.
*/
native function SetActiveProfileByIndex(int ProfileIndex);
defaultproperties
{
bSynchronizeNodesInEditor=TRUE
bPassThroughWhenNotRendered=FALSE
bFixNumChildren=TRUE
Children(0)=(Name="Input",Weight=1.0)
ForcedAimDir=ANIMAIM_CENTERCENTER
PassThroughAtOrAboveLOD=1000
}

View File

@ -0,0 +1,48 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeBlend extends AnimNodeBlendBase
native(Anim)
hidecategories(Object);
var float Child2Weight;
var float Child2WeightTarget;
var float BlendTimeToGo; // Seconds
/**
* if TRUE, do not blend when the Skeletal Mesh is not visible.
* Optimization to save on blending time when meshes are not rendered.
* Instant switch instead.
*/
var() bool bSkipBlendWhenNotRendered;
cpptext
{
// AnimNode interface
virtual void TickAnim(FLOAT DeltaSeconds);
virtual INT GetNumSliders() const { return 1; }
virtual FLOAT GetSliderPosition(INT SliderIndex, INT ValueIndex);
virtual void HandleSliderMove(INT SliderIndex, INT ValueIndex, FLOAT NewSliderValue);
virtual FString GetSliderDrawValue(INT SliderIndex);
}
/**
* Set desired balance of this blend.
*
* @param BlendTarget Target amount of weight to put on Children(1) (second child). Between 0.0 and 1.0.
* 1.0 means take all animation from second child.
* @param BlendTime How long to take to get to BlendTarget.
*/
native function SetBlendTarget( float BlendTarget, float BlendTime );
defaultproperties
{
Children(0)=(Name="Child1",Weight=1.0)
Children(1)=(Name="Child2")
bFixNumChildren=TRUE
bSkipBlendWhenNotRendered=TRUE
}

View File

@ -0,0 +1,124 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeBlendBase extends AnimNode
native(Anim)
hidecategories(Object)
abstract;
/** Link to a child AnimNode. */
struct native AnimBlendChild
{
/** Name of link. */
var() Name Name;
/** Child AnimNode. */
var editinline export AnimNode Anim;
/** Weight with which this child will be blended in. Sum of all weights in the Children array must be 1.0 */
var float Weight;
/** Weight used for blending. See AnimBlendType. */
var const transient float BlendWeight;
/**
* Whether this child's skeleton should be mirrored.
* Do not use this lightly, mirroring is rather expensive.
* So minimize the number of times mirroring is done in the tree.
*/
var bool bMirrorSkeleton;
/** Is Children Additive Animation. */
var bool bIsAdditive;
/** For editor use. */
var editoronly int DrawY;
};
/** Array of children AnimNodes. These will be blended together and the results returned by GetBoneAtoms. */
var editfixedsize editinline export array<AnimBlendChild> Children;
/** Whether children connectors (ie elements of the Children array) may be added/removed. */
var bool bFixNumChildren;
/** Type of animation blending. Affects how the weight interpolates. */
var() AlphaBlendType BlendType;
cpptext
{
/** Call DeferredInitAnim() if the node required it. Recurses through the Tree. Increase UAnimNode::CurrentSeachTag before calling. */
virtual void CallDeferredInitAnim();
// UAnimNode interface
virtual void TickAnim(FLOAT DeltaSeconds);
virtual void BuildParentNodesArray();
virtual void BuildTickArray(TArray<UAnimNode*>& OutTickArray);
FORCEINLINE FLOAT GetBlendWeight(FLOAT ChildWeight);
FORCEINLINE void SetBlendTypeWeights();
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
virtual void GetChildBoneAtoms( INT ChildIdx, FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys );
/**
* Get mirrored bone atoms from desired child index.
* Bones are mirrored using the SkelMirrorTable.
*/
void GetMirroredBoneAtoms(FBoneAtomArray& Atoms, INT ChildIndex, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
/**
* Draws this node in the AnimTreeEditor.
*
* @param Canvas The canvas to use.
* @param SelectedNodes Reference to array of all currently selected nodes, potentially including this node
* @param bShowWeight If TRUE, show the global percentage weight of this node, if applicable.
*/
virtual void DrawAnimNode(FCanvas* Canvas, const TArray<UAnimObject*>& SelectedNodes, UBOOL bShowWeight);
virtual FString GetNodeTitle();
virtual FIntPoint GetConnectionLocation(INT ConnType, INT ConnIndex);
virtual INT Extend2DSlider(FCanvas* Canvas, const FIntPoint &SliderPos, INT SliderWidth, UBOOL bAABBLiesWithinViewport, INT LoSliderHandleHeight) { return 0; }
/** For debugging. Return the sum of the weights of all children nodes. Should always be 1.0. */
FLOAT GetChildWeightTotal();
/** Notification to this blend that a child UAnimNodeSequence has reached the end and stopped playing. Not called if child has bLooping set to true or if user calls StopAnim. */
virtual void OnChildAnimEnd(UAnimNodeSequence* Child, FLOAT PlayedTime, FLOAT ExcessTime);
/** A child connector has been added */
virtual void OnAddChild(INT ChildNum);
/** A child connector has been removed */
virtual void OnRemoveChild(INT ChildNum);
/** A child Anim has been modified*/
virtual void OnChildAnimChange(INT ChildNum){};
/** Rename all child nodes upon Add/Remove, so they match their position in the array. */
virtual void RenameChildConnectors();
/** internal code for GetNodes(); should only be called from GetNodes() or from the GetNodesInternal() of this node's parent */
virtual void GetNodesInternal(TArray<UAnimNode*>& Nodes);
/** Called after (copy/)pasted - reset values or re-link if needed**/
virtual void OnPaste();
/**
* Resolve conflicts for blend curve weights if same morph target exists
*
* @param InChildrenCurveKeys Array of curve keys for children. The index should match up with Children.
* @param OutCurveKeys Result output after blending is resolved
*
* @return Number of new addition to OutCurveKeys
*/
virtual INT BlendCurveWeights(const FArrayCurveKeyArray& InChildrenCurveKeys, FCurveKeyArray& OutCurveKeys);
protected:
/**
* Update Child Weight : Make sure childIndex isn't OOB
*/
virtual void UpdateChildWeight(INT ChildIndex);
}
native function PlayAnim(bool bLoop = false, float Rate = 1.0f, float StartTime = 0.0f);
native function StopAnim();
// calls PlayAnim with the current settings
native function ReplayAnim();
defaultproperties
{
BlendType=ABT_Linear
}

View File

@ -0,0 +1,40 @@
/**
* AnimNodeBlendByBase.uc
* Looks at the base of the Pawn that owns this node and blends accordingly.
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeBlendByBase extends AnimNodeBlendList
native(Anim);
cpptext
{
virtual void TickAnim(FLOAT DeltaSeconds);
}
enum EBaseBlendType
{
BBT_ByActorTag,
BBT_ByActorClass,
};
/** Type of comparison to do */
var() EBaseBlendType Type;
/** Actor tag that will match the base */
var() Name ActorTag;
/** Actor class that will match the base */
var() class<Actor> ActorClass<AllowAbstract>;
/** Duration of blend */
var() float BlendTime;
/** Cached Base Actor */
var transient Actor CachedBase;
defaultproperties
{
bFixNumChildren=TRUE
Children(0)=(Name="Normal")
Children(1)=(Name="Based")
BlendTime=0.2f
}

View File

@ -0,0 +1,34 @@
/**
* AnimNodeBlendByPhysics.uc
* Looks at the physics of the Pawn that owns this node and blends accordingly.
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeBlendByPhysics extends AnimNodeBlendList
native(Anim);
cpptext
{
virtual void TickAnim(FLOAT DeltaSeconds);
}
defaultproperties
{
bFixNumChildren=true
Children(0)=(Name="PHYS_None")
Children(1)=(Name="PHYS_Walking")
Children(2)=(Name="PHYS_Falling")
Children(3)=(Name="PHYS_Swimming")
Children(4)=(Name="PHYS_Flying")
Children(5)=(Name="PHYS_Rotating")
Children(6)=(Name="PHYS_Projectile")
Children(7)=(Name="PHYS_Interpolating")
Children(8)=(Name="PHYS_Spider")
Children(9)=(Name="PHYS_Ladder")
Children(10)=(Name="PHYS_RigidBody")
Children(11)=(Name="PHYS_SoftBody")
Children(12)=(Name="PHYS_NavMeshWalking")
Children(13)=(Name="PHYS_Unused")
Children(14)=(Name="PHYS_Custom")
}

View File

@ -0,0 +1,24 @@
/**
* AnimNodeBlendByPosture.uc
* Looks at the posture of the Pawn that owns this node and blends accordingly.
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeBlendByPosture extends AnimNodeBlendList
native(Anim);
/*
* Note: this is obsolete. This class is going to be removed soon.
*/
cpptext
{
virtual void TickAnim(FLOAT DeltaSeconds);
}
defaultproperties
{
Children(0)=(Name="Standing")
Children(1)=(Name="Crouched")
}

View File

@ -0,0 +1,66 @@
/**
* AnimNodeBlendByProperty.uc
* Looks at a specific property of the Pawn and will blend between two inputs based on its value
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeBlendByProperty extends AnimNodeBlendList
native(Anim);
/** Property Name to look up */
var() name PropertyName;
/** If Property should be looked up on the Owner's base instead of the Owner. */
var() bool bUseOwnersBase;
/** Name of cached property. Used to detect changes and invalidating the cached property. */
var transient name CachedPropertyName;
/** Cached property object pointer. Avoids slow FindField on a per tick basis, and cast. */
var const transient native Pointer CachedFloatProperty{UFloatProperty};
var const transient native Pointer CachedBoolProperty{UBoolProperty};
var const transient native Pointer CachedByteProperty{UByteProperty};
/** Force an update on the node */
var const transient bool bForceUpdate;
/** Track Owner changes */
var transient Actor CachedOwner;
var() float BlendTime;
var() float FloatPropMin;
var() float FloatPropMax;
/** Use BlendToChild1Time/BlendToChild2Time instead of BlendTime? */
var() bool bUseSpecificBlendTimes;
var() float BlendToChild1Time;
var() float BlendToChild2Time;
/** When moving the slider, keep nodes with same property in sync. */
var(Editor) bool bSynchronizeNodesInEditor;
cpptext
{
virtual void InitAnim(USkeletalMeshComponent* MeshComp, UAnimNodeBlendBase* Parent);
virtual void TickAnim(FLOAT DeltaSeconds);
virtual FString GetNodeTitle();
virtual void HandleSliderMove(INT SliderIndex, INT ValueIndex, FLOAT NewSliderValue);
/** Parent node is requesting a blend out. Give node a chance to delay that. */
virtual UBOOL CanBlendOutFrom();
/** parent node is requesting a blend in. Give node a chance to delay that. */
virtual UBOOL CanBlendTo();
}
defaultproperties
{
Children(0)=(Name="Child1")
Children(1)=(Name="Child2")
bSynchronizeNodesInEditor=TRUE
bFixNumChildren=FALSE
bForceChildFullWeightWhenBecomingRelevant=FALSE
BlendTime=0.1
BlendToChild1Time=0.1
BlendToChild2Time=0.1
FloatPropMin=0.0
FloatPropMax=1.0
}

View File

@ -0,0 +1,65 @@
/**
* AnimNodeBlendBySpeed
*
* Blends between child nodes based on the owners speed and the defined constraints.
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeBlendBySpeed extends AnimNodeBlendList
native(Anim);
/** How fast they are moving this frame. */
var float Speed;
/** Last Channel being used */
var int LastChannel;
/** How fast to blend when going up */
var() float BlendUpTime;
/** How fast to blend when going down */
var() float BlendDownTime;
/** When should we start blending back down */
var() float BlendDownPerc;
/** Weights/ constraints used for transition between child nodes */
var() array<float> Constraints;
/** Use acceleration instead of Velocity to determine speed */
var() bool bUseAcceleration;
/** Optional delay before blending to the next channel */
var() float BlendUpDelay, BlendDownDelay;
var transient float BlendDelayRemaining;
cpptext
{
// AnimNode interface
/**
* Blend animations based on an Owner's velocity.
*
* @param DeltaSeconds Time since last tick in seconds.
*/
virtual void TickAnim(FLOAT DeltaSeconds);
/**
* Resets the last channel on becoming active.
*/
virtual void OnBecomeRelevant();
virtual INT GetNumSliders() const { return 1; }
virtual FLOAT GetSliderPosition(INT SliderIndex, INT ValueIndex);
virtual void HandleSliderMove(INT SliderIndex, INT ValueIndex, FLOAT NewSliderValue);
virtual FString GetSliderDrawValue(INT SliderIndex);
// AnimNodeBlendBySpeed interface
/**
* Function called to calculate the speed that should be used for this node.
* Allows subclasses to easily modify the speed used.
*/
virtual FLOAT CalcSpeed();
}
defaultproperties
{
BlendUpTime=0.1;
BlendDownTime=0.1;
BlendDownPerc=0.2;
Constraints=(0,180,350,900);
}

View File

@ -0,0 +1,52 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
// This special blend node will use the LookDir and Acceleration from the Actor that
// owns the SkeletalMeshComponent to blend the four directional animations together.
// TODO: This node could also 'lock' animation rate/phase together for its children (for cadence matching)? Should this be a general blender property?
class AnimNodeBlendDirectional extends AnimNodeBlendBase
native(Anim)
hidecategories(Object);
/** Allows control over how quickly the directional blend should be allowed to change. */
var() float DirDegreesPerSecond;
/** In radians. Between -PI and PI. 0.0 is running the way we are looking. */
var float DirAngle;
/** If the LOD for the mesh is at or above this LOD level, only use a single directional animation instead of blending. */
var() int SingleAnimAtOrAboveLOD;
/** Rotational offset to apply */
var Rotator RotationOffset;
/** Use acceleration instead of Velocity to determine speed */
var() bool bUseAcceleration;
cpptext
{
// AnimNode interface
virtual void TickAnim(FLOAT DeltaSeconds);
virtual INT GetNumSliders() const { return 1; }
virtual FLOAT GetSliderPosition(INT SliderIndex, INT ValueIndex);
virtual void HandleSliderMove(INT SliderIndex, INT ValueIndex, FLOAT NewSliderValue);
virtual FString GetSliderDrawValue(INT SliderIndex);
}
defaultproperties
{
Children(0)=(Name="Forward",Weight=1.0)
Children(1)=(Name="Backward")
Children(2)=(Name="Left")
Children(3)=(Name="Right")
bFixNumChildren=true
DirDegreesPerSecond=360.0
SingleAnimAtOrAboveLOD=1000
CategoryDesc = "Directional"
}

View File

@ -0,0 +1,79 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
// This class of blend node will ramp the 'active' child up to 1.0
class AnimNodeBlendList extends AnimNodeBlendBase
native(Anim)
hidecategories(Object);
/** Array of target weights for each child. Size must be the same as the Children array. */
var array<float> TargetWeight;
/** How long before current blend is complete (ie. active child reaches 100%) */
var float BlendTimeToGo;
/** Child currently active - that is, at or ramping up to 100%. */
var INT ActiveChildIndex;
/** Call play anim when active child is changed */
var() bool bPlayActiveChild;
/**
* If TRUE (Default), then when the node becomes relevant, the Active Child will be forced to full weight.
* This is a general optimization, as multiple nodes tend to change state at the same time, this will
* reduce the maximum number of blends and animation decompression done at the same time.
* Setting it to FALSE, will let the node interpolate animation normally.
*/
var(Performance) bool bForceChildFullWeightWhenBecomingRelevant;
/**
* if TRUE, do not blend when the Skeletal Mesh is not visible.
* Optimization to save on blending time when meshes are not rendered.
* Instant switch instead.
*/
var(Performance) bool bSkipBlendWhenNotRendered;
/** slider position, for animtree editor */
var const float SliderPosition;
/** ActiveChildIndex for use in editor only, to debug transitions */
var() editoronly INT EditorActiveChildIndex;
cpptext
{
// UObject interface
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
// AnimNode interface
virtual void InitAnim( USkeletalMeshComponent* meshComp, UAnimNodeBlendBase* Parent );
virtual void ResetAnimNodeToSource(UAnimNode *SourceNode);
virtual void TickAnim(FLOAT DeltaSeconds);
// AnimTree editor interface
virtual INT GetNumSliders() const { return 1; }
virtual FLOAT GetSliderPosition(INT SliderIndex, INT ValueIndex);
virtual void HandleSliderMove(INT SliderIndex, INT ValueIndex, FLOAT NewSliderValue);
virtual FString GetSliderDrawValue(INT SliderIndex);
// AnimNodeBlendBase interface
virtual void OnAddChild(INT ChildNum);
virtual void OnRemoveChild(INT ChildNum);
// AnimNodeBlendList interface
/** Called after (copy/)pasted - reset values or re-link if needed**/
virtual void OnPaste();
}
native function SetActiveChild( INT ChildIndex, FLOAT BlendTime );
defaultproperties
{
bSkipBlendWhenNotRendered=TRUE
bForceChildFullWeightWhenBecomingRelevant=TRUE
Children(0)=(Name="Child1")
bFixNumChildren=FALSE
CategoryDesc = "BlendBy"
}

View File

@ -0,0 +1,77 @@
/**
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeBlendMultiBone extends AnimNodeBlendBase
native(Anim)
hidecategories(Object);
struct native ChildBoneBlendInfo
{
/** Weight scaling for each bone of the skeleton. Must be same size as RefSkeleton of SkeletalMesh. If all 0.0, no animation can ever be drawn from Child2. */
var array<float> TargetPerBoneWeight;
/** Used in InitAnim, so you can set up partial blending in the defaultproperties. See SetTargetStartBone. */
var() name InitTargetStartBone;
/** Used in InitAnim, so you can set up partial blending in the defaultproperties. See SetTargetStartBone. */
var() float InitPerBoneIncrease;
//
// Internal variables
//
/** Old StartBone, to monitor changes */
var const name OldStartBone;
/** Old OldBoneIncrease, to monitor changes */
var const float OldBoneIncrease;
/**
* Indices of bones required from Target (at LOD 0), if Target's weight is >0.0.
* Bones are only in this array if their per-bone weight is >0.0 (or they have a child in the array).
* Indices should be strictly increasing.
*/
var transient array<byte> TargetRequiredBones;
structdefaultproperties
{
InitPerBoneIncrease=1.0
}
};
/** List of blend targets - one per bone to blend */
var() array<ChildBoneBlendInfo> BlendTargetList;
/**
* Indices of bones required from Source (at LOD 0), if Target's weight is 1.0.
* Bones are only in this array if their per-bone weight is <1.0 (or they have a child in the array).
* Indices should be strictly increasing.
*/
var transient array<byte> SourceRequiredBones;
cpptext
{
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
// AnimNode interface
virtual void InitAnim( USkeletalMeshComponent* meshComp, UAnimNodeBlendBase* Parent );
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
/** Utility for creating the TargetPerBoneWeight array. Starting from the named bone, walk down the heirarchy increasing the weight by PerBoneIncrease each step. */
virtual void SetTargetStartBone( INT TargetIdx, FName StartBoneName, FLOAT PerBoneIncrease = 1.f );
}
/** Updating the StartBoneName or PerBoneIncrease, will cause the TargetPerBoneWeight to be automatically re-updated, you'll loose custom values! */
//@todo - support opt. params
native noexport final function SetTargetStartBone( int TargetIdx, name StartBoneName, optional float PerBoneIncrease /* = 1.f */ );
defaultproperties
{
Children(0)=(Name="Source",Weight=1.0)
Children(1)=(Name="Target")
CategoryDesc = "Filter"
}

View File

@ -0,0 +1,45 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeBlendPerBone extends AnimNodeBlend
native(Anim);
/** If TRUE, blend will be done in local space. */
var() const bool bForceLocalSpaceBlend;
/** List of branches to mask in from child2 */
var() Array<Name> BranchStartBoneName;
/** per bone weight list, built from list of branches. */
var Array<FLOAT> Child2PerBoneWeight;
/** Required bones for local to component space conversion */
var Array<BYTE> LocalToCompReqBones;
cpptext
{
/** Do any initialisation, and then call InitAnim on all children. Should not discard any existing anim state though. */
virtual void InitAnim(USkeletalMeshComponent* meshComp, UAnimNodeBlendBase* Parent);
// AnimNode interface
virtual void TickAnim(FLOAT DeltaSeconds);
// AnimNode interface
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
virtual void BuildWeightList();
}
/**
* Overridden so we can keep child zero weight at 1.
*/
native function SetBlendTarget( float BlendTarget, float BlendTime );
defaultproperties
{
Children(0)=(Name="Source",Weight=1.0)
Children(1)=(Name="Target")
bFixNumChildren=TRUE
CategoryDesc = "Filter"
}

View File

@ -0,0 +1,95 @@
/**
* AnimNodeCrossfader
* This single node allows to crossfade between 2 animations through script control.
* A typical usage scenario would be to blend between 2 player idle animations.
* This blend requires 2 AnimNodeSequence as childs, you cannot connect 2 blends nor any other node types.
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeCrossfader extends AnimNodeBlend
native(Anim)
hidecategories(Object);
cpptext
{
// UAnimNode interface
virtual void InitAnim( USkeletalMeshComponent* meshComp, UAnimNodeBlendBase* Parent );
virtual void TickAnim(FLOAT DeltaSeconds);
}
//
// Exposed (script modifable) parameters
//
/** default animation sequence played upon startup */
var() name DefaultAnimSeqName;
//
// Internal (C++) variables
//
/** true if not blending out of the current one shot anim. Anim will just freeze at last frame */
var const bool bDontBlendOutOneShot;
/** Blend Out time for current One Shot anim */
var const float PendingBlendOutTimeOneShot;
/**
* Play a One Shot animation.
*
* @param AnimSeqName Name of animation sequence to play
* @param BlendInTime time to blend from current animation to this (new) one.
* @param BlendOutTime time to blend from this animation (before it finishes playing) back to the previous one.
* @param bDontBlendOut if true, animation will freeze at last frame, and not blend back to the old one.
* @param Rate Playing rate of animation.
*/
native noexport final function PlayOneShotAnim
(
name AnimSeqName,
optional float BlendInTime,
optional float BlendOutTime,
optional bool bDontBlendOut,
optional float Rate
);
/**
* Blend to a looping animation.
*
* @param AnimSeqName Name of animation sequence to play.
* @param BlendInTime time to blend from current animation to this (new) one.
* @param Rate Playing rate of animation.
*/
native noexport final function BlendToLoopingAnim
(
name AnimSeqName,
optional float BlendInTime,
optional float Rate
);
/**
* Get Animation Name currently playing
*
* @return animation name currently being played.
*/
native final function Name GetAnimName();
/**
* Get active AnimNodeSequence child. To access animation properties and control functions.
*
* @return AnimNodeSequence currently playing.
*/
native final function AnimNodeSequence GetActiveChild();
defaultproperties
{
}

View File

@ -0,0 +1,84 @@
/**
* This class is used for rendering a box around a group of kismet objects in the kismet editor, for organization
* and clarity. Corresponds to a "comment box" in the kismet editor.
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeFrame extends AnimObject
native(Anim);
cpptext
{
#if WITH_EDITOR
/** Draws the box part of the comment (including handle) */
void DrawFrameBox(FCanvas* Canvas, UBOOL bSelected);
/**
* Draws this node in the AnimTreeEditor.
*
* @param Canvas The canvas to use.
* @param SelectedNodes Reference to array of all currently selected nodes, potentially including this node
* @param bShowWeight If TRUE, show the global percentage weight of this node, if applicable.
*/
virtual void DrawNode(FCanvas* Canvas, const TArray<UAnimObject*>& SelectedNodes, UBOOL bShowWeight);
#endif
}
/** Horizontal size of comment box in pixels. */
var() int SizeX;
/** Vertical size of comment box in pixels. */
var() int SizeY;
/** Width of border of comment box in pixels. */
var() int BorderWidth;
/** Should we draw a box for this comment object, or leave it just as text. */
var() bool bDrawBox;
/** If we are drawing a box, should it be filled, or just an outline. */
var() bool bFilled;
/** If bDrawBox and bFilled are true, and FillMaterial or FillTexture are true, should be tile it across the box or stretch to fit. */
var() bool bTileFill;
/** If we are drawing a box for this comment object, what colour should the border be. */
var() color BorderColor;
/** If bDrawBox and bFilled are true, what colour should the background be. */
var() color FillColor;
/**
* If bDrawBox and bFilled, you can optionally specify a texture to fill the box with.
* If both FillTexture and FillMaterial are specified, the FillMaterial will be used.
*/
var() editoronly Texture2D FillTexture;
/**
* If bDrawBox and bFilled, you can optionally specify a material to fill the box with.
* If both FillTexture and FillMaterial are specified, the FillMaterial will be used.
*/
var() editoronly Material FillMaterial;
var() editoronly String ObjComment;
defaultproperties
{
//bDrawFirst=true
//ObjName="Sequence Comment"
//ObjComment="Comment"
SizeX=128
SizeY=64
DrawWidth=128
DrawHeight=64
BorderWidth=1
bFilled=true
FillColor=(R=255,G=255,B=255,A=16)
BorderColor=(R=0,G=0,B=0,A=255)
bDrawBox = true
}

View File

@ -0,0 +1,23 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeMirror extends AnimNodeBlendBase
native(Anim)
hidecategories(Object);
var() bool bEnableMirroring;
cpptext
{
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
}
defaultproperties
{
Children(0)=(Name="Child",Weight=1.0)
bFixNumChildren=true
bEnableMirroring=true
CategoryDesc = "Mirror"
}

View File

@ -0,0 +1,152 @@
/**
* Gives code control to override an AnimTree branch, with a custom animation.
* . Normal branch is the normal tree branch (for example Human upper body).
* . Custom branch must be connected to an AnimNodeSequence.
* This node can then take over the upper body to play a cutom animation given various parameters.
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodePlayCustomAnim extends AnimNodeBlend
DependsOn(AnimNodeSequence)
native(Anim);
cpptext
{
virtual void TickAnim(FLOAT DeltaSeconds);
virtual INT GetNumSliders() const { return 0; }
};
/** True, when we're playing a custom animation */
var bool bIsPlayingCustomAnim;
/** save blend out time when playing a one shot animation. */
var float CustomPendingBlendOutTime;
/**
* Play a custom animation.
* Supports many features, including blending in and out.
*
* @param AnimName Name of animation to play.
* @param Rate Rate animation should be played at.
* @param BlendInTime Blend duration to play anim.
* @param BlendOutTime Time before animation ends (in seconds) to blend out.
* -1.f means no blend out.
* 0.f = instant switch, no blend.
* otherwise it's starting to blend out at AnimDuration - BlendOutTime seconds.
* @param bLooping Should the anim loop? (and play forever until told to stop)
* @param bOverride play same animation over again only if bOverride is set to true.
*
* @return PlayBack length of animation.
*/
final native function float PlayCustomAnim
(
name AnimName,
float Rate,
optional float BlendInTime,
optional float BlendOutTime,
optional bool bLooping,
optional bool bOverride
);
/**
* Play a custom animation.
* Auto adjusts the animation's rate to match a given duration in seconds.
* Supports many features, including blending in and out.
*
* @param AnimName Name of animation to play.
* @param Duration duration in seconds the animation should be played.
* @param BlendInTime Blend duration to play anim.
* @param BlendOutTime Time before animation ends (in seconds) to blend out.
* -1.f means no blend out.
* 0.f = instant switch, no blend.
* otherwise it's starting to blend out at AnimDuration - BlendOutTime seconds.
* @param bLooping Should the anim loop? (and play forever until told to stop)
* @param bOverride play same animation over again only if bOverride is set to true.
*/
final native function PlayCustomAnimByDuration
(
name AnimName,
float Duration,
optional float BlendInTime,
optional float BlendOutTime,
optional bool bLooping,
optional bool bOverride
);
/**
* Stop playing a custom animation.
* Used for blending out of a looping custom animation.
*/
final native function StopCustomAnim(float BlendOutTime);
/**
* Set Custom animation.
*/
final function SetCustomAnim(Name AnimName)
{
local AnimNodeSequence SeqNode;
SeqNode = AnimNodeSequence(Children[1].Anim);
if( SeqNode != None )
{
SeqNode.SetAnim(AnimName);
}
}
/** Set bCauseActorAnimEnd flag */
final function SetActorAnimEndNotification(bool bNewStatus)
{
local AnimNodeSequence SeqNode;
SeqNode = AnimNodeSequence(Children[1].Anim);
if( SeqNode != None )
{
SeqNode.bCauseActorAnimEnd = bNewStatus;
}
}
/** Returns AnimNodeSequence playing the custom animation */
final function AnimNodeSequence GetCustomAnimNodeSeq()
{
return AnimNodeSequence(Children[1].Anim);
}
/**
* Set custom animation root bone options.
*/
final function SetRootBoneAxisOption
(
optional ERootBoneAxis AxisX = RBA_Default,
optional ERootBoneAxis AxisY = RBA_Default,
optional ERootBoneAxis AxisZ = RBA_Default
)
{
local AnimNodeSequence AnimSeq;
AnimSeq = GetCustomAnimNodeSeq();
if( AnimSeq != None )
{
AnimSeq.SetRootBoneAxisOption(AxisX, AxisY, AxisZ);
}
else
{
`Warn(GetFuncName() @ "Custom AnimNodeSequence not found for" @ Self);
}
}
defaultproperties
{
NodeName="CustomAnim"
bFixNumChildren=TRUE
Children(0)=(Name="Normal")
Children(1)=(Name="Custom")
}

View File

@ -0,0 +1,72 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeRandom extends AnimNodeBlendList
native(Anim)
hidecategories(Object);
cpptext
{
virtual void TickAnim(FLOAT DeltaSeconds);
virtual void InitAnim( USkeletalMeshComponent* meshComp, UAnimNodeBlendBase* Parent );
/** A child has been added, update RandomInfo accordingly */
virtual void OnAddChild(INT ChildNum);
/** A child has been removed, update RandomInfo accordingly */
virtual void OnRemoveChild(INT ChildNum);
/** Notification to this blend that a child UAnimNodeSequence has reached the end and stopped playing. Not called if child has bLooping set to true or if user calls StopAnim. */
virtual void OnChildAnimEnd(UAnimNodeSequence* Child, FLOAT PlayedTime, FLOAT ExcessTime);
/** Notification when node becomes relevant. */
virtual void OnBecomeRelevant();
INT PickNextAnimIndex();
void PlayPendingAnimation(FLOAT BlendTime=0.f, FLOAT StartTime=0.f);
}
struct native RandomAnimInfo
{
/** Chance this child will be selected */
var() float Chance;
/** Minimum number of loops to play this animation */
var() Byte LoopCountMin;
/** Maximum number of loops to play this animation */
var() Byte LoopCountMax;
/** Blend in time for this child */
var() float BlendInTime;
/** Animation Play Rate Scale */
var() Vector2D PlayRateRange;
/** If it's a still frame, don't play animation. Just randomly pick one, and stick to it until we lose focus */
var() bool bStillFrame;
/** Number of loops left to play for this round */
var transient byte LoopCount;
/** Keep track of last position */
var transient float LastPosition;
structdefaultproperties
{
Chance=1.f
LoopCountMin=0
LoopCountMax=0
BlendInTime=0.25f
PlayRateRange=(X=1.f,Y=1.f)
}
};
var() editfixedsize editinline Array<RandomAnimInfo> RandomInfo;
/** Pointer to AnimNodeSequence currently playing random animation. */
var transient AnimNodeSequence PlayingSeqNode;
var transient INT PendingChildIndex;
var transient bool bPickedPendingChildIndex;
defaultproperties
{
ActiveChildIndex=-1
PendingChildIndex=-1
CategoryDesc = "Random"
}

View File

@ -0,0 +1,22 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeScalePlayRate extends AnimNodeBlendBase
native(Anim)
hidecategories(Object);
var() float ScaleByValue;
cpptext
{
virtual void TickAnim(FLOAT DeltaSeconds);
virtual FLOAT GetScaleValue();
}
defaultproperties
{
Children(0)=(Name="Input",Weight=1.0)
bFixNumChildren=TRUE
ScaleByValue=1
}

View File

@ -0,0 +1,19 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeScaleRateBySpeed extends AnimNodeScalePlayRate
native(Anim)
hidecategories(Object);
var() float BaseSpeed;
cpptext
{
virtual FLOAT GetScaleValue();
}
defaultproperties
{
BaseSpeed=350
}

View File

@ -0,0 +1,338 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeSequence extends AnimNode
native(Anim)
hidecategories(Object);
/** This name will be looked for in all AnimSet's specified in the AnimSets array in the SkeletalMeshComponent. */
var() const name AnimSeqName;
/** Speed at which the animation will be played back. Multiplied by the RateScale in the AnimSequence. Default is 1.0 */
var() float Rate;
/** Whether this animation is currently playing ie. if the CurrentTime will be advanced when Tick is called. */
var() bool bPlaying;
/** If animation is looping. If false, animation will stop when it reaches end, otherwise will continue from beginning. */
var() bool bLooping;
/** Should this node call the OnAnimEnd event on its parent Actor when it reaches the end and stops. */
var() bool bCauseActorAnimEnd;
/** Should this node call the OnAnimPlay event on its parent Actor when PlayAnim is called on it. */
var() bool bCauseActorAnimPlay;
/** Always return a zero rotation (unit quaternion) for the root bone of this animation. */
var() bool bZeroRootRotation;
/** Always return root bone translation at the origin. */
var() bool bZeroRootTranslation;
/** if TRUE, don't display a warning when animation is not found. */
var() bool bDisableWarningWhenAnimNotFound;
/** Current position (in seconds) */
var() const float CurrentTime;
// Keep track of where animation was at before being ticked
var const transient float PreviousTime;
/** This is the time at which to end the anim. Example: You have a 10 second anim where you just want a portion of the anim! Great for prototyping! */
var const transient float EndTime;
/** Pointer to actual AnimSequence. Found from SkeletalMeshComponent using AnimSeqName when you call SetAnim. */
var transient const AnimSequence AnimSeq;
/** Bone -> Track mapping info for this player node. Index into the LinkupCache array in the AnimSet. Found from AnimSet when you call SetAnim. */
var transient const int AnimLinkupIndex;
/**
* Total weight that this node must be at in the final blend for notifies to be executed.
* This is ignored when the node is part of a group.
*/
var() float NotifyWeightThreshold;
/** Whether any notifies in the animation sequence should be executed for this node. */
var() bool bNoNotifies;
/** Forces the skeletal mesh into the ref pose by setting bForceRespose on the skelmesh comp when not playing. (Optimization) */
var() bool bForceRefposeWhenNotPlaying;
/**
* Flag that indicates if Notifies are currently being executed.
* Allows you to avoid doing dangerous things to this Node while this is going on.
*/
var bool bIsIssuingNotifies;
/** name of group this node belongs to */
var(Group) const Name SynchGroupName;
/** If TRUE, this node can never be a synchronization master node, always slave. */
var(Group) bool bForceAlwaysSlave;
/**
* TRUE by default. This node can be synchronized with others, when part of a SynchGroup.
* Set to FALSE if node shouldn't be synchronized, but still part of notification group.
*/
var(Group) const bool bSynchronize;
/** Relative position offset. */
var(Group) float SynchPosOffset;
/** Reverse synchronization. Go in opposite direction. */
var(Group) const bool bReverseSync;
/** Display time line slider */
var(Display) bool bShowTimeLineSlider;
/** Reference to the CameraAnim to play in conjunction with this animation. */
var(Camera) CameraAnim CameraAnim;
/** Ref to the CameraAnimInst that is currently playing. */
var transient CameraAnimInst ActiveCameraAnimInstance;
/** True to loop the CameraAnim, false for a one-off. */
var(Camera) bool bLoopCameraAnim;
/** True to randomize the CameraAnims start position, so it doesn't look the same every time. Ignored if bLoopCameraAnim is false. */
var(Camera) bool bRandomizeCameraAnimLoopStartTime;
/** "Intensity" multiplier applied to the camera anim. */
var(Camera) float CameraAnimScale;
/** How fast to playback the camera anim. */
var(Camera) float CameraAnimPlayRate;
/** How long to blend in the camera anim. */
var(Camera) float CameraAnimBlendInTime;
/** How long to blend out the camera anim. */
var(Camera) float CameraAnimBlendOutTime;
/**
* This will actually call MoveActor to move the Actor owning this SkeletalMeshComponent.
* You can specify the behaviour for each axis (mesh space).
* Doing this for multiple skeletal meshes on the same Actor does not make much sense!
*/
enum ERootBoneAxis
{
/** the default behaviour, leave root translation from animation and do no affect owning Actor movement. */
RBA_Default,
/** discard any root bone movement, locking it to the first frame's location. */
RBA_Discard,
/** discard root movement on animation, and forward its velocity to the owning actor. */
RBA_Translate,
};
var() const ERootBoneAxis RootBoneOption[3]; // [X, Y, Z] axes
/**
* Root Motion Rotation.
*/
enum ERootRotationOption
{
/** Default, leaves root rotation in the animation. Does not affect actor. */
RRO_Default,
/** Discards root rotation from the animation, locks to first frame rotation of animation. Does not affect actor's rotation. */
RRO_Discard,
/** Discard root rotation from animation, and forwards it to the actor. (to be used by it or not). */
RRO_Extract,
};
var() const ERootRotationOption RootRotationOption[3]; // Roll (X), Pitch (Y), Yaw (Z) axes.
/**
* EDITOR ONLY
* Add Ref Pose to Additive Animation, so it can be viewed fully into the AnimSetViewer.
*/
var const bool bEditorOnlyAddRefPoseToAdditiveAnimation;
/** List of SkelControl controlled by MetaData */
var const transient Array<SkelControlBase> MetaDataSkelControlList;
/** This allows up to return from FinishAnim on blendout when wanted */
var transient bool bCheckForFinishAnimEarly;
/** only setup to work with AnimNodeSlot and FinishAnim right now */
var transient bool bBlendingOut;
cpptext
{
protected:
// Internal
/** Returns the camera associated with the skelmesh's owner, if any. */
ACamera* GetPlayerCamera() const;
public:
// UObject interface
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
virtual void BeginDestroy();
// AnimNode interface
virtual void InitAnim( USkeletalMeshComponent* meshComp, UAnimNodeBlendBase* Parent );
/** Deferred Initialization, called only when the node is relevant in the tree. */
virtual void DeferredInitAnim();
virtual void ResetAnimNodeToSource(UAnimNode *SourceNode);
virtual UBOOL GetCachedResults(FBoneAtomArray& OutAtoms, FBoneAtom& OutRootMotionDelta, INT& bOutHasRootMotion, FCurveKeyArray& OutCurveKeys, INT NumDesiredBones);
virtual UBOOL ShouldSaveCachedResults();
void ConditionalClearCachedData();
/**
* Whether we should keep the cached result for the next frame or not
* This is to avoid keeping cached result on memory once it ticks.
* It will release cache result if this returns FALSE
**/
virtual UBOOL ShouldKeepCachedResult();
/** AnimSets have been updated, update all animations */
virtual void AnimSetsUpdated();
virtual void TickAnim(FLOAT DeltaSeconds); // Progress the animation state, issue AnimEnd notifies.
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
/**
* Draws this node in the AnimTreeEditor.
*
* @param Canvas The canvas to use.
* @param SelectedNodes Reference to array of all currently selected nodes, potentially including this node
* @param bShowWeight If TRUE, show the global percentage weight of this node, if applicable.
*/
virtual void DrawAnimNode(FCanvas* Canvas, const TArray<UAnimObject*>& SelectedNodes, UBOOL bShowWeight);
virtual FString GetNodeTitle();
// AnimNodeSequence interface
void GetAnimationPose(UAnimSequence* InAnimSeq, INT& InAnimLinkupIndex, FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
// Extract root motion for animation using a specified start and end time
void ExtractRootMotionUsingSpecifiedTimespan (UAnimSequence* InAnimSeq, const INT &TrackIndex, FBoneAtom& RootBoneAtom, FBoneAtom& RootBoneAtomDeltaMotion, INT& bHasRootMotion, FLOAT StartTime, FLOAT EndTime) const;
/**
* Extract Root Motion for the current Animation Pose.
*/
inline virtual void ExtractRootMotion (UAnimSequence* InAnimSeq, const INT &TrackIndex, FBoneAtom& RootBoneAtom, FBoneAtom& RootBoneAtomDeltaMotion, INT& bHasRootMotion)
{
ExtractRootMotionUsingSpecifiedTimespan(InAnimSeq, TrackIndex, RootBoneAtom, RootBoneAtomDeltaMotion, bHasRootMotion, PreviousTime, CurrentTime);
}
/** Advance animation time. Take care of issuing notifies, looping and so on */
void AdvanceBy(FLOAT MoveDelta, FLOAT DeltaSeconds, UBOOL bFireNotifies);
/** Issue any notifies that are passed when moving from the current position to DeltaSeconds in the future. Called from TickAnim. */
void IssueNotifies(FLOAT DeltaSeconds);
/** Allow negative play rates and still get animnotifies$$$**/
void IssueNegativeRateNotifies(FLOAT DeltaSecond);
/**
* notification that current animation has reached the end (will be called even if it loops, unlike OnAnimEnd)
* @param PlayedTime Time in seconds of animation played. (play rate independant).
* @param ExcessTime Time in seconds beyond end of animation. (play rate independant).
*/
virtual void OnAnimComplete( FLOAT PlayedTime, FLOAT ExcessTime ) {}
/**
* notification that current animation finished playing.
* @param PlayedTime Time in seconds of animation played. (play rate independant).
* @param ExcessTime Time in seconds beyond end of animation. (play rate independant).
*/
virtual void OnAnimEnd(FLOAT PlayedTime, FLOAT ExcessTime);
// AnimTree editor interface
virtual INT GetNumSliders() const { return bShowTimeLineSlider ? 1 : 0; }
virtual FLOAT GetSliderPosition(INT SliderIndex, INT ValueIndex);
virtual void HandleSliderMove(INT SliderIndex, INT ValueIndex, FLOAT NewSliderValue);
virtual FString GetSliderDrawValue(INT SliderIndex);
/** Restart camera animations */
virtual void OnBecomeRelevant();
/** Pause camera animations */
virtual void OnCeaseRelevant();
/** Starts playing any camera anim we want to play in conjunction with this anim. */
void StartCameraAnim();
/** Stops playing any active camera anim playing in conjunction with this anim. */
void StopCameraAnim();
/** Update animation usage **/
#if !FINAL_RELEASE
virtual void UpdateAnimationUsage( FLOAT DeltaSeconds );
#endif //#if !FINAL_RELEASE
/** Initialize morph curve information **/
void InitCurveData();
/** Utility functions to ease off Casting */
virtual class UAnimNodeSequence* GetAnimNodeSequence() { return this; }
}
/** Change the animation this node is playing to the new name. Will be looked up in owning SkeletaMeshComponent's AnimSets array. */
native function SetAnim( name Sequence );
/** Start the current animation playing with the supplied parameters. */
native function PlayAnim(bool bLoop = false, float InRate = 1.0f, float StartTime = 0.0f);
/** Stop the current animation playing. CurrentTime will stay where it was. */
native function StopAnim();
// calls PlayAnim with the current settings
native function ReplayAnim();
/** Force the animation to a particular time. NewTime is in seconds. */
native function SetPosition(float NewTime, bool bFireNotifies);
/** Get normalized position, from 0.f to 1.f. */
native function float GetNormalizedPosition() const;
/**
* Finds out normalized position of a synchronized node given a relative position of a group.
* Takes into account node's relative SynchPosOffset.
*/
native function float FindGroupRelativePosition(FLOAT GroupRelativePosition) const;
/**
* Finds out position of a synchronized node given a relative position of a group.
* Takes into account node's relative SynchPosOffset.
*/
native function float FindGroupPosition(FLOAT GroupRelativePosition) const;
/**
* Get relative position of a synchronized node.
* Taking into account node's relative offset.
*/
native function float GetGroupRelativePosition() const;
/** Returns the global play rate of this animation. Taking into account all Rate Scales */
native function float GetGlobalPlayRate();
/** Returns the duration (in seconds) of the current animation at the current play rate. Returns 0.0 if no animation. */
native function float GetAnimPlaybackLength();
/**
* Returns in seconds the time left until the animation is done playing.
* This is assuming the play rate is not going to change.
*/
native function float GetTimeLeft();
/**
* Set custom animation root bone options.
*/
final native function SetRootBoneAxisOption
(
ERootBoneAxis AxisX = RBA_Default,
ERootBoneAxis AxisY = RBA_Default,
ERootBoneAxis AxisZ = RBA_Default
);
/**
* Set custom animation root rotation options.
*/
final native function SetRootBoneRotationOption
(
ERootRotationOption AxisX = RRO_Default,
ERootRotationOption AxisY = RRO_Default,
ERootRotationOption AxisZ = RRO_Default
);
defaultproperties
{
Rate=1.0
NotifyWeightThreshold=0.0
bSynchronize=TRUE
RootBoneOption[0] = RBA_Default
RootBoneOption[1] = RBA_Default
RootBoneOption[2] = RBA_Default
RootRotationOption[0]=RRO_Default
RootRotationOption[1]=RRO_Default
RootRotationOption[2]=RRO_Default
CameraAnimPlayRate=1.f
CameraAnimScale=1.f
CameraAnimBlendInTime=0.2f
CameraAnimBlendOutTime=0.2f
}

View File

@ -0,0 +1,95 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*
* This class encapsulates a common interface to extract multiple animation data and blend it.
*/
class AnimNodeSequenceBlendBase extends AnimNodeSequence
native(Anim)
abstract;
/**
* Structure regrouping all we need to extract an animation.
*/
struct native AnimInfo
{
/** Animation Name */
var const Name AnimSeqName;
/**
* Pointer to actual AnimSequence.
* Found from SkeletalMeshComponent using AnimSeqName when you call SetAnim.
*/
var transient const AnimSequence AnimSeq;
/**
* Bone -> Track mapping info for this player node.
* Index into the LinkupCache array in the AnimSet.
* Found from AnimSet when you call SetAnim.
*/
var transient const int AnimLinkupIndex;
};
/**
* Structure to define animation blending.
*/
struct native AnimBlendInfo
{
/** Name of animation sequence*/
var() Name AnimName;
/** Animation info */
var AnimInfo AnimInfo;
/** Weight i the blend */
var transient float Weight;
};
/** Array of animations to blend */
var(Animations) editfixedsize editinline export Array<AnimBlendInfo> Anims;
cpptext
{
// UObject interface
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
virtual void InitAnim(USkeletalMeshComponent* MeshComp, UAnimNodeBlendBase* Parent);
/** Deferred Initialization, called only when the node is relevant in the tree. */
virtual void DeferredInitAnim();
/** AnimSets have been updated, update all animations */
virtual void AnimSetsUpdated();
/** make sure animations are up date */
virtual void CheckAnimsUpToDate();
/** Lookup animation data for a given animation name */
void SetAnimInfo(FName InSequenceName, FAnimInfo& InAnimInfo);
/** Extract animations and do the blend. */
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
/** Update animation usage **/
virtual void UpdateAnimationUsage( FLOAT DeltaSeconds );
/** Get AnimInfo total weight */
FLOAT GetAnimInfoTotalWeight();
/**
* Resolve conflicts for blend curve weights if same morph target exists
*
* @param InChildrenCurveKeys Array of curve keys for children. The index should match up with Children.
* @param OutCurveKeys Result output after blending is resolved
*
* @return Number of new addition to OutCurveKeys
*/
virtual INT BlendCurveWeights(const FArrayCurveKeyArray& InChildrenCurveKeys, FCurveKeyArray& OutCurveKeys);
}
defaultproperties
{
Anims(0)=(Weight=1.0)
Anims(1)=()
}

View File

@ -0,0 +1,74 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNodeSequenceBlendByAim extends AnimNodeSequenceBlendBase
native(Anim)
hidecategories(Animations);
/** Angle of aiming, between -1..+1 */
var() Vector2d Aim;
/** Keep track if aim changed to force an update of the node */
var transient const Vector2d PreviousAim;
var() Vector2d HorizontalRange;
var() Vector2d VerticalRange;
/** Angle offset applied to Aim before processing */
var() Vector2d AngleOffset;
//
// Animations
//
// Left
var() Name AnimName_LU;
var() Name AnimName_LC;
var() Name AnimName_LD;
// Center
var() Name AnimName_CU;
var() Name AnimName_CC;
var() Name AnimName_CD;
// Right
var() Name AnimName_RU;
var() Name AnimName_RC;
var() Name AnimName_RD;
cpptext
{
/** Override this function in a subclass, and return normalized Aim from Pawn. */
virtual FVector2D GetAim();
// AnimNode interface
virtual void TickAnim(FLOAT DeltaSeconds);
// For slider support
virtual INT GetNumSliders() const { return 1; }
virtual ESliderType GetSliderType(INT InIndex) const { return ST_2D; }
virtual FLOAT GetSliderPosition(INT SliderIndex, INT ValueIndex);
virtual void HandleSliderMove(INT SliderIndex, INT ValueIndex, FLOAT NewSliderValue);
virtual FString GetSliderDrawValue(INT SliderIndex);
}
/**
* Makes sure animations are updated.
* If you're changing any of the AnimName_XX during game, call this function afterwards.
*/
native final function CheckAnimsUpToDate();
defaultproperties
{
HorizontalRange=(X=-1,Y=+1)
VerticalRange=(X=-1,Y=+1)
Anims(0)=(Weight=1.0)
Anims(1)=()
Anims(2)=()
Anims(3)=()
Anims(4)=()
Anims(5)=()
Anims(6)=()
Anims(7)=()
Anims(8)=()
}

View File

@ -0,0 +1,267 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*
* Slot for Matinee controlled Animation Trees.
* Each slot will be able to blend a defined number of channels (AnimNodeSequence connections).
*/
class AnimNodeSlot extends AnimNodeBlendBase
native(Anim)
hidecategories(Object);
/** True, when we're playing a custom animation */
var const bool bIsPlayingCustomAnim;
/** save blend out time when playing a one shot animation. */
var const FLOAT PendingBlendOutTime;
/** Child index playing a custom animation */
var const INT CustomChildIndex;
/** Child currently active, being blended to */
var const INT TargetChildIndex;
/** Array of target weights for each child. Size must be the same as the Children array. */
var Array<FLOAT> TargetWeight;
/** How long before current blend is complete (ie. target child reaches 100%) */
var const FLOAT BlendTimeToGo;
/**
* If TRUE (default), then forward the AnimEnd notification when we start blending out the animation.
* This usually improves transitions and blends, as we can start playing new animations as soon as this one
* starts blending out, as opposed to waiting until it is fully blended out.
* Setting this to FALSE, will trigger the standard behavior of triggering AnimEnd notifies when the animation is really done playing.
*/
var() bool bEarlyAnimEndNotify;
/**
* if TRUE, do not blend when the Skeletal Mesh is not visible.
* Optimization to save on blending time when meshes are not rendered.
* Instant switch instead.
*/
var() bool bSkipBlendWhenNotRendered;
/** If TRUE, Additive Animations override the source input.
* If FALSE, Additive Animations are added to source input. (DEFAULT)
*/
var() bool bAdditiveAnimationsOverrideSource;
/** TRUE if current it's used by Matinee, InterpTrackAnimControl
* FALSE if not
*/
var const transient bool bIsBeingUsedByInterpGroup;
/** allow bPauseAnims to be supported for this node type if we want */
var() bool bDontAddToAlwaysTickArray;
`if(`__TW_)
/** Prevent notifies from being triggered by anim blend children */
var bool bNoNotifies;
`endif
cpptext
{
// AnimNode interface
virtual void InitAnim(USkeletalMeshComponent* MeshComp, UAnimNodeBlendBase* Parent);
#if __TW_ANIMATION_
/** Deferred Initialization, called only when the node is relevant in the tree. */
virtual void DeferredInitAnim();
#endif
/** Update position of given channel */
virtual void MAT_SetAnimPosition(INT ChannelIndex, FName InAnimSeqName, FLOAT InPosition, UBOOL bFireNotifies, UBOOL bLooping, UBOOL bEnableRootMotion);
/** Update weight of channels */
virtual void MAT_SetAnimWeights(const FAnimSlotInfo& SlotInfo);
/** Rename all child nodes upon Add/Remove, so they match their position in the array. */
virtual void RenameChildConnectors();
// AnimNode interface
virtual void TickAnim(FLOAT DeltaSeconds);
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
// AnimNodeBlendBase interface
virtual void OnAddChild(INT ChildNum);
virtual void OnRemoveChild(INT ChildNum);
/** A child Anim has been modified */
virtual void OnChildAnimChange(INT ChildNum);
/** Child AnimNodeSequence hit end of animation */
virtual void OnChildAnimEnd(UAnimNodeSequence* Child, FLOAT PlayedTime, FLOAT ExcessTime);
virtual INT GetNumSliders() const { return 0; }
/**
* When requested to play a new animation, we need to find a new child.
* We'd like to find one that is unused for smooth blending,
* but that may be a luxury that is not available.
*/
INT FindBestChildToPlayAnim(FName AnimToPlay, UBOOL bOverride);
void SetActiveChild(INT ChildIndex, FLOAT BlendTime);
void UpdateWeightsForAdditiveAnimations();
/** Called after (copy/)pasted - reset values or re-link if needed**/
virtual void OnPaste();
virtual void SelectedActiveSequence( UAnimNodeSequence* Seq ) {}
/** Utility functions to ease off Casting */
virtual class UAnimNodeSlot* GetAnimNodeSlot() { return this; }
/**
* Clean up Slot Node Sequence Pool if used
* Called when world is cleaned up
*/
static void CleanUpSlotNodeSequencePool();
/**
* Release unused Sequence nodes if released
* Called before Tick is called, so that it doesn't leave any reference during tick
*/
static void FlushReleasedSequenceNodes(const USkeletalMeshComponent * SkelComp);
/**
* Release unused Sequence nodes if released
* Called before Tick is called, so that it doesn't leave any reference during tick
*/
static void ReleaseSequenceNodes(const USkeletalMeshComponent * SkelComp);
/**
* Release unused Sequence nodes if released
* Called before Tick is called, so that it doesn't leave any reference during tick
*/
static void PrintSlotNodeSequencePool();
protected:
/**
* Update Child Weight : Make sure childIndex isn't OOB
*/
virtual void UpdateChildWeight(INT ChildIndex);
/** Make sure child exists **/
void EnsureChildExists(INT ChildIndex, UBOOL bClaimOnly=FALSE);
}
/**
* Play a custom animation.
* Supports many features, including blending in and out.
*
* @param AnimName Name of animation to play.
* @param Rate Rate animation should be played at.
* @param BlendInTime Blend duration to play anim.
* @param BlendOutTime Time before animation ends (in seconds) to blend out.
* -1.f means no blend out.
* 0.f = instant switch, no blend.
* otherwise it's starting to blend out at AnimDuration - BlendOutTime seconds.
* @param bLooping Should the anim loop? (and play forever until told to stop)
* @param bOverride play same animation over again only if bOverride is set to true.
* @param StartTime When to start the anim (e.g. start at 2 seconds into the anim)
* @param EndTime When to end the anim (e.g. end at 4 second into the anim)
*
* @return PlayBack length of animation.
*/
final native function float PlayCustomAnim
(
name AnimName,
float Rate,
optional float BlendInTime,
optional float BlendOutTime,
optional bool bLooping,
optional bool bOverride,
optional float StartTime,
optional float EndTime
);
/**
* Play a custom animation.
* Supports many features, including blending in and out.
*
* @param AnimName Name of animation to play.
* @param Duration duration in seconds the animation should be played.
* @param BlendInTime Blend duration to play anim.
* @param BlendOutTime Time before animation ends (in seconds) to blend out.
* -1.f means no blend out.
* 0.f = instant switch, no blend.
* otherwise it's starting to blend out at AnimDuration - BlendOutTime seconds.
* @param bLooping Should the anim loop? (and play forever until told to stop)
* @param bOverride play same animation over again only if bOverride is set to true.
* @return TRUE if animation is playing, FALSE if couldn't play it.
*/
final native function bool PlayCustomAnimByDuration
(
name AnimName,
float Duration,
optional float BlendInTime,
optional float BlendOutTime,
optional bool bLooping,
optional bool bOverride = TRUE
);
/** Returns the Name of the currently played animation or '' otherwise. */
final native function Name GetPlayedAnimation();
/**
* Stop playing a custom animation.
* Used for blending out of a looping custom animation.
*/
final native function StopCustomAnim(float BlendOutTime);
/**
* Call this function to remove nodes from the AnimAlwaysTickArray so bPauseAnims will work,
* sets or clears the bDontAddToAlwaysTickArray
*/
final native function SetAllowPauseAnims(bool bSet);
/**
* Switch currently played animation to another one.
*/
final native function SetCustomAnim(Name AnimName);
/** Set bCauseActorAnimEnd flag */
final native function SetActorAnimEndNotification(bool bNewStatus);
`if(`__TW_ANIMATION_)
/** Set NotifyWeightThreshold to prevent triggering notifies */
final native function SetNotifyWeightThreshold(float Threshold);
`endif
/**
* Returns AnimNodeSequence currently selected for playing animations.
* Note that calling PlayCustomAnim *may* change which node plays the animation.
* (Depending on the blend in time, and how many nodes are available, to provide smooth transitions.
*/
final native function AnimNodeSequence GetCustomAnimNodeSeq();
/**
* Set custom animation root bone options.
*/
final native function SetRootBoneAxisOption
(
optional ERootBoneAxis AxisX = RBA_Default,
optional ERootBoneAxis AxisY = RBA_Default,
optional ERootBoneAxis AxisZ = RBA_Default
);
/**
* Set custom animation root rotation options.
*/
final native function SetRootBoneRotationOption
(
optional ERootRotationOption AxisX = RRO_Default,
optional ERootRotationOption AxisY = RRO_Default,
optional ERootRotationOption AxisZ = RRO_Default
);
/* Advance time regarding child weights */
final native function TickChildWeights(FLOAT DeltaSeconds);
defaultproperties
{
bAdditiveAnimationsOverrideSource=FALSE
bSkipBlendWhenNotRendered=FALSE // Should be investigated before turning back on. TTP #153546
bEarlyAnimEndNotify=TRUE
TargetWeight(0)=1.f
Children(0)=(Name="Source",Weight=1.0)
Children(1)=(Name="Channel 01")
bFixNumChildren=FALSE
NodeName="SlotName"
}

View File

@ -0,0 +1,72 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*
* Animation Node used to synch childs.
* Would be typically used to synch several walk/run/crouch cycles together.
*
* This node works by using the most relevant node in the final blend as the master node,
* to update all the others (slaves).
* This requires all cycles to be relatively synched (i.e. left foot is down on all cycles at 0.25% of the animation, regarless of its length).
*/
class AnimNodeSynch extends AnimNodeBlendBase
native(Anim);
/** definition of a group of AnimNodeSequence to synchronize together */
struct native SynchGroup
{
/** Cached array of anim node sequence nodes to synchronize */
var Array<AnimNodeSequence> SeqNodes;
/** Last master node used, do not search for a new one, if this one has a full weight... */
var transient AnimNodeSequence MasterNode;
/** Name of group. */
var() Name GroupName;
/** If FALSE, do not trigger slave nodes notifies. */
var() bool bFireSlaveNotifies;
/** Rate Scale */
var() float RateScale;
structdefaultproperties
{
RateScale=1.f
}
};
/** List of groups to synchronize */
var() Array<SynchGroup> Groups;
cpptext
{
virtual void InitAnim(USkeletalMeshComponent* MeshComp, UAnimNodeBlendBase* Parent);
virtual void TickAnim(FLOAT DeltaSeconds);
void UpdateMasterNodeForGroup(FSynchGroup& SynchGroup);
void RepopulateGroups();
}
/** Add a node to an existing group */
native final function AddNodeToGroup(AnimNodeSequence SeqNode, Name GroupName);
/** Remove a node from an existing group */
native final function RemoveNodeFromGroup(AnimNodeSequence SeqNode, Name GroupName);
/** Accesses the Master Node driving a given group */
native final function AnimNodeSequence GetMasterNodeOfGroup(Name GroupName);
/** Force a group at a relative position. */
native final function ForceRelativePosition(Name GroupName, FLOAT RelativePosition);
/** Get the relative position of a group. */
native final function float GetRelativePosition(Name GroupName);
/** Adjust the Rate Scale of a group */
native final function SetGroupRateScale(Name GroupName, FLOAT NewRateScale);
defaultproperties
{
Children(0)=(Name="Input",Weight=1.0)
bFixNumChildren=TRUE
}

View File

@ -0,0 +1,184 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNode_MultiBlendPerBone extends AnimNodeBlendBase
native(Anim);
/** Internal cached pointer to Pawn Owner */
var const transient Pawn PawnOwner;
/** Enum specifying how the weight should be checked */
enum EWeightCheck
{
/** If AnimNodeSlot is not playing an animation, pass through */
EWC_AnimNodeSlotNotPlaying,
};
/** Rule put on a node. */
struct native WeightNodeRule
{
/** Name of node */
var() Name NodeName;
/** Reference to node */
var AnimNodeBlendBase CachedNode;
/** Reference to cached slot node */
var AnimNodeSlot CachedSlotNode;
/** How the weight should be checked. */
var() EWeightCheck WeightCheck;
/** Child index of node to check weight for */
var() INT ChildIndex;
structdefaultproperties
{
WeightCheck=EWC_AnimNodeSlotNotPlaying
}
};
/** Definition of a mask rule. */
struct native WeightRule
{
var() WeightNodeRule FirstNode;
var() WeightNodeRule SecondNode;
};
struct native BranchInfo
{
// Exposed properties
/** Name of bone branch is starting from */
var() Name BoneName;
/** Used to set up smooth blending */
var() float PerBoneWeightIncrease;
structdefaultproperties
{
PerBoneWeightIncrease=1.f
}
};
/** Per bone masking definition */
struct native PerBoneMaskInfo
{
// Exposed properties
var() Array<BranchInfo> BranchList;
/** Desired weight for this Mask */
var() float DesiredWeight;
var() float BlendTimeToGo;
/**
* Rules for turning off Mask.
* This system allows to turn off a mask based on a set of rules.
* Most of the time BlendPerBone is associated with a AnimNodeSlot
* to play cutsom animations.
* So with this system, it's possible to make the BlendPerBone a pass through node
* when no custom animation is played on the AnimNodeSlot. Hence optimizing significantly the tree.
*
* Example:
* - NodeName = Name of AnimNodeSlot
* - ChildIndex = 0 (source of AnimNodeSlot, when no custom animation is playing)
* - WeightCheck = EWC_ChildIndexFullWeight
* So this reads, if the Source children of the AnimNodeSlot is full weight
* (ie no custom animation is playing), then turn off this mask and
* make this BlendPerBone a pass through node.
*
* @note: When setting up multiple rules, ALL of them must be true in order to turn off the mask.
* if one fails, then the mask will NOT be disabled.
*/
var() Array<WeightRule> WeightRuleList;
var() bool bWeightBasedOnNodeRules;
/**
* If the owner is not a local human player, then ignore this branch.
* (ie AI, other players in network...)
*/
var() bool bDisableForNonLocalHumanPlayers;
/** Set when there is a blend pending, and it's being delayed by CanBlendTo()/CanBlendOutFrom() */
var transient bool bPendingBlend;
// Internal properties
/** Weight scaling for each bone of the skeleton. Must be same size as RefSkeleton of SkeletalMesh. If all 0.0, no animation can ever be drawn from Child2. */
var transient Array<FLOAT> PerBoneWeights;
/**
* Bones required to be transformed to mesh space.
* When doing a MeshSpace blending, this array defines which bones need to be blended that way
* as an optimization. As it is expensive to convert from Parent Bone Space -> Mesh Space and back.
* So this ensures that the conversion is only performed on the critical bones.
* These are the bones which have a different mask weight than their parents (so they will be blended)
* and their parents (needed to build the mesh space skeleton, as we are converting from PARENT bone space.
* The other bones can be done with the faster parent bone space blend.
*/
var transient Array<BYTE> TransformReqBone;
/** Index to navigate above array */
var transient INT TransformReqBoneIndex;
};
/** List of Masks. Matches size of Children array - 1 */
var() editfixedsize editinline Array<PerBoneMaskInfo> MaskList;
/** Describes how a blend should be performed. */
enum EBlendType
{
EBT_ParentBoneSpace,
EBT_MeshSpace,
};
/** How rotation should be blended */
var() EBlendType RotationBlendType;
cpptext
{
/** Do any initialisation, and then call InitAnim on all children. Should not discard any existing anim state though. */
virtual void InitAnim(USkeletalMeshComponent* MeshComp, UAnimNodeBlendBase* Parent);
/** Ticking, updates weights... */
virtual void TickAnim(FLOAT DeltaSeconds);
/** @see UAnimNode::GetBoneAtoms. */
virtual void GetBoneAtoms(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, FCurveKeyArray& CurveKeys);
// Special Optimized Paths
FORCEINLINE void MeshSpaceBlendMultipleMasks(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, TArray<INT>& RelevantChildren, FArrayBoneAtomArray& ChildAtomsArray, FArrayMatrixArray& MaskTMArray, const TArray<INT> & ChildrenHasRootMotion, const FBoneAtomArray & ChildrenRootMotion);
FORCEINLINE void LocalBlendMultipleMasks(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, TArray<INT>& RelevantChildren, FArrayBoneAtomArray& ChildAtomsArray, const TArray<INT> & ChildrenHasRootMotion, const FBoneAtomArray & ChildrenRootMotion);
FORCEINLINE void MeshSpaceBlendSingleMask(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, TArray<INT>& RelevantChildren, FArrayBoneAtomArray& ChildAtomsArray, FArrayMatrixArray& MaskTMArray, const TArray<INT> & ChildrenHasRootMotion, const FBoneAtomArray & ChildrenRootMotion);
FORCEINLINE void LocalBlendSingleMask(FBoneAtomArray& Atoms, const TArray<BYTE>& DesiredBones, FBoneAtom& RootMotionDelta, INT& bHasRootMotion, TArray<INT>& RelevantChildren, FArrayBoneAtomArray& ChildAtomsArray, const TArray<INT> & ChildrenHasRootMotion, const FBoneAtomArray & ChildrenRootMotion);
/** Parent node is requesting a blend out. Give node a chance to delay that. */
virtual UBOOL CanBlendOutFrom();
/** parent node is requesting a blend in. Give node a chance to delay that. */
virtual UBOOL CanBlendTo();
/**
* Utility for creating the Mask PerBoneWeights array.
* Walks down the hierarchy increasing the weight by PerBoneWeightIncrease each step.
*/
virtual void CalcMaskWeight(INT MaskIndex);
virtual void UpdateRules();
/** Track Changes, and trigger updates */
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
/** Rename Child connectors upon edit/remove */
virtual void RenameChildConnectors();
// AnimNodeBlendBase interface
virtual void OnAddChild(INT ChildNum);
virtual void OnRemoveChild(INT ChildNum);
}
/**
* Control the weight of a given Mask.
*/
native final function SetMaskWeight(INT MaskIndex, FLOAT DesiredWeight, FLOAT BlendTime);
defaultproperties
{
Children(0)=(Name="Source",Weight=1.f)
CategoryDesc = "Filter"
}

View File

@ -0,0 +1,78 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNotify extends Object
native(Anim)
abstract
editinlinenew
hidecategories(Object)
collapsecategories;
/** Color of Notify in editor */
var editoronly Color NotifyColor;
cpptext
{
// AnimNotify interface.
virtual void Notify( class UAnimNodeSequence* NodeSeq ) {}
virtual void NotifyTick( class UAnimNodeSequence* NodeSeq, FLOAT AnimCurrentTime, FLOAT AnimTimeStep, FLOAT InTotalDuration ) {}
virtual void NotifyEnd( class UAnimNodeSequence* NodeSeq, FLOAT AnimCurrentTime ) {}
virtual FString GetEditorComment()
{
return TEXT("");
}
virtual FColor GetEditorColor()
{
#if WITH_EDITORONLY_DATA
return NotifyColor;
#else
return FColor( 0 );
#endif // WITH_EDITORONLY_DATA
}
/**
* Called by the AnimSet viewer when the 'parent' FAnimNotifyEvent is edited.
*
* @param NodeSeq The AnimNodeSequence this notify is associated with.
* @param OwnerEvent The FAnimNotifyEvent that 'owns' this AnimNotify.
*/
virtual void AnimNotifyEventChanged(class UAnimNodeSequence* NodeSeq, FAnimNotifyEvent* OwnerEvent) {}
}
simulated function bool FindNextNotifyOfClass(AnimNodeSequence AnimSeqInstigator, class<AnimNotify> NotifyClass, out AnimNotifyEvent OutEvent)
{
local AnimSequence Seq;
local int i;
local bool bFoundThis;
if(AnimSeqInstigator.AnimSeq != None)
{
// we look through the notifies to find the end that corresponds to this start
Seq = AnimSeqInstigator.AnimSeq;
for(i=0; i<Seq.Notifies.length; i++)
{
// Found us - remember the time
if(Seq.Notifies[i].Notify == self)
{
bFoundThis = TRUE;
}
// First notify of desired class after this 'start'
if(bFoundThis && ClassIsChildOf(Seq.Notifies[i].Notify.Class, NotifyClass))
{
// Copy info from event
OutEvent = Seq.Notifies[i];
// and set bool
return TRUE;
}
}
}
return false;
}
defaultproperties
{
NotifyColor=(R=255,G=200,B=200,A=255)
}

View File

@ -0,0 +1,40 @@
/**
*
*/
class AnimNotify_AkEvent extends AnimNotify
native(Anim);
var() AkEvent AkEvent;
var() bool bFollowActor;
var() Name BoneName;
`if(`__TW_WWISE_)
var() bool bIgnoreIfActorHidden;
/** Useful to ensure it won't activate while blending from this anim into a death anim */
var() bool bIgnoreIfActorDead;
/** This is the percent to play this Sound. Defaults to 100% (aka 1.0f) **/
var() float PercentToPlay;
`endif
cpptext
{
// AnimNotify interface.
virtual void Notify( class UAnimNodeSequence* NodeSeq );
#if __TW_WWISE_
virtual UAkEvent* PickEventToPlay( AActor* in_pOwner );
virtual UBOOL CanPlay( AActor* in_pOwner, USkeletalMeshComponent* in_pSkelComp, UAkEvent* in_pEvent );
virtual void GetSoundLocation( AActor* in_pOwner, USkeletalMeshComponent* in_pSkelComp, UAkEvent* in_pEvent, FVector& in_SoundLocation, INT& in_bEventIsOccluded, UBOOL& in_bEventIsAudible );
virtual void Play( AActor* in_pOwner, UAkEvent* in_pEvent, const FVector& in_SoundLocation, UBOOL in_bEventIsOccluded );
#endif // __TW_WWISE_
}
defaultproperties
{
bFollowActor=true
`if(`__TW_WWISE_)
PercentToPlay=1.0
bIgnoreIfActorDead=true
`endif
}

View File

@ -0,0 +1,20 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNotify_CameraEffect extends AnimNotify
native(Anim);
/** The effect to play non the camera **/
var() class<EmitterCameraLensEffectBase> CameraLensEffect;
cpptext
{
// AnimNotify interface.
virtual void Notify( class UAnimNodeSequence* NodeSeq );
virtual FString GetEditorComment() { return TEXT("CameraEffect"); }
}
defaultproperties
{
}

View File

@ -0,0 +1,39 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNotify_ClothingMaxDistanceScale extends AnimNotify
native(Anim);
/** The Particle system to play **/
var() float StartScale;
var() float EndScale;
var() EMaxDistanceScaleMode ScaleMode;
var float Duration;
cpptext
{
// AnimNotify interface.
virtual void Notify( class UAnimNodeSequence* NodeSeq );
virtual void NotifyEnd( class UAnimNodeSequence* NodeSeq, FLOAT AnimCurrentTime );
/**
* Called by the AnimSet viewer when the 'parent' FAnimNotifyEvent is edited.
*
* @param NodeSeq The AnimNodeSequence this notify is associated with.
* @param OwnerEvent The FAnimNotifyEvent that 'owns' this AnimNotify.
*/
virtual void AnimNotifyEventChanged(class UAnimNodeSequence* NodeSeq, FAnimNotifyEvent* OwnerEvent);
}
defaultproperties
{
NotifyColor=(R=200,G=255,B=200)
StartScale = 1;
EndScale = 1;
ScaleMode = MDSM_Multiply;
}

View File

@ -0,0 +1,28 @@
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class AnimNotify_Footstep extends AnimNotify
native(Anim);
`if(`__TW_)
/** 0 = left foot, 1 = right foot, 2 = left hand, 3 = right hand */
`else
/** 0=left 1=right */
`endif
var() int FootDown;
cpptext
{
// AnimNotify interface.
virtual void Notify( class UAnimNodeSequence* NodeSeq );
#if __TW_
virtual FString GetEditorComment() { switch(FootDown){ case 0: return TEXT("Left Footstep"); case 1: return TEXT("Right Footstep"); case 2: return TEXT("Left Handstep"); case 3: return TEXT("Right Handstep"); default: return TEXT("");}; }
#else
virtual FString GetEditorComment() { return (FootDown == 0) ? TEXT("Left Footstep") : TEXT("Right Footstep"); }
#endif // __TW_
}
defaultproperties
{
FootDown=0
}

Some files were not shown because too many files have changed in this diff Show More