Age | Commit message (Collapse) | Author |
|
Helpful for D14365.
|
|
|
|
Mistake in [0] calculated the mean-face-center which wasn't used.
0: 23344bca6c5d1de330169a04ed8d21145fc60053
|
|
See https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Integer_Types
|
|
|
|
Also use a bit-field for SnapObjectParams.keep_on_same_target
|
|
Be consistent with naming to avoid mixing MPoly/MFace.
|
|
This commit moves the hide status of mesh vertices, edges, and faces
from the `ME_FLAG` to optional generic boolean attributes. Storing this
data as generic attributes can significantly simplify and improve code,
as described in T95965.
The attributes are called `.hide_vert`, `.hide_edge`, and `.hide_poly`,
using the attribute name semantics discussed in T97452. 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 by default,
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 the hide status is used. When the flags are removed
completely, requirements will decrease when hiding is unused.
Further notes:
* Some code can be further simplified to skip some processing when the
hide attributes don't exist.
* The data is still stored in flags for `BMesh`, necessitating some
complexity in the conversion to and from `Mesh`.
* Access to the "hide" property of mesh elements in RNA is slower.
The separate boolean arrays should be used where possible.
Ref T95965
Differential Revision: https://developer.blender.org/D14685
|
|
|
|
|
|
This reverts commit 94866ef84f1907116409f8fe9c1f313405
A number of reports of bevel regressions came after the
commit to fix bevel intersection continuity.
Since the fix for some of those regressions is not obvious
we will revert the continuity improvement and do it as
part of the Bevel V2 project.
|
|
|
|
|
|
Regression from 087f27a52f78
|
|
This allows parts of the code to be threaded more easily.
|
|
Add sin_cos_from_fraction which ensures each quadrant has matching
values when their sign is flipped.
|
|
Calculating shortest path selection in UV edge mode was done using vertex
path logic. Since the UV editor now supports proper edge selection [0],
this approach can sometimes give incorrect results.
This problem is now fixed by adding separate logic to calculate the
shortest path in UV edge mode.
Resolves T99344.
[0]: ffaaa0bcbf477c30cf3665b9330bbbb767397169
Reviewed By: campbellbarton
Ref D15511.
|
|
Also remove duplicate comments in bmesh_log.h, caused by automated
comment relocation in [0].
[0]: c4e041da23b9c45273fcd4874308c536b6a315d1
|
|
This mirrors the C++ attribute API better, separates the implementation
of attributes from CustomData slightly, and makes functions simpler,
clearer, and safer.
Also fix an issue with removing an attribute caused by 97712b018df71c
meant the first attribute with the given type was removed instead of
the attribute with the given name.
|
|
|
|
|
|
- CustomDataType -> eCustomDataType
- CustomDataMask -> eCustomDataMask
- AttributeDomain -> eAttrDomain
- NamedAttributeUsage -> eNamedAttrUsage
|
|
|
|
|
|
|
|
BMLog was zeroing face sets when creating new faces,
which is not valid. They're now set to 1.
|
|
Also add missing task-ID reference & remove colon after \note as it
doesn't render properly in doxygen.
|
|
|
|
Recent cleanups 9a8669ac81b99b2 and 1c790555a02bfc3
incorrectly interpereted the bitfield width syntax as a default
value. Also resolve two other compilation warnings.
|
|
|
|
|
|
The uv fix just submitted had a bug where I forgot to wrap around
after adding 1. This apparently worked anyway in a debug build
but not in release build, hence the buildbot tests were failing.
|
|
Also remove unnecessary uses of `struct` and add const in one place.
|
|
The UV fix just committed had gotten out of sync with some changes
that had been made inside some comments (spelling and folding).
|
|
Add macros to get/set boolean attributes, to set float2/float3
attributes and to get float2/float3 attributes via pointer access.
Needed for D14365 and further generic attribute integration.
Differential Revision: https://developer.blender.org/D14708
|
|
This substantially redoes the logic by which bevel chooses, for
the middle segment when there are an odd number of segments,
which face to interpolate in, and which vertices to snap to which
edges before doing that interpolation. It changes the UV layouts
of a number of the regression tests, for the better.
An example, in the reference bug, is a cube with all seams, unwrapped
and then packed with some margin around them, now looks much
better in UV space when there are an odd number of segments.
|
|
The "PROP" in the name reflects its generic status, and removing
"LOOP" makes sense because it is no longer associated with just
mesh face corners. In general the goal is to remove extra semantic
meaning from the custom data types.
|
|
Also ensure space around text in C-comment blocks.
|
|
|
|
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
|
|
Also rename DNA struct members.
|
|
Follow conventions from T85728.
|
|
|
|
These boolean options are passed as uint, but they would be
easier to understand if using bool.
Differential Revision: https://developer.blender.org/D14405
|
|
Currently there is a "calc_face_normal" argument to mesh to bmesh
conversion, but vertex normals had always implicitly inherited whatever
dirty state the mesh input's vertex normals were in. Probably they were
most often assumed to not be dirty, but this was never really correct in
the general case.
Ever since the refactor to move vertex normals out of mesh vertices,
cfa53e0fbeed7178c7, the copying logic has been explicit: copy the
normals when they are not dirty. But it turns out that more control is
needed, and sometimes normals should be calculated for the resulting
BMesh.
This commit adds an option to the conversion to calculate vertex
normals, true by default. In almost all places except the decimate
and edge split modifiers, I just copied the value of the
"calc_face_normals" argument.
Differential Revision: https://developer.blender.org/D14406
|
|
Mainly -Wset-but-unused-variable.
Makes default compilation on macOS way less noisy.
Differential Revision: https://developer.blender.org/D14357
|
|
Follow naming from T85728.
|
|
The constant M_PI_4 is added to GLSL to ensure it works there too.
Differential Revision: https://developer.blender.org/D14288
|
|
|
|
|