grapa.shared.command_recorder.CommandRecorderCurve

class grapa.shared.command_recorder.CommandRecorderCurve(curve: Curve)

Bases: object

Records operations performed on a Curve, to allow undo/redo functionality. Used by Curve.recorder. Similar interfaces as CommandRecorderGraph. NB: log an operation makes sense irrespective of which Graphs the Curve belongs to but undo_last_transaction() may screw up -> open door for undesired changes on unrelated Graphs -> undo_last_transaction() and redo_last_transaction() are NOT implemented in CommandRecorderCurve

__init__(curve: Curve)

Methods

__init__(curve)

is_log_active([new])

Get/set if logging is active for any of the Graphs containing the Curve.

log(caller, do, undo[, tag_special, ...])

Log an operation performed on the Curve.

log_special(tag[, blend_into_transaction])

Log a special operation performed on the Curve.

is_log_active(new: bool | None = None)

Get/set if logging is active for any of the Graphs containing the Curve. See CommandRecorderGraph.is_log_active(). :param new: if not None, set new logging state

log(caller, do: Tuple[str, list, dict], undo: Tuple[str, list, dict], tag_special: str = '', blend_into_transaction=False)

Log an operation performed on the Curve.

log_special(tag: str, blend_into_transaction=True)

Log a special operation performed on the Curve.