UXP/kwik-exporter
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.
sample-projects/SingleBook/book01
- page1.psd
- page2.psd
- kwikconfig.json
{ "name":"book one", "output":"../../Solar2D/src/App/book", "pages":[ {"psd":"page01.psd", "name":"page one"}, {"psd":"page02.psd", "name":"page two"} ] }
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.
New
it scafolds the files and folders of a Solar2D template-project of kwik/base-proj/Solar2D into the folder you has selected in the dialog
{TARGET FOLDER}/App/book is the folder which code and assets like images are stored
It is free to rename {TARGET FOLDER}/App/book as you. Please follow the file naming rule
you may create a second book folder manually by using Finder(Mac) or File explore(Win)
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, then read build.config to mark portrait or landscape readonly
Select Book
default: App/book
select a book folder where images and lua files are generated
TODO select portrait or landscape
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.
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 = {} },} },
},