Kwik Exporter

Kwik Exporter Panel

This is the panel image of Kwik Exporter plugin in Photoshop

Settings

Photoshop Files

  • Open

    You open a folder of yours which contains psd files.

    • Reset checkbox

      it should be checked to browse & select a folder, otherwise Select Book button uses the cached data

you can select the following folder that comes with the two demo .psd filesw ith kwikconfig.json.

  • sample-projects/SingleBook/photoshop

    • landscape.psd

    • protrait.psd

    • kwikconfig.json

      {
        "name":"book single",
        "output":"../../Solar2D/src/App/book",
        "pages":[
          {"psd":"portrait.psd", "name":"portrait"}
        ],
        "ignored:"[
          {"psd":"landscape.psd", "name":"landscape"},
        ]
      }

TODO Project Name Text Box to display a selected folder name as default.

kwikconfig.json will be automatically created in the selected folder to store the list of psf files and the output folder of a Solar2D project.

Double Click the .psd name in the list to open.

Solar2D Project > Select Book

A book folder is where the the exporter plugin ouputs images of layers of photshop documents. You may create a new Solar2D project or select one that has been made.

  • New

    it scafolds the files and folders of Solar2D template-project located in kwik/base-proj/Solar2D into the folder you choose in the brwose-folder dialog.

    you will find a folder named “book " in {TARGET FOLDER}/App/. It is the folder which holds lua files(code) and assets like images, audio files etc.

    you can rename “book” folder” as you like. Use finder or file explorer to rename it manually. Please follow the file naming rule

    TODO current implementation copies Solar2D folder w/o App

    TODO it would be better to scafold the entire structure of SingleBook sample

    • Option box portrait or landscape

      when Select Book button is clikced, build.config is processed to display the project portrait/or landscape

  • Select Book

    default: App/book

    select a book folder where images and lua files are generated

    TODO select portrait or landscape

    • Reset checkbox

      it should be checked to browse & select a folder, otherwise Select Book button uses the cached data


This is a sample folder structure

  β”œβ”€β”€ Photoshop
  β”‚   └── book
  β”‚       β”œβ”€β”€ kwikconfig.json
  β”‚       └── page01.psd
  └── Solar2D
        β”œβ”€β”€ App
        β”‚   └── book
        β”‚        β”œβ”€β”€assets
        β”‚        β”œβ”€β”€commands
        β”‚        β”œβ”€β”€components
        β”‚        β”œβ”€β”€models
        β”‚        └── index.lua
        β”œβ”€β”€ Images.xcassets
        β”œβ”€β”€ LaunchScreen.storyboardc
        β”œβ”€β”€ assets
        β”œβ”€β”€ build.settings
        β”œβ”€β”€ commands
        β”œβ”€β”€ components
        β”œβ”€β”€ config.lua
        β”œβ”€β”€ controller
        β”œβ”€β”€ en.lproj
        β”œβ”€β”€ extlib
        β”œβ”€β”€ jp.lproj
        β”œβ”€β”€ main.lua
        └── mySplashScreen.png

Kwik4 could not choose a folder for publishing, it was fixed to use “build4” folder, Kwik5 can select any photoshop files on your PC, and can publish to a App/book folder.

Solar2D Project > Select Book

  • Select Book

    please select an output folder where each psf files are published. It must be under App folder.

Publish

selected psd files are publihsed to App/book folder

  • checkbox all

    it will select all the psd files in the list

  • Input text box

    you can input the index number of psd files to be published for example,

    0, 2-3
  • Publish button

    Export Settings Dialog appears, click Export

    TODO show the project name with the default output folder

    • Browse button

      Please make sure the target book folder for output. If you like to change the destination folder.

      The last output folder could be stored in kwikconfig.json

      {
        "name":"book free",
        "output":"../../../Solar2D/App/bookFree",
        "pages":[
          {"psd":"page01.psd", "name":"page01"},
          {"psd":"page02.psd", "name":"page02"}
        ],
      }
  • Kwik will publish images/source code to the output folder. You can find them, images in assets folder and lua files in

    TODO change dist to src with SimpleBook sample

Active Document

You can publish images/codes from active document only.

  • Export Images
  • Export Code

Layer Groups

TODO Kwik4_1280x1920 to be renamed as page1

You can export images of each member of a layer group.

Before using “Unmerge” button, please select an output folder where each psf files are published. It must be under App folder.

The default behavior is to publish one mergerd image of a layer group. You need to select a layer group to be unmereged

Select layer groups and then click Unmerge button.

If you want to cancel a layer group to be unmerged, Check it and click Cancel button. It will disapper from the list.

The source files and the images of each layer in a layer group are exported when published.

TODO fix the bug that unmerged group is not indexed at the right position in index.lua

local scene = require('controller.scene').new(sceneName, {
    name = "kwik4_1280x1920",
    layers = {
          {  bg={} },
          {  copyright={} },
          {  star={} },
          {  hello={} },
          {  mycircle={} },
          {  myrect={},
          {  GroupA={
                { SubA = {} },} },
    },