Age | Commit message (Collapse) | Author |
|
|
|
See explanation in comment.
Differential Revision: https://developer.blender.org/D15864
|
|
|
|
Now dragged handles are handled separately, and the function returns a
statically sized array by value. The functions are also renamed to be
more consistent with curve naming elsewhere in Blender.
|
|
This was missed in 58c650a44c251a41c89375d697efdf07153016e0.
|
|
This was only really used in one place, so better to just do it there
rather than requiring another argument for the handle calculation.
|
|
|
|
|
|
Unused after 217d0a15243d12da070e8a68c2603bab73be2164
|
|
Changes to the text caret (cursor) when editing Text objects in the
3D Viewport.
See D15797 for more details and examples.
Differential Revision: https://developer.blender.org/D15797
Reviewed by Brecht Van Lommel
|
|
|
|
Use cache from 25e307d725d0b924f rather
than creating a new vector on every redraw.
|
|
|
|
|
|
|
|
|
|
|
|
This makes the api more portable and not depend on
any visual area for background tasks like future modifiers.
|
|
Several visual tweaks to node links to make them overall fit in
better with the look of the node editor:
- Change the link thickness with the zoom level to a certain degree.
- Remove the fuzziness of the node link and its shadow/outline.
- The link outline color can now be made transparent.
- Add circles at the end of dragged links when connecting to sockets.
- Improve the banding of the color interpolation along the link.
- Adjust the spacing of dashes along straight node links.
Reviewed By: Pablo Vazquez, Hans Goudey
Differential Revision: http://developer.blender.org/D15036
|
|
This patch is a cleanup required before refactoring the view layer syncing
process {T73411}.
* Remove FIRSTBASE.
* Remove LASTBASE.
* Remove BASACT.
* Remove OBEDIT_FROM_WORKSPACE.
* Replace OBACT with BKE_view_layer_active_object.
* Replace OBEDIT_FROM_VIEW_LAYER with BKE_view_layer_edit_object.
Reviewed By: mont29
Maniphest Tasks: T73411
Differential Revision: https://developer.blender.org/D15799
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: does not fix the limit in PBVH draw which is
caused by VBO limits not MAX_MCOL.
|
|
The new factor allows to apply the current brush size to the
external stroke perimeter conversion done in draw mode.
|
|
This patch moves material indices from the mesh `MPoly` struct to a
generic integer attribute. The builtin material index was already
exposed in geometry nodes, but this makes it a "proper" attribute
accessible with Python and visible in the "Attributes" panel.
The goals of the refactor are code simplification and memory and
performance improvements, mainly because the attribute doesn't have
to be stored and processed if there are no materials. However, until
4.0, material indices will still be read and written in the old
format, meaning there may be a temporary increase in memory usage.
Further notes:
* Completely removing the `MPoly.mat_nr` after 4.0 may require
changes to DNA or introducing a new `MPoly` type.
* Geometry nodes regression tests didn't look at material indices,
so the change reveals a bug in the realize instances node that I fixed.
* Access to material indices from the RNA `MeshPolygon` type is slower
with this patch. The `material_index` attribute can be used instead.
* Cycles is changed to read from the attribute instead.
* BMesh isn't changed in this patch. Theoretically it could be though,
to save 2 bytes per face when less than two materials are used.
* Eventually we could use a 16 bit integer attribute type instead.
Ref T95967
Differential Revision: https://developer.blender.org/D15675
|
|
This information was missing and made the feature hard to discover.
|
|
|
|
From the 3DView code has basically no knowledge of collection hierarchy,
so we can either not remap any local usage of linked objects that are
being overridden, or remap them in all their local collections.
The second behavior makes most sense in the vast majority of cases.
Note that this was only an issue when directly linking and overriding
objects, not when doing so through collections.
|
|
|
|
Checks for 'invalid' selected IDs that need to be skipped were
incomplete, and one was missing the actual return statement.
|
|
The purpose of `NodeTreeRef` was to speed up various queries on a read-only
`bNodeTree`. Not that we have runtime data in nodes and sockets, we can also
store the result of some queries there. This has some benefits:
* No need for a read-only separate node tree data structure which increased
complexity.
* Makes it easier to reuse cached queries in more parts of Blender that can
benefit from it.
A downside is that we loose some type safety that we got by having different
types for input and output sockets, as well as internal and non-internal links.
This patch also refactors `DerivedNodeTree` so that it does not use
`NodeTreeRef` anymore, but uses `bNodeTree` directly instead.
To provide a convenient API (that is also close to what `NodeTreeRef` has), a
new approach is implemented: `bNodeTree`, `bNode`, `bNodeSocket` and `bNodeLink`
now have C++ methods declared in `DNA_node_types.h` which are implemented in
`BKE_node_runtime.hh`. To make this work, `makesdna` now skips c++ sections when
parsing dna header files.
No user visible changes are expected.
Differential Revision: https://developer.blender.org/D15491
|
|
While missing the break before a default that only breaks isn't
an error, it means adding new cases needs to remember to add the
break for an existing case, changing the default case will also
result in an unintended fall-through.
Also avoid `default:;` and add an explicit break.
|
|
|
|
|
|
The property registration was missing in the operator, now fixed.
|
|
This patch is a response to T92588 and is implemented
as a Function/Shader node.
This node has support for Float, Vector and Color data types.
For Vector it supports uniform and non-uniform mixing.
For Color it now has the option to remove factor clamping.
It replaces the Mix RGB for Shader and Geometry node trees.
As discussed in T96219, this patch converts existing nodes
in .blend files. The old node is still available in the
Python API but hidden from the menus.
Reviewed By: HooglyBoogly, JacquesLucke, simonthommes, brecht
Maniphest Tasks: T92588
Differential Revision: https://developer.blender.org/D13749
|
|
|
|
|
|
When allocating new `CustomData` layers, often we do redundant
initialization of arrays. For example, it's common that values are
allocated, set to their default value, and then set to some other
value. This is wasteful, and it negates the benefits of optimizations
to the allocator like D15082. There are two reasons for this. The
first is array-of-structs storage that makes it annoying to initialize
values manually, and the second is confusing options in the Custom Data
API. This patch addresses the latter.
The `CustomData` "alloc type" options are rearranged. Now, besides
the options that use existing layers, there are two remaining:
* `CD_SET_DEFAULT` sets the default value.
* Usually zeroes, but for colors this is white (how it was before).
* Should be used when you add the layer but don't set all values.
* `CD_CONSTRUCT` refers to the "default construct" C++ term.
* Only necessary or defined for non-trivial types like vertex groups.
* Doesn't do anything for trivial types like `int` or `float3`.
* Should be used every other time, when all values will be set.
The attribute API's `AttributeInit` types are updated as well.
To update code, replace `CD_CALLOC` with `CD_SET_DEFAULT` and
`CD_DEFAULT` with `CD_CONSTRUCT`. This doesn't cause any functional
changes yet. Follow-up commits will change to avoid initializing
new layers where the correctness is clear.
Differential Revision: https://developer.blender.org/D15617
|
|
Using the same `GeometryComponentFieldContext` for all situations,
even when only one geometry type is supported is misleading, and mixes
too many different abstraction levels into code that could be simpler.
With the attribute API moved out of geometry components recently,
the "component" system is just getting in the way here.
This commit adds specific field contexts for geometry types: meshes,
curves, point clouds, and instances. There are also separate field input
helper classes, to help reduce boilerplate for fields that only support
specific geometry types.
Another benefit of this change is that it separates geometry components
from fields, which makes it easier to see the purpose of the two concepts,
and how they relate.
Because we want to be able to evaluate a field on just `CurvesGeometry`
rather than the full `Curves` data-block, the generic "geometry context"
had to be changed to avoid using `GeometryComponent`, since there is
no corresponding geometry component type. The resulting void pointer
is ugly, but only turns up in three places in practice. When Apple clang
supports `std::variant`, that could be used instead.
Differential Revision: https://developer.blender.org/D15519
|
|
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.
|
|
|
|
- PALETTE_OT_color_add: crashed without a brush.
- SCREEN_OT_actionzone: crashed without a window.
- PREFERENCES_OT_studiolight_show: exception when opening prefs failed.
|
|
|
|
These functions used the term "find", which makes it sound like a lookup
callback, when in fact it would add elements to a set for further
processing. So use "collect" instead.
|
|
The slide brush requires attachment information on the curves.
Now a warning is shown instead of crashing Blender. The attachment
information can be generated by executing the
`Curves > Snap to Nearest Surface` operator.
|