Guest User

Untitled

a guest
Sep 5th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class InterpTrackVisibility extends InterpTrack
  2.     native(Interpolation);
  3.  
  4. /**
  5.  * Copyright 1998-2012 Epic Games, Inc. All Rights Reserved.
  6.  *
  7.  *
  8.  *  This track implements support for setting or toggling the visibility of the associated actor
  9.  */
  10.  
  11. cpptext
  12. {
  13.     // InterpTrack interface
  14.     virtual INT GetNumKeyframes() const;
  15.     virtual void GetTimeRange(FLOAT& StartTime, FLOAT& EndTime) const;
  16.     virtual FLOAT GetTrackEndTime() const;
  17.     virtual FLOAT GetKeyframeTime(INT KeyIndex) const;
  18.     virtual INT AddKeyframe(FLOAT Time, UInterpTrackInst* TrInst, EInterpCurveMode InitInterpMode);
  19.     virtual INT SetKeyframeTime(INT KeyIndex, FLOAT NewKeyTime, UBOOL bUpdateOrder=true);
  20.     virtual void RemoveKeyframe(INT KeyIndex);
  21.     virtual INT DuplicateKeyframe(INT KeyIndex, FLOAT NewKeyTime);
  22.     virtual UBOOL GetClosestSnapPosition(FLOAT InPosition, TArray<INT> &IgnoreKeys, FLOAT& OutPosition);
  23.  
  24.     virtual void PreviewUpdateTrack(FLOAT NewPosition, UInterpTrackInst* TrInst);
  25.     virtual void UpdateTrack(FLOAT NewPosition, UInterpTrackInst* TrInst, UBOOL bJump);
  26.  
  27.     /** Get the name of the class used to help out when adding tracks, keys, etc. in UnrealEd.
  28.     * @return   String name of the helper class.*/
  29.     virtual const FString   GetEdHelperClassName() const;
  30.  
  31.     virtual class UMaterial* GetTrackIcon() const;
  32.  
  33.     /** Whether or not this track is allowed to be used on static actors. */
  34.     virtual UBOOL AllowStaticActors() { return TRUE; }
  35.  
  36.     virtual void DrawTrack( FCanvas* Canvas, UInterpGroup* Group, const FInterpTrackDrawParams& Params );
  37. }
  38.  
  39.  
  40. /** Visibility track actions */
  41. enum EVisibilityTrackAction
  42. {
  43.     /** Hides the object */
  44.     EVTA_Hide,
  45.  
  46.     /** Shows the object */
  47.     EVTA_Show,
  48.  
  49.     /** Toggles visibility of the object */
  50.     EVTA_Toggle
  51. };
  52.  
  53.  
  54.  
  55. /** Required condition for firing this event */
  56. enum EVisibilityTrackCondition
  57. {
  58.     /** Always play this event */
  59.     EVTC_Always,
  60.  
  61.     /** Only play this event when extreme content (gore) is enabled */
  62.     EVTC_GoreEnabled,
  63.  
  64.     /** Only play this event when extreme content (gore) is disabled */
  65.     EVTC_GoreDisabled
  66. };
  67.  
  68.  
  69.  
  70. /** Information for one toggle in the track. */
  71. struct native VisibilityTrackKey
  72. {
  73.     var     float                   Time;
  74.     var()   EVisibilityTrackAction  Action;
  75.  
  76.     /** Condition that must be satisfied for this key event to fire */
  77.     var EVisibilityTrackCondition ActiveCondition;
  78. }
  79.  
  80. /** Array of events to fire off. */
  81. var array<VisibilityTrackKey>   VisibilityTrack;
  82.  
  83. /** If events should be fired when passed playing the sequence forwards. */
  84. var() bool  bFireEventsWhenForwards;
  85.  
  86. /** If events should be fired when passed playing the sequence backwards. */
  87. var() bool  bFireEventsWhenBackwards;
  88.  
  89. /** If true, events on this track are fired even when jumping forwads through a sequence - for example, skipping a cinematic. */
  90. var() bool  bFireEventsWhenJumpingForwards;
  91.  
  92. defaultproperties
  93. {
  94.     TrackInstClass=class'Engine.InterpTrackInstVisibility'
  95.     TrackTitle="Visibility"
  96.     bFireEventsWhenForwards=true
  97.     bFireEventsWhenBackwards=true
  98.     bFireEventsWhenJumpingForwards=true
  99. }
Add Comment
Please, Sign In to add comment