Automation API
Automation API
SceneComposer provides an interoperable interface, accessible from any .NET language binding that support a progressive and evolving level of automation.
SCManager exposes the automation API enabling an application developer to write an own program which can load SceneComposer solutions and generate asset files. In order to use the operations provided by this API, refer to following dlls:
The API offers a singleton instance of SCManager which allows to instantiate a single object of class SCManager and use the methods provided.
Useing Automation API:
- Create a C# application
- Add SceneComposer.Automation.dll and SceneComposer.SDKInterface.dll as references in the C# project.
- Reference the dlls in the C# application:
- using SceneComposer.SDKInterface.Solution;
- using SceneComposer.Automation;
SceneComposer.Automation.dll
SceneComposer.Automation.dll provides the following methods and properties:
- SCManager.Instance.Initialize(): Performs the initialization of all services.
- SCManager.Instance.Solution: Returns the current solution or null if no solution is loaded.
- SCManager.Instance.LoadSolution(solutionFileName): Loads and returns a new solution from the specified solution file, which can further be accessed and managed through the query interface.
- SCManager.Instance.GenerateAsset(assetFileName, solution.Scenes): Generates an asset file based on the current solution. The asset file will contain all items which have the "Always Export" flag set or are referred by other included items. In addition the asset file will contain the specified extra scenes with all their dependencies. GenerateAsset(assetFileName, scenesList ) requests the path of the asset as a parameter. Its function is to generate the asset file at the specified location on the computer. The second parameter represents a list of the extra scenes that you want to include.
SceneComposer.SDKInterface.dll
SceneComposer.SDKInterface.dll provides the methods that allow to manage and query the solution received with the LoadSolution() method or from the Solution property.
The query interface provides the following information:
- List of scenes / Scene by name iterating on elements of the list
- List of animations / Animation by name