Age | Commit message (Collapse) | Author |
|
If the internal flag is set to debug and the Ctrl key is used
the program keeps running endless.
|
|
When the inverted mode is used, the visual aids must
not be displayed.
|
|
When the visual aids are disabled, but the extend factor
is > 0, the lines must be extended, but not displayed.
Also, some variables renamed to clarify.
|
|
There was a memory leak when use inverted fill.
|
|
|
|
The extend lines were included in render by error
when the only collide option was ON.
|
|
|
|
This commit is an improvement in the previous fill tool
changes in order to improve how the extended strokes
are managed.
* Now, the algorithm checks if the extend cross a standard stroke, not only extend strokes.
* Option to enable or disable the stroke cross checking
because this can be slow in very complex scenes.
* Added `D` key to toggle stroke cross option.
* Option to use only collide strokes to be used as fill limit.
If the option to use only collide strokes is enabled, the
open extensions are in different color.
* Status text now shows mode and the actual extend factor.
This commits also contains a refactor of the loops
to use arrays as much as possible.
Reviewed By: mendio, pepeland
Differential Revision: https://developer.blender.org/D16052
|
|
The problem was the duplicated strokes had wrong pointers
to the original stroke.
|
|
|
|
|
|
|
|
The error occurs only when the layer is empty.
|
|
|
|
To use function style cast '(unsigned char)x' can't be replaced by
'unsigned char(x)'.
|
|
|
|
|
|
|
|
It does not need follow in the loop if a collision was found.
|
|
* Improve how the extend lines collision is calculated.
* Added `S` key to switch between modes.
* Now extend factor does not disable visual aids (thi sis done with checkbox).
* Reduce the use of linked list and now memory array is used.
* Refactor Radius functions.
* Fixed bug of Radius mode when object is rotated.
* Cleanup code.
Differential Revision: https://developer.blender.org/D16022
|
|
|
|
|
|
Now it's possible to set an offset in the surface reprojection.
Before, this was only possible while drawing, but not in the
reproject operator.
Differential Revision: https://developer.blender.org/D15610
|
|
Missing in previous commit
|
|
Before, the lines could be extended endless, but this added too noise.
Now, the lines are not extended more if collide.
Before:
{F13504186}
After:
{F13504187}
Reviewed By: mendio, frogstomp
Differential Revision: https://developer.blender.org/D15992
|
|
|
|
This value was used to close gaps, but now with the new system is not needed.
Internally, still we need to keep a small leak size, but after doing a lot of test a
value of 3 is perfect, so it's harcoded.
|
|
To avoid too much noise, the help circles are only visible if the
the gap is still open. When the gap is closed, the circles are hidden.
Hiding the circles makes it easier to focus on what is problematic.
instead, to see many circles that are already resolved.
|
|
The new names are:
* Radius
* Extend
The mode Radius + Extend has been removed.
Also, some code cleanup and format.
|
|
The motivation for this change: while working on an animation recently, I found that there are some gaps that won't close easily via stroke extension or leak size checking. In D14698, I attempted to address this by changing the algorithm of the raster-space flood fill. This patch attempts to address the same issue in vector space by adding two new cases where stroke extensions are added, as suggested by @frogstomp:
# **Points of high curvature:** when the curvature at a point is high enough that it's hard to visually distinguish between it and an endpoint, add a stroke extension out along the normal (pointing in the opposite direction of the stroke's acceleration.) This addresses cases where technically the endpoint points up, but there's a sharp corner right below it that should extend to connect.
# **Stroke endpoints within a radius**: when two endpoints are close together, regardless of the angle they make, connect them if they are within a radius. This addresses cases like where the two endpoints have effectively parallel tangents, so extensions won't close the gap.
Reviewed By: antoniov, mendio, frogstomp
Differential Revision: https://developer.blender.org/D14809
|
|
|
|
Disambiguate:
- Lower / Upper (case)
- Spray (ocean modifier)
- Keep Original (clip, grease pencil, object)
- Screen [space] (inside some enum items, mostly)
- Cast Shadow ("shadow that is cast", not "to cast a shadow")
Extract:
- Line Art Light Reference Near and Far
- Mesh vertex attribute domain: Vertex
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15938
|
|
The default trace can only trace an image or a sequence, but
it was not possible to trace only selected frames in a sequence.
This new parameter allows to define what frame trace.
If the value is 0, the trace is done as before.
The parameter is not exposed in the UI because this is logic
if it is managed by a python API, but it has no sense in the UI.
This feature was included after receiving feedback from Studios
which need to trace videos only for some frames using custom
python scripts.
|
|
When a change happens which invalidates view layers the syncing will be postponed until the first usage.
This will improve importing or adding many objects in a single operation/script.
`BKE_view_layer_need_resync_tag` is used to tag the view layer to be out of sync. Before accessing
`BKE_view_layer_active_base_get`, `BKE_view_layer_active_object_get`, `BKE_view_layer_active_collection`
or `BKE_view_layer_object_bases` the caller should call `BKE_view_layer_synced_ensure`.
Having two functions ensures that partial syncing could be added as smaller patches in the future. Tagging a
view layer out of sync could be replaced with a partial sync. Eventually the number of full resyncs could be
reduced. After all tagging has been replaced with partial syncs the ensure_sync could be phased out.
This patch has been added to discuss the details and consequences of the current approach. For clarity
the call to BKE_view_layer_ensure_sync is placed close to the getters.
In the future this could be placed in more strategical places to reduce the number of calls or improve
performance. Finding those strategical places isn't that clear. When multiple operations are grouped
in a single script you might want to always check for resync.
Some areas found that can be improved. This list isn't complete.
These areas aren't addressed by this patch as these changes would be hard to detect to the reviewer.
The idea is to add changes to these areas as a separate patch. It might be that the initial commit would reduce
performance compared to master, but will be fixed by the additional patches.
**Object duplication**
During object duplication the syncing is temporarily disabled. With this patch this isn't useful as when disabled
the view_layer is accessed to locate bases. This can be improved by first locating the source bases, then duplicate
and sync and locate the new bases. Will be solved in a separate patch for clarity reasons ({D15886}).
**Object add**
`BKE_object_add` not only adds a new object, but also selects and activates the new base. This requires the
view_layer to be resynced. Some callers reverse the selection and activation (See `get_new_constraint_target`).
We should make the selection and activation optional. This would make it possible to add multiple objects
without having to resync per object.
**Postpone Activate Base**
Setting the basact is done in many locations. They follow a rule as after an action find the base and set
the basact. Finding the base could require a resync. The idea is to store in the view_layer the object which
base will be set in the basact during the next sync, reducing the times resyncing needs to happen.
Reviewed By: mont29
Maniphest Tasks: T73411
Differential Revision: https://developer.blender.org/D15885
|
|
Related to {D15885} that requires scene parameter
to be added in many places. To speed up the review process
the adding of the scene parameter was added in a separate
patch.
Reviewed By: mont29
Maniphest Tasks: T73411
Differential Revision: https://developer.blender.org/D15930
|
|
|
|
The operator was not checking the status of the
Autokey button.
|
|
This operator allows to set the start point for any cyclic stroke.
This is very handy to fit interpolation issues or
use thickness modifier.
Note: There is small change in this commit to fix
a typo error in the name of the operator.
Reviewed By: mendio, frogstomp
Maniphest Tasks: T100827
Differential Revision: https://developer.blender.org/D15881
|
|
The only difference between `GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR`
and `GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR` is that in the vertex
shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version
uses `vec4(pos, 1.0)`.
But VBOs with 2D attributes work perfectly in shaders that use 3D
attributes. Components not specified are filled with components from
`vec4(0.0, 0.0, 0.0, 1.0)`.
So there is no real benefit to having two different shader versions.
|
|
The only real difference between `GPU_SHADER_2D_UNIFORM_COLOR` and
`GPU_SHADER_3D_UNIFORM_COLOR` is that in the vertex shader the 2D
version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses
`vec4(pos, 1.0)`.
But VBOs with 2D attributes work perfectly in shaders that use 3D
attributes. Components not specified are filled with components from
`vec4(0.0, 0.0, 0.0, 1.0)`.
So there is no real benefit to having two different shader versions.
This will simplify porting shaders to python as it will not be
necessary to use a 3D and a 2D version of the shaders.
In python the new name for '2D_UNIFORM_COLOR'' and '3D_UNIFORM_COLOR'
is 'UNIFORM_COLOR', but the old names still work for backward
compatibility.
Differential Revision: https://developer.blender.org/D15836
|
|
|
|
This function allows to set the start point for cyclic strokes.
The function is required by a new modifier and operator
that are currently under development.
|
|
This makes the api more portable and not depend on
any visual area for background tasks like future modifiers.
|
|
The new factor allows to apply the current brush size to the
external stroke perimeter conversion done in draw mode.
|
|
|
|
|
|
The property registration was missing in the operator, now fixed.
|
|
Actually, when you increase the thickness of the stroke in the outline conversion, the shape of the stroke changes and becomes thicker.
This commit includes a new algorithm to correct this problem. A new `Keep Shape` parameter allows you to disable it because, for artist reasons, it may be good to keep the old algorithm and change the shape.
|
|
The old name `mode` was confusing because there was also a `view_mode`.
|
|
Instead to use always a value of 1, now the thickness of the stroke perimeter can be set.
This thickness is added to the original perimeter, so using a big number can increase the global thickness of the stroke.
|