-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored for unity beta release 2017.1
- Loading branch information
1 parent
3555ae7
commit 8317077
Showing
6 changed files
with
70 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
AlembicImporter/Assets/UTJ/Alembic/Editor/Importer/AlembicImporterEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotAsset.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if ENABLE_TIMELINE | ||
#if UNITY_2017_1_OR_NEWER | ||
|
||
using System; | ||
using UnityEngine; | ||
|
38 changes: 38 additions & 0 deletions
38
AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotPlayable.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#if UNITY_2017_1_OR_NEWER | ||
|
||
using System; | ||
using UnityEngine.Playables; | ||
|
||
namespace UTJ.Alembic | ||
{ | ||
public class AlembicShotPlayable : ScriptPlayable | ||
{ | ||
public AlembicStreamPlayer streamPlayer { get; set; } | ||
|
||
public float m_StartTimeOffsetsdfs; | ||
|
||
public float m_StartTimeOffset; | ||
public float m_EndTimeClipOff; | ||
public float m_TimeScale; | ||
public AlembicPlaybackSettings.CycleType m_Cycle = AlembicPlaybackSettings.CycleType.Hold; | ||
|
||
public override void ProcessFrame(FrameData info, object playerData) | ||
{ | ||
base.ProcessFrame(info, playerData); | ||
|
||
if (streamPlayer == null) | ||
return; | ||
|
||
streamPlayer.m_PlaybackSettings.m_startTime = 0f; | ||
streamPlayer.m_PlaybackSettings.m_cycle = m_Cycle; | ||
streamPlayer.m_PlaybackSettings.m_timeOffset = (float)m_StartTimeOffset; | ||
streamPlayer.m_PlaybackSettings.m_endTime = (float)streamPlayer.m_PlaybackSettings.m_duration - m_EndTimeClipOff; | ||
streamPlayer.m_PlaybackSettings.m_timeScale = (float)m_TimeScale; | ||
streamPlayer.m_PlaybackSettings.m_Time = (float)handle.time; | ||
streamPlayer.m_PlaybackSettings.m_OverrideTime = true; | ||
streamPlayer.m_PlaybackSettings.m_preserveStartTime = true; | ||
} | ||
} | ||
} | ||
|
||
#endif |
12 changes: 12 additions & 0 deletions
12
AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotPlayable.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicTrack.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters