Skip to main content

Recommended Layers Structure for Smart Importer

This page will explainexplains how best to set up items so that they and their internal group items are automatically detected as controls when importing Adobe Photoshop (.psd)/, Adobe XD (.xd)/, Figma (.fig) files withusing the Smart Importer.

Controls that can be automatically assigned are limited to those found in the TouchableTouchable, Common  and CommonCore categories.


Creating Design Files

To automatically apply controls to group items in a design file and import them into Scene Composer, the group items must be created according to the recommended layer structure.

The following sections describe the specific creation steps in detail.

For Adobe Photoshop(.psd)Files

MakingControls controlscan be created from photoshopPhotoshop layer data canas be in the following way 
follows:

  1. Create a group item for the control to be assigned and name it "SC_<name of controlControlName>". In the example below, in order to make a TextButton control, the top layer has been named "SC_TextButton" (see blue box).
  2. Make property layers that the desired control contains underneath the group item madecreated in step 1 (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 names of the control properties for the names of these photoshopPhotoshop layers. Note that any spaces in photoshop layer names should be deleted (see green boxes for comparison)
drawing-7-1686313199.pngdrawing-7-1686313199.png

By naming a group item in the design file as “SC_<ControlName>”, Scene Composer automatically recognizes and maps it as a control.
Therefore, it is not necessary 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 observing the above method, select the finished photoshop file from the Scene Composer toolbar [Import] > [Smart Importer] > [From Local File...]. The Smart Importer panel will open, and the file will be loaded in line with the .psd file layers that were set. As seen in the image below, the TextButton control has already been confirmed and subsequently applied.

drawing-5-1726226385.pngdrawing-5-1726226385.png

Each property on the Appearance and Basic Property tabs will also reflect the layers that were set in the .psd file. 
drawing-4-1729219437.pngdrawing-4-1729219437.png

This will also be reflected on the property panel after importing is complete. 

drawing-5-1726226731.pngdrawing-5-1726226731.png

The size of the imported control will conform to the width and height of the largest image layer applied.

When importing nodes with mismatching layers and properties, new group nodes are created, and additional properties are added as child elements.



For Adobe XD(.xd)Files

The preparation needed for .xd files is for all intents and purposes the same as with 「For Adobe Photoshop(.psd)Files」. As seen below with the TextButton example, structure the Adobe XD items to match the structure and property names of controls to be automatically applied.

drawing-7-1686313818.pngdrawing-7-1686313818.png

For Figma(.fig)Files 

The preparation needed for .fig files is for all intents and purposes the same as with 「For Adobe Photoshop(.psd)Files」. As seen below with the TextButton example, structure the Figma items to match the structure and property names of controls to be automatically applied.

drawing-7-1686313403.pngdrawing-7-1686313403.png


Layer Structure and Naming Guideline for Controls

In general, it is recommended to keep the PSD layer format close to the standard Controls. Below is a guide on how the layers for some Controls should be formatted and named.

Touchable
    Button
    SC_Button
    ├ NormalImage
    ├ PressedImage
    └ FocusImage

    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
      Breadcrumb
        Name EllipsisText Button
          NormalImage PressedImage FocusImage CheckBox
            NormalImage PressedImage SelectedImage SelectedPressedImage FocusedImage CircularSlider
              BackgroundImage ActiveImage ThumbImage ThumbImagePressed FocusImage

              Gauge
              SC_Gauge
               
              • ├ BackgroundImage
                  └ NeedleImage
              BackgroundImage GroupBox
                BackgroundImage IconButton
                  NormalImage PressedImage FocusedImage IconNormalImage IconPressedImage IconFocusedImage InputField
                    CaretImage BackgroundImage FocusedImage

                    Menu Icon
                    SC_MenuIcon
                     
                    • ├ Image
                       
                    •  └ BackgroundImage
                    Menu Item
                      FocusImageOnSelection FocusImageOnDragging DeleteButtonNormalImage DeleteButtonPressedImage Image Menu Screen
                        BackgroundImage FocusBorderImage

                        Mesh2D
                        SC_Mesh2D
                          └ Image
                        Core
                        • ImageCoreDial
                          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
                        MultiStateButton
                          ButtonState1Bmp

                          ButtonState2Bmp ButtonState3Bmp ButtonState4Bmp FocusedImage PageIndicator
                            PressedImage SelectedPressedImage SelectedIndicatorImage IndicatorImage SelectedIndicatorPressedImage IndicatorPressedImage RadioButton
                              NormalImage PressedImage SelectedImage SelectedPressedImage FocusedImage Roll
                                DecorationImage TextEditBackground SpinBox
                                  BackgroundImage ArrowUpNormalImage ArrowUpPressedImage ArrowDownNormalImage ArrowDownPressedImage TextButton
                                    Text NormalImage PressedImage FocusedImage ToggleButton
                                      FirstImage FirstPressedImage SecondImage SecondPressedImage FocusedImage TouchIndication
                                        Image