Add textures for experiment brush
ClosedPublic

Authored by scottpetrovic on Oct 26 2018, 5:41 PM.

Details

Reviewers
rempt
dkazakov
albertoefg
Group Reviewers
Krita
Summary

Bug 315079

Added option to select "Solid Color" or "Pattern" to experimental brush.

Before:

After:

After with mirror:

After with solid color:

Test Plan

Compiled and tested.

  1. Works with solid color or pattern
  2. Works with mirror or without it
  3. Saved different copies of the brush, all keep the appropriate fill selected option.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
albertoefg created this revision.Oct 26 2018, 5:41 PM
Restricted Application added a project: Krita. · View Herald TranscriptOct 26 2018, 5:41 PM
albertoefg requested review of this revision.Oct 26 2018, 5:41 PM
rempt accepted this revision.Oct 29 2018, 12:06 PM
rempt added a subscriber: rempt.

Yes, this looks perfectly correct. Do you already have push access?

This revision is now accepted and ready to land.Oct 29 2018, 12:06 PM
dkazakov requested changes to this revision.Nov 5 2018, 10:36 PM
dkazakov added a subscriber: dkazakov.

Hi, @albertoefg!

The patch works almost fine, but there are a few little things that should be fixed before pushing it:

  1. [BUG] After starting Krita and opening brush editor the radio button has nothing set. It is incorrect. The radio button should have the value of the current brush.
  1. Use enum instead of the two booleans (see inlined comment)
  1. In brush format use literal enum as well.

Bug in point one is a direct sequence of not using a enum actually :)

plugins/paintops/experiment/kis_experimentop_option.cpp
119

That is actually the reason of the bug

plugins/paintops/experiment/kis_experimentop_option.h
32

See a comment about two booleans. Basically, we need a field that might have two options: "patter" or "color"

73

That is really a bad idea to use two booleans to state that has only two options :) What does it mean if both booleans are false? And what does it mean if both booleans are true? Such state is undefined in this code. Please change it to some enum. Something like:

enum FillType {
    FillSolidColor,
    FillPattern
};

It will avoid the problem of undefined state

85

Don't forget about the default values!

This revision now requires changes to proceed.Nov 5 2018, 10:36 PM

@albertoefg - Are you still working on this. If not, would you be ok if I took this patch over and finished it off. I think the patch is still pretty much yours, so you can still get the credit for it.

scottpetrovic commandeered this revision.Mar 12 2019, 5:29 PM
scottpetrovic added a reviewer: albertoefg.

I talked with @albertoefg about this ticket. He is ok with me finishing this guy off.

updated code to use enum instead of separate boolean values for fill type

dkazakov accepted this revision.Mar 15 2019, 9:36 PM

Hi, @scottpetrovic!

The patch looks perfectly fine now! Please push :)

This revision is now accepted and ready to land.Mar 15 2019, 9:36 PM
scottpetrovic closed this revision.Mar 16 2019, 3:31 PM

Pushed out...closing