Age | Commit message (Collapse) | Author |
|
|
|
Logic about computing of poly normals in final stage of modifier stack
evaluation was broken, giving also wrong loop normals.
|
|
|
|
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
|
|
Causes clang-format to give different results on a second run.
|
|
|
|
|
|
|
|
|
|
|
|
modifier.
A deform-only modifier that needs access to normals need a copy of
evaluated mesh with those normals updated, when it is not the first one
in the stack.
That issue had been partially fixed in Object mode a long time ago
(see T23673), but it was still broken for deform-only stacks cases.
And it was also completely missing from the Edit mode code
(`editbmesh_calc_modifiers()` function).
|
|
Use the term "AFTER" instead of "OFS" since it wasn't obvious these
macros operate on everything after the struct member passed.
Avoid casting to non-const types when only reading.
|
|
|
|
Ensure we do get poly normals if they are requested in given cddata mask.
|
|
This also fixes T62228.
However, datatransfer code is still doing bad things with its source,
still working on proper changes here.
|
|
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.
|
|
When bmesh was in a branch we had both edit_mesh and edit_btmesh,
now there is no reason to use this odd name.
|
|
|
|
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.
|
|
Part of D4277 by @sobakasu
|
|
This is more like a band-aid than a real fix actually, real fix would be
to understand why rendering smoke requires auto texspace to be ON
(afaict, this was not the case in 2.7x)...
But I've already spent way too much time on this issue, at least now we
get better situation than before (i.e. smoke with adaptive domain works
well even when orig domain mesh has autospace flag disabled).
|
|
weights ..."
This reverts commit 6dbfd7f6d6bc9bea9556861eba682a3126b5ed40.
|
|
... incorrectly (or assert)
Thanks @angavrilov and @lichtwerk for the fix.
|
|
included.
We should *never* prevent copying basic mesh CDLayers (vertices etc.),
that does not make sense.
I guess issue was not in old DM because geometry was duplicated anyway,
and in 'normal' modifier stack eval, probably because bare mesh was
awlays requested? But we should not have to be explicit here about it.
|
|
|
|
|
|
|
|
Passing depsgraph instead of scene, since a scene does not fully define the
state of object you want to use for the BVH.
Also, mesh_create_eval_final_view and mesh_create_eval_final_render are pretty
much the same, so mesh_create_eval_no_deform and
mesh_create_eval_no_deform_render are as well.
Issue reported on: T58734
Reviewers: sergey
https://developer.blender.org/D4032
|
|
Since it seems that CD_ORIGINDEX is not available for loops,
the only choice is to simply use the loop normals already
computed by depsgraph after evaluating modifiers.
This revealed a bug where the Auto Smooth settings would be lost
from the mesh after complex modifiers, or after edit mesh to mesh
conversion, so restoring them is needed to get correct results.
|
|
Move all mask-related fields from Object and OperationDepsNode
to Object_Runtime and IDDepsNode. Auto-apply DEG_TAG_GEOMETRY
if the mask changes after DEG rebuild. Update DEG API and all
code that uses it.
This fixes "source mesh data is not ready" errors from Data
Transfer modifier when parameters are changed in the UI after
the recent mesh_get_eval_final fix.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D4025
|
|
Our mesh validation was only checking cd layout so far, not their actual
data. While this might only be needed for a few types, this is a
required addition for things like imported UVs, else we have no way to
avoid nasty things like NANs & co.
Note that more layer types may need that callback, time will say. For
now added it to some obvious missing cases...
|
|
Using those functions during multithreaded evaluation is a sure
way to have a race condition and crash.
|
|
|
|
It's a very bad idea to call this on non-COW instances - see T58150.
Also, when rebuilding mesh it's better to accumulate mask flags to
avoid possible repeated rebuilds from different users.
|
|
Ensure all relevant CustomDataMask bits are set during normal evaluation.
|
|
mesh_finalize_eval() may set ob->data to evaluated mesh, needs to be
done *after* call to BKE_mesh_texspace_copy_from_object(), else that one
is meaningless.
Related to investigations on T57985, but does not solve it at all. :(
|
|
|
|
This is more an internal transition away from derived mesh.
|
|
|
|
The Nearest Surface Point shrink method, while fast, is neither
smooth nor continuous: as the source point moves, the projected
point can both stop and jump. This causes distortions in the
deformation of the shrinkwrap modifier, and the motion of an
animated object with a shrinkwrap constraint.
This patch implements a new mode, which, instead of using the simple
nearest point search, iteratively solves an equation for each triangle
to find a point which has its interpolated normal point to or from the
original vertex. Non-manifold boundary edges are treated as infinitely
thin cylinders that cast normals in all perpendicular directions.
Since this is useful for the constraint, and having multiple
objects with constraints targeting the same guide mesh is a quite
reasonable use case, rather than calculating the mesh boundary edge
data over and over again, it is precomputed and cached in the mesh.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3836
|
|
Was only used by subsurf in the past years, it is unlikely
other modifiers will every need this any time soon.
|
|
|
|
Fixes edit-mesh not having a boundbox calculated for it.
|
|
|
|
|
|
|
|
Editmesh modifier calculation behaved as if eModifierMode_OnCage
was enabled for all modifiers.
Remove assignment after all modifiers are calculated.
|
|
|