GSoC/2020/StatusReports/AshwinDhakaita
Integrating the MyPaint Brush Engine with Krita
Summary
MyPaint developers have separated out their brush engine in the form of a library, libmypaint. Artists like MyPaint brushes a lot and it would be good to integrate the same as a new brush engine within Krita brush engine subsystem.
The project has two objectives:
- To integrate the MyPaint brush engine in the form of a new brush engine in Krita, enable it to load the MyPaint brushes from system and use them for painting in Krita.
- To implement a preset editor to edit existing brushes and also create new ones.
By the end of the project, Krita will have a new brush engine that can be used for painting with MyPaint brushes and also create and edit them.
Project Goals
- Implement a new brush engine in Krita
STATUS: Complete
- Enable Krita to load installed MyPaint brushes from the system.
STATUS: Complete
- Implement a preset editor for editing and creating MyPaint brushes.
STATUS: Complete
- Documenting the brush engine.
STATUS: Complete
Work Report
Implement a new brush engine in Krita
The first step in achieving the MyPaint Brush integration in Krita was to implement a new brush engine which makes use of Libmypaint apis at the backend for painting. This brush engine will serve as a wrapper to the one provided by MyPaint and help libmypaint in interfacing with the Krita system.
- Status - Complete
- Duration - 25 May - 29 June
Enable Krita to load MyPaint Brushes
The newly available MyPaint brush engine is of no use if it can't load installed MyPaint brushes from the system. So, we want to enable Krita to load these brushes.
- Status - Complete
- Duration - 20 June - 29 June
Implement Preset Editor
This aims at creating a preset editor, pretty similar to the one preset in Krita already. This will help in creating new MyPaint brushes and modify the existing ones. Just think, what good a brush would be if we can't even change it's size or paint color .
- Status - Complete
- Duration - 30 June- 23 July
Documenting the Brush Engine
This completed recently. Had to create a document to help users to know about the settings that MyPaint brush engine provides. This has to added in the brush engine section of Krita Manual. The only problem with this is that mypaint is pretty complex and there is no good documentation available even on MyPaint's website. So, this is still a problem that the usability of this document is a bit minimal given that the terminologies used are pretty complicated for a beginner.
- Status - Complete
- Duration - 24 August - 26 August
What is Complete And What is Left
Most of my project is complete and ready to be merged. Though there are still a few small bugs that need to be resolved. They shouldn't take more than a few days to solve. Once done, the project shall be completely ready.
List of Commits
- Added libmypaint to cmake
- Added mypaint brush engine to paintop registry
- Added KisMyPaintBrush and KisMyPaintSurface classes
- Added cursor for MyPaintOp
- Implemented Load Methods for KisMyPaintBrush
- Refactored MyPaintOpPlugin to use KisMyPaintOpFactory
- Added Tests for MyPaintOp plugin
- Optimized draw_dab and get_color methods
- Unlinked Libmypaint from libs/image
- Fixed Eraser not working
- Fixed broken build when libmypaint is not installed
- Fix for splatter-04 preset
- Added Classic mypaint brush presets in the default install
- Enable brush Resizing
- Converted Properties to QScopedPointers
- Slight Change in dabrect
- Refactor to make methods non global
- Fix for 1Pixel preset
- Removed unused code from draw_dab
- Rectified Tests for QScopedPointers
- Remove moc include from kis_mypaintop_test
- Added Basic Settings in Preset Editor
- Added Test for Loading MyPaint Brushes
- Added Preset Editor with Advanced Settings
- Synchronised base settings and advanced settings
- Fixed Crash and base option sync issue
- Added Use of EraserMode
- Range Changing Behaviour
- Added Custom Brush Option Type
- Code Review Changes
- Use image projection instead of m_node
- Added antialiasing setting
- Fixed custom input not working
- Change sensor when checkbox is clicked
- Use a separate variable for storing previous time
- use mypaint apis for marking start of the stroke
- added airbrush option
- Added range checking
- Add missing licenses
- Code Cleanup
- Change cursor outline in proportion to offset by random
- Refactored mypaint brush option as KisDynamicSensors
- Remove warning in libmypaint not found
- Fixed crash on smudging on scratchpad
- Fixed broken reloading of MyPaint Brushes
Project Links
- Phabricator Task
- Merge Request
- Merge Request [Master Branch]
- Merge Request [Documentation]
- Branch
- Branch for Krita-Master
Monthly Status Reports
Note: Phase 3 Report will be out on 31st August and will be available through my blog. All my GSoC weekly reports are also present on my blog.