Why Anki image occlusion cards import as plain cloze, and the one-line fix

A developer building AnkiForge, a tool that generates Anki cards from lecture PDFs and labelled diagrams, found that image occlusion cards were not behaving as real image occlusion. Copying the stock note type's templates and field names was not enough, because Anki desktop checks a specific config value to decide whether to show the mask editor. Setting originalStockKind to the image occlusion value (6) resolves the problem, and without it the editor shows plain text fields with raw occlusion strings. The developer also matched Anki's exact coordinate formatting so exported notes match those saved after a round trip through the editor. Testing was done with the Anki Python package, which uses the same backend as the desktop app, to verify the output.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in