Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix G The part table’s fields, at a glance

work/<name>/parts.py, an ordinary Python module; a missing field is a hard error (config.REQUIRED). The template is dtp/templates/project/parts.py — copy it into the subproject.

fieldwhich stages it governsformathow to write itchange it, rerun from
ASSIGNsegment (1); the one-shot route uses only this one; with the lines as walls (ASSIGN_FROM) it inherits the previous step’s[("sub-part", [region number, …]), …]written against the regions.png of the first segment; the order is the occlusion order, bottom -> topall of it, from segment
ORDERsegment, and the one-shot route’s tree[n for n, _ in ASSIGN]never edited—
CLASSESthe majority vote in segment[("class", ["word", …], ["sub-part", …]), …]the order is the priority: small and specific firstfrom segment
SAM_WORDSsegment["hair", "red bow", …]the more specific the word the better; a word whose mask covers more than 40% of the subject is uselessfrom segment
KEEP_ASSIGN_REGIONsegment["sub-part", …]the sub-parts that skip the vote and keep the whole region the hand-written table gave themfrom segment
GROUPScomplete (3), per-layer lineart, draft (5), paint[("group", ["sub-part", ...]), ...]a group is one layer, the union of its sub-parts; the order is the occlusion order, which is the order of the groups in the .kra. Written by looking at the region image and the lineart imagefrom complete
SHARED_FLAT_COLORdraft (5){"group": "shared name", …}the groups that share one local colourfrom draft
GROUPS_FROM_MASKper-layer lineart (4), draft (5)[("group", "mask_x.png", "after which group", "the sub-part it depends on")]a layer split out of another group with an AI maskfrom lines
LINESlineart (2)[("Line_X", ["sub-part", …]), …]the lineart layers; every sub-part belongs to exactly one of themfrom lineart
LINE_LAYER_OF_GROUPper-layer lineart (4){"group": "Line_X", …}which lineart layer each layer’s lines go to, the GROUPS_FROM_MASK groups included; a group that is not listed gets no linesfrom lines
STRAND_GROUPSpaint (6), one-shot{"group", …}the groups that grow strands. Empty in the template; the one-shot route also needs strands=Truepaint / trace
HATCH_GROUPSone-shot (8){"sub-part", …}the sub-parts that get hatching. Empty in the template; the one-shot route also needs hatch=Truetrace
SEETHROUGHcomplete (3){"group": ["its layers", …], …}which See-through layers each group takes as candidates for its whole shape (only the occluded part is used); a group that is not listed only gets its seam filled; the layer names are in the template’s commentsfrom complete
LINE_DROP_BY_LAYERpaint (6){"Line_X": 6.0, …}one lineart layer’s own threshold: a line that is not darker than its surroundings by at least this much is not painted; a layer that is not listed uses the line_drop knob of the paint steppaint
PAINTpaint (6){"group": dict(method=..., ...), "*": dict(method="generic")}which method paints each group (method is a name in dtp.paint.METHODS, one page per body part: shadow_tier skin - eye eyes - hair hair - generic the baseline “copy” - eight placeholders) and its knobs; "*" is mandatory; a misspelled name fails the part table, and a group that picked a placeholder raises “not decided yet” at paint timepaint
CROPSreview (7){"face": (x, y), "neck": …, …}the centres of the 1:1 close-ups, in 8x coordinates; at least the face, the neck, the hands and the feetthe next painting run