Age | Commit message (Collapse) | Author |
|
Using the attribute name semantics from T97452, this patch moves the
selection status of mesh elements from the `SELECT` of vertices, and
edges, and the `ME_FACE_SEL` of faces to generic boolean attribute
Storing this data as generic attributes can significantly simplify and
improve code, as described in T95965.
The attributes are called `.select_vert`, `.select_edge`, and
`.select_poly`. The `.` prefix means they are "UI attributes",so they
still contain original data edited by users, but they aren't meant to
be accessed procedurally by the user in arbitrary situations. They are
also be hidden in the spreadsheet and the attribute list.
Until 4.0, the attributes are still written to and read from the mesh
in the old way, so neither forward nor backward compatibility are
affected. This means memory requirements will be increased by one byte
per element when selection is used. When the flags are removed
completely, requirements will decrease.
Further notes:
* The `MVert` flag is empty at runtime now, so it can be ignored.
* `BMesh` is unchanged, otherwise the change would be much larger.
* Many tests have slightly different results, since the selection
attribute uses more generic propagation. Previously you couldn't
really rely on edit mode selections being propagated procedurally.
Now it mostly works as expected.
Similar to 2480b55f216c
Ref T95965
Differential Revision: https://developer.blender.org/D15795
|
|
|
|
This is very similar to D14077. There are two differences though.
First is that vertex creases are already stored in a separate layer,
and second is that we can now completely remove use of `Mesh.cd_flag`,
since that information is now inherent to whether the layers exist.
There are two functional differences here:
* Operators are used to add and remove layers instead of a property.
* The "crease" attribute can be created and removed by geometry nodes.
The second change should make various geometry nodes slightly faster,
since the "crease" attribute was always processed before. Creases are
now interpolated generically in the CustomData API too, which should
help maintain the values across edits better.
Meshes get an `edge_creases` RNA property like the existing vertex
property, to provide more efficient access to the data in Cycles.
One test failure is expected, where different rounding between float
the old char storage means that 5 additional points are scattered in
a geometry nodes test.
Differential Revision: https://developer.blender.org/D15927
|
|
Similar to the other refactors from T95965, this commit moves sculpt
face sets to use a generic integer attribute named `".sculpt_face_set"`.
This makes face sets accessible in the Python API.
The attribute is not visible in the attributes list or the spreadsheet
because it is meant for internal use, though that could be an option
in the future along with other similar attributes. Currently the change
is small, but in the future this could simplify code by allowing use
of more generic attribute APIs.
Differential Revision: https://developer.blender.org/D16045
|
|
|
|
This makes it easier to pass more parameters to the iterator in the future.
Differential Revision: https://developer.blender.org/D16047
|
|
Following {T54811} (and {rBbb92edd1c802}), DEG updates have been added
to the various operators. This has also been done for the layers
operators (see {rBf998bad211ae}, `ARMATURE_OT_bone_layers` has been
marked done in T54811). However, instead of `ARMATURE_OT_bone_layers`,
the update tagging actually happened for `POSE_OT_bone_layers`.
Now do this for `ARMATURE_OT_bone_layers` as well (keep it for
`POSE_OT_bone_layers`, dont think this is wrong there either).
Maniphest Tasks: T101046
Differential Revision: https://developer.blender.org/D15969
|
|
|
|
|
|
Revert part of [0] which changed logic for scaling 2D regions
when the window resize. This re-introduces T72392 which can be
fixed separately.
[0]: 6243972319289d86c70ce9946d10909e7eddfdaf
|
|
|
|
|
|
The BMesh selection virtual array was empty. There are a few different
places we could add an "empty" check here, but at the top of the
function is the simplest for now.
|
|
Similar to e5a7470638803fd, the tree currently being edited should be
used for polling and other tests, rather than the node tree at the root
of the node editor's path.
|
|
|
|
Was placed in filelist.cc, which didn't make much sense since they deal
with quite different things.
|
|
I'm adding some asset APIs/types in C++ that the file-listing code would
use. I prefer porting this code to C++ over adding a C-API for the asset
code.
Includes some minor cleanups that shouldn't change behavior, like using
`MEM_new()`/`MEM_cnew()`, C++ style C-library includes,
`LISTBASE_FOREACH()`, removing unnecessary typedefs, etc.
|
|
This functionality was present until Blender 2.80. Basically it adds back the
"+" and "-" buttons in the file browser when it stores an output filepath.
This is useful for someone rendering multiple versions of an animation (or a
composition) to compare.
At the moment this is used for the render output, and the File Output node in
the compositor.
Differential Revision: https://developer.blender.org/D15968
|
|
|
|
|
|
Selection
Regression introduced in rb2ba1cf4b40fc.
The `MLOOPUV_VERTSEL` flag only indicates UV selection without sync.
|
|
Caused due to an inaccuracy when the values of `in` and `out` are too
close.
The solution is to project the value of `in` directly onto the plane.
|
|
Face sets were not being initialized. I had also
forgotten to remove a dead struct member from
SculptBoundary which was being accessed.
|
|
Feeding -1 to BM_ELEM_CD_GET_VOID_P will not return NULL.
|
|
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
|
|
After the redo panel is added to animation editors in D14960, many
operators have now been adjusted to appear and function correctly.
A full list of changes is tracked in T98195.
This patch only includes actual usability fixes. It does not do any
changes for the user's convenience, like adding other helpful properties
to operators. This can be done in a follow-up patch.
Reviewed By: sybren
Maniphest Tasks: T98195
Differential Revision: https://developer.blender.org/D14977
|
|
Add the Redo panel to the dopesheet & NLA editors. This also implicitly
adds it to the timeline editor, since it's a kind of action editor
internally.
This feature is needed for changing advanced properties of animation
operators, such as select grouped (see D14811). But it can also be
useful for existing operators, like precise keyframe position tweaking.
Changes are basically the same as in D6286 (which added the redo panel
for Graph Editor).
Some operators have internal properties that should be hidden. A full
list can be found in T98195. These will be fixed in a follow-up patch.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D14960
|
|
Differential Revision: https://developer.blender.org/D16020
|
|
The operator did not set the any extrapolation mode of the individual
keyframes, it sets it for the whole f-curve. Change the operator name to
reflect that.
|
|
Code from {rBb0cb0a785475} assumed a texture node `node->id` would
always be an image.
That is not true though:
- could be an object (as reported here with the Point Density node)
- could be a textblock (as in the IES Texture node)
Acting on these would crash when doing `BKE_image_signal` on them.
Now check node id is an image and do nothing otherwise.
Also check if an image is actually set in these nodes (if none is, the
Image Editor is now also untouched, previously the image in the Image
Editor was "cleared" here [set to NULL] -- which does not seems very
beneficial)
Maniphest Tasks: T101001
Differential Revision: https://developer.blender.org/D15943
|
|
For example, allows a custom UV grid size of 4 x 12.
TODO: Fix snapping with custom UV grid sizes.
Manifest Tasks: T78391
Differential Revision: https://developer.blender.org/D16000
|
|
|
|
Currently node group assets are supported, but using them by dragging
from the asset browser is cumbersome. This patch adds all node group
assets from user asset libraries and the current file libraries to the
add node search menu and the link drag search menu.
Node groups added through the search will have their "options" hidden,
meaning the data-block selector is displayed. This helps keep the UI
clean, and the selector shouldn't be necessary anyway.
To make that possible, metadata like the node tree type and its inputs
and outputs has to be saved in the file. This requires re-saving the
files that contain the assets with the patch applied.
The node add search operator is moved from Python to C++ to ease
development and allow more flexibility. It supports a tooltip that
gives the description of assets.
Currently the node groups are added with the asset system's existing
"Append & Reuse" behavior. It's likely that linking should be possible
in the future too, but for now the idea is to use the more foolproof
option that doesn't create dependencies between files.
Because loading assets can potentially take a long time, the search
menu refreshes its items as new assets are loaded. However, changing
the search field is necessary to see the update.
Differential Revision: https://developer.blender.org/D15568
|
|
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
|
|
Regression in [0], re-order the key-map so the home key
can be used for cursor motion.
[0]: 82fc52ffc88142e0fa29335e07595c87c173a3a6
|
|
|
|
Fix clipping artifacts of node drop shadows that could occur
on hidden nodes, when using higher UI scaling.
Reviewed By: Hans Goudey
Differential Revision: http://developer.blender.org/D16007
|
|
The node position is specified in the coordinate space of the node
editor. The cursor position has to be divided by `UI_DPI_FAC` since it's
in view space but the offset is independent of any ui scaling.
Reviewed By: Hans Goudey
Differential Revision: http://developer.blender.org/D16006
|
|
Switch to target_ functions to avoid this.
|
|
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
|
|
This reduces logging overhead. The performance difference is only
significant when there are many fast nodes. In my test file with many
math nodes, the performance improved from 720ms to 630ms.
|
|
|
|
|
|
|
|
Also cleaned up a comment.
|
|
Avoid conversion to `BMesh` for basic topology operations and data access.
Instead use a mesh map to retrieve the faces connected to each edge.
I observed performance improvements of 5x (600ms to 100ms) to 10x
(15s to 1s), with bigger changes for large meshes with more data layers
Switching to `std::queue` over Blender's `GSQueue` gave another
25% improvement.
Differential Revision: https://developer.blender.org/D15988
|