Difference between revisions of "API"
Chris Monson (Talk | contribs) (→Methods) |
Chris Monson (Talk | contribs) (→getBPM) |
||
Line 48: | Line 48: | ||
'''getBPM() As Double''' | '''getBPM() As Double''' | ||
− | Gets the current | + | Gets the BPM of the current cuelist |
Usage: | Usage: |
Latest revision as of 14:45, 15 June 2013
Contents |
[edit] Types
[edit] api.attributeTypes
[edit] Classes
[edit] api.cues
Used for working with cues.
[edit] api.groups
Used for working with groups.
[edit] api.output
Used for getting information about DMX output.
[edit] Methods
[edit] getTime
getTime() As Double
Gets the current playback position.
Usage:
print(api.getTime())
[edit] setTime
setTime(time As Double)
Sets the current playback position to the specified time.
Usage:
api.setTime(36.5) print(api.getTime())
[edit] getBPM
getBPM() As Double
Gets the BPM of the current cuelist
Usage:
print(api.getBPM())
[edit] wait
wait(seconds As Double)
Causes execution to wait for the specified number of seconds.
Usage:
api.wait(3.5)
[edit] isPlaying
isPlaying() As Boolean
Checks to see if the timeline is currently playing back.
Usage:
if(api.isPlaying()): api.stopPlayback()
[edit] startPlayback
startPlayback()
Starts timeline playback.
Usage:
if(api.isPlaying() == False): api.startPlayback()
[edit] stopPlayback
stopPlayback()
Stops timeline playback.
Usage:
if(api.isPlaying()): api.stopPlayback()
[edit] NextCue
nextCue()
Advances timeline to the next cue.
Usage:
api.nextCue()
[edit] PreviousCue
previousCue()
Moves timeline to the previous cue.
Usage:
api.previousCue()
[edit] Event Handling
[edit] onInitialize
Called when the script is loaded.
Usage:
def onInitialize(): print("Script Loaded")
[edit] onDispose
Called when the script is being disposed by either it being disabled, or by Lightforge closing.
Usage:
def onDispose(): print("Addon Disposing")
[edit] onEdit
Called when the script settings are being edited. Editing a script's settings from the Script Settings Dialog is only possible if this function is implemented in your code.
Usage:
def onEdit(): print("Settings Edit")
[edit] onExecute
Called when this script is specifically executed.
Usage:
def onExecute(): print("Script Executed")
[edit] onExecuteAsync
Called when this script is specifically executed. Code run from this function is executed asynchronously.
Usage:
def onExecuteAsync(): print("Script Executed Asynchronously")
[edit] onStartup
Called when Lightforge starts up.
Usage:
def onStartup(): print("Lightforge Started")
[edit] onStartupAsync
Called when Lightforge starts up. Code run from this function is executed asynchronously.
Usage:
def onStartupAsync(): print("Lightforge Started (Async)")
[edit] onPlaybackStart
Called when timeline playback has started.
Usage:
def onPlaybackStart(): print("Playback Started")
[edit] onPlaybackStop
Called when timeline playback has stopped
Usage:
def onPlaybackStop(): print("Playback Stopped")
[edit] onFrameChange
Called on every frame change during playback, scrubbing, and time changes.
Usage:
def onFrameChange(seconds As Double): print("Frame Changed " + seconds)
[edit] onShutdown
Called when Lightforge is shutting down.
Usage:
def onShutdown(): print("Lightforge Shutdown")
[edit] onCuelistChange
Called when the current cuelist has been changed.
Usage:
def onCuelistChange(): print("Cue List Changed")
[edit] onShowLoaded
Called when a new show has been loaded.
Usage:
def onShowLoaded(): print("Show Loaded")