Age | Commit message (Collapse) | Author |
|
|
|
Without this, there was no way of finding out which object, modifier
combination caused the error, making the logs not very useful
for debugging.
|
|
|
|
|
|
|
|
This resolves a performance regression in 2.8x where every edit-mode
update performed an edit-mesh to mesh conversion.
Now the conversion will be lazily initialized if/when it's required.
New BKE_mesh_wrapper_* functions abstract over mesh data access.
Currently only edit-mesh and regular meshes are supported.
In the future sub-surface meshes may be supported too.
|
|
|
|
Return the correct sculpt level in BKE_multires_sculpt_level_get and
enable the property in the UI
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7575
|
|
|
|
Make it explicit this data mask is added to the default mask.
|
|
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.
This previously caused a bug in T74283, that should be fixed now.
Differential Revision: https://developer.blender.org/D6695
|
|
than mesh"
This reverts commit f2b95b9eae2ee913c99cff7595527b18d8b49d0a.
Fix T74283: modifier display lost when moving object in edit mode.
The cause is not immediately obvious so better to revert and look at this
carefully.
|
|
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.
Differential Revision: https://developer.blender.org/D6695
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
The function `modifiers_disable_subsurf_temporary` disables
temporarily only subsurf modifiers with the `On Cage` option enabled.
But a modifier can act on cage even with this option disabled.
Differential Revision: https://developer.blender.org/D6722
|
|
This is a revert of a small fraction of commit rB5e332fd700
that introduced the issue according to bisect.
Doing a break here is wrong, because BKE_crazyspace_build_sculpt
assumes that processing stopped at the first deform modifier
without deformMatrices, and thus skips all modifiers until it
finds one like that. Thus this early loop exit makes the behavior
worse, as instead of skipping just Mask and Mirror, it skips all.
|
|
Also correct some outdated symbol references,
add missing 'name' commands.
|
|
This is a workaround for T58473 to avoid likely event of ruining
sculpted data.
Differential Revision: https://developer.blender.org/D6244
|
|
The issue was caused by crazy space distortion orientation happening
for subsurf modifier.
Solved by making it so subsurf only deforms the surface but keeps
matrices as-is. This is not fully mathematically correct, but is better
that the fall-back solution which was doing wrong matrices anyway.
Also, this is closer to have subsurf was handled prior to the
related changes.
Reviewed By: brecht, pablodp606
Differential Revision: https://developer.blender.org/D5991
|
|
Modifier stack evaluation would copy mesh settings other than mesh topology
automatically, outside of the individual modifier evaluation. This leads to hard
to understand code, and makes it unclear which settings are available in following
modifiers, and which only after the entire stack is evaluated.
Now every modifier is responsible to ensure the mesh it outputs preserves materials,
texture space and other settings, or alters them as needed.
Fixes T64739: incorrect texture space for various modifiers
Differential Revision: https://developer.blender.org/D5808
|
|
space issues"
This reverts commit e7a514369fe700dcc5a1fe433c8f709ed9595ded, it introduces
a bug in selection in edit mode.
Fixes T70103: can't select extruded Vertex
Ref T64739
|
|
This is a regression since PBVH was introduced for weight paint.
The solution is: treat subsurf and multires modifiers as deforming
ones for the weight painting. This is an easiest solution to make
PBVH use subdivided location of original vertices.
This change could simplify some of the weight paint by removing
the grids check, since PBVH is not supposed to be built from grids
in this case anymore.
Differential Revision: https://developer.blender.org/D5751
|
|
Modifier stack evaluation would copy mesh settings other than mesh topology
automatically, outside of the individual modifier evaluation. This leads to hard
to understand code, and makes it unclear which settings are available in following
modifiers, and which only after the entire stack is evaluated.
Now every modifier is responsible to ensure the mesh it outputs preserves materials,
texture space and other settings, or alters them as needed.
Fixes T64739: incorrect texture space for various modifiers
Differential Revision: https://developer.blender.org/D5808
|
|
This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.
|
|
|
|
|
|
|
|
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
|
|
Use doxy references to function and enums,
also correct some names which became out of sync.
|
|
|
|
Need to use original mesh to get virtual modifiers list, otherwise
key datablocks will not be properly taken into account (since evaluated
mesh doesn't have key datablock).
|
|
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.
|
|
|
|
Was initially reported when painting on a mesh with armature,
which was failing due to missing bbone cache. The issue was
deeper, and was related on the way which object was used to
calculate crazyspace.
|
|
|
|
DerivedMesh is now removed from edit-mesh modifier evaluation.
|
|
|
|
|
|
Specifically the deformVerts_DM, deformMatrices_DM, deformVertsEM_DM and deformMatricesEM_DM functions are not used anymore.
Reviewer: brecht
|
|
None of those calls actually passed a DerivedMesh.
|
|
The contents of the ModifierEvalContext struct are constant while iterating
over the modifier stack. The struct thus should be only created once, outside
any loop over the modifiers.
|
|
Makes the follow changes:
- Add new `deform*` and `apply*` function pointers to `ModifierTypeInfo` that take `Mesh`, and rename the old functions to indicate that they take `DerivedMesh`. These new functions are currently set to `NULL` for all modifiers.
- Add wrapper `modifier_deform*` and `modifier_apply*` functions in two variants: one that works with `Mesh` and the other which works with `DerivedMesh` that is named with `*_DM_depercated`. These functions check which type of data the modifier supports and converts if necessary
- Update the rest of Blender to be aware and make use of these new functions
The goal of these changes is to make it possible to port to using `Mesh` incrementally without ever needing to enter into a state where modifiers don't work. After everything has been ported over the old functions and wrappers could be removed.
Reviewers: campbellbarton, sergey, mont29
Subscribers: sybren
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D3155
|
|
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
|
|
2.8x branch added bContext arg in many places,
pass eval-context instead since its not simple to reason about what
what nested functions do when they can access and change almost anything.
Also use const to prevent unexpected modifications.
This fixes crash loading files with shadows,
since off-screen buffers use a NULL context for rendering.
|
|
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
|
|
Getting a new edit-derived-bmesh was always creating a deform-vert array, even when it wasn't needed.
Since this was called on redraw, in many cases it was doing it unnecessarily.
Now pass in a custom-data mask and only fill in deform-verts when needed.
Gives noticeable drawing speedup (~10-30% here).
|