Age | Commit message (Collapse) | Author |
|
Note that these changes are limited simple cases as these kinds of
changes could allow for errors when refactoring code when the known
state is not so obvious.
|
|
It was projecting from the stroke position.
The behavior has changed in {rB5400be9ffee2}.
|
|
The value for default option was wrong in the python definition.
|
|
|
|
Sometimes is required to reset the thickness or the opacity of the strokes. Actually this was done using a modifier, but this operators solves this.
Reviewed By: mendio, filedescriptor
Maniphest Tasks: T87427
Differential Revision: https://developer.blender.org/D11453
|
|
Move reproject_type into an extern, to avoid declaring multiple times.
|
|
This operator is a common request of animators to convert the transformation (inluding modifiers) of one grease pencil object, into a new object, generating strokes.
Reviewed By: pepeland
Maniphest Tasks: T87424
Differential Revision: https://developer.blender.org/D11014
|
|
This is an initial change to speed up the calculation of the Occlude eraser. In the future, we can add more optimizations, but at least this increase speed.
Intead to check always the 3 points, the check is skipped if it's not required.
Base in a solution by Philipp Oeser.
This is related to T88412
|
|
`ray_start` must start at the position of the gpencil point.
|
|
This fix the compiler warning too.
|
|
Conflicts:
source/blender/editors/object/object_add.c
|
|
Now the operators work like other areas of Blender using the list of selected objects.
Also, the name has been changed to:
```Layers:
- Copy Layer to Selected
- Copy All Layers to Selected
Materials:
- Copy Material to Selected
- Copy All Materials to Selected```
Reviewed By: mendio, pablovazquez, pepeland
Differential Revision: https://developer.blender.org/D11216
|
|
Code would still create an object (without setting up materials), code
for removing unused material slots would then freeze.
Now return/cancel early in case of empty selection.
This came up in T88269 [which is still not fully fixed, transforming
curve edit points clear their GP_STROKE_SELECT flag which now results in
the early exit, should be looked at separately]
Maniphest Tasks: T88269
Differential Revision: https://developer.blender.org/D11252
|
|
Now, we have the new `I` menu for that. The `B`keymap was part of the old code.
|
|
We have the `I` menu for that. This is part of the old code.
|
|
Clang-Tidy: bugprone-too-small-loop-variable
|
|
Now it's possible to append materials of one grease pencil object into another one. The operator allows active material or all materials.
Also, the Layer Copy To Object has been renamed to Layer Append to Object to keep consistency and now allows to append all layers at once.
|
|
Internally, when using Fill brush a dilate of the filled area was done, but this was hardcoded to 1 pixel.
In some situations, this was not enough, so now the value is accesible in the UI and can be set with different values.
Also, as this value is more used than `Leak Size`, the new Dilate is on Topbar, and Leak Size has been moved to Advanced panel.
|
|
|
|
There was a function to set 2 pixels wide for inverse filling, but this must not be done in the borders of the image.
Now, the borders are checked before set 2 pixels.
|
|
|
|
Instead to create only the Blank object, now a new Layer and a simple material is added.
This is a common request of artists.
Reviewed By: mendio, pepeland
Differential Revision: https://developer.blender.org/D11110
|
|
This bug was introduced in e1acefd45e23
|
|
Reviewed By: mendio
Maniphest Tasks: T87426
Differential Revision: https://developer.blender.org/D11013
|
|
Now the list of masks can be ordered as is done in Layers.
This can be used to organize list and in the future refquired for new masking options.
|
|
Draw functions used RNA_pointer_create to create the pointer,
however this already exists in the operator.
|
|
Before only active frame was supported
Related to T87425
|
|
Any dynamic enum access would not use the callback.
Always set the owner_id to avoid this causing problems.
Oversight in 919558854d624f5db40acfa9f5674ac8c94873b6
|
|
Now if one stroke in the extremes of the stack is selected, other strokes are moved.
Reviewed By: pepeland, Dantti
Maniphest Tasks: T87321
Differential Revision: https://developer.blender.org/D10997
|
|
Now, the Unselect Ends is disabled by default.
|
|
Previously it was not possible to subdivide the last segment of a cyclic
stroke.
The fix makes sure that the correct number of new points is calculated
correctly and adds the new points to the last segment.
Reviewed By: antoniov
Maniphest Tasks: T87157
Differential Revision: https://developer.blender.org/D10902
|
|
|
|
When using the smooth operator, the thickness would not be
smoothed on the first iteration. This was becasue the inner loop
was set to run `r * 20` times but `r` starts at 0.
The fix makes sure that "Smooth Thickness" works on the first
iteration by using a fixed value of `20` as the loop limit. This
makes sure that for every iteration, we run the smoothing of the
thickness 20 more times.
Reviewed By: antoniov
Maniphest Tasks: T87082
Differential Revision: https://developer.blender.org/D10867
|
|
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and
`ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`.
This new function replaces `ED_view3d_autodist_init`.
Also, since `ED_view3d_depth_update` depends on the render context, and
changing the context is a slow operation, that function also was removed,
and the depth buffer cached is now updated inside the new unified drawing
function when the "bool update_cache" parameter is true.
Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to
`runtime.flag`.
Differential revision: https://developer.blender.org/D10678
|
|
layer is locked
The problem was produced because the strokes were selected, but the loop to clear this flag before applying cutter was using unlocked layers only, and the protected layer flag was not reset.
Now, the flag is reset for all layers, locked and unlocked.
|
|
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.
|
|
The 'E' key was set to cancel drawing. This was a change in the
old grease pencil system and is no longer used.
|
|
|
|
Tracing images to grease pencil objects creates sometimes artifacts, as seen, for example, when tracing the attached image. {F9910821}
I have found the same behavior both in the 2.92 release and in the current 2.93 master.
The artifacts are caused by a variable that's not initialized or updated when finding a point tagged as POTRACE_CORNER.
This patch solves this issue.
Maniphest Tasks: T86967
Differential Revision: https://developer.blender.org/D10832
|
|
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 patch adds support to export and import grease pencil in several formats.
Inlude:
* Export SVG
* Export PDF (always from camera view)
* Import SVG
The import and export only support solid colors and not gradients or textures.
Requires libharu and pugixml.
For importing SVG, the NanoSVG lib is used, but this does not require installation (just a .h file embedded in the project folder)
Example of PDF export: https://youtu.be/BMm0KeMJsI4
Reviewed By: #grease_pencil, HooglyBoogly
Maniphest Tasks: T83190, T79875, T83191, T83192
Differential Revision: https://developer.blender.org/D10482
|
|
- Rename:
`BKE_gpencil_object_material_get_index_name`, to
`BKE_gpencil_object_material_index_get_by_name`
Matching `BKE_gpencil_layer_get_by_name`.
- Move logic to ensure named materials into a new function:
`BKE_gpencil_object_material_ensure_by_name`
|
|
This option is only valid in Edit mode. Also changed the space between options to improve UI.
Reviewed by: @mendio
|
|
|
|
The offset when creating the keyframes was set to `frame_target + i` but
`i` starts iterating from the current frame number.
The fix uses just `i` as the frame number.
Reviewed By: antoniov
Maniphest Tasks: T86745
Differential Revision: https://developer.blender.org/D10772
|
|
|
|
If playback starts before the first GP frame, we will get "ghost"
strokes.
|
|
This adds the LineArt grease pencil modifier.
It takes objects or collections as input and generates various grease
pencil lines from these objects with the help of the active scene
camera. For example it can generate contour lines, intersection lines
and crease lines to name a few.
This is really useful as artists can then use 3D meshes to automatically
generate grease pencil lines for characters, enviroments or other
visualization purposes.
These lines can then be baked and edited as regular grease pencil lines.
Reviewed By: Sebastian Parborg, Antonio Vazquez, Matias Mendiola
Differential Revision: http://developer.blender.org/D8758
|
|
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.
|
|
|