## PlotCamSeqForCachedObjects

### Introduced

v12.0 (2014)

### Description

Plot file cached objects to new cache files in Camera Sequencer time.

### Scripting Syntax

    oArray = PlotCamSeqForCachedObjects( [Path], [SequencerIn], [SequencerOut], [PlotWithoutGaps], [Attributes], [UseGlobalKine] );

### Return Value

An Array consisting of a comma-delimited String containing object names, a comma-delimited String containing the location to plotted cache files, a collection of cache clips that will be deleted.

### Parameters

Parameter | Type | Description
--- | --- | ---
Path | String | The target path to put plotted cache files. The filename needs to contain a "_#" token.
SequencerIn | Long | Start Camera Sequencer frame to plot Default Value: 1
SequencerOut | Long | End Camera Sequencer frame to plot Default Value: 100
PlotWithoutGaps | Boolean | Determine whether or not to ignore the gaps between ShotClips. Default Value: False
Attributes | String | List of attributes to include. If not specified, all attributes will be plotted.
UseGlobalKine | Boolean | True to plot in global space. Default Value: False

### Examples

#### Python Example

    """

    The sample code demonstrates how to construction a camera sequencer shot with cached ICE simulations

    """

    # 1) Create a basic emission from grid and cache the ICE simulation to file

    Application.NewScene( "", False )

    Application.CreatePrim("Grid", "MeshSurface", "", "")

    Application.ICEFlow_CreateParticles("", "", "")

    Application.CacheObjectsIntoFile( "pointcloud", 5, 1, 100, 1, True, True,

     "Color,Force,Mass,NbSubSamples,Orientation,PointPosition,PointVelocity,Scale,Shape,SimulatedFrameFraction,Size,State_ID",

     "ICECache1",

     XSIUtils.BuildPath( "[project path]", "Simulation", "[model]", "[object]", "[object]_ICECache1_#.icecache" ),

     False )

    # 2) Create a new point cloud and apply the cached simulation

    Application.NewScene( "", False )

    Application.GetPrim( "pointcloud", "ice_cached_cloud" )

    Application.AddFileCacheSource( "ice_cached_cloud",

     XSIUtils.BuildPath( "[project path]", "Simulation", "scene_root", "pointcloud", "pointcloud_ICECache1_[1..100].icecache" ),

     "", "" )

    # 3) Create Camera Sequencer Shot Clips

    Application.AddShotClip( "", "Shot1", "", 1, 80, 99 )

    Application.AddShotClip( "", "Shot2", "", 25, 1, 31 )

    Application.AddShotClip( "", "Shot3", "", 60, 80, 99 )

    Application.SceneRefresh()

    # 4) Plot the cached ICE simulation in the Camera Sequencer

    RetVal = Application.PlotCamSeqForCachedObjects( XSIUtils.BuildPath( "[project path]", "Simulation", "CamSeq", "ice_cached_cloud_CamSeqCache_#.icecache" ),

     1, 100, "", "", False )

    Application.LogMessage( "Name of cached cloud: " + RetVal[0] )

    Application.LogMessage( "Location of cache files: " + RetVal[1] )

    Application.LogMessage( "Collection of clips to be deleted: " + RetVal[2].GetAsText() )

    # 5) Re-apply plotted cache simulation back to the pointcloud

    Application.ApplyCamSeqFileCacheSources( RetVal[0], RetVal[1], RetVal[2] )

### See Also

ApplyCamSeqFileCacheSources PlotCamSeqToActions PlotFrameSetToActions PlotCamSeqShape PlotSequencerCamera GetSceneFrameSetFromCamSeq