Age | Commit message (Collapse) | Author |
|
This patch makes the grease pencil smooth operation symmetric.
It also increases the performance a lot if strong smoothing is
required. Additionally there is an option for the position smooth
operation to keep the shape closer to the original for more iterations.
Since the result differs from the previous algorithm, versioning is used
to change the iterations and factor to match the old result.
Differential Revision: http://developer.blender.org/D14325
|
|
So far it was needed to declare a new RNA struct to `RNA_access.h` manually.
Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property
declarations. Now this also includes the RNA struct declarations, so they don't
have to be added manually anymore.
Differential Revision: https://developer.blender.org/D13862
Reviewed by: brecht, campbellbarton
|
|
Add 'ID_ACTION' context to some animation curve interpolation enums.
Related to T95506/T43295.
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
Also other minor corrections & reformat particle system copyright.
|
|
his new modifier is equals to the existing mesh modifier but adapted to grease pencil.
The underlying functions used to calculate the shrink are the same used in meshes.
{F11794101}
Reviewed By: pepeland, HooglyBoogly
Differential Revision: https://developer.blender.org/D13192
|
|
Use arrays for wmEvent coordinates, this quiets warnings with GCC11.
- `x, y` -> `xy`.
- `prevx, prevy` -> `prev_xy`.
- `prevclickx, prevclicky` -> `prev_click_xy`.
There is still some cleanup such as using `copy_v2_v2_int()`,
this can be done separately.
Reviewed By: campbellbarton, Severin
Ref D12901
|
|
In some cases the stroke has 0 points and this must be skipped in the interpolation.
|
|
When joining two strokes in paint mode using the auto merge option, the join was very hard if the thickness was too different.
This patch adds a smooth to the join in order to get better transition.
Also fixed the problem to join existing strokes very far from actual stroke.
Some cleanup and rename of old code is included in order to make code more readable.
Reviewed By: pepeland
Differential Revision: https://developer.blender.org/D12362
|
|
Also hyphenate 'mouse-move' use doxy sections in render_update.c &
move function comment from the header to the source.
|
|
|
|
Draw functions used RNA_pointer_create to create the pointer,
however this already exists in the operator.
|
|
Any dynamic enum access would not use the callback.
Always set the owner_id to avoid this causing problems.
Oversight in 919558854d624f5db40acfa9f5674ac8c94873b6
|
|
|
|
When interpolate, the stroke order was not correct because it was assumed the GHash iter would return the items in the same order of insertion, but this is false.
Now, a list is used to keep the order of the strokes and the Hash is used to get the relationship between strokes as before.
|
|
If the selection order is not used, need to put the strokes in inverse order because the Hash Iter returns the strokes in inverse order.
|
|
This option is only valid in Edit mode. Also changed the space between options to improve UI.
Reviewed by: @mendio
|
|
Before only it was only possible interpolate frames of `Keyframe` type. Now all types except `Breakdown` can be used.
`Breakdown` cannot be used because it would be impossible interpolate two times because the extremes of the interpolation would change and the clean operator would not work.
|
|
Used for local structs/variables,
since `ofs` is by far the most widely used abbreviation.
|
|
|
|
Multiply the two number together. If the sign of the result is positive, then the sign was the same. If the sign of the result is negative, then the signs were different.
|
|
|
|
Improved the calculation of the distances and changed the variable names to make it more readable.
Still, there are some corner cases that could be not handled properly, but we keep as is to test more real drawings to analyze if the small number of corner cases needs to be fixed or not.
|
|
|
|
If the lines cross, but the angle is very sharp, check the distance between the extremes.
|
|
|
|
Following with the changes included to interpolate strokes of different number of points, a full review has been done in the interpolation tools.
* Interpolate now is a tool and not an operator. It was not logic to have this tool as a button.
* Interpolate tool parameters have been moved to topbar.
* Interpolate popover has been removed from topbar and interpolate `Sequence` operator has been moved to grease pencil menu.
* Interpolate Sequence now include a Redo panel.
* Interpolate tool now allows to select the strokes by pairs. This allows to interpolate any stroke with any stroke and not as before that it was only possible by drawing order. If no stroke is selected, the interpolation is done as before.
* Now is possible interpolate again if a previous keyframe exist. Before, it was impossible to interpolate two times in same frame and this made impossible to do the interpolation by groups of frames.
* New automatic option to `Flip strokes` if the stroke and end are not in the right position. Also the flip can be set manually for corner cases.
* Cleanup of menus related to interpolate.
* Fixed some bugs and removed parameters from scene because now all are tool or operator contained.
* Some code cleanup and function renames.
This commit also includes the some codebase to future implementation of the concept `Vertex Active` that now does not exist in grease pencil.
|
|
Remove redundant headers using
`./source/tools/utils_maintenance/code_clean.py`
Reviewed By: jmonteath
Ref D10364
|
|
In two cases the percentage property was actually used incorrectly, as
pointed out in T82070. The range was [0, 1], but the properties were still
displayed as percentages.
There is a preference to control whether to display factors or
percentages, so it usually doesn't make sense to manually define
properties as percentages.
Resolves T82070
Differential Revision: https://developer.blender.org/D9344
|
|
|
|
|
|
|
|
To avoid unexpected behavior and desync issues with
stroke and curve data, the interpolation operators are deactivated
in curve edit mode.
|
|
Now it's possible to copy only part of the data. This will be used in future operators.
|
|
ED_gpencil_stroke_material_editable
|
|
As now it is using a duplicated frame, the untag must be done before copying the frames.
|
|
Use the BKE_gpencil_stroke_uniform_subdivide function to subdivide strokes
before interpolation. When the target/source stroke is smaller than the other
stroke, it is subdivided until the lengths match. This improves the overall quality
of the interpolation of different sized strokes.
Before/After video:
{F9511779}
Reviewed By: #grease_pencil, antoniov, pepeland, mendio
Differential Revision: https://developer.blender.org/D9839
|
|
Differential Revision: https://developer.blender.org/D8660
This patch is the result of the GSoC 2020 "Editing Grease Pencil Strokes
Using Curves" project. It adds a submode to greasepencil edit mode that
allows for the transformation of greasepencil strokes using bezier
curves. More information about the project can be found
here: https://wiki.blender.org/wiki/User:Filedescriptor/GSoC_2020.
|
|
|
|
If the next frame of the layer was NULL and it was not the active layer crashed.
|
|
Now the interpolate is available in draw mode (except the option of selected strokes).
Differential Revision: https://developer.blender.org/D9325
|
|
Sometimes interpolate all frames is not convenient and it's better, for example, interpolate in twos.
The new parameter allows to define the number of frame for each step, by default is set to 1 as before.
{F8812621}
This is a request of animators to improve interpolate tools.
Reviewed By: mendio
Maniphest Tasks: T80190
Differential Revision: https://developer.blender.org/D8723
239b0b
|
|
Sometimes the interpolated stroke was tagged and removed.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/gpencil` module.
No functional changes.
|
|
|
|
Need to verify active frame not NULL.
|
|
This was due some strokes could be tagged and as the layer was locked, the strokes were not untagged and removed when all tagged strokes are removed.
The tagged strokes are used as temp ghost of the interpolation and removed at the end of the interpolation.
|
|
If try to interpolate a layer without an active a next frame, the interpolation failed.
Now, check for both frames before start interpolation.
|
|
In some situations the stroke could be tagged and this tag was used to delete the interpolated strokes.
Now, the frames used as interpolated range are untagged before creating the interpolated strokes.
|
|
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
|