Smart Importer Smart Importer UI This page describes the Smart Importer dialog. The Smart Importer dialog consists of the following four parts. Preview Import Layer Tree Control Preview The Preview panel displays a preview of the file to be imported. Zoom factor of the preview The current zoom factor is displayed in the lower-left corner. To adjust the zoom factor of the preview: Use the mouse wheel to zoom in and out. Click the button with the four arrows to preview the file at the maximum zoom factor within the display area. Select an element on the preview image. Artificial intelligence (AI) detects controls on the selected element and lists them in the Control section. Import The import section consists of two tabs, Import Settings and AI Settings. Import Settings Tab The Import Settings tab contains the following settings. Import to folder Select a destination folder for the imported resources. To change the destination folder, use the pull-down menu. create a new destination folder, use the Create new folder for import section. The destination folder can be any location in Solution Explorer. Create new folder for import When this option is enabled, a new import folder can be created with any name. The created folder is located in the import destination folder specified in Import to folder. Scenes Edit scenes with the Smart Importer. See the Basic Operations guide for editing scenes with Smart Importer. Toggle Applied Controls Preview When this option is enabled, a green frame appears where the control is applied. The green frame allows you to visually check where the control is applied on the preview. Resize Display Resolution This option is enabled when the resolution of the file to be imported is larger than the solution's display resolution. When this option is enabled, the Smart Importer automatically resizes the resolution of the imported file to fit the display resolution. Import State Machine When this option is enabled,the Smart Importer imports state machines from your design file directly into your CGI Studio solution. If a global state machine already exists within your solution, the Smart Importer displays a prompt where you can choose whether to import the new state machines with the Is Global property enabled. AI Settings Tab Configure AI detection settings on this tab. The Smart Importer uses the value specified in the Preferences for Edge Detection. For details, see the Preferences page. AI uses the color selected under Transparent background color to analyze the image being imported. The best background color for detecting controls depends greatly on the image content. If AI has problems detecting controls, change this setting. Layer Tree The Layer Tree displays a tree view of each element from the file being imported. The list displayed here corresponds to the scene tree in Scene Composer. When you select one or more elements in this list, AI detects controls on the selected elements and lists them in the Control section. Enter keywords in the search field at the top of the Layer Tree to narrow the list to those layers that contain those keywords. Check the checkbox to the left of each layer element to include it in the scene. The Smart Importer does not import cleared elements. Revert/Revert All button To cancel the applied control settings, select the target item in the Layer Tree panel and click Revert. To cancel all applied control settings in the Layer Tree, click Revert All. The Smart Importer displays a confirmation dialog before continuing. Control Control List Tab Select any layer in the Layer Tree, and AI detects the most suitable controls. The Control List tab displays the analysis results and lists candidate controls in order of probability. The Smart Importer categorizes the controls by solution and reference, such as ConstructionKit and Custom Controls. For controls in ConstructionKit, the probability of matching with the AI is displayed as a number (and bar) to the right of the control name, and they are listed in descending order from the highest number. Custom controls that are not included in ConstructionKit are displayed in order of control name. By default, each category displays five controls. Clicking View All (red box in the image below) displays a list of all controls. The list of controls that is displayed can be narrowed down by entering keywords in the search field at the top (orange box in the image below). To apply the controls to the selected element, use Apply in the Control List. To configure the display settings, click the triangle icon on the left side of the search field. The settings section lets you configure which controls appear according to the detection value. To apply a control to a selected element, click Apply in the Control List. When you apply a control with a low AI detection probability, a dialog box appears to confirm your selection. Appearance Tab When you apply any control, the display automatically switches to the Appearance tab. Configure the appearance properties for the applied control. Some controls, such as TextValue, do not require appearance settings. The Appearance tab is made up of the following three main sections. Image Pivot Point 9-Patch Image For each control image properties, select the layer image from the file to import. If the control image property name matches the layer name, the Smart Importer automatically sets the layer image. You cannot edit the image layer. For example, when you apply the Gauge control, the Control Image has a NeedleImage property. Therefore, if NeedleImage exists in the layer name of the file to import, the Smart Importer automatically sets it to the NeedleImage property. When you assign a control to a group layer, you can choose from the following options for the control image. Select layers Select any image layer from the group layer. You can use composite images with multiple layers. For more information, please refer to Configure a control image with multiple layers. After importing, the Smart Importer places the composite image in the ControlBitmaps folder and sets the bitmap name to the property name specified here. If you select a single layer, the Smart Importer uses the original bitmap placed in the Bitmaps folder. For folder locations, see Folder structure after import. Transparent The Smart Importer uses a transparent image. Default value The Smart Importer uses the default image for the applied control. Select images included in the group layer by clicking the selection icon on the right of the image. Select images from the descendant layers and the current layer as property values You cannot select layers other than images (except for bitmap layers to which controls have been applied). After you selected the image, the Smart Importer sets the pivot point to the center of the composite image. For each control image properties, set the layer image in the file to import. If the control image property name and the layer name match, the Smart Importer automatically sets the layer image. Image Array Properties The Smart Importer supports image array properties and automatically assigns images in the FlipBook control. The numbers attached to each Image element on the Appearance tab correspond to the values displayed in descending order in the layer tree. Folder structure after import After import, the Smart Importer creates the Bitmaps, ControlBitmaps, and TextStyles folders in the Solution Explorer. Bitmaps Smart Importer places the imported bitmap for each layer in this folder. ControlBitmaps Smart Importer places the bitmap composed of multiple layers in this folder for the control properties. ImportedScenes Smart Importer places the scene imported as a template in this folder. Scenes When you import a StateMachine (screen transition), the Smart Importer places the target scene in this folder. TextStyles Smart Importer places the created text style in this folder. Pivot Point When you set up a control image with layer mapping, the Smart Importer automatically sets the pivot point. The pivot point values that the Smart Importer sets automatically are as follows. (However, if the pivot point values are specified with the layer names mentioned later, the specified values are used as the set values.) Pivot point X value: 0 Pivot point Y value: 0 In addition, when you select the Pivot Point check box (No.1 in the image below), you can use the following options: Enter values for the X and Y coordinates of the pivot point. You can enter decimal values. Set the pivot point to the center of the image by clicking No.2 in the image above). Click No. 3 in the image above to open the Freehand dialog box. Move the crosshair cursor in the dialog box to configure the pivot point. Set the background color of the Freehand dialog to black or gray from Background Color in the lower-right corner of the dialog (highlighted in the orange box in the figure below). Additionally, configure the default background color in Preferences > Smart Importer. Alternatively, you can apply any pivot point value by specifying it in the layer name of the image to import. If the layer name in the target file to be imported is something like  ***@X10@Y20, the pivot point values are automatically set as X = 10 and Y = 20. If the layer name in the file to be imported is ***@X10.5, the pivot point value is automatically set as X = 10.5 and Y = 0. 9-Patch This option appears when the Enable editing 9-Patch option is enabled in the Preferences > Smart Importer settings. When enabled, the 9-Patch feature can be configured (input values must be positive numbers only). Basic Properties Tab This section lets you set properties for the applied control. After importing, select the target control and configure it on the Properties panel. If the layer name is the same as the control's property name, the Smart Importer automatically maps the individual properties from the file to import. Basic Operations This section describes the basic operations in Smart Importer. Import File Formats The Smart Importer imports files using one of the following two methods, depending on the file format: Local files: *.psd, *.xscil, *.xd Cloud resources: Figma data For more information on the Photoshop layer structure format, see Recommended Layers Structure for Smart Importer. Restore Settings The Smart Importer saves the settings that you applied when configuring the import in the solution along with the imported scene. Therefore, when you importing the same file again to the same path in Solution Explorer, the Smart Importer displays a dialog asking if you want to use the saved settings. Use The Smart Importer applies the saved settings. Merge Merges both the saved settings and the new settings. Don't use The Smart Importer does not apply saved settings and creates new settings. If an image has been replaced in an imported file, select the Use Radiobutton to replace the old image in the scene with the updated image while maintaining the previous mapping between layers and colors. For other behaviors when reimporting files, see reimporting files. Conversion to 2D Nodes During import, Smart Importer converts specific elements, such as Photoshop artboards and Color Pickers, to optimal nodes in Scene Composer. Artboards Smart Importer can treat artboards in the file you imported as Group Node. Color Picker Smart Importer can treat Color Pickers in the file you imported as Solid Color Nodes. In this case, the solid color layer uses the same icon as the Solid Color Node in Smart Importer. You cannot edit the Appearance tab under any of the following conditions: The layer of the file to be imported does not have image information. The applied control does not have a properties that refers to an image. In all other cases, the same options are available as for image layers. For example, the Layer Mapping section can generate image resources after you map control properties to a layer. Similarly, other prototyping tools do the same with Color Pickers. For each node in a 2D scene, see 2D scene nodes. Control instance configured with Smart Importer After you finished applying the detected controls and configuring images, pivot points, and other properties, click OK at the bottom of the Smart Importer dialog to import the configured file. See the Smart Importer UI for details on what to configure in each part of the Smart Importer dialog. The Smart Importer imports the configured file to the location specified in the Import Settings Tab using the configured settings. Note that you can view the control instance configured in Smart Importer , such as Gauge left in the image below, in the Imports panel. You can use control instances configured in Smart Importer in the Scene Editor or drag them into the Scene Tree. Configure Scenes The Import Settings tab allows you to manage scenes that you import into Scene Composer. To see the available options, select a target scene from Scenes, then right-click the target scene: Add Scene Adds a new scene. The Smart Importer clears all checkboxes for each element displayed in the Layer Tree. After you select this option, the Add Scene... dialog box appears. Enter a name for the new scene. Clone Scene The Smart Importer duplicates the scene while maintaining the configuration on the current Layer Tree. After you select this option, the Add Scene... dialog box appears. Enter a name for the new scene. Remove Scene Deletes the selected scene. Rename Scene Rename the scene. You can also double-click the target scene name to change the name. TextStyle When you import a Text Layer into Scene Composer, Scene Composer creates a a new TextStyle. Its name combines the font name and font size used in the Text Layer of the PSD file. When Scene Composer creates a new TextStyle, it checks whether the Scene Composer solution includes a font resource with the corresponding name. If Scene Composer cannot find the appropriate font resources in the solution, it displays a dialog box like the one below. If the font does not exist in the solution, you can use an existing font resource by specifying an alternative font on this dialog. Text and text-containing controls Scene Composer imports the bounding rectangle (width and height) of text and controls containing text as automatic values. Global State Machine Scene Composer imports all State Machine elements as Global State Machine elements and does not display a confirmation dialog. Smart Importer UseCase This section describes various use cases for Smart Importer operations. Configure Scene Contents This section explains how to configure the contents by using an example that imports an image file consisting of two scenes, an In-Vehicle Infotainment (IVI) scene (e.g., music player and climate control) and a cluster scene. The IVI layer is an IVI scene consisting of a music player and air conditioning controls. The Cluster layer is a scene that contains only clusters. If the import file IVI_Scene contains the two layers described above, you can configure the two scenes to contain different elements by following these steps. In the Smart Importer window's Import Settings tab, select IVI from Scenes: and select Clone Scene... from the context menu. In the Clone Scene... dialog box, enter Cluster_Scene in the name field, and then click OK. Two scenes, IVI_Scene and Cluster_Scene, appear under Scenes. Select IVI_Scene from Scenes, and then clear the Cluster check box in the Layer Tree. Smart Importer excludes the Cluster layer from the IVI_Scene scene structure. Select Cluster_Scene from Scenes, and then clear the IVI_Sample check box in the Layer Tree. Smart Importer excludes the IVI_Sample layer from the Cluster_Scene scene configuration.   Click OK in Smart Importer to perform the import. You can see the imported scenes and resources in the Solution Explorer panel. The IVI_Scene and Cluster_Scene scenes do not contain the layers specified in steps two and three, respectively. Re-importing a file containing new images If you reopen a previously imported file using Restore, and the file has the same name and path, Smart Importer loads the saved settings, including applied controls and appearance settings. If the destination folder or scene already exists, Smart Importer displays blue information icons (see orange frames in the image below). Hold the mouse cursor over these icons to display the necessary information in a tooltip. When you run the import with the current settings, Smart Importer overwrites already imported resources and scenes, keeps the Layer Mapping settings and applied controls information, and updates the images in the Scene Composer solution to the latest image. If you want to import image content into the Scene Composer solution a second time, keeping the resources and scenes from both imports, select a different import location or a different scene name. Re-importing a file containing images with different layers If you import a previously imported file, that has the same destination path and same file name, but a partially different layer structure, the Layer Tree in Smart Importer dialog appears as follows. Added or modified group layers Smart Importer adds an orange icon to the Group Node icon. This symbol helps you identify groups that have been modified since the last import (see orange frame in the image below). Control Assigned Bitmap If you have already assigned a control to a bitmap node and another control uses that bitmap, Smart Importer displays the bitmap in yellow font. Newly added layer Smart Importer displays newly added layers in green font (see green frame in the image below). Note that Smart Importer does not show newly added layers in Preview, it disables the check box in Layer Tree by default. To show the layer in Preview, select the check box. Deleted Layer Smart Importer displays in red font layers that existed in the previously imported file but do not exist in the current import file (see reed frame in the image below). Smart Importer also disables the check boxes in Layer Tree. Since these layers are not included in the current import file, Smart Importer does not display these layers in Preview, even if you select them in Layer Tree. Merging multiple scene settings Smart Importer saves the settings that you apply during the import run in the solution along with the imported scene. This settings-saving behavior allows you to import various configurations into the solution by using a single import target file and eventually merge the configurations into a single configuration. The following example shows how to set this up. Creating Multiple Configurations This section uses the Photoshop Document (PSD) file Car_Cluster.psd in the following location as an import example. Note that Smart Importer does not display the New SPI configuration was found dialog during each import operation because you specify a different import-destination folder. \cgi_studio_content\2D\PSD\Car_Cluster.psd Open the Car_Cluster.psd file in the Smart Importer and configure the Telltale control. Then, under Import to Folder, enter  /Resources/Cluster_Telltales as the import destination and perform the import. See 1. TellTale Settings in the image below. Re-open the same image file in the Smart Importer, this time setting the Gauge control. Enter /Resources/Cluster_Gauge as the import destination and perform the import. See 2. Gauge Settings in the image below. Repeat the process for the ProgressBar control. Enter /Resources/Cluster_ProgressBar as the import destination and perform the import. See 3. ProgressBar Settings in the image below. Merge of multiple scene configurations Open the Car_Cluster.psd file in the Smart Importer. Enter /Resources/Cluster_Telltales in the Import into folder and clear the Create new folder for import check box. The Smart Importer dialog appears. Select Use, and then click OK to restore and apply the Telltale control settings. A blue caution icon appears in Scenes. Change the import destination to /Resources/Cluster_Gauge. A dialog box similar to the one below appears. Select Merge, and then click OK. The configured Gauge control is added to the previously configured Telltale control. Similarly, change the import destination to /Resources/Cluster_ProgressBar. As in step 4, a dialog box similar to the one shown below appears. Select Merge, and then click OK. The configured ProgressBar control is added. These steps create a configuration with the TellTale, Gauge, and ProgressBar controls applied. Configure a control image with multiple layers In some cases, the imported image file may contain a complex structure, where elements such as the gauge background and needle are composed of multiple images or layers. However, the Gauge control in Scene Composer requires only one image for the background and one for the needle. To support complex image configurations while preserving control settings, Smart Importer allows multiple layers for each image used in the control. This section uses the Car_Cluster.psd file as an example. The Smart Importer window displays the following, after you selected Car_Cluster.psd as file to import with the Smart Importer (see also image below): The Layer Tree of the imported Car_Cluster.psd file Gauge left is the Gauge's root layer. The orange framed layer contains the Gauge needle. The blue framed layer contains the background. The Control List tab lists the artificial intelligence (AI) automatic-control-detection results.   Follow the steps below to configure a Gauge control with a background image that has multiple layers: In the Layer Tree, select the root layer of the target layer group (Gauge left in the image above). Smart Importer lists the results of AI generated automatic control detection in the Control List tab. In the Control List, find the Gauge control and click the Apply button next to the Gauge control. Smart Importer assigns the Gauge control to the Gauge left layer group. Smart Importer switches the focus to the Appearance tab. When you select the root layer to which you apply the control, Smart Importer can configure the entire layer group, including all child layers. To select multiple layers and set them all at once, hold ctrl or  shift and click the target layer, or click and drag around the layer you want to select. Smart Importer was able to configure the NeedleImage property with the NeedleImage layer, because the layer name of the file to import contains NeedleImage. The Car_Cluster.psd file contains multiple background-image layers.   Select Select layers from the BackgroundImage drop-down menu. The ImageLayers Selection dialog box appears. Select the layer you want to assign to BackgroundImage and click OK.   After you finished your configuration in Smart Importer, click OK to start the import. Smart Importer creates a background image by merging the specified layers and creating a new BackgroundImage. You can see this newly created image in the SceneComposer's Solution Explorer. Double-click this image The Image Preview window displays the BackgroundImage. Smart Importer places bitmaps merged from multiple layers for control properties in the ControlBitmaps folder in Solution Explorer. Recommended Layers Structure for Smart Importer This page shows you how to set up items so that Smart Importer automatically detects the items and their nested group items as controls when you import Adobe Photoshop (.psd), Adobe XD (.xd), o Figma (.fig) files. Smart Importer can automatically assign only controls in the Touchable, Common and Core categories. Creating Design Files To enable the automatic application of controls to group items in a design file and their subsequent import into Scene Composer, group items must be created following the recommended layer structure. The recommended layer structure is primarily designed to support the text-related and image-related properties of a control. By creating layers that correspond to these properties and naming them according to the associated Scene Composer property names, the Smart Importer can automatically identify and map the layers to the appropriate control properties. The following sections provide detailed instructions for creating the required layer structure. For Adobe Photoshop(.psd)Files You can create controls from Photoshop layer data as follows: Create a group item for the control that you want Smart Importer to assign and name it "SC_". For example, name the top layer "SC_TextButton" to make a TextButton control (see blue box). Under the group item that you created in step 1, create property layers for the desired control (see red and green boxes). These properties include text-related properties (e.g., Text, FirstText) and image-related properties (e.g., NormalImage, PressedImage). Use the control properties names for the Photoshop layer names. Delete any spaces in Photoshop layer names (see green boxes for comparison) The Smart Importer automatically recognizes and maps a group item that is named SC_” in the design file. You are not required to create layers for all text-related and image-related properties of the control. Even if only the required properties are created as layers, the control will still be applied correctly. After following the steps above, select Import > Smart Importer > From Local File... from the Scene Composer toolbar, then select the finished Photoshop file. Smart Importer opens the Smart Importer panel, loads the file according to the .psd layers that you configured, confirms the TextButtonControl, and applies it, as you can see in the image below. Each property on the Appearance and Basic Properties tabs reflects the layers that you set in the .psd file.  The Properties panel also reflects these settings after Smart Importer completes the import. The imported control's size matches the width and height of the largest image layer that you applied. When Smart Importer imports nodes with mismatching layers and properties, it creates new group nodes and additional properties as child elements. For Adobe XD(.xd)Files Prepare .xd files in the same way as described in For Adobe Photoshop (.psd) Files. Structure the Adobe XD items to match the structure and property names of the controls that Smart Importer automatically applies. For Figma(.fig)Files  Prepare .fig files in the same way as described in For Adobe Photoshop (.psd) Files. Structure the Figma items to match the structure and property names of the controls that Smart Importer automatically applies. Layer Structure and Naming Guideline for Controls In general, keep the PSD layer format close to the standard controls. Use the following guide to format and name layers for some controls. Touchable Button SC_Button ├ NormalImage ├ PressedImage └ FocusedImage CheckBox SC_CheckBox ├ Text ├ NormalImage ├ PressedImage ├ SelectedImage ├ SelectedPressedImage └ FocusedImage MultiStateButton SC_MultiStateButton ├ Text ├ StateImages0 ├ StateImages1 ├ StateImages2 └ StateImages3 ToggleButton SC_ToggelButton ├ FirstText ├ SecondText ├ FirstImage ├ FirstPressedImage ├ SecondImage └ SecondPressedImage Common AnalogClock  SC_AnalogClock   ├ SecondsNeedleImage   ├ MinutesNeedleImage   ├ HoursNeedleImage   └ FaceImage Gauge SC_Gauge   ├ BackgroundImage   └ NeedleImage Menu Icon SC_MenuIcon   ├ Image   └ BackgroundImage Mesh2D SC_Mesh2D   └ Image Core CoreDial SC_CoreDial   ├ KnobImage   ├ BackgroundImages0   ├ BackgroundImages1   └ BackgroundImages2 CoreTextButton SC_CoreTextButton   ├ NormalImage   ├ PressedImage   ├ DisabledImage   └ Text CoreRadioButton SC_CoreRadioButton   ├ Text   ├ NormalImage   ├ SelectedImage   ├ NormalDisabledImage   └ SelectedDisabledImage CoreSlider SC_CoreSlider   ├ TrackImage   ├ TrackDisabledImage   ├ TrackFillImage   ├ TrackDisabledFillImage   ├ KnobNormalImage   ├ KnobPressedImage   └ KnobDisabledImage Adobe XD Importing Description This section explains about Adobe XD file format, its layer structure, naming conventions, and an import example that uses a sample file. Layer Structure and Naming Guideline As with Photoshop Document (PSD) file format, the SmartImporter's AI analyzes imported files to detect, propose, and create Controls for the solution. Keep the Adobe XD layer format close to the standard Controls in Scene Composer. The naming guideline is as same as the PSD guideline. For details, refer to the Recommended Layers Structure for Smart Importer. Additional naming conventions exist for efficiently importing AdobeXD files, such as the following. Control: Text The Smart Importer creates Text Control for each text layer. Control: Tell Tale The Smart Importer creates a Tell Tale Control when the group name has the _telltale suffix and contains a child image layer. Control: TextButton The Smart Importer creates a TextButton Control when the layer meets either of the following conditions: the group layer contains a child text layer the text layer name has a _Button suffix. Smart Importer supports only rectangle shapes; it does not support other shapes, such as polygons. AdobeXD Features Supported by CGI Studio Smart Importer The Smart Importer supports importing the following Adobe XD features: Artboards Components Texts Text Font FontStyle FontSize FillColor Position Size Images Position Size Solid Rectangles Color Position Size Buttons Text Transitions TellTales Artboards The Smart Importer converts each AdobeXD Artboard into a Scene in SceneComposer. Components Adobe XD has a component system where you can define components once and instantiate them multiple times. If an artboard references a component, the Adobe XD converter looks up and instantiates components as needed. Texts The Smart Importer converts Adobe XD text areas into Text Nodes in SceneComposer. It reads the configuration of the Adobe XD text and applies the following properties to the SceneComposer Text Node: Property Description Example Text the text to display Font the font's PostScript name OpenSans-Light FontStyle the font's style Light FontSize the font's point size 72 FillColor a fill color (if the Adobe XD file configures a solid-style) Position the position of the text area in the scene Size the size of the text area (see note below) If the AdobeXD file defines a text area with  Auto Width and Auto Height, the Smart Importer cannot calculate the text area bounding box.  See section Text Controls in the Adobe XD import example.   Images The Smart Importer converts Adobe XD shapes ( "type": "shape") with a pattern fill (a fill of "type": "solid") to RenderNodes. It applies the following properties to the SceneComposer RenderNode: Position Size Solid Rectangles The Smart Importer converts rectangles ( shapes of "type": "rect") with a solid fill (a fill of "type": "solid") to SolidColorNodes. It applies the following properties to the SceneComposer SolidColorNode: Color Position Size See section Rectangle in the Adobe XD import example. Buttons If the Adobe XD resource contains a group whose name ends with _Button, the Smart Importer creates a TextButton. The Smart Importer checks the suffix in a case insensitive way, so _button or _BUTTON, and similar also work. The Smart Importer applies the following properties to the SceneComposer TextButton: Text - The Smart Importer uses the first text label inside the Adobe XD group as the TextButton's Text. The button depicted above provokes a Scene transition. The Smart Importer takes this transition from the first artboard transition inside the group. See Transitions.   Transitions Adobe XD supports building interactive prototypes with several kinds of transitions. A button can trigger a navigation transition to a different artboard, and a component can support transitions between different states. SceneComposer supports button-triggered Scene transitions that Scene Composer generates from artboard transitions in the XD file. See Transition in the Adobe XD import example. Tell Tales The Smart Importer creates a Tell Tale Control for an Adobe XD group whose name ends with _TellTale. If the group contains an image with  OnState in its name, the Smart Importer sets it as the Tell Tale Control's On State Image. If the group contains an image with  OffState in its name, the Smart Importer sets it as the Tell Tale Control's Off State Image. The Smart Importer checks the group name's suffix and the image names in a case insensitive way, so _Telltale or _telltale, ONSTATE_pic,  image_offstate_picture and similar variants also work. See Tell Tale Control in the Adobe XD import example. Adobe XD import example This sample explains the layer structure and restrictions for Adobe XD. Get the sample Adobe XD file from the following location: "...\cgi_studio_content\2D\XD\XD_SampleCluster.xd" Rectangle The Smart Importer supports only rectangle shapes for import, therefore it does not import the polygon in the "Next_Button" group as depicted below. Text Controls The Smart Importer sets a text layer as a Text Control, as it does for other file formats. In this sample, the following layers are text layers: Change view under "Next_Button" All child layers under "Textboxes". The 72kmh label under "Speed gauge" D under "Battery gauge" Tell Tale Control Because the sample file contains a "TellTale" group whose name has the _telltale suffix, the Smart Importer sets its child image layers as Tell Tale Control. Transition The Smart Importer transfers the transition setting that is included in the Adobe XD file to State Machine Editor. Other options If necessary, change the Import to folder setting and its related options. Check Resize Display Resolution if needed. Check the Import Result in the Player After configuring these settings, click OK in the Smart Importer dialog to proceed with the import. Click Play with Generate and Play selected. When the Player application starts, clear "Scenes#Scene2D" to view the import result. Click Change view in the lower-right corner to transition to the other scene according to the transition defined in Adobe XD. Figma Smart Importer can import Figma data. This page explains how to import Figma data with Smart Importer and how to work with the results.  You cannot import Figma data for which you do not have editing privileges. Preparations for Importing Figma Data Preparing the URL and Access Token Before you import Figma data with Smart Importer, acquire the URL and access token for the Figma data.  Obtain the URL and access token in the Figma Desktop App as follows. Ensure that you have access to the Figma REST API (https://api.figma.com). In case of a connectivity issue, contact your IT department because a firewall might block the API. Acquiring the URL In the top bar of the Figma Desktop App, right-click the relevant project tab, and then select Copy Link from the context menu.  Acquiring the Access Token In the Figma Desktop App, select Figma Icon > Help and Account > Account Settings to open the dialog. In the Security tab of the dialog, click Generate new token under Personal access tokens. In the Generate new token dialog, set the Token name, Expiration, and Scopes, and then click Generate token. Figma displays the created access token under Personal access tokens on the Security tab of the dialog. The instructions on how to obtain the URL and access token apply to Figma Desktop App version 125.10.8. How to Import Figma Data From the Scene Composer toolbar, select Import > Smart Importer > From Cloud Resource... Scene Composer displays a new dialog titled Import from cloud resource.   Enter the URL and access token in the respective fields and click OK. For information about acquiring the URL and access token, see Preparing the URL and Access Token. The Smart Importer dialog opens. The procedure for using Smart Importer is the same as for other file types. For details, see 3. Scene Composer > Import of Resources > Smart Importer > Basic Operation. Adjust the necessary settings, and then click OK. Smart Importer imports the data into the folder that you specified in Import to folder. If you entered an incorrect or invalid URL or access token in the Import from cloud resource dialog, Smart Importer stops the import and displays the following error dialog. API access limits vary depending on your subscription plan. If your API requests exceed that limit, Smart Importer stops the import and displays the following error dialog. For details on each plan, see Figma’s official website. Importing Figma Data - Advanced Importing as a scene Smart Importer imports the topmost item of each page in the Figma data as a scene. Use the following naming :  _ Relationship between Figma items and Scene Composer Nodes  When you import Figma items with Smart Importer, Smart Importer imports each item as a specific type of node, as shown in the following table. Scene Composer node type Group Bitmap Text Figma item type Component ✓ ComponentSet ✓ Ellipse ✓ Frame ✓ Group ✓ Instance ✓ Line ✓ Polygon ✓ Rectangle ✓ Section ✓ Slice ✓ Star ✓ Text ✓ Vector ✓ Smart Importer imports bitmap and text items only when Figma provides their render data. For example, if you set a Figma item to hidden, Smart Importer cannot import it. Importing as Controls or Bitmaps Smart Importer can import any Figma item as a control or bitmap. The imported item can contain the following child items: Component ComponentSet Frame Group Instance Section Importing as a control Smart Importer imports an item as a control when the name is SC_. You can also specify control property values by naming child items after the corresponding control properties. If a child item name matches a control property name in Scene Composer, Smart Importer can automatically map the bitmap from the Figma file to that property. For example, Scene Composer's CheckBox control provides multiple image properties. When a Figma file contains an item named SC_CheckBox with child items whose names match these properties, Smart Importer automatically assigns the corresponding bitmaps to the correct control properties (see the image below). This way, no manual assignment of image properties is necessary in Smart Importer. Smart Importer supports this functionality only for Touchable and Common controls. Importing as bitmaps Smart Importer can import group items that contain child items as bitmaps when you prefix the group item name with  SC_Bmp. Import as a State Machine When you define flows (screen transitions) in Figma, Smart Importer imports the structure of screen transitions into Scene Composer as a state machine.   You can review the imported state machine in the State Machine Editor in Scene Composer. Figma Settings: Scenes and Flows In Figma, define multiple scenes and the flows that connect them. Create screen transitions beginning with the scene designated as the flow start point. The Import Result in Scene Composer Smart Importer imports the flow structure defined in Figma into CGI Studio as a state machine. The state machine starts from the state that corresponds to the scene that you set as the flow start point in Figma. After importing, for each generated state, Smart Importer automatically creates a screenshot of the corresponding Figma scene. Scene Composer's State Machine Editor displays this screenshot as a Scene Image. If a Figma file contains multiple flows, Smart Importer imports each flow as an independent state machine. If you include a transition from one flow in a separate flow (that is, when a transition is duplicated), Smart Importer does not import the separate flow.  Names and Behavior After Importing as a State Machine Names After Import The name of the state machine after import is  StateMachine. After import, each state has the same name as the Figma item that Smart Importer imports as a scene. In Figma, you can select the interaction that triggers screen transitions, such as click, drag, or mouse over.  Regardless of the interaction that you defined in Figma, Smart Importer sets Scene Composer's Transition properties as follows: Event: `Clicked` Condition: `Check Click` Importing a Layout Auto layout If you set Auto layout on a Figma Frame, Smart Importer imports the frame as a Stack Layout in Scene Composer and applies each Auto layout setting as a Stack Layout property. Smart Importer applies Figma Auto layout settings as properties of Scene Composer's Stack Layout: Auto layout (Figma) Stack Layout Properties (Scene Composer) 1 Direction Stack Layout Layouter > Arrangement Direction Arrangement Vertical layout Vertical Horizontal layout Horizontal Wrap 2 Gap Each node after the first node in the Stack Layout Layout > Margin > Left or Top Direction Margin Vertical layout Top Horizontal layout Left Wrap 3 Alignment Nodes included in a Stack Layout Layout > VerticalAlignment and HorizontalAlignment 4 Padding (Horizontal) The node to be placed at the leftmost position of the Stack Layout Layout > Margin > Left 5 Padding (Vertical) The topmost node in the Stack Layout Layout > Margin > Top The following example shows how Scene Composer's Stack Layout inherits Figma's horizontal Auto layout settings. Text Layout When Smart Importer imports a Figma text layer into Scene Composer, it creates a Group node with LayoutType Overlay, and additionally a TextNode under that group.  In addition, Scene Composer's TextNode layout property inherits the Typography Alignment settings from the Figma text layer. Importing Fonts When importing Figma data with Smart Importer, you can import any fonts that are used in the Figma design but are not available in the current Scene Composer solution. During import, Smart Importer compares the fonts used in the Figma design with the fonts available in the solution. If it detects a missing font, Smart Importer opens the Smart Importer dialog and displays font-selection options. In the Smart Importer dialog, select one of the following options for each missing font: Replace it with an existing font (select an existing font from the dropdown menu) Import the font as a new resource (select Import from the dropdown menu) If you select Import, Smart Importer adds the corresponding font to the solution and stores it in the Resources\Fonts folder. If you select an existing font, Smart Importer applies that font to the imported data. In the Smart Importer dialog, Smart Importer displays the Import option for each font in the dropdown menu only when it can import the corresponding font. If the Resources\Fonts folder does not exist in the solution, Smart Importer automatically creates it. Automatic Text Mapping During the import of Figma data, Smart Importer can compare the TextNode content with the Language Table and automatically assign matching Text IDs. Previously, you had to manually assign a Text ID to each TextNode after import. This feature enables automation of the mapping process. Smart Importer compares the displayed text Strings in the Figma data with the Master Language Strings in the Language Table. If it finds a matching String, it automatically assigns the corresponding Text ID for that String. Configuration Enable or disable this feature in the Smart Importer dialog under the Import Settings tab using the Map language table to texts option. Smart Importer enables this setting by default. Behavior The feature workflow includes the following three steps: Smart Importer retrieves the text, compares it with the Language Table and assigns the Text ID. Smart Importer retrieves the text String from the TextNode In the following example, it retrieves the String "TEST". Smart Importer compares the retrieved String with the master language in the Language Table In the following example, it compares the String retrieved in step 1 with the master language [00] in the Language Table. If Smart Importer finds a match, it assigns the Text ID In the example below, it assigns the Text ID of the matching Language Table entry to the TextNode If multiple Text IDs exist for the same text String, Smart Importer uses the first matching Text ID. If there is no matching text String, Smart Importer does not assign a Text ID. The example file of Figma This section describes how to use the instrument cluster as a Figma design file. The example file is stored in the following location. /cgi_studio_content/2D/Figma/AI_Cluster_Sample.fig Due to technical limitations, Scene Composer cannot open Figma design files directly. For this reason, the first step is to import them into your personal Figma account. Log in to your Figma account. In your Figma account, click Import Files and load the AI_Cluster_Sample.fig file. Figma uploads the AI_Cluster_Sample.fig file to your account. After Figma uploads the file, AI_Cluster_Sample appears in your file list. To import this sample file using the Smart Importer, select Import > Smart Importer > Import from Cloud Resource... from the menu and follow the import instructions. See Figma import instructions for more information.