# FTC Command (Optional)

#### <a class="anchor" id="bkmrk--23"></a>Command Line Automation with FTC Command

*FTCCmd* is a command line tool that supports operations like import and the generation of assets without the need to open SceneComposer GUI.

It is delivered as an ***optional add on*** to CGI Studio with the following content:

<div class="contents" id="bkmrk-%3Ccgi-studio-root%3E%2Fbi"><div class="contents"><div class="textblock">- *&lt;cgi-studio-root&gt;/bin/SceneComposer/FTCCmd.exe*
- *&lt;cgi-studio-root&gt;/bin/SceneComposer/FTCCmd.exe.config*

</div></div></div>FTCCmd can be launched by using the Windows Command Prompt.

<div class="contents" id="bkmrk-ftccmd.exe-relies-on"><div class="contents"><div class="textblock"><dl class="note"><dt></dt><dd><p class="callout info">FTCCmd.exe relies on standard SceneComposer binaries, hence it is only functional when located in the same folder as SceneComposer.exe and related dynamic link libraries.</p>

</dd><dd></dd></dl>---

</div></div></div>#### <a class="anchor" id="bkmrk--24"></a>FTCCmd Arguments

The FTCCmd syntax basically supports following command line arguments:

```
- FTCCmd /? - displays generic info about the possible modes (Import, <a class="code" href="http://dev.doc.cgistudio.at/APILINK/group___f_e_a_t_s_t_d___d_i_a_g_n_o_s_t_i_c_s.html#ggad2cbc908487f2a3b4340020c0f69bda0a4022bc360aafc7b5692c92639c5d975b" title="Info.">Info</a>, Generate, ExportScl)
- FTCCmd {Mode} /? - displays detailed info about the specified mode
- FTCCmd {Mode} {SolutionFile} {Options} - performs an operation on the given solution as specified by the mode and the additional options
```

Note the following syntax rules:

<div class="contents" id="bkmrk-%7B%7D-%3D-any-content-whi"><div class="contents"><div class="contents"><div class="textblock">- {} = Any content which is included between curly brackets is *mandator*
- \[\] = Any content which is included between square brackets is *optional*
- \[...\] = The suspension point indicates that the content can be *repeated*
- For any path the "" (quotation marks) have to be used.

</div></div></div></div>```bash
C:\SceneComposer>FTCCmd /?
FTCCmd /?
 --or--
FTCCmd {Mode} /?
 --or--
FTCCmd /v
 --or--
FTCCmd /version
 --or--
FTCCmd {Mode} {SolutionFile} {Options}

  Mode                Specifies the mode (Info, Import, Generate, ExportScl).
  SolutionFile        The solution file which will be processed.
  Options             See help specific for each mode.
  /SH,/SCHost         Specifies the path to the SCHost.dll file that will be taken into account.

C:\SceneComposer>


```

There are four operation modes supported:

<div class="contents" id="bkmrk-info-import-export-s"><div class="contents"><div class="textblock">- <span style="color: rgb(230,126,35);">[Info](#bkmrk-ftccmd-operation-mod)</span>
- <span style="color: rgb(230,126,35);">[Import](#bkmrk-ftccmd-operation-mod-0)</span>
- <span style="color: rgb(230,126,35);">[Export SCL](#bkmrk-ftccmd-operation-mod-1)</span>
- <span style="color: rgb(230,126,35);">[Generate](#bkmrk-ftccmd-operation-mod-2)</span>

</div></div></div>Arguments related to FTCCmd configuration and license handling

<div class="contents" id="bkmrk-%2Fconfig-%2Flicenses"><div class="contents"><div class="textblock">- <span style="color: rgb(230,126,35);">[/Config](#bkmrk-ftccmd-configuration)</span>
- <span style="color: rgb(230,126,35);">[/Licenses](#bkmrk-ftccmd-license-handl)</span>

</div></div></div>Get Info, Import or Generate asset for old solutions using Convert option

<div class="contents" id="bkmrk-%2Fconvert"><div class="contents"><div class="textblock">- <span style="color: rgb(230,126,35);">[/Convert](#bkmrk-ftccmd-convert-solut)</span>

</div></div></div>Get a piece of information about version both in FTCLauncher and FTCCmd

<div class="contents" id="bkmrk-%2Fversion"><div class="contents"><div class="textblock">- <span style="color: rgb(230,126,35);">[/Version](#bkmrk-ftccmd-version-solut)</span>

</div></div></div>Specify full file path to SCHost.dll file for Scene Composer

<div class="contents" id="bkmrk-%2Fschost"><div class="contents"><div class="contents"><div class="textblock">- <span style="color: rgb(230,126,35);">[/SCHost](#bkmrk-ftccmd-specifying-wh)</span>

</div></div></div></div><div class="contents" id="bkmrk--1"><div class="contents"><div class="textblock">---

</div></div></div>#### <a class="anchor" id="bkmrk--26"></a>FTCCmd Specifying which SCHost.dll : /SH,/SCHost

This command allows you to specify the full file path to the SCHost.dll file to be used by FTCCmd.

**Example:**

FTCCmd {Mode} {SolutionFile} {Options} /SCHost {SCHost.dll Path}

```
FTCCmd ExportScl d:\Libraries\Materials.scs /outscl d:\ExportedLibraries\Materials.scl /SCHost "C:\temp\Scenecomposer\SCHost.dll"
```

<div class="contents" id="bkmrk--2"><div class="contents"><div class="textblock"><div class="fragment">  
</div>---

</div></div></div>#### <a class="anchor" id="bkmrk--27"></a>FTCCmd Operation Mode: Info

Use the *Info* operation mode of FTCCmd to display some basic information about the content of a given solution (for example: the scene contained in the accessed solution, the used animations, the widgets which are used in the given solution and their properties).

```
C:\SceneComposer>FTCCmd info
Displays a list with scenes and animations contained in a solution.

FTCCmd Info {SolutionFile} [/Convert Yes|No]

  SolutionFile        The solution file which will be processed.
  /Convert            Converts the solution if necessary (Yes, No, default No).

C:\SceneComposer>


```

**Example:**

```
FTCCmd <a class="code" href="http://dev.doc.cgistudio.at/APILINK/group___f_e_a_t_s_t_d___d_i_a_g_n_o_s_t_i_c_s.html#ggad2cbc908487f2a3b4340020c0f69bda0a4022bc360aafc7b5692c92639c5d975b" title="Info.">Info</a> "C:\Documents and Settings\User\Desktop\Solution\Solution.scs"
```

<div drawio-diagram="1032"><img src="https://doc316en.candera.eu/uploads/images/drawio/2023-02/drawing-4-1676446709.png" alt="drawing-4-1676446709.png"/></div>

<div class="contents" id="bkmrk--4"><div class="contents"><div class="textblock">  
</div></div></div>---

#### <a class="anchor" id="bkmrk--29"></a>FTCCmd Operation Mode: Import

Use the *Import* operation mode of FTCCmd to import content like FBX files or images to a given solution. Following options are supported:

```
C:\SceneComposer>FTCCmd Import
Imports content into a solution.

FTCCmd Import {SolutionFile} /Importer Fbx|Image /Input {File1} [{File2} ...] /Destination {DestinationFolder} [/Flags {Flag1} [{Flag2} ...]] [/Convert Yes|No] [/Config {ConfigFile}]

  SolutionFile        The solution file which will be processed.
  /Importer           Specifies the importer to use (Fbx, Image).
  /I,/Input           Specifies the list of files to process. The following wildcards are supported: '*' - zero or more characters, '?' - zero or one characters. Example: *.jpg
  /B,/BitmapProfile   Specifies the bitmap profile to be applied to the imported images (full name). Example: "/Global/Config/Profiles/BitmapProfiles/BitmapProfile"
  /D,/Destination     Specifies the destination folder from the solution where the imported content will be put.
  /F,/Flags           Specifies the import flags (ClearDestination, PreserveLibraryItemAttributes, ShowInImports, UnlockItems).
  /Convert            Converts the solution if necessary (Yes, No, default No).
  /Cfg,/Config        Specifies the configuration file.

Example:
FTCCmd Import d:\Solutions\SolutionAuto\SolutionAuto.scs /Importer Fbx /Input d:\Solutions\_importable\CarGeneric\CarGeneric.FBX /Destination /MyModule/Imports/CarGeneric

C:\SceneComposer>


```

**Optional Import flags:**

<div class="contents" id="bkmrk-cleardestination%3A-de"><div class="contents"><div class="textblock">- *ClearDestination*: Deletes existing items in the destination folder
- *PreserveLibraryItemAttributes*: Preserves item attributes
- *ShowInImports*: Makes the imported objects visible in Imports panel

</div></div></div>**Wildcard Support:**

If there are many files which must be imported we can use the available wildcards - characters that can be used as a substitute for an entire class of characters. For instance, if in a folder we have many graphic files named "img1.png", "img2.png", "img3.png" and so forth, and if it is necessary to import all of them we can do this by specifying through the wildcard (\*) that we need to import all the files which respect the rule "img\*.png".

Available wildcards:

<div class="contents" id="bkmrk-%28%2A%29-star-wildcard%3A-u"><div class="contents"><div class="textblock">- *(\*) Star wildcard*: used for 0 or many characters (any)
- *(?) Question mark wildcard*: used for 0 or exactly one character (any)

</div></div></div>If it is necessary to set the bitmap attributes, following option is available:

```
FTCCmd ... /BitmapProfile <bitmap_profile_full_name>
```

**Examples:**

```
FTCCmd Import "D:\Work\Solutions\SolutionImportBitmap\SolutionImportBitmap.scs" /Importer image /Input 
FTCCmd Import "D:\Work\Images\rust.png" /BitmapProfile "/Global/Config/Profiles/BitmapProfiles/BitmapProfile2" 
/Destination "/MyModule/Imports/Import5"
```

---

#### <a class="anchor" id="bkmrk--31"></a>FTCCmd Operation Mode: Export SCL

This mode will allow you to export a specific solution to an .scl file. The specified output solution must be of type SCL in order to succeed.

```
C:\SceneComposer>FTCCmd ExportSCl
Exports the specified solution to an .scl file. The specified solution must be of type SCL in order to succeed.

FTCCmd ExportScl {SolutionFile} /outscl {OutputFilePath}

  SolutionFile               The solution file which will be processed.
  /outscl OutputSclFilePath  Specifies the file path where the SCL is to be generated
  /Convert                   Converts the solution if necessary (Yes, No, default No).

Example:
FTCCmd ExportScl d:\Libraries\Materials.scs /outscl d:\ExportedLibraries\Materials.scl

C:\SceneComposer>


```

<div class="contents" id="bkmrk-solutionfile%3A-the-fi"><div class="contents"><div class="textblock"><div class="fragment">  
</div>- SolutionFile: The file path to the solution file (.scs) to be exported.
- OutputFilePath: The file path including the (.scl) file name where the SCL is to be generated.

</div></div></div>Example:

```
FTCCmd ExportScl d:\Libraries\Materials.scs /outscl d:\ExportedLibraries\Materials.scl /SCHost "C:\temp\Scenecomposer\SCHost.dll"
```

<div class="contents" id="bkmrk--12"><div class="contents">  
</div></div>---

#### <a class="anchor" id="bkmrk--33"></a>FTCCmd Operation Mode: Generate

Use the *Generate* operation mode of FTCCmd to generate a simulation or target asset from a given solution. Following options are supported:

```
C:\SceneComposer>FTCCmd Generate
Generates an asset file from the solution.

FTCCmd Generate {SolutionFile} /ShaderCompiler Target|Simulation /Asset {AssetFile} [/AssetProfile {AssetProfileFullName}] [/CustomId {Id}] [/FloatFormat {Format}] [/Convert Yes|No] [/Config {ConfigFile}] [/Licenses None | {Lic1} [{Lic2} ...]]

  SolutionFile        The solution file which will be processed.
  /SC,/ShaderCompiler Specifies the shader compiler to use (Simulation, Target).
  /FF,/FloatFormat    Specifies the float number format to use.
  /AF,/Asset          Specifies the asset file which is going to be generated.
  /AP,/AssetProfile   Specifies the full name of the asset profile (from solution) to be activated
  /Id,/CustomId       Specifies the custom id written to the asset header (long integer, default 0).
  /Convert            Converts the solution if necessary (Yes, No, default No).
  /Cfg,/Config        Specifies the configuration file.
  /Lic,/Licenses      Specifies the licenses which will be acquired (2D, 3D, Globalization, SmartImporter, AssetLibraryVerification, Safety). If this parameter is not specified and no license configuration file is found (see /Config) all licenses will be acquired.

Example:
FTCCmd Generate d:\Solutions\SolutionAuto\SolutionAuto.scs /ShaderCompiler Target /Asset d:\AssetTarget.bin

C:\SceneComposer>
```

<div class="contents" id="bkmrk--16"><div class="contents"><div class="textblock">  
</div></div></div>**Optional Generate flags:**

<div class="contents" id="bkmrk-customid%3A-asset-veri"><div class="contents"><div class="contents"><div class="textblock">- *CustomId*: Asset verification value written in an asset header section
- *FloatFormat*: Information about the representation of float numbers in the asset; all the formats are platform dependent

</div></div></div></div>##### <a class="anchor" id="bkmrk--35"></a>Sample Asset Generation: Using /ShaderCompiler /Asset /AssetProfile parameters

Example:

```
FTCCmd Generate "C:\sample\2D Basic.scs" /ShaderCompiler Simulation /Asset Asset.bin /AssetProfile "AssetProfile_MyNewAssetProfile.scml" /SCHost C:\CGIStudio\bin\SceneComposer\device\iMX6\SCHost.dll
```

<div class="contents" id="bkmrk-%2Fsc%2C%2Fshadercompiler-"><div class="contents"><div class="contents"><div class="textblock"><div class="fragment">  
</div>- /SC,/ShaderCompiler - Specifies the shader compiler to use (Simulation, Target).
- /AF,/Asset - Specifies the asset file name that is going to be generated.
- /AP,/AssetProfile - Specifies the full name of the asset profile from solution (.scml) to be activated.

</div></div></div></div><div class="contents" id="bkmrk--17"><div class="contents"><div class="textblock">---

</div></div></div>#### <a class="anchor" id="bkmrk--36"></a>FTCCmd Configuration: /Config

To reuse all the user specific persistent SceneComposer settings in an FTCCmd session, use the */Config* argument to specify the path to the SceneComposer configuration folder.

The configuration folder valid for a given SceneComposer GUI session can be found in "File" &gt; "Preferences" section "Environment":

<div drawio-diagram="6603"><img src="https://doc316en.candera.eu/uploads/images/drawio/2024-08/drawing-5-1724419422.png" alt="drawing-5-1724419422.png"/></div>

<div class="contents" id="bkmrk--19"><div class="contents"><div class="textblock">  
</div></div></div>Instead of the full configuration folder, an exported .sccfg file can also be used as a /Config argument value. Use the "Export all" button to create a .sccfg file.

**Examples:**

```
FTCCmd ... /Config C:\Documents and Settings\...\...
FTCCmd ... /Config FTCSettings.sccfg 
```

<div class="contents" id="bkmrk--20"><div class="contents"><div class="textblock"><div class="fragment">  
</div>---

</div></div></div>#### <a class="anchor" id="bkmrk--38"></a>FTCCmd License Handling: /Licenses

By default - if neither /Config nor /Licenses arguments are given in an FTCCmd call - FTCCmd will acquire all licenses before the desired operation is executed.

<div class="contents" id="bkmrk-refer-to-using-licen"><div class="contents"><div class="textblock">- Refer to <span style="color: rgb(230,126,35);">[Using Licenses](https://doc316en.candera.eu/books/starting-scenecomposer/page/using-licenses "Using Licenses")</span> to learn about available licenses.

</div></div></div>To adapt this behaviour, following options are available:

```
FTCCmd ... /Config {path to config folder or .sccfg file}
```

In this case, the license settings from the SceneComposer GUI can be applied to FTCCmd.

```
FTCCmd ... /Licenses 2D 3D Globalization
```

In this case, only the specified licenses ("2D", "3D", "Globalization", "PhotoshopImporter", "AssetLibraryVerification") will be acquired by FTCCmd.

```
FTCCmd ... /Licenses <a class="code" href="http://dev.doc.cgistudio.at/APILINK/group___layout.html#gga143e31a12d442971ea2cbcda11cf35e3a6325ea46e8f4c69da2da6ccae1f7c4a6" title="The image will not be stretched; it will be rendered in its original size. If the available space is ...">None</a>
```

In this case, no license at all will be acquired by FTCCmd.

<div class="contents" id="bkmrk--21"><div class="contents"><div class="textblock">---

</div></div></div>#### <a class="anchor" id="bkmrk--39"></a>FTCCmd Convert solution: /Convert

By default FTCCmd will not convert old solutions. In order to get information, import or generate asset for old solutions, the following option is available:

```
FTCCmd .../Convert Yes
```

<div class="contents" id="bkmrk--22"><div class="contents"><div class="textblock"><div class="fragment">  
</div>---

</div></div></div>#### <a class="anchor" id="bkmrk--40"></a>FTCCmd Version solution: /Version

A command which gives a piece of information about version both in FTCLauncher and FTCCmd:

```
FTCCmd .../Version
```