c02f3c94d9
Opacity modifier implementation based on GP2. Functionality is largely unchanged. _Color Mode_ is either `Stroke` or `Fill` for modifying color opacity or `Hardness`. _Uniform Opacity_ does two things at once (!): - Sets the same opacity value for every point in a stroke. - Sets opacity as an absolute value rather than a factor. _Weight as Factor_ (button to the right of Opacity Factor): Use the vertex group as opacity __factor__ rather than an overall __influence__. This is confusing and hard to convey, but copies behavior from GP2. The _Influence_ panel contains the same filter settings as the GP2 modifier, with some small changes: - _Layer_ selects only strokes in the respective layer (with an _Invert_ option) - _Material_ selects only points with the respective material (with an _Invert_ option) - _Layer Pass_ and _Material Pass_ select only strokes/points which are rendered in the respective pass. _Note 1: Layers don't have UI for setting a pass yet, this will be a generic layer attribute. This can be set through the API for testing._ _Note 2: In GP2 a pass value of zero was used to disable pass filters. Since zero is a valid pass ID an explicit flag has been added for the purpose of turning pass filters on and off._ - _Vertex Group_: This can be used as an additional influence filter on points. If _Weight as Factor_ is enable the vertex group instead replaces the opacity factor. In _Fill_ mode the vertex group weight of the stroke's first point is used as influence for the entire stroke. - _Custom Curve_ is another possible influence factor per point. The curve input value is the relative position of a point along its stroke. The Influence settings have been moved into a separate DNA struct, which should help with reusability in various modifiers. Various utility functions can be found int `MOD_grease_pencil_util.hh` for handling influence settings and generating `IndexMasks` for modernized C++ code. Pull Request: https://projects.blender.org/blender/blender/pulls/116946