Age | Commit message (Collapse) | Author |
|
Prepare for enabling ReflowComments.
|
|
|
|
|
|
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
|
|
|
|
Mostly functions wrapping args, not confirming to our style guide.
|
|
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.
|
|
|
|
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
|
|
|
|
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
(hint this isn't a simple getter).
See P611 to apply instead of manually resolving conflicts.
|
|
no functional changes.
|
|
Rewrite the current range-tree API used by dyn-topo undo
to avoid inefficiencies from stdc++'s set use.
- every call to `take_any` (called for all verts & faces)
removed and added to the set.
- further range adjustment also took 2x btree edits.
This patch inlines a btree which is modified in-place,
so common resizing operations don't need to perform a remove & insert.
Ranges are stored in a list so `take_any` can access the first item
without a btree lookup.
Since range-tree isn't a bottleneck in sculpting, this only gives minor speedups.
Measured approx ~15% overall faster calculation for sculpting,
although this number time doesn't include GPU updates and depends on how
much edits fragment the range-tree.
|
|
|
|
|
|
|
|
|
|
|
|
Was using pointer hashing when the keys are in fact uint's.
Since they're well distributed from the rangetree,
no need to do bit-shifting tricks. just use int as hash.
Gives ~8% speedup in own tests.
|
|
|
|
|
|
Add retake to range-tree to avoid double lookup.
|
|
Undoing nodes that do not belong to the current object will cause the
saved bmesh log entry to be reverted instead. This entry can belong to
another object though.
This is easy to fix by enforcing name matching (this was borrowed by
edit mode but can definitely be improved) between current object name
and undo node name and deleting older entries.
However there are complications. Deleting dyntopo entries in this way
can leave a brush stroke as first dyntopo log entry. This can present
issues if we attempt to delete that entry since it's deleted mesh
elements may now have had their ids (which would still be valid at the
time) cleaned up. This can result in crashing if we attempt to resculpt
on the mesh. To fix this I have disabled releasing the deleted entries.
This entanglement between bm_log and undo is quite volatile but I hope
the system works better now.
Also minor cleanup, fix unneeded check warning
|
|
It shouldn't create issues in practice because modified face ids should
have been reclaimed from an added face on a previous entry, but add for
completeness.
|
|
changes.
|
|
This is meant to support undo when hiding parts of the mesh.
Also avoid rebuilding the PBVH in that case as well (no nodes split)
|
|
|
|
|
|
|
|
also replace AT with __func__ since AT expands the full pathname
|
|
|
|
|
|
also avoid allocs per node in pbvh_bmesh_node_limit_ensure()
|
|
|
|
vertex and edge),
also replace BM_face_create_quad_tri_v with BM_face_create_verts
|
|
side in some cases it gets a bit confusing.
also correct edge-rotate where bool->flag conversion worked by accident.
|
|
Turn off pbvh normal update flag after recalculation, saves
recalculating normals every frame when not stroking the mesh.
For this to work reliably with undo we need to support original normals
in the bm_log (was marked as a TODO already in the code), so that
undoing avoids having invalid normals in the mesh (since we don't update
every frame anymore). This was added in this commit as well.
Also added some (disabled) quite paranoid checks in the bmesh valication
code for dyntopo hoping to catch the real normal update issue. No luck
there yet.
|
|
avoids remove,insert and only hashes the key once.
|
|
path_util_1.patch from Lawrence D'Oliveiro (ldo)
|
|
|
|
verts since the face stores these already.
also remove ScrArea.cursor, historic runtime variable.
|
|
Fixes [#34043] "Dyntopo: noise appear during sculpting (parasite edges)"
projects.blender.org/tracker/index.php?func=detail&aid=34043&group_id=9&atid=498
|
|
vert_mask_get(), vert_mask_set().
add an assert because if the mesh is in an invalid state the mask layer can exist but the mask pointer still be NULL (noticed this while looking into a different bug).
|
|
|
|
|
|
BM_log_vert_removed(), only one needed.
|