Age | Commit message (Collapse) | Author |
|
This code in the geometry set header was not directly related to
geometry sets, it makes more sense in the attribute access header.
This makes it clearer that code for geometry components uses attribute
code, rather than the other way around. It also allows adding more
functionality to `BKE_attribute_access.hh` that depends on these things
without including `BKE_geometry_set.hh` there.
|
|
The code incorrectly used the size of the second to last segment rather
than the last segment's size. That was a problem when the last segment
is a vector segment but the second to last isn't.
I also used the opportunity to slightly refactor the control point
offsets cache, making it one longer so it also contains information
about the size of the last segment, simplifying other code.
|
|
|
|
In {rB266cd7bb82ce}, support for muting links was added. It might be
debatable if we define a shader as "having" displacement even if the link
is muted, but after said commit, shader_has_displacement() would return
true but still leave the returned node as NULL.
Now also return false if the link is muted (otherwise the caller would
need to additionally check the returned node as well.)
Maniphest Tasks: T88234
Differential Revision: https://developer.blender.org/D11256
|
|
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
|
|
This module exposes the platform utils defined in the GPU module in C.
This will be useful for porting existing code with `bgl` to `gpu`.
Reviewed By: fclem, brecht, campbellbarton
Maniphest Tasks: T80730
Part of D11147
|
|
This module exposes the capabilities defined in the GPU module in C.
This will be useful for porting existing code in `bgl` to `gpu`.
Reviewed By: fclem, brecht, campbellbarton
Maniphest Tasks: T80730
Part of D11147
|
|
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
|
|
The term direction was used in 3 different ways in screen editing code,
making it hard to follow:
- 0-3 for as magic numbers mapped to [west,north,east,south].
- `h`, `v` characters for [horizontal,vertical] axes.
- Cycle direction SPACE_CONTEXT_CYCLE_PREV, SPACE_CONTEXT_CYCLE_NEXT
The following changes have been made:
- Add `eScreenDir` for [west,north,east,south], use variable name `dir`.
- Add `eScreenAxis` for [horizontal,vertical] values, use variable name
`dir_axis`.
- Add `eScreenCycle` for existing enum `SPACE_CONTEXT_CYCLE_{PREV/NEXT}`.
- Add macros `SCREEN_DIR_IS_VERTICAL(dir)`,
`SCREEN_DIR_IS_HORIZONTAL(dir)`.
Replacing `ELEM(dir, 1, 3)`, `ELEM(dir, 0, 2)`.
- Move `ED_screen_draw_join_highlight`, `ED_screen_draw_split_preview`
to `screen_intern.h`.
Reviewed By: Severin
Ref D11245
|
|
This allows extra options (in-front and stroke order) to be shown when adding line art kind of grease pencil object.
Reviewed by: Antonio Vazquez (antoniov)
Diff: https://developer.blender.org/D11130
|
|
- Matches changes in Python 3.x dictionary methods.
- Iterating now raises a run-time error if the property-group changes
size during iteration.
- IDPropertyGroup.iteritems() has been removed.
- IDPropertyGroup View & Iterator types have been added.
- Some set functionality from dict_keys/values/items aren't yet
supported (isdisjoint method and boolean set style operations).
Proposed as part of T85675.
|
|
Differential Revision: https://developer.blender.org/D11231
|
|
|
|
Differential Revision: https://developer.blender.org/D11240
|
|
|
|
When popping ID-property groups/arrays,
ID-property was removed but not freed.
Now the value is converted to a native Python type and freed.
|
|
There is a new Texture data-block socket that we can use in Geometry
Nodes now. This commit replaces the texture property of a node and
gives it a texture input socket instead. That increases flexibility.
The texture socket still has some limitations that will be lifted in the
next couple of days (e.g. it's not supported by the switch node and
cannot be exposed the a modifier yet).
Differential Revision: https://developer.blender.org/D11222
|
|
Sort include dirs in just one file, not a big change
(`source/blender/editors/armature/CMakeLists.txt`).
No functional changes.
|
|
This fixes a few "obvious" places where we do unnecessary updates.
Those special cases were added in the early days of geometry nodes
when many updates were missing and we tried to get it to work at all.
There is a fairly high risk that with this change some required updates
will be missing again. Those can be fixed when we find thme.
Some of the update issues might have been fixed by rB58818cba40794905f9323080e60884e090f2d388
and similar changes we added over time.
Differential Revision: https://developer.blender.org/D11238
|
|
Improve the "In Betweens" tools:
- Push Pose from Rest Pose
- Relax Pose to Rest Pose
- Push Pose from Breakdown
- Relax Pose to Breakdown
- Pose Breakdowner
These all now use the same new sliding tool:
- Actual visual indication of the blending/pushing percentage applied.
- Mouse wrapping to allow for extrapolation without having to worry
about the initial placement of the mouse. This also means these tools
are actually usable when chosen from the menu.
- Precision mode by holding {key Shift}.
- Snapping to 10% increments by holding {key Ctrl}.
- Overshoot protection; by default the tool doesn't allow overshoot
(lower than 0% or higher than 100%), and it can be enabled by pressing
{key E}.
- Bones are hidden while sliding, so the pose itself can be seen more
clearly. This can be toggled by pressing {key H} while using the tool.
Reviewed By: #animation_rigging, zeddb, sybren, #user_interface, brecht, Severin, looch
Maniphest Tasks: T81836
Differential Revision: https://developer.blender.org/D9054
|
|
|
|
|
|
This allows other tests to override it.
|
|
DrawTest will be used by other tests as well.
|
|
Sculpting tools are designed to ignore hidden geometry and behave like
hidden geometry does not exist.
When getting the neighbors of a vertex, now this takes into account
hidden geometry to avoid returing neighbors which connected edge is not
visible. This should make corner cases of a lot of tools work properly,
especially when working in low poly meshes when is common to have a
single face loop hidden.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D11007
|
|
When using a tool that is not a brush, the previously used brush
preset will still be active in the tool settings, so the cursor will
draw its custom reviews.
This checks if the current active tool is a brush before drawing its
previews. If it is not a brush tools, it draws a default white cursor.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9418
|
|
Part of a rename change in rBc5d38a2be8 was lost when committing.
|
|
This is very similar to rB5613c61275fe6 and rB0061150e4c90d, basically
just exposing a `VMutableArray` method to its generic counterpart. This
is quite important for curve point attributes to avoid a lookup for
every point when there are multiple splines.
|
|
|
|
An emission texture is currently connected to the Base Color socket. It should connect to the Emission socket, like a constant does.
Reviewed By: gaiaclary
Differential Revision: https://developer.blender.org/D10990
|
|
|
|
link->multi_input_socket_index, which is used to calculate the links
position on the multi-input socket, was not set.
Now it is set to the sockets current link count.
Review: Jacques Lucke (JacquesLucke)
Differential Revision: https://developer.blender.org/D11082
|
|
Heterogeneous lookup is useful when constructing a key in a
map/set is relatively expensive (e.g. `std::string`). When doing
lookups in the map/set, one usually does not want to construct
the type to avoid overhead. Instead, heterogeneous lookup
allows for using a different type (such as `StringRef`) as key.
This change makes it easier to implement heterogeneous
lookup for custom types. Before, one had to specialize
`blender::DefaultHash`. Now, one just has to implement
a `static uint64_t hash_as(value)` on the type itself.
One still has to provide the equality operator in addition
to the hash function of course.
|
|
Before, any usage of tbb wrappers used in modifier code would
just fall back to the non-threaded non-tbb version.
We ran into this issue a couple of times in patches.
|
|
This is a fairly common operation, so there should be a method
that does it to avoid unnecessary complexity at the caller site.
|
|
Sometimes it is useful to find the key that compares equal
to a known key. Typically that happens when the key itself
has additional data attached that is not part of its hash.
Note that the returned key reference/pointer is const, because
the caller must not change the key in a way that changes its
hash or how it compares to other keys.
|
|
This is used by the upcoming new geometry nodes evaluator.
|
|
The wrapper is necessary to support building without TBB.
This class is used by the upcoming new evaluator for
geometry nodes.
|
|
Unavailable sockets should generally be ignored during evaluation.
They mainly exist because we don't have a better mechanism to turn
some sockets on/off depending on node parameters.
Currently, it is still possible that a link connects an available with an
unavailable socket. This link is not displayed in the ui and should
generally be ignored.
|
|
|
|
|
|
Previously, multiple threads adding information to node ui storage
at the same time resulted in memory corruption. The lock prevents
that, but might potentially become a bottleneck in the future.
For now favour correctness over a potential performance bottleneck.
|
|
Previously, one could allocate an array, but not construct its
elements directly. This method just adds some convenience.
|
|
|
|
|
|
The new "Close Area" operator can let any neighbor replace the area to
be closed. This patch improves the selection of the best, and most-
aligned, neighbor. It maximizes the ratio of the shared edge lengths,
rather than minimize the absolute amount of misalignment. This follows
our expectations closer because it takes into account the relative
sizes of the areas and their edges.
see D11143 for details and examples.
Differential Revision: https://developer.blender.org/D11143
Reviewed by Campbell Barton
|
|
|
|
When disk cache path is same as blend file path, with Unix-like systems
blend file can be overwritten by disk cache directory.
This was caused by `BLI_delete(path, false, true)` when path points to
file. On Windows this would result in error message and file would not
be deleted. On Linux, file is deleted and then overwritten with cache
directory.
To further minimize chance of removing blend file, append disk cache
path with `_seq_cache` suffix.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11217
|
|
Byte images used `ibuf->float_colorspace` as source colorspace.
This was oversight - `ibuf->rect_colorspace` should be used as source
colorspace.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11223
|