Softimage SDK Programmer's Guide > Plug-in Development > Animation > Playback Controls >

# Controlling the Frame Rate and Format

The playback frame rate and format (The speed at which frames are displayed) are used only for the playback interaction in Softimage. These playback options take the default settings made in the Output Format property, but you can change them as required for playback without affecting the default frame format and rate set for the scene.

There are four standard frame rate formats described by the numerical value contained in the Format parameter. Specifying the custom frame rate format allows the user to define a non-standard frame rate in the Rate parameter value:

Format parameter value | Description | Rate parameter value (frames per second)
--- | --- | ---
7 | FILM format | 24 fps
8 | PAL format | 25 fps
10 | NTSC format | 29.97 fps
11 | Custom format | frame rate defined by user
19 | HDTV format | 30 fps

Tip

The Format parameter values correspond to the siDefaultTimeFormat enum, but these are the values that are logged when using the SetValue command.

These can be accessed directly via the GetValue and SetValue commands (as discussed in Accessing Parameter Values Directly) or through the Parameter or Parameter object, as demonstrated in the examples below.

JScript Example: Finding the Current Frame Rate

    // JScript (command access)
    var format = GetValue( "PlayControl.Format" );
    var results = "Current frame: ";

    switch (format) {
    	case 10 : results += " NTSC (29.97 fps)"; break;
    	case 8 : results += " PAL (25 fps)"; break;
    	case 7 : results += " FILM (24 fps)"; break;
    	case 19 : results += " HDTV (30 fps)"; break;
    	case 11 : results += " Custom (User ticks per second)";
    	default : results = "Unknown format!";
    }
    Application.LogMessage( results );

    // Expected results:
    //INFO : Current frame:  FILM (24 fps)

Python Example: Setting a Custom Frame Rate

    # Python (command access)
    app = Application
    app.SetValue( "PlayControl.Format", 11 # switch to custom format
    app.SetValue( "PlayControl.Rate", 10 )# set rate to 10 frames per second

C++ Example: Changing the Current Frame Rate

    // Get the current project
    Application app;
    Project prj = app.GetActiveProject();

    // The PlayControl property set is stored with scene data under the project
    CRefArray proplist = prj.GetProperties();
    Property playctrl( proplist.GetItem(L"Play Control") );

    // Switch to PAL format (25 frames per second)
    playctrl.PutParameterValue( L"Format", 8.0 );