Skip to main content

Adobe XD Importing

Description

InThis thissection section, explainexplains about Adobe XD file format, its layer structurestructure, naming conventions, and namingan part and the importingimport example bythat usinguses the concretea sample file.


Layer Structure and Naming Guideline

As samewith asPhotoshop PSDDocument (PSD) file format, the SmartImporter's AI will analyzeanalyzes imported files to detect/proposedetect, propose, and create Controls for the solution. Thus,Keep again recommended to keepthe Adobe XD layer format close to the standard Controls in Scene Composer. ThatThe naming guideline is as same as PSD,the pleasePSD guideline. For details, refer to the Recommended Layers Structure for Smart Importer in detail. .

Additional naming conventions exist for efficientefficiently import ofimporting AdobeXD files, such as the below.following.

Control: Text

The Smart Importer creates Text Control for each text layer will be set as Text Control..

drawing-5-1726235688.png

Control: Tell Tale

The layerSmart Importer creates a Tell Tale Control when the group name has athe _telltale suffix of "_telltale" and hascontains a child image layer will be set as Tell Tale Control..

drawing-5-1726233615.png
Control: TextButton

The Smart Importer creates a TextButton Control when the layer that hasmeets either of the belowfollowing conditionconditions:

will
bethe setgroup aslayer TextButton Control. There iscontains a child text layterlayer inthe atext group layer. A Text layer, thatlayer name has a _Button suffix. of "_Button".
drawing-5-1726235918.png


TheSmart RectangleImporter shape issupports only supported,rectangle theshapes; it does not support other shapeshapes, such as polygon isn't supported.polygons.



AdobeXD Features Supported by CGI Studio Smart Importer

The Smart Importer supports importing ofthe following Adobe XD features:


Artboards

EachThe Smart Importer converts each AdobeXD Artboard is converted into a Scene in SceneComposer.


Components

Adobe XD has a component system,system where componentsyou can bedefine definedcomponents once,once and instantiatedinstantiate 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 are converted into Text Nodes in SceneComposer.

TheIt Smart Importer will readreads the configuration of the AdobeXDAdobe XD text and applyapplies the following properties to the SceneComposer Text Node:

    Property Description Example Text - the text to display
    Font - the font's postscriptPostScript name (e.g.OpenSans-Light "OpenSans-Light") FontStyle - the font's style (e.g.Light "Light") FontSize - the font's point size (e.g.72 72) FillColor - a fill color (if the Adobe XD file configures a solid-stylestyle) is
    configured in thePosition AdobeXD file) Position - the position of the text area in the scene
    Size - the size of the text area (might not be available, see note below)

    If anthe AdobeXD file defines a text area is configured forwith Auto Width and Auto Height, the Smart Importer cannot calculate the size of the text area (bounding box).box. 

    Please also seeSee section Text Controls ofin the Adobe XD import exampleexample..


     

    Images

    The Smart Importer converts Adobe XD shapes ("type": "shape") with a pattern fill (a fill of "type": "solid") are converted to RenderNodes.

    TheIt Smart Importer will applyapplies the following properties to the SceneComposer RenderNode:

    • Position
    • Size


    Solid Rectangles

    RectanglesThe Smart Importer converts rectangles (shapes of "type": "rect") with a solid fill (a fill of "type": "solid") are converted to SolidColorNodes.

    TheIt applies the following properties will be applied to the SceneComposer SolidColorNode:

    • Color
    • Position
    • Size

    Please also seeSee section Rectangle ofin the Adobe XD import exampleexample..


    Buttons

    If the Adobe XD resource contains a group,group thewhose name of which ends with _Button, the Smart Importer will createcreates a TextButton.

    The Smart Importer checks the suffix in a case insensitive way, so _button or _BUTTON, etc.and willsimilar also work.

    The Smart Importer will applyapplies the following properties to the SceneComposer TextButton:

    • Text - The Smart Importer uses the first text label found inside the Adobe XD group will becomeas the TextButton's Text.
    drawing-5-1726236104.pngdrawing-5-1788512522.png

    The button depicted above,above provokes a Scene transition. ThisThe Smart Importer takes this transition is taken from the first artboard transition found inside the groupgroup. (seeSee Transitions).

     
    Transitions

    Adobe XD supports building interactive prototypes with serveralseveral kinds of transitions. A button maycan trigger a navigation transition to a different artboard, and a component maycan support transitions between different states etc.states. SceneComposer supports button-triggered sceneScene transitions generatedthat Scene Composer generates from artboard transitions in the XD file.

    drawing-4-1676360249.png
    drawing-5-1726235118.png

    PleaseSee also see section Transition ofin thethe Adobe XD import example.


    TellTalesTell Tales

    The Smart Importer creates a TellTaleTell Tale Control for an Adobe XD group,group whose name ends with _TellTale.

      If thisthe group contains an image with OnState or OffState in its name, thisthe imageSmart willImporter besets setit as the TellTaleTell Tale Control's On State Image. orIf the group contains an image with OffState in its name, the Smart Importer sets it as the Tell Tale Control's Off State Image. respectively.

      The Smart Importer checks the group name's suffix and the image names in a case insensitive way, so _Telltale or _telltale, etc.ONSTATE_pic,  image_offstate_picture and ONSTATE_picorsimilar image_offstate_picture etc. willvariants also work.

      Please also see sectionSee Tell Tale Control ofin the Adobe XD import example.



      Adobe XD import example

      Please get the mentionedThis sample Adobe XD file in the below location.

      Using this sample, explain aboutexplains 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

      ThoughThe thereSmart isImporter asupports only rectangle shapes for import, therefore it does not import the polygon in the group "Next_Button" ofgroup theas sample,depicted that isn't imported into a Solution in Scene Composer. This is because a rectangle shape is only supported for importing.below.

      drawing-5-1726236171.pngdrawing-5-1788512471.png



      Text Controls

      TextThe Smart Importer sets a text layer willas bea setText Control, as Textit Controldoes as same asfor other file format.formats. In this sample, the following layerlayers are text layers.layers:

      • Change view under "Next_Button"
      • The allAll child layers under "Textboxes".
      • 72kmThe 72kmh label under "Speed gauge"
      • D under "Battery gauge"
      drawing-5-1726236408.pngdrawing-5-1788512848.png



      Tell Tale Control

      Since there is "TellTale" group inBecause the sample file andcontains thata "TellTale" group whose name has athe suffix_telltale ofsuffix, "_telltale",the Smart Importer sets its child image layers are set as Tell Tale Control.

      drawing-5-1726236664.pngdrawing-5-1788512239.png



      Transition

      The Smart Importer transfers the transition setting that is createdincluded byin the Adobe XD is transferredfile to State Machine editor.Editor.

      drawing-4-1676360124.png



      Other options

      If necessary, please change the setting on "Import to folder"folder setting and its related options. And,Check mark "Resize Display Resolution"Resolution optionif just in case.needed.

      drawing-5-1726236863.png



      PerformCheck the Import Result in the Player

        After setconfiguring these settings, click OK in the above, press OK button on Smart Importer dialog to proceeding import. Then, press "Play" buttonproceed with "the import. Click Play with Generate and Play"Play option.selected. When the Player application isstarts, run, and uncheckclear "Scenes#Scene2D" sectionto and then you could getview the importingimport result. IfClick youChange press "change view" buttonview in the lower-right bottomcorner corner, you can maketo transition to the other scene accordinglyaccording to the transition defined in Adobe XD.
        drawing-4-1676360178.png