recording
Boudewijn Rempt
boud at valdyas.org
Thu Mar 15 12:12:27 UTC 2012
Hi,
I've tried to make a list of the current state of recording and related
technologies in Krita, in repsonse to bug 245295 - Recording of scaling
and moving a layer doesnt work. I think it's fair to say that none of
the current relevant technologies, namely recording, strokes framework
and scripting are complete yet. I'm not sure what kind of solution we
need here, but after looking at the magnitude of the task, I feel we need
some kind of automation here, since it's unlikely we'll ever be able to
provide complete coverage by hand.
* Recorder
We have a few actions that can be recorded: filter and painting,
not selecting yet.
* Selections can be saved and should be recorded
* rulers can be saved and should be recorded
** Current recorded actions:
KisRecordedAction
KisRecordedNodeAction
KisRecordedFilterAction
KisRecordedPaintAction
KisRecordedFillPaintAction
KisRecordedPathPaintAction
KisRecordedShapePaintAction
** The recording design document
(http://community.kde.org/Krita/Recording_System) only talks about tool
actions, but menu actions and shortcuts should also be recorded.
* Strokes:
Strokes also transfer information about the action to be done on to an
entity that executes the actual thing to be done. For painting, for
instance, both FreehandStroke and KisRecordedPaintAction store the state
of the canvas resources. Duplication? Can we share stuff? Actually porting
Krita to the strokes framework isn't finished yet either.
http://community.kde.org/Krita/Recording_System talkes about integrating
recording and strokes -- is that done already?
* Scripting:
What about it? And remote instrumenting using dbus? We have a barely
compiling, hardly useful scripting plugin that uses kross, and users can
create generators and filters with shiva, which solves at least one part
of the scripting needs. But I'm not sure we shouldn't figure out a way to
integrate scripting and recording.
* Generation:
Couldn't we come up with something that would generate strokes, recorder
and actions from one or more xml files?
* Links
http://community.kde.org/Krita/Centralized_Queue_For_Tool_Jobs
http://community.kde.org/Krita/Recording_and_Collaborative_working_Design
http://community.kde.org/Krita/Strokes_Framework
http://community.kde.org/Krita/Recording_System
http://community.kde.org/Krita/Undo_adapter_vs._Undo_store
* Overview of stuff that needs to be recorded/scripted/remotely
instrumentable/ported to strokes
** Actions
Every action should be recordable. Actions lead to dialogs, act directly
or activate tools.
Should tool activation be recordable?
This is a quick grep for all the actions in Krita... Excepting the actions
in libs, of course. And recently it became clear that we were missing
actions for some functions, like the buttons in the layerbox, so there are
already actions missing. We create new actions all the time. Somehow we
need a mechanism that records actions as well.
m_100pct = new KAction(i18n("Reset zoom"), this);
m_imageFlatten = new KAction(i18n("&Flatten image"), this);
m_imageMergeLayer = new KAction(i18n("&Merge with Layer Below"),
this);
m_flattenLayer = new KAction(i18n("&Flatten Layer"), this);
m_rasterizeLayer = new KAction(i18n("Rasterize Layer"), this);
m_layerSaveAs = new KAction(KIcon("document-save"), i18n("Save Layer
as Image..."), this);
m_imageResizeToLayer = new KAction(i18n("Size Canvas to Size of
Current Layer"), this);
m_removeSegmentAction = new KAction(i18n("Remove Segment"), this);
m_pasteNew = new KAction(i18n("Paste into &New Image"), this);
m_pasteAt = new KAction(i18n("Paste at cursor"), this);
m_copyMerged = new KAction(i18n("Copy merged"), this);
m_reselect = new KAction(i18n("&Reselect"), this);
m_invert = new KAction(i18n("&Invert Selection"), this);
m_copyToNewLayer = new KAction(i18n("Copy Selection to New Layer"),
this);
m_cutToNewLayer = new KAction(i18n("Cut Selection to New Layer"),
this);
m_fillForegroundColor = new KAction(i18n("Fill with Foreground
Color"), this);
m_fillBackgroundColor = new KAction(i18n("Fill with Background
Color"), this);
m_fillPattern = new KAction(i18n("Fill with Pattern"), this);
m_smooth = new KAction(i18n("Smooth..."), this);
m_imageResizeToSelection = new KAction(i18n("Size Canvas to Size of
Selection"), this);
new KAction(i18n("I&nsert Image as Layer..."), this);
new KAction(KIcon("document-properties"), i18n("Properties..."),
this);
d->reapplyAction = new KAction(i18n("Apply Filter Again"), this);
m_lighterColor = new KAction(i18n("Make Brush color lighter"), this);
m_darkerColor = new KAction(i18n("Make Brush color darker"), this);
m_increaseBrushSize = new KAction(i18n("Increase Brush Size"), this);
m_decreaseBrushSize = new KAction(i18n("Decrease Brush Size"), this);
d->toggleFgBg = new KAction(i18n("Swap Foreground and Background
Color"), this);
d->resetFgBg = new KAction(i18n("Reset Foreground and Background
Color"), this);
eraseAction = new KAction(i18n("Set eraser mode"), m_eraseModeButton);
hMirrorAction = new KAction(i18n("Set horizontal mirror mode"),
hMirrorButton);
vMirrorAction = new KAction(i18n("Set vertical mirror mode"),
vMirrorButton);
new KAction(i18n("Brush composite"), this);
new KAction(i18n("Brush option slider 1"), this);
new KAction(i18n("Brush option slider 2"), this);
new KAction(i18n("Mirror"), this);
new KAction(i18n("Add to palette"), this);
new KAction(i18n("Workspaces"), this);
m_maskToSelection = new KAction(i18n("Mask To Selection"), this);
m_maskToLayer = new KAction(i18n("Create Layer from Mask"), this);
new KAction(KIcon("tool_example"),
new KAction(KIcon("tool_bezier_select"),
new KAction(KIcon("tool_moutline"),
new KAction(KIcon("tool_bezier_paint"),
new KAction(i18n("HDR Layer from bracketing"), this);
new KAction(i18n("&Edit metadata..."), this);
new KAction(i18n("Separate Image..."), this);
new KAction(i18n("&Histogram..."), this);
m_toneMappingAction = new KAction(i18n("Tonemapping..."), this)
new KAction(i18n("Scale To New Size..."), this);
new KAction(i18n("Size Canvas..."), this);
m_scaleLayerAction = new KAction(i18n("Scale &Layer..."), this);
m_scaleSelectionAction = new KAction(i18n("&Scale..."), this);
m_growSelection = new KAction(i18n("Grow Selection..."), this);
m_shrinkSelection = new KAction(i18n("Shrink Selection..."), this);
m_borderSelection = new KAction(i18n("Border Selection..."), this);
m_featherSelection = new KAction(i18n("Feather Selection..."), this);
new KAction(i18n("&Shear Image..."), this);
new KAction(i18n("&Shear Layer..."), this);
new KAction(i18n("Extensions manager..."), this);
new KAction(i18n("Add Drop Shadow..."), this);
new KAction(i18n("&Convert Image Type..."), this);
new KAction(i18n("&Convert Layer Type..."), this);
new KAction(i18n("Select from Color Range..."), this);
new KAction(i18n("Select Opaque"), this);
new KAction(KIcon("media-playback-start"), i18n("Open and play..."),
this);
new KAction(KIcon("document-edit"), i18n("Open and edit..."), this);
new KAction(i18n("Save all actions"), this);
m_startRecordingMacroAction = new KAction(KIcon("media-record"),
i18n("Start recording macro"), this);
m_stopRecordingMacroAction = new
KAction(KIcon("media-playback-stop"), i18n("Stop recording actions"),
this);
new KAction(i18n("&Rotate Image..."), this);
new KAction(KIcon("object-rotate-right"), i18nc("rotate image 90
degrees to the right", "Rotate Image of 90° to the Right"), this);
new KAction(i18nc("rotate image 180 degrees to the right", "Rotate
Image of 180°"), this);
new KAction(KIcon("object-rotate-left"), i18nc("rotate image 90
degrees to the left", "Rotate Image of 90° to the Left"), this);
m_rotateLayerAction = new KAction(i18n("&Rotate Layer..."), this);
m_rotate90LayerAction = new KAction(i18nc("rotate the layer 180
degrees", "Rotate Layer of 180°"), this);
m_rotate180LayerAction = new KAction(KIcon("object-rotate-right"),
i18nc("rotate the layer 90 degrees to the right", "Rotate Layer of 90° to
the Right"), this);
m_rotate270LayerAction = new KAction(KIcon("object-rotate-left"),
i18nc("rotate the layer 90 degrees to the left", "Rotate Layer of 90° to
the Left"), this);
new KAction(KIcon("object-flip-horizontal"), i18n("Mirror
Horizontally"), this);
new KAction(KIcon("object-flip-vertical"), i18n("Mirror Vertically"),
this);
new KAction(i18n("&Patterns"), this);
KAction(i18n("&Gradients"), this);
KAction(i18n("&Color"), this);
KAction(i18n("&Painter's Tools"), this);
m_gridFastConfig1x1 = new KAction(i18n("1x1"), this);
m_gridFastConfig2x2 = new KAction(i18n("2x2"), this);
m_gridFastConfig5x5 = new KAction(i18n("5x5"), this);
m_gridFastConfig10x10 = new KAction(i18n("10x10"), this);
m_gridFastConfig20x20 = new KAction(i18n("20x20"), this);
m_gridFastConfig40x40 = new KAction(i18n("40x40"), this);
m_gridClear = new KAction(i18n("Clear Perspective Grid"), this);
KAction *action = new KAction(i18n("&Finish"), this);
action = new KAction(KIcon("dialog-cancel"), i18n("&Cancel"), this);
m_d->saveIncremental = new KAction(i18n("Save Incremental &Version"),
this);
m_d->saveIncrementalBackup = new KAction(i18n("Save Incremental
Backup"), this);
m_d->totalRefresh = new KAction(i18n("Total Refresh"), this);
m_d->createTemplate = new KAction( i18n( "&Create Template From
Image..." ), this);
KAction *firstRun = new KAction( i18n( "Load Tutorial"), this);
KAction *rotateCanvasRight = new KAction(i18n("Rotate Canvas Right"),
this);
KAction *rotateCanvasLeft = new KAction(i18n("Rotate Canvas Left"),
this);
KAction *resetCanvasTransformations = new KAction(i18n("Reset Canvas
Transformations"), this);
QAction *insertAsNewLayer = new KAction(i18n("Insert as New Layer"),
&popup);
QAction *insertAsNewLayers = new KAction(i18n("Insert as New Layers"),
&popup);
QAction *openInNewDocument = new KAction(i18n("Open in New Document"),
&popup);
QAction *openInNewDocuments = new KAction(i18n("Open in New
Documents"), &popup);
QAction *cancel = new KAction(i18n("Cancel"), &popup);
new KAction(i18n("Edit Palette..."), this);
KAction *KAction(i18n("Select Image Background..."), this);
m_colorSelAction = new KAction("Show color selector", this);
m_mypaintAction = new KAction("Show MyPaint shade selector", this);
m_minimalAction = new KAction("Show minimal shade selector", this);
m_colorHistoryAction = new KAction("Show color history", this);
m_commonColorsAction = new KAction("Show common colors", this);
m_newPainterLayerAction = new KAction(KIcon("document-new"),
i18n("&Paint Layer"), this);
m_newGroupLayerAction = new KAction(KIcon("folder-new"), i18n("&Group
Layer"), this);
m_newCloneLayerAction = new KAction(KIcon("edit-copy"), i18n("&Clone
Layer"), this);
m_newShapeLayerAction = new KAction(KIcon("bookmark-new"),
i18n("&Shape Layer"), this);
m_newAdjustmentLayerAction = new KAction(KIcon("view-filter"),
i18n("&Filter Layer..."), this);
m_newGeneratorLayerAction = new KAction(KIcon("view-filter"),
i18n("&Generated Layer..."), this);
m_newTransparencyMaskAction = new KAction(KIcon("edit-copy"),
i18n("&Transparency Mask"), this);
m_newEffectMaskAction = new KAction(KIcon("bookmarks"), i18n("&Filter
Mask..."), this);
m_newSelectionMaskAction = new KAction(KIcon("edit-paste"),
i18n("&Local Selection"), this);
KAction *KAction(i18n("Compose Layer..."), this);
KAction *KAction(i18n("Image Split "), this);
KAction* m_newPainterLayerAction;
KAction* m_newGroupLayerAction;
KAction* m_newCloneLayerAction;
KAction* m_newShapeLayerAction;
KAction* m_newAdjustmentLayerAction;
KAction* m_newGeneratorLayerAction;
KAction* m_newTransparencyMaskAction;
KAction* m_newEffectMaskAction;
KAction* m_newSelectionMaskAction;
** Commands
All actions in Krita are already undoable. Not everything that ends up in
a command can be recorded. We save image data, not the command parameters.
Does everything that needs to be recorded already end up in a command? No,
toggles, tool activations and so on do not.
./ui/kis_node_commands_adapter.h
./image/commands/kis_node_opacity_command.h
./image/commands/kis_paintdevice_convert_type_command.h
./image/commands/kis_layer_command.h
./image/commands/kis_image_node_to_bottom_command.h
./image/commands/kis_image_node_to_top_command.h
./image/commands/kis_layer_props_command.h
./image/commands/kis_image_layer_add_command.h
./image/commands/kis_layer_commands.h
./image/commands/kis_node_compositeop_command.h
./image/commands/kis_change_generator_command.h
./image/commands/kis_selection_commands.h
./image/commands/kis_change_filter_command.h
./image/commands/kis_node_move_command.h
./image/commands/kis_node_command.h
./image/commands/kis_reselect_global_selection_command.h
./image/commands/kis_image_commands.h
./image/commands/kis_node_property_list_command.h
./image/commands/kis_image_node_lower_command.h
./image/commands/kis_deselect_global_selection_command.h
./image/commands/kis_image_command.h
./image/commands/kis_image_node_raise_command.h
./image/commands/kis_image_layer_remove_command.h
./image/commands/kis_node_commands.h
./image/commands/kis_image_layer_move_command.h
./image/commands/kis_image_lock_command.h
./image/commands/kis_image_set_projection_color_space_command.h
./image/commands/kis_image_change_layers_command.h
./image/commands/kis_set_global_selection_command.h
./image/commands_new/kis_saved_commands.h
./image/commands_new/kis_image_resize_command.h
./image/commands_new/kis_processing_command.h
./image/commands_new/kis_update_command.h
./image/commands_new/kis_image_set_resolution_command.h
./image/commands_new/kis_node_move_command2.h
./image/tests/kis_layer_commands_test.h
./image/tests/kis_stroke_strategy_undo_command_based_test.h
./image/tests/kis_image_commands_test.h
./image/tests/kis_node_commands_test.h
./image/kis_stroke_strategy_undo_command_based.h
./plugins/tools/tool_transform2/tool_transform_commands.h
** Tools
All tools should be recordable. Paint tools are recorded right now, but
none of the others.
./plugins/tools/tool_crop/tool_crop.h
./plugins/tools/tool_crop/kis_tool_crop.h
./plugins/tools/tool_perspectivegrid/tool_perspectivegrid.h
./plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.h
./plugins/tools/tool_curves/kis_tool_moutline.h
./plugins/tools/tool_curves/tool_curves.h
./plugins/tools/tool_curves/kis_tool_bezier_select.h
./plugins/tools/tool_curves/kis_tool_example.h
./plugins/tools/tool_curves/kis_tool_bezier.h
./plugins/tools/tool_curves/kis_tool_curve.h
./plugins/tools/tool_curves/kis_tool_bezier_paint.h
./plugins/tools/defaulttools/kis_tool_rectangle.h
./plugins/tools/defaulttools/kis_tool_multihand.h
./plugins/tools/defaulttools/kis_tool_fill.h
./plugins/tools/defaulttools/kis_tool_ellipse.h
./plugins/tools/defaulttools/kis_tool_brush.h
./plugins/tools/defaulttools/kis_tool_pan.h
./plugins/tools/defaulttools/kis_tool_gradient.h
./plugins/tools/defaulttools/kis_tool_move.h
./plugins/tools/defaulttools/kis_tool_colorpicker.h
./plugins/tools/defaulttools/kis_tool_path.h
./plugins/tools/defaulttools/default_tools.h
./plugins/tools/defaulttools/kis_tool_line.h
./plugins/tools/defaulttools/kis_tool_measure.h
./plugins/tools/tool_text/kis_text_tool_option_widget.h
./plugins/tools/tool_text/kis_tool_text.h
./plugins/tools/tool_text/tool_text.h
./plugins/tools/tool_polygon/tool_polygon.h
./plugins/tools/tool_polygon/kis_tool_polygon.h
./plugins/tools/tool_grid/kis_tool_grid.h
./plugins/tools/tool_grid/tool_grid.h
./plugins/tools/tool_polyline/kis_tool_polyline.h
./plugins/tools/tool_polyline/tool_polyline.h
./plugins/tools/selectiontools/kis_tool_select_magnetic_option_widget.h
./plugins/tools/selectiontools/kis_tool_select_polygonal.h
./plugins/tools/selectiontools/kis_tool_select_similar.h
./plugins/tools/selectiontools/selection_tools.h
./plugins/tools/selectiontools/kis_tool_select_contiguous.h
./plugins/tools/selectiontools/kis_tool_select_path.h
./plugins/tools/selectiontools/kis_tool_select_magnetic.h
./plugins/tools/selectiontools/kis_tool_select_outline.h
./plugins/tools/selectiontools/kis_tool_select_rectangular.h
./plugins/tools/selectiontools/kis_tool_select_elliptical.h
./plugins/tools/selectiontools/kis_tool_select_brush.h
./plugins/tools/tool_dyna/tool_dyna.h
./plugins/tools/tool_dyna/kis_tool_dyna.h
./plugins/tools/tool_transform2/tool_transform.h
./plugins/tools/tool_transform2/tool_transform_commands.h
./plugins/tools/tool_transform2/kis_tool_transform.h
./plugins/tools/tool_transform2/tool_transform_args.h
./plugins/tools/tool_star/tool_star.h
./plugins/tools/tool_star/kis_tool_star.h
./plugins/assistants/RulerAssistant/kis_ruler_assistant_tool.h
./plugins/assistants/RulerAssistant/ruler_assistant_tool.h
./plugins/extensions/painterlyframework/mixertool.h
More information about the kimageshop
mailing list