Page MenuHome

Freestyle: remove old and unused stroke shaders
ClosedPublic

Authored by Folkert de Vries (flokkievids) on Sep 26 2014, 4:10 PM.

Details

Summary

This patch removes some cpp Freestyle shaders that are unused and don't serve a real purpose any more.

The removed shaders are:

  • BPy_ColorNoiseShader
  • BPy_ColorVariationPatternShader
  • BPy_StrokeTextureShader
  • BPy_TextureAssignerShader
  • BPy_ThicknessVariationPatternShader
  • BPy_fstreamShader
  • BPy_streamShader

and a few more that weren't even exposed to the Python api.

Diff Detail

Repository
rB Blender

Event Timeline

Folkert de Vries (flokkievids) retitled this revision from to Freestyle: remove old and unused stroke shaders.
Folkert de Vries (flokkievids) updated this object.
Tamito Kajiyama (kjym3) requested changes to this revision.Sep 28 2014, 5:04 AM
Tamito Kajiyama (kjym3) edited edge metadata.

Thank you @Folkert de Vries (flokkievids) for the revision. I made a few inline notes below.

Also could you please revert the removal of ColorNoiseShader? I just remembered a feature request for a thickness noise shader. That could be implemented in a generic form commonly applicable to not only thickness but also color and alpha transparency (as in other color/alpha/thickness shaders). Then the existing ColorNoiseShader can be a basis of the implementation of the requested feature.

release/scripts/freestyle/modules/freestyle/shaders.py
52

Please remove this ThicknessVariationPatternShader and streamShader below.

source/blender/freestyle/CMakeLists.txt
213

Please keep these two entries in the alphabetical order.

This revision now requires changes to proceed.Sep 28 2014, 5:04 AM

The ThicknessNoiseShader is still present, I thought/think it would be a good idea to expose it to python.

As for the ColorNoiseShader, would it not be a better idea to use stroke textures for this purpose? That approach provides much more control already, as well as extra features (live preview, color and alpha combined).

A thickness noise modifier is a feature requested several times, so let us add one in the 2.73 release.

Color, alpha and thickness modifiers of line styles have symmetry such that the same modifier is available for all the three line properties (an exception is the calligraphic shader which is only applicable to thickness). It is true that textures can be used for adding noise to color and alpha, but I feel like it makes sense to have symmetric color/alpha noise shaders in addition to ThicknessNoiseShader.

Folkert de Vries (flokkievids) edited edge metadata.
  • Add ColorNoiseShader back
  • remove ColorCaligraphicShader code in BasicStrokeShaders.h
Tamito Kajiyama (kjym3) edited edge metadata.
This revision is now accepted and ready to land.Oct 8 2014, 5:56 PM
This revision was automatically updated to reflect the committed changes.