Age | Commit message (Collapse) | Author |
|
|
|
|
|
As the total of points was changed before free memory, if the total was lower than before, the remaining points were not released.
|
|
The Dopesheet was unlocked all layers because it was using the same logic used in UI panel, but this was wrong.
|
|
When select a layer in Dopesheet, the autolock layer was not working.
Now the Dopesheet code calls the function for autolock. Also some code cleanup to move the logic to new function.
|
|
The Poly curves were not supported when convert curves to grease pencil strokes, but now are supported.
Also, some code cleanup to make it more readable.
|
|
Now the material is set as fill if the curve is 2D and is filled with a material. This is done in the Convert operator only, because the SVG add-on works totally different due the SVG has more parameters to determine the type of filling.
|
|
Also remove unused arguments.
|
|
This commit adds support to convert curves to Grease Pencil strokes and create the materials too.
Also, there is a new python API. This API is required by the modified SVG import addon to create strokes( see T67065).
All curves selected in one operation are converted in the same Grease Pencil object.
|
|
When a material slot is empty, the default material is used.
The default color used is Gray to get a good contrast in dense scenes with dark and white background.
Reviewers: brecht, dfelinto, mendio, pepeland
Differential Revision: https://developer.blender.org/D5625
|
|
|
|
Follow conversion already used in most places.
|
|
Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place.
This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes.
Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data.
As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5470
|
|
Now the GPencil smooth algorithm uses a average value instead to use only two points and the interpolated value.
Differential Revision: https://developer.blender.org/D5489
|
|
Some statements were split across multiple lines because of their
trailing comments.
In most cases it's clearer to put the comments above.
|
|
For very small gaps, we don't need generate geometry.
|
|
|
|
|
|
This mode simplify the stroke doing a resampling of the points and generate new geometry at the distance defined.
Sample function developed by @NicksBest
New Resample Stroke operator
This operator recreates the stroke geometry with a predefined length between points.
The operator uses the same code used in Simplify modifier.
Reviewers: @mendio
|
|
Merge points when the distance is less than a predefined value.
The method to interpolate the position created a wrong merge. Now, always the secondary point is merged with the first one (merge at first), except the last point.
|
|
|
|
This function will be used for new operators.
|
|
T68035 by @luzpaz
|
|
Reviewers: campbellbarton, brecht
Reviewed By: brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D4991
|
|
When apply the transformation, the thickness of the stroke was wrong because the scale was not applied to pressure.
|
|
Now, when close a geometry with cyclic is possible generate new geometry for the gap.
The cyclic operator now supports multiframe edition too. Before only worked with active frame.
Also added the corresponding missing menu options and the new F keymap. All these features were missing, pending of the fix of the alpha glitches in stroke already done.
|
|
|
|
Now, when you add an slot and then draw, the automatic created material will use the empty slot, instead to add a new slot and leave a empty one.
This fix only works if you add only an empty slot. We could remove any empty slot in the middle, but as this has no impact in the drawing or file, it does not worth the CPU time to review every time the material list. Anyway, the user can press delete button to remove any empty slot.
If we see this is a big problem in the future, we can reopen the bug and add this cleaning function.
|
|
assigned to it
This was a design decision, but now we have decided to change it using the active material for the strokes using deleted material.
If the material slot is empty a new material is created to keep the strokes visible.
|
|
Usually the brush type is correct, but for some old files the brush could be a not valid type. In this case, returns the object active material.
This is related to T61413
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
This commit adds support for drawing Dots strokes with a gradient factor to get artistic effects like watercolor.
Currently, the option is only supported by Dots materials, and in the future will be added to line strokes, but now there is a limitation on drawing engine and we will keep disabled on Line materials.
Also, added the option to align Dots and Boxes strokes textures aligned with the drawing path to get more fluid strokes.
|
|
The problem was the colors were not converted and the annotation flag was not enabled.
Note: For Scene data (View3D) there is a convert operator.
|
|
- The ambiguous term 'handle' was used where 'ensure'
is typically used (get or add when missing).
- Rename `current` to `active`, all `current` functions which were
also ensuring.
- Clarify what is being operated on, using `BKE_gpencil_object_*` for
objects, `BKE_gpencil_brush_*` for brushes.
|
|
A new parameter in the layer adjustment panel allows to define the color of the channel in Dopesheet.
This is needed when there are a lot of layers.
See D4623 for more details.
|
|
|
|
Using GP_BRUSH_MATERIAL_PINNED to switch between active material and brush material, instead of updating all brushes on active material changes. This will allow brushes to have no material and therefore to not inflate the user count.
This fix T62465.
Patch contributed by @matc
Reviewers: @brecht @antoniov @billreynish @mendio
|
|
|
|
Use fallback when no data exists
matching bound-box for other kinds of geometry.
|
|
|
|
The bound box was not calculated for grease pencil objects.
|
|
There was a conflict between Object "In Front" and how the strokes were managed in Stroke panel for grease pencil datablock.
In order to keep consistency, the order of the object has been moved to Object level and now it's using the standard "In Front" flag. As all it is 3D, the option "Back" has been removed.
This also fixes the problem with task T62137.
Also related to commit 54ffc4e19dc4 and D4405
|
|
New edit mode operator and post-processing brush option.
Trim works on a single GP stroke. It removes trailing points before and after the first intersection (or loop) nearest to the start of the stroke.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
|
|
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
That way it is obvious when we are using default ID copy behaviour, and
when we are using advanced/specialized ones.
|