GSoC/2021/StatusReports/SanthoshAnguluri: Difference between revisions

From KDE Community Wiki
< GSoC‎ | 2021‎ | StatusReports
(Created page with "== Krita: Collective operations over multiple layers/groups == Krita is an opensource professional digital painting program. In Krita, artists can work on different layers an...")
 
 
(4 intermediate revisions by the same user not shown)
Line 12: Line 12:
* Cut/Copy selected layers with their new version to the clipboard
* Cut/Copy selected layers with their new version to the clipboard
** STATUS: '''DONE'''
** STATUS: '''DONE'''
* A "Paste factory" to paste all layers in the clipboard into a single merged layer
** STATUS: '''PENDING'''


* Re-implement existing paste factories to work seamlessly with the new design
* Re-implement existing paste factories to work seamlessly with the new design
** STATUS: '''PENDING'''
** STATUS: '''DONE'''


* Documentation for aforementioned features
* Documentation for aforementioned features
** STATUS: '''PENDING'''
** STATUS: '''DONE'''


=== Mentors ===
=== Mentors ===
Line 49: Line 46:


For cut operation, original layers are deleted as mentioned above.
For cut operation, original layers are deleted as mentioned above.
Blogpost: [https://santhoshanguluri.wordpress.com/2021/07/26/gsoc21-week-4-7-with-krita/ GSoC’21: Week 4-7 with Krita]


===== Commits =====
===== Commits =====
Line 58: Line 57:
* [https://invent.kde.org/graphics/krita/-/merge_requests/888/diffs?commit_id=59ab6d21c2551f148a3cd7aabe79c13d86db0134 Copying a vector layer saves its paint layer equivalent to clipboard]
* [https://invent.kde.org/graphics/krita/-/merge_requests/888/diffs?commit_id=59ab6d21c2551f148a3cd7aabe79c13d86db0134 Copying a vector layer saves its paint layer equivalent to clipboard]
* [https://invent.kde.org/graphics/krita/-/merge_requests/888/diffs?commit_id=782b6882eefd08bbad9578f9a5c8d647825a4794 Fix: Crash while saving a mask without parent in clipboard]
* [https://invent.kde.org/graphics/krita/-/merge_requests/888/diffs?commit_id=782b6882eefd08bbad9578f9a5c8d647825a4794 Fix: Crash while saving a mask without parent in clipboard]
=== Paste Factories ===
The paste factories that defines each paste action retrieve the data saved in the clipboard. Now <code>KisPasteActionFactory</code> pastes all the layers in same order or the shapes present in the clipboard respectively.
<code>Paste at Cursor</code> action pastes the merged data of all layers present in clipboard into a new layer and <code>Paste at Active Layer</code> pastes the merged data into the active layer.
===== Commits =====
* [https://invent.kde.org/graphics/krita/-/merge_requests/888/diffs?commit_id=b8516d0dc59fffd181a24f778f711e2b1179c7aa Update Paste at Cursor and Paste Into Active Layer]
* [https://invent.kde.org/graphics/krita/-/merge_requests/888/diffs?commit_id=84dc357b65f4591573199bca060e82d754b27ce9 Fix offset area to render paint device correctly in KisMimeData]
* [https://invent.kde.org/graphics/krita/-/merge_requests/888/diffs?commit_id=10ed0e778bb393ca0c0aeae4bd4dc0970bd8e46b Use Image's profile while using 'Paste at cursor' and 'Paste at Active Layer']
=== Documentation ===
The Krita reference manual and user manual contains areas where cut/copy/paste operations are explained. These areas are updated explaining new features. MR for documentation: [https://invent.kde.org/documentation/docs-krita-org/-/merge_requests/244 MR 244]


== Links for more info ==
== Links for more info ==

Latest revision as of 15:04, 19 August 2021

Krita: Collective operations over multiple layers/groups

Krita is an opensource professional digital painting program. In Krita, artists can work on different layers and group those layers conveniently for a single artwork. Many a time, it is expected to do similar operations over a set of layers/groups. This project focuses on implementing few basic operations over a set of layers/groups. By the end of GSoC, Krita should be able to perform cut, copy, paste, delete operations over multiple layers and groups in a single stroke.

Project Goals

  • Delete paint data over all selected layers
    • STATUS: DONE
  • Delete operation on a group layer deletes paint data of all layers belong to the group
    • STATUS: DONE
  • Cut/Copy selected layers with their new version to the clipboard
    • STATUS: DONE
  • Re-implement existing paste factories to work seamlessly with the new design
    • STATUS: DONE
  • Documentation for aforementioned features
    • STATUS: DONE

Mentors

Progress Report

Multi layer/group deletion

The idea is with an active selection on canvas, the delete operation should delete the selected area in all the selected layers and recursively apply to the children layers as well. This includes re-implementing clearImage in KisToolUtils class. However, such recursive deletion would also delete data on children masks as well. This is not a user expected response. So, my mentors suggested me to apply delete on explicitly selected masks only.

Blogpost: GSoC’21: Week 1-3 with Krita

Commits

Layers into clipboard

With an active selection on canvas, the KisCutCopyActionFactory is made to create a duplicate layer for each selected layer. These duplicate layers are then added to a temporary KisImage. The new duplicate layers are processed to crop the paint data to the active selection area. This is done by ActionHelper. These processed layers are then saved into clipboard preserving the order of original layers.

Few variants of making duplicate layer:

  • In case of vector layer, a paint layer with its projection is made and processed with ActionHelper.
  • Duplicates of masks are not processed before saving in clipboard.

For cut operation, original layers are deleted as mentioned above.

Blogpost: GSoC’21: Week 4-7 with Krita

Commits

Paste Factories

The paste factories that defines each paste action retrieve the data saved in the clipboard. Now KisPasteActionFactory pastes all the layers in same order or the shapes present in the clipboard respectively. Paste at Cursor action pastes the merged data of all layers present in clipboard into a new layer and Paste at Active Layer pastes the merged data into the active layer.

Commits

Documentation

The Krita reference manual and user manual contains areas where cut/copy/paste operations are explained. These areas are updated explaining new features. MR for documentation: MR 244

Links for more info