## GetShotClip

### Introduced

v12.0 (2014)

### Description

Finds a Clip given the sequence time in frames.

### Scripting Syntax

    GetShotClip( Frame, [GlobalFrame], [Clip], [DirectlyOver], [ActiveCamera] );

### Parameters

Parameter | Type | Description
--- | --- | ---
Frame | Double | Frame number in sequence time.
GlobalFrame | Double | Returns time-remapped frame number in scene time. It's recommended to set to -1 if it's not required, to avoid computing the global frame . That will speed up the processing time. Default Value: -1
Clip | Clip | Returns Shot clip under current sequence time.
DirectlyOver | Boolean | Returns True if that requested frame is directly within the time span of the ShotClip, and False otherwise.
ActiveCamera | Camera | Returns the camera being used by the ShotClip.

### Examples

#### 1. VBScript Example

    Application.NewScene "", false

    Application.AddShotClip , "SampleClip", "Camera", 5, 1, 20

    globalFrame = -1	'global frame time will not be calculate and will return -1.

    Application.GetShotClip 20, globalFrame, oClip, bDirectly, oActiveCam

    Application.LogMessage globalFrame

    Application.LogMessage oClip

    Application.LogMessage bDirectly

    Application.LogMessage oActiveCam

    'OUTPUT:

    ' INFO : -1

    ' INFO : Camera_Sequencer.Shot_Track.SampleClip

    ' INFO : True

    ' INFO : Camera

#### 2. Python Example

    """

    This example shows how to retrieve the output arguments from

    the returning ISIVTCollection object.

    """

    Application.AddShotClip( "", "SampleClip", "Camera", 5, 1, 20 )	# This will add a shotclip between sequence frame 5 and 24.

    retCol = Application.GetShotClip( 10, 0 )	# Retrieve the shot clip information at frame 10

    # Retrieves the output argument using it key value

    GlobalFrame = retCol.Value( "GlobalFrame"  )	# Returns the Global Frame time.

    oShotClip = retCol.Value( "Clip" ) 			# Returns the Shot Clip object

    DirectlyOver = retCol.Value( "DirectlyOver" )# Returns True if frame is directly within time frame of the Shot Clip

    ActiveCamera = retCol.Value( "ActiveCamera" )# Returns the active camera object of the shot clip

    Application.LogMessage( GlobalFrame )

    Application.LogMessage( oShotClip )

    Application.LogMessage( DirectlyOver )

    Application.LogMessage( ActiveCamera )

    # OUTPUT:

    # INFO : 6.0

    # INFO : Camera_Sequencer.Shot_Track.SampleClip

    # INFO : True

    # INFO : Camera

### See Also

AddShotClip Clip