Age | Commit message (Collapse) | Author |
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.
Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!
As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).
Reviewers: brecht, campbellbarton, sergey
Differential Revision: https://developer.blender.org/D4407
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Similar to masking grids, need to also check existing grid level.
This is because edit mode might leave allocated grid with 0 levels.
|
|
Before that only normal component was averaged, which is not
really correct.
Unfortunately, the new code is somewhat slower due to more
involved math to deal properly with non-quad faces, but the
plan is to move averaging from runtime to edit time, This
means, that mdisps will always be continuous around the edges
and no averaging on every frame change of animated character
will be needed.
|
|
|
|
The idea is to run reshaping for every boundary vertex
of a grid rather than trying to copy boundary grid
elements.
While this is somewhat slower, this avoids all this
tangent flipping magic, which tempts to be rather tricky
and fragile.
|
|
The boundary copy code was not dealing correct with flipping
tangent vectors, hence causing discontinuity in the final
positions.
Now we only copy boundaries for quads, where we know how to
deal with tangent vectors and where we know that this is
needed.
More clear solution could be to change the code in a way that
handles handles displacement grids of quads in the same way
as it's done for non-quad faces.
|
|
|
|
Needed for clang formatting to workaround bug/limit, see: T53211
|
|
|
|
|
|
Now it is forumlated in terms of deltas, and consists of the
following steps:
- Original displacement at the reshape level are being backed up.
- New displacement is being written by the reshape routines.
- Delta of the displacement is calculated.
- Deltas are propagated to the higher levels, which also includes
their interpolation/
- Original displacement is restored.
- New interpolated displacements are added to the original ones.
This is a base ground for the upcoming change related on using
Catmull-Clark smoothing for the deltas instead of linear
interpolation. Currently is no changes for artists, just preparing
for upcoming work.
|
|
First of all, follow our naming convention to use module prefix.
Second of all, mesh is being created and is to be freed, we also
have convention for such function names.
|
|
|
|
|
|
|
|
|
|
|
|
Rename modifier_deformVerts_ensure_normals &
modifier_applyModifier_ensure_normals with wrappers that match 2.7x
convention.
|
|
|
|
Probably more work is needed, but is good starting point.
|
|
This is the only thing which needs to be done to perform propoer
reshape. Makes it easier to re-use code from other places.
|
|
There is nothing we need from object in this case.
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
|
|
|
|
|
|
|
|
Allows to paint mask in sculpt mode, then go out of sculpt
mode, come back and see proper mask.
|
|
Added propagation of displacement to a higher levels.
Has the same limitation as reshape from object, which makes
grids somewhat choppy due to linear interpolation nature.
This is to be addressed next.
|
|
This brings basic implementation of displacement propagation
to a higher levels. Currently does linear interpolation between
grid points at which reshape happened. It makes results a bit
choppy, proper solution would be to use some interpolation
weights from the limit patch.
|
|
|
|
Was happening for "new" objects, which did not have MDisps
allocated yet.
|
|
|
|
Allows to go to sculpt mode, do brush strokes, get out of sculpt mode
and have deformation preserved.
The issues currently is that the current implementation of CCG
storage is created from the limit surface, without displacement
taken into account. It is trivial to get displaced coordinates,
but it is more tricky to get displaced normals. This is something
to be solved next.
Another limitation is that this only works for sculpting at a maximal
multires level. There is code to be done to support propagation
of displacement onto a higher levels.
|
|
There are so many reshapes now, and one more is to come.
Better be explicit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Limited to mesh type of source, not sure it ever worked for non-meshes.
While it's possible to support reshape from any object, the actual brain
of operation would need to be recoded to go away from requirement of
vertex indices matching in source and destination.
|
|
|
|
|
|
|