Last Modified: 2024-04-10

UXP/kwik-exporter

  1. Open Adobe UXP Developer Tool

    Add Plugin

    Add Plugin to select develop/UXP/kwik-exporter/dist

    TODO alpla release folder structure may be different to the current develop

    Load com.kiwksher.kwik5.dev-ps

Kwik Exporter Panel

The UXP panel apppears in Photoshop

Photoshop Files > Open

you can select the following folder that comes with demo .psd files and kwikconfig.json. You may open a folder of yours which contains psd files.

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

TODO User can change it and Kwik uses it for a folder name when publshing

TODO kwikconfig.json will be created in the selected folder.

TODO igonred

```
  "pages":[
    {"psd":"page01.psd", "name":"page one"},
    {"psd":"page02.psd", "name":"page two"}
  ],
  "ignored":[
    {"psd":"page01_copy.psd", "name":"page 01 backup"},
  ]
```

Double Click the one of .psd in the list. The psd file is opened for editing.

Solar2D Project

You may create a new project or select one that has been made.

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

Publish

selected psd files are publihsed to App/book folder

Active Document

You can publish images/codes from active document only.

Layer Groups

TODO Kwik4_1280x1920 to be renamed as page1

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

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 = {} },} },
    },