preloading
preloading
#
node.preload(default) — bound onto Procedure.
Wraps a node in a
PreloadProcedure,
turning a user-input question into a pre-answered, still-adjustable option.
Imported into the Procedure class body, so every import here is lazy (the
node layer imports Procedure back).
preload(self, default)
#
node.preload(default) — pre-answer this node with an adjustable default.
default is a procedure (or a raw literal, lifted to a constant) whose
type matches this node's; the runtime preloads it in so the node starts
complete and the user may adjust it before capturing::
session.photo &= cg.CaptureImage(
raw_photo=cg.UserInputBool(label="RAW").preload(False),
)