Skip to main content

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 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:

  1. Create a group item for the control that you want Smart Importer to assign and name it "SC_<ControlName>". For example, name the top layer "SC_TextButton" to make a TextButton control (see blue box).
  2. 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).
  3. Use the control properties names for the Photoshop layer names. Delete any spaces in Photoshop layer names (see green boxes for comparison)
drawing-7-1686313199.png

The Smart Importer automatically recognizes and maps a group item that is named SC_<ControlName>” 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.

drawing-5-1726226385.png

Each property on the Appearance and Basic Properties tabs reflects the layers that you set in the .psd file. 
drawing-4-1729219437.png

The Properties panel also reflects these settings after Smart Importer completes the import.

drawing-5-1726226731.png

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.

drawing-7-1686313818.png
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.

drawing-7-1686313403.png

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