Page MenuHome

Paint: Option to disable antialiasing
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Oct 10 2019, 9:55 PM.
Subscribers
Tokens
"Party Time" token, awarded by gobb_blend."Like" token, awarded by Frozen_Death_Knight."Like" token, awarded by MetinSeven.

Details

Summary

You may want to disable antialiasing if you are working with pixel art
or low resolution textures. It is enabled by default.
There is still a flag available in ebrushFlags, but it is used in another
patch. I added ebrushFlags2, but I need to reorganize all flags at some
point in a way that makes sense.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) requested changes to this revision.Oct 14 2019, 11:03 AM
Jeroen Bakker (jbakker) added inline comments.
source/blender/makesrna/intern/rna_brush.c
2014

Set default for this RNA property to true.

This revision now requires changes to proceed.Oct 14 2019, 11:03 AM

There is no need for a flag2, there is a free bit in flag already.

Even so, it's getting near full, if we do add new flags would prefer to add flags which for spesific purposes (perhaps modes).

source/blender/makesrna/intern/rna_brush.c
2014

We don't need to set the defaults in RNA if they're set in DNA_brush_defaults.h.

source/blender/makesrna/intern/rna_brush.c
2010

For UV's we have pixel_snap_mode.

Think this could be called "use_snap_to_pixel" ?

Since this only relates to brush placement.

source/blender/makesrna/intern/rna_brush.c
2010

It does not disable float precision placement, it disables subpixel sampling. That way you will only get a 1 or a 0 curve mask value in a pixel when painting with a sharp falloff.

  • Instead of flag2, we could add a sampling_flag.
  • Booleans should use use_ prefix.
  • Review update, rebase
Jeroen Bakker (jbakker) requested changes to this revision.Wed, Oct 30, 8:19 AM
Jeroen Bakker (jbakker) added inline comments.
source/blender/makesdna/DNA_brush_types.h
439

eBrushSamplingFlags is a better description for this type.
Also add a comment where this flag is stored in the DNA for reference.

This revision now requires changes to proceed.Wed, Oct 30, 8:19 AM
Pablo Dobarro (pablodp606) marked an inline comment as done.
  • Review update
This revision is now accepted and ready to land.Wed, Oct 30, 3:43 PM

One minor issue, otherwise LGTM.

release/scripts/startup/bl_ui/properties_paint_common.py
205

Shouldn't this only display if projpaint is false?

release/scripts/startup/bl_ui/properties_paint_common.py
205

If I check for projpaint the option does not appear in the 2D view when painting with a 3D and a 2D view at the same time. I think most users would prefer to have this option always available even if it only affects 2D painting.

release/scripts/startup/bl_ui/properties_paint_common.py
205

when painting with a 3D and a 2D view at the same time.

Not sure why you would use a 2D image editor to configure the brush for the 3D view.

There are already checks for projpaint`to avoid showing settings which are not used.

This revision was automatically updated to reflect the committed changes.
This comment was removed by gobb_blend.