Age | Commit message (Collapse) | Author |
|
In preparation of refactoring for texture nodes.
|
|
This commit contains various new features for curves sculpt mode
that have been developed in parallel.
* Selection:
* Operator to select points/curves randomly.
* Operator to select endpoints of curves.
* Operator to grow/shrink an existing selection.
* New Brushes:
* Pinch: Moves points towards the brush center.
* Smooth: Makes individual curves straight without changing the root
or tip position.
* Puff: Makes curves stand up, aligning them with the surface normal.
* Density: Add or remove curves to achieve a certain density defined
by a minimum distance value.
* Slide: Move root points on the surface.
Differential Revision: https://developer.blender.org/D15134
|
|
This has not been used since 5505697ac in 2010.
|
|
|
|
We really need to fix how unprojected radius (scene unit) works.
What happened is the paint code updates the brush's normal radius
with the current unprojected pixel radius, which was then
used by texture brush tiled mode.
To fix this I just cached the pixel radius at stroke start in
UnifiedPaintSettings->start_pixel_radius.
|
|
Previously, the number of control points in a new curve was hardcoded.
Differential Revision: https://developer.blender.org/D14857
|
|
Ref T97444.
Differential Revision: https://developer.blender.org/D14700
|
|
color attribute system.
This commit removes sculpt colors from experimental
status and unifies it with vertex colors. It
introduces the concept of "color attributes", which
are any attributes that represents colors. Color
attributes can be represented with byte or floating-point
numbers and can be stored in either vertices or
face corners.
Color attributes share a common namespace
(so you can no longer have a floating-point
sculpt color attribute and a byte vertex color
attribute with the same name).
Note: this commit does not include vertex paint mode,
which is a separate patch, see:
https://developer.blender.org/D14179
Differential Revision: https://developer.blender.org/D12587
Ref D12587
|
|
This adds a new Grow/Shrink brush which is similar to the Length
brush in the old hair system.
* It's possible to switch between growing and shrinking by hold
down ctrl and/or by changing the direction enum.
* 3d brush is supported.
* Different brush falloffs are supported.
* Supports scaling curves uniformly or shrinking/extrapolating
them. Extrapolation is linear only in this patch.
* A minimum length settings helps to avoid creating zero-sized curves.
Differential Revision: https://developer.blender.org/D14474
|
|
This adds a new Add brush for the new curves object type in sculpt mode.
The brush is used to insert new curves (typically hair) on the surface object.
Supported features:
* Add single curve exactly at the cursor position when `Add Amount` is 1.
* Front faces only.
* Independent interpolate shape and interpolate length settings.
* Smooth and flat shading affects curve shape interpolation.
* Spherical and projection brush.
This also adds the `surface_triangle_index` and `surface_triangle_coordinate`
attributes. Those store information about what position on the surface each
added curve is attached to:
* `surface_triangle_index` (`int`): Index of the internal triangle that a curve
is attached to. `-1` when the curve is not attached to the surface.
* `surface_triangle_coordinate` (`float2`): First two numbers of a barycentric
coordinate that reference a specific position within the triangle.
Ref T96444.
Differential Revision: https://developer.blender.org/D14340
|
|
|
|
usages.
|
|
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
|
|
Some IDs (like text ones) can be linked and only kept around thanks to
editors, allow making such IDs local in `BKE_lib_id_make_local_generic`.
Also refactor logic checking whether ID should be made directly local or
copied into its own util function, so that we can remain sure all
special-cases 'make local' code still uses the same logic here.
|
|
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
|
|
The main goal of this refactor is to make BPath module use `IDTypeInfo`,
and move each ID-specific part of the `foreach_path` looper into their
own IDTypeInfo struct, using a new `foreach_path` callback.
Additionally, following improvements/cleanups are included:
* Attempt to get better, more consistent namings.
** In particular, move from `path_visitor` to more standard `foreach_path`.
* Update and extend documentation.
** API doc was moved to header, according to recent discussions on this
topic.
* Remove `BKE_bpath_relocate_visitor` from API, this is specific
callback that belongs in `lib_id.c` user code.
NOTE: This commit is expected to be 100% non-behavioral-change. This
implies that several potential further changes were only noted as
comments (like using a more generic solution for
`lib_id_library_local_paths`, addressing inconsistencies like path of
packed libraries always being skipped, regardless of the
`BKE_BPATH_FOREACH_PATH_SKIP_PACKED` `eBPathForeachFlag` flag value,
etc.).
NOTE: basic unittests were added to master already in
rBdcc500e5a265093bc9cc.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D13381
|
|
Two issues addressed here:
I) `asset_type_info` is sub-data, not a callback. Therefore, move it
before the callbacks in the `IDTypeInfo` struct.
II) More important, initialize this new attribute in *ALL* `IDTypeInfo`
instances. No member of this struct should ever be left implicitely
uninitilazed, ever.
Aftermath of rBa84f1c02d251.
|
|
|
|
The new `BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL` execute the given
statement and then check status of `LibraryForeachIDData` data, and
return in case stop of iteration is requested.
This is very similar to the other `BKE_LIB_FOREACHID_PROCESS_` existing
macros, and allows us to properly break iteration when a sub-function
has requested it.
Part of T90922: Fix return policy inconsistency in `scene_foreach_id`.
|
|
`BKE_LIB_FOREACHID_PROCESS_IDSUPER`.
More in-line name with the rest of that macro-based API, especially
since this will be extended in the future.
|
|
When appending an asset from the asset browser, its asset data needs to
be cleared.
However, linking an asset (or regular append from the file browser)
should not clear such data. In linking case, it would be there again
after a blend file reload anyway.
So this commit introduces a new `BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR`
option.
NOTE: in case the appended ID needs to be copied from its linked data
(instead of making the later directly local), asset data is lost anyway
since it is never copied with the ID currently.
Ref. {T91749} and D11768.
|
|
Callbacks in IDTypeInfo should never affect other IDs if they are not
embedded.
We break this rule in some cases, at least each of those should be
clearly commented about and get some security checks to try to avoid
unexpected issues as much as possible.
|
|
Mixing testing and actual action in a single function is just not a good
way to do things, and the 'testing' feature is not used anywhere
anymore, time to get rid of it.
|
|
rB8cc3d2d6f51f introduced option to force make_local code to either copy
or actually make a linked ID local, but logic of boolean options
handling was broken.
This commit simplifies logic here and fixes the issue.
NOTE: Since those new options were not used yet this was a harmless bug.
|
|
them local.
This is to be used when calling code already knows whether the 'made
local' linked ID should be copied, or can directly be converted to a
local one.
Currently unused , this is preparation for rewrite of append code.
|
|
The parameter wa sin the UI but was not used because it was replaced by Use Thickness.
|
|
callbacks.
This was not really useful, and added estra useless steps in case and ID
should not actually be written.
Further more, it prevented clearing the usercount on write, which can be
cause a false positive 'chanhged' detection in undo/redo case.
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
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.
|
|
Check for indirect ID use after other simple user count checks are made.
Also assert ED_object_base_free_and_unlink_no_indirect_check object
argument isn't indirectly used.
|
|
This concerns currently only collections (`master_collection` of scenes)
and root node trees. It removes the matching type-specific helpers
(`BKE_collection_master_scene_search` and `BKE_node_tree_find_owner_ID`).
No functional change expected here.
NOTE: Current implementation of `owner_get` is far from optimal, we
could probably do it better, see {T69169}.
NOTE: While it could also have it, shapekeys IDTypeInfo was left out of
this change for now. Mainly because it sould not be used currently, and
we ultimately want to demote shape keys from ID status anyway.
|
|
This commit is a refactor of the fill tool to solve several problems we had since the first version of the tool.
Changes:
* The filling speed has been improved for each step of the process with the optimization of each algorithm/function.
* New `AutoFit` option to fill areas outside of the viewport. When enable, the total size of the frame is calculated to fit the filling area.
* New support multiframe filling. Now it is possible to fill multiple similar frames in one go.
* New `Stroke Extension` option to create temporary closing strokes. These strokes can be displayed and adjusted dynamically using wheel mouse or PageUp/Down keys.
* Parameter `Resolution` now is named `Precision` and has been moved to topbar.
* `Resolution` now has decimals and can be lower than 1 to allow quick filling in storyboarding workflows. Maximum value has been set as 5.
* Parameter `Simplify` has been moved to Advanced panel.
* Improved fill outline detection. In some cases, the outline penetrated the area to be filled with unexpected results.
* Fixes some corner case bugs with infinite loops.
As a result of this refactor, also these new functionalities has been added.
* New support for multiframe in `Draw` mode. Any drawing in active frame is duplicated to all selected frame.
* New multiframe display mode. Keyframes before or after of the active frame are displayed using onion colors. This can be disable using Onion overlay options.
|
|
|
|
|
|
Approximately 91 spelling corrections, almost all in comments.
Differential Revision: https://developer.blender.org/D10288
Reviewed by Harley Acheson
|
|
Currently this is needed to properly tag PointCache's for info update
(fixes an issue reported in T82503).
Suspect we may need this in more cases in the future though, RNA
assign/update processes are not always 100% enough to deal with
complicated corner cases.
|
|
Now the resolution can be reduced to get less details. This is very useful for doing storyboards to get a quick fill of any character.
Following UI review, the name "Resolution" has been changed to "Precision" because is more clear.
Differential Revision: https://developer.blender.org/D10076
|
|
This tool implements smearing for multires displacement over the limit
surface, similar to how smearing for colors and topology slide works.
When used the displacement values of the vertices "slide" over the
topology, creating the effect of smearing the surface detail.
As the brush just modifies displacement values instead of coordinates,
the total displacement of the affected area doesn't change. This means
that this smearing effect can be used multiple times over the same area
without generating any artifacts in the topology.
When the brush is used with the pinch or expand smear modes,
displacement differences are pushed into the same area, creating hard
surface effects without pinching the topology.
As any other brush that relies on the limit surface (like displacement
erasers), this will work better after using apply base.
Reviewed By: sergey, JulienKaspar, dbystedt
Differential Revision: https://developer.blender.org/D9659
|
|
Remove DNA headers, using forward declarations where possible.
Also removed duplicate header, header including it's self
and unnecessary inclusion of libc system headers from BKE header.
|
|
This adds a new property to the sculpt vertex color paint brush to limit
the area of the brush that is going to be used to sample the wet paint
color. This is exactly the same concept as normal radius and area radius
that exist for sculpting brushes for sampling the surface depth and
orientation.
When working near color hard edges, this allows to prevent the color
from the other side of the edge to blend into the wet paint.
With 1.0 (the previous default) wet paint radius, as soon as the brush touches
one vertex of the other color, the wet paint mix color changes, making it
impossible to maintain the border between the two colors.
Reviewed By: sergey, dbystedt, JulienKaspar
Differential Revision: https://developer.blender.org/D9587
|
|
|
|
a Stroke.
Add code preserving scene's toolsettings accross undo.
IDPointers are dealt with special care, we try to keep existing ones for
some (like brushes) when possible.
Note that this covers ToolSettings, Brushes and Palettes currently.
I'm not especially happy about how this new code mixes with existing
'foreach_id' one, in particular in scene. But cannot think of a better,
more generic way to do it currently.
Maniphest Tasks: T71759
Differential Revision: https://developer.blender.org/D9311
|
|
memfile undos
This is essentially adding that new callback, and using it only for already
existing Scene's 3DCursor.
Note that the place where this is called has been moved again, after all
have been lib-linked, such that those callbacks may also work on ID pointers.
Maniphest Tasks: T71759
Differential Revision: https://developer.blender.org/D9237
|
|
The new preset I made for 2.91 is way more controllable with lower
strength values and does not have the accumulate bug, but until the
brush management is in place to ship multiple versions of the brush,
probably most people expect something closer to the old version to be
the default.
Reviewed By: sergey
Maniphest Tasks: T81901
Differential Revision: https://developer.blender.org/D9289
|
|
Better use higher-level code from common ID management when possible.
Helps to de-duplicate logic, and reduces outside usages of more
'dangerous' functions.
Note that we could get rid of many of those `BKE_<id_type>_add`
functions now, but on the other hand several of those take extra
parameters and perform additional actions, so think we can keep them all
for now as 'non-standard ID specific creation functions'.
|
|
Those were only shallow wrappers around `BKE_id_copy`, barely used (even
fully unused in some cases), and we want to get rid of those ID-specific
helpers for the common ID management tasks. Also prevents weird custom
behaviors (like `BKE_object_copy`, who was the only basic ID copy
function to reset user count of the new copy to zero).
Part of 71219.
|
|
No reasons to keep the new ID pointer as parameter here.
Part of T71219.
|
|
This is part of T75724.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D9134
|