Age | Commit message (Collapse) | Author |
|
|
|
Only DNA_customdata_types.h is needed for BMEditMesh.
|
|
Also remove white-space added last commit.
|
|
Rename:
- EDBM_mesh_free -> EDBM_mesh_free_data
BKE_editmesh_free -> BKE_editmesh_free_data
Since this doesn't free the edit-mesh pointer.
- BKE_editmesh_free_derivedmesh -> BKE_editmesh_free_derived_caches
Since this no longer uses derived-mesh, match naming for the related
object function BKE_object_free_derived_caches.
Also remove `do_tessellate` argument from BKE_editmesh_create,
since the caller can explicitly do this if it's needed,
with the advantage that it can be combined with normal calculation
which is faster on high-poly meshes.
|
|
Using BMesh operators through the edit-mesh API created a full copy
of the mesh so it was possible to restore the mesh in case
one of the operators raised an error.
Remove support for automatic backup/restore from the EDBM_op_* API's
as it adds significant overhead and was rarely used.
Operators that need this can use the BMBackup API to backup & restore
the mesh in case of failure.
Add warning levels to BMO_error_raise so operators can report problems
without it being interpreted as a request to cancel the operation.
For high-poly meshes creating and freeing a full copy is an expensive
operation, removing this gives a speedup of ~1.77x for most operators
except for "connect_verts" / "connect_vert_pair"
which still uses this functionality.
|
|
|
|
Support calculating face normals when tessellating. When this is done
before updating vertex normals it gives ~20% performance improvement.
Now vertex normal calculation only needs to perform a single pass on the
mesh vertices when called after tessellation.
Extended versions of normal & looptri update functions have been added:
- BM_mesh_calc_tessellation_ex
- BM_mesh_normals_update_ex
Most callers don't need to be aware of this detail by using:
- BKE_editmesh_looptri_and_normals_calc
- BKE_editmesh_looptri_and_normals_calc_with_partial
- EDBM_update also takes advantage of this,
where calling EDBM_update with calc_looptri & calc_normals
enabled uses the faster normal updating logic.
|
|
This patch exposes functionality for performing partial mesh updates
for normal calculation and face tessellation while transforming a mesh.
The partial update data only needs to be generated once,
afterwards the cached connectivity information can be reused
(with the exception of changing proportional editing radius).
Currently this is only used for transform, in the future it could be
used for other operators as well as the transform panel.
The best-case overall speedup while transforming geometry is about
1.45x since the time to update a small number of normals and faces is
negligible.
For an additional speedup partial face tessellation is multi-threaded,
this gives ~15x speedup on my system (timing tessellation alone).
Exact results depend on the number of CPU cores available.
Ref D11494
Reviewed By: mano-wii
|
|
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
With constructive + deform modifiers, loop-cut visualization
wasn't following the displayed mesh.
This now gets the coordinates from the cage when available.
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
|
|
Remove this pointer since it's linking Mesh data back to the object,
where a single edit-mesh may have multiple object users,
causing incorrect assumptions in the code.
Resolves dangling pointer part of the T72667 crash,
although there are other issues which still need to be fixed.
In EDBM_op_finish and EDBM_update_generic,
full Main lookups have been added which should be replaced with mesh
argument or the update tagging moved elsewhere.
|
|
Note that this is a bit clumsy having both edit-mesh and mesh,
BKE_editmesh_ensure_autosmooth & BKE_editmesh_lnorspace_update
are often called together, these could be made into a single functions.
|
|
|
|
This code has been moved into the draw manager.
|
|
This introduces object mode tagging for data which hasn't yet been
written back to the ID data.
Now when selecting other sculpt objects, the original objects data is
flushed back to the ID before writing a memfile undo step.
|
|
|
|
This fixes the regression from T70103 introduced by the fix for T70103.
|
|
|
|
Use consistent terminology.
|
|
This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.
|
|
Now Normal menu operations and rotate normals (r n) do not need
manual enabling of autosmooth first.
See T64324 for discussion of Normal UI changes.
|
|
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.
|
|
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
|
|
DerivedMesh is now removed from edit-mesh modifier evaluation.
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
|
|
|
|
|
|
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.
|
|
- MTexPoly structure & layer type.
- The 'Mesh.uv_textures' layers.
- DerivedMesh TexFace drawing.
- Scripts & UI.
|
|
|
|
This modifier can be used to correct bad deformations,
Original patch D1183 by @sazerac, with own modifications
|
|
|
|
|
|
|
|
since enough bmesh operations can also take advantage of direct index lookups on verts/edges/faces.
developers note:
- EDBM_index_arrays_init/ensure/free -> BM_mesh_elem_table_ensure/init/free
- EDBM_vert/edge/face_at_index -> BM_vert/edge/face_at_index
- EDBM_uv_element_map_create/free -> BM_uv_element_map_create/free
- ED_uv_element_get -> BM_uv_element_get
|
|
|
|
|