Run

Check out the Installation instructions to get the required packages on your machine. Once you’ve got it, to run Lic, you’ll need to tell it where LDraw, L3P and Pov-Ray live. There’s not yet any nice GUI control to do this. Instead, you’ll have to open the file config.py in a text editor, and manually specify the three required paths. Common defaults are already set.

With the paths set, to (finally) run Lic, just double click the Lic.py file in the source package.

Loading an existing model into Lic:

The ‘File -> Open’ menu works.

The first time you open an LDraw file in Lic, Lic does a bunch of one-time calculations so it can draw the instruction window preview. Mainly, Lic must calculate how big each part and step image is when displayed. It does this by rendering the part to a background frame buffer, then cropping the resulting image. This process can take considerable time, but needs to be done only once.

The part dimensions calculated by Lic are stored in a PartDimension.cache file inside Lic’s current working directory. All step image dimensions are stored inside the LDraw file itself, as new comments - but *only* if you save the file. This is important: Lic will not write anything to the file unless you tell it to, so you probably want to save your file immediately after loading it for the first time.

Since Lic is still at such an early development stage, I suggest backing up any file before opening it in Lic (duh). Also, Lic itself will automatically make one back up of the file (to filename + .bak) whenever you save, but I wouldn’t rely on this.

Once a file has been loaded and saved in Lic, subsequent loads should happen quite fast.

I apologize in advance for the butt-ugly Open and Save-As dialogs. I’m new to GTK+, but had I known its FileChooser dialog was so frickin hideous when starting out, I probably would’ve chosen a different toolkit…

The main GUI components:

Lic’s main window is split into two main panes. The left pane holds the Instruction tree - a pretty straightforward hierarchical representation of each object in the instruction book. The right pane is a preview of the currently selected instruction book page. Clicking any object in the hierarchy tree will select that object in the preview window. Clicking an object in the preview will also select it (but not in the tree, yet).

The root of the Instruction tree is the main model itself. Nodes in the root are either Instruction book Pages or Submodels. Each Submodel node contains any Pages in that Submodel. Submodel Pages are numbered sequentially as they appear in the main model (depth-first).

Pages are made up of one or more Steps (well, just 1 for now). To borrow some handy nomenclature from LPub: Steps are made up of Construction Step Images (CSIs) and Part List Images (PLIs) (and a step number label, eventually).

CSIs contain nodes for each part inserted in that Step. PLIs contain a list of each (part, color) pair inserted in that Step.

Manipulating Instruction images:

For now, the only manipulation you can do with Lic is move Instruction objects around. Select any object, then use the keyboard arrow keys to move it around. One arrow moves the object one pixel in the chosen direction. Shift + arrow moves by 10. Saving will save any movements (except page number labels, for now)

Instruction generation:

The ‘Instructions -> Generate Images’ menu works.

Once you have your instruction book the way you like, ‘Instructions->Generate Images’ will generate high quality POV-Ray renderings of your instructions. Lic creates a folder in the its current working directory named after the model. There, it will create one png for each instruction page in the tree.

Instruction generation can take a long, long time. Also, once you begin there’s no way (yet) to interrupt Lic and stop it. The best you can do is close down the CLI window, and shut Lic down completely. The good news is that Instructions are generated in the exact order they’re needed, so if you interrupt an image generation then start it up again it will take up exactly where it left off. If you want to regenerate any particular image, just delete it and run Instruction generation again - only missing files will be regenerated.

Page images are created at 800 x 600 by default. There’s no way (yet) to set image size output from inside Lic. Lic does honor the LPUB PAGE SIZE metacommand, so you can us that at the beginning of your model file to change the generated image size.