User Tools

Site Tools


example_changecameramode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

example_changecameramode [2016/09/06 08:36] (current)
act created
Line 1: Line 1:
 +====== Example: Change camera mode of all connected cameras ======
 +This script changes the camera mode off all connected cameras to "​photo"​.
 +
 +<​code>​
 +// Get a list of connected cameras
 +var cameraList = GetCameraList(true);​
 +
 +// Iterate over all cameras and set the mode to "​photo"​
 +for (var i=0; i<​cameraList.length;​ ++i)
 +{
 +    if (GetCameraMode(cameraList[i]) != "​photo"​)
 +    {
 +        SetCameraMode("​photo",​ cameraList[i],​ false);
 +    }
 +}
 +</​code>​
  
example_changecameramode.txt · Last modified: 2016/09/06 08:36 by act