tik_manager4.dcc.krita.utils

Functions

export_merged_visible_layers(→ bool)

Export all visible vector layers from the active Krita document as a merged SVG file.

export_selected_vector_layer_to_svg(→ bool)

Export the currently selected vector layer in the active Krita document to an SVG file.

open_image_file(→ None)

Open a document file in Krita.

Module Contents

export_merged_visible_layers(file_path: str) bool

Export all visible vector layers from the active Krita document as a merged SVG file.

Recursively traverses all layer groups, collects the inner SVG content of every visible vector layer, and writes a single well-formed SVG file sized to the document canvas dimensions.

Args:

file_path: Destination path for the exported .svg file.

Returns:

True if the file was written successfully.

Raises:

ValueError: If no visible vector layers are found in the document.

export_selected_vector_layer_to_svg(file_path: str) bool

Export the currently selected vector layer in the active Krita document to an SVG file.

Args:

file_path (str): Destination file path for the SVG.

Returns:

bool: True if export succeeds.

Raises:

RuntimeError: If there is no active document or layer. TypeError: If the selected node is not a vector layer.

open_image_file(file_path: str) None

Open a document file in Krita.