Age | Commit message (Collapse) | Author |
|
When using subsurf (and other modifiers) the edit flags are not
propagated correctly. Currently we assume to read the edit flags
from the original object which is kind off hinding the real issue.
Modifiers use `mesh_new_nomain_from_template_ex` to create a copy
from an existing mesh. this method is only used by modifiers. So
by placing this we will make sure that editmesh is propagated.
Reviewed By: fclem, sergey
Maniphest Tasks: T62449
Differential Revision: https://developer.blender.org/D4666
|
|
evaluations.
BKE_mesh_new_nomain automatically added a CD_ORIGINDEX layer initialized to 0,
which was never filled in correctly. In 2.7 the equivalent function used to
modify the source derivedmesh and add valid original indices to it, but this
is no longer possible in the new design and was quite unpredictable anyway.
Now instead rely on mesh_calc_modifiers and the depsgraph to determine when
CD_ORIGINDEX should be added.
|
|
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.
|
|
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.
|
|
|
|
More or less same code was being executed twice during ID copying.
Makes no sense to add yet another switch-by-ID-type to handle
specificaly runtime data during ID copying, we already have
BKE_xxx_copy_data() functions for that.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
|
|
That way it is obvious when we are using default ID copy behaviour, and
when we are using advanced/specialized ones.
|
|
Turns out most of our 'local working copy' cases can use same set of
flags.
Note that this commit adds LIB_ID_COPY_CACHES to all our local meshes
copying, however this is no-op since that flag is unused during mesh
copying... We may want to add another set of flags without that one at
some point, but for now it would not be useful imho.
|
|
Time to follow conventions for that one as well.
|
|
This was used in *one* place only... much better to have a dedicated
helper for that kind of things. ;)
|
|
Needed for clan-format not to wrap onto one line.
|
|
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.
|
|
Not sure why that was that way (can't remember any good reason at least,
so assuming this is a dummy mistake from own rB33cbcd73448f), this
should be done in any case.
|
|
Needed for context menu checks.
|
|
This is a second attempt to get the crash fixed. The original fix
worked, but it was reverted by d3e0d7f0825.
Now the logic goes as:
- All pointers which we can not have shared (the ones which are
owned by the runtime) are cleared.
- The rest of runtime stays untouched.
This seems to be enough to keep particles happy.
|
|
- Clear deprecated flags for ID's:
Scene, Sequence, World, Object & Mesh.
- Clear deprecated flags for Spaces: outliner, 3D view & image.
- Remove unused `Mesh.drawflag`
- Remove unused `USER_ALLWINCODECS`, `USER_MMB_PASTE`.
- Remove `V3D_SOLID_TEX` & `V3D_ZBUF_SELECT` - used in a few areas.
- Flip `Object.empty_image_visibility_flag`
(avoids do-version on each new flag)
- Rename 'Backside' -> 'Back' in context of drawing - showing 'Back'
makes sense.
|
|
|
|
|
|
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
|
|
Initialize to default values for meshes w/o vertices,
note that zeroing for BKE_object_boundbox_calc_from_mesh
matches old derived mesh code.
|
|
This is for 2.80 (though bug I mistakenly merged into was for 2.78.
Duplicate bugs T58127, T58411, T58440, and T58789 all fixed.
Bevel weights and crease are not real Mesh layers so get lost
on coversion of mesh to bmesh unelss the mesh's cd_flag member
tells the converter to create layers for them.
Most code the copies or partially copies meshes uses
mesh_new_nomain_from_template_ex, so copied the flag there.
|
|
This reverts commit 3a038db576e97c0e720a92af05a218ed71ed121a.
Caused CoW crash switching from edit to sculpt mode.
|
|
to avoid confusion."
This reverts commit e6322abad23a8ae71b72e54befffc17ae35e30d9.
|
|
avoid confusion.
|
|
|
|
modifiers of a mesh.
Go for the simple solution for now (disable auto-texspace in evaluated mesh).
Proper fix would be part of known TODO redesign of bbox handling.
Solution suggested by @sergey, thanks!
|
|
Thinks whole bbox code needs a complete rewrite, one can see a lot of
old history in it, it has way too many functions doing
nearly-the-same-thing(c), it spreads in very inconsistent ways across a
lot of files, ... But have no time for this right now, and would not be
a good idea with Beta comming up close anyway.
So for now going the simple and (hopefully) sane & safe way: forbid
object-level functions to affect data-level bbox. Mesh and curve ones
would generate bbox in obdata instead of object, for some reason (all
other obdata types only use object's bbox ever). That may have been
working in old ages, but with CoW and threaded depsgraph this is just
calling for piles of issues.
|
|
snap to meshes in edit mode.
Before a value for bound box was stored in a local cache.
|
|
Needed for D3966
|
|
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
|
|
Not all three sides of a tesselated mesh triangle are guaranteed
to be original mesh edges, so a somewhat complicated check is
required to detect which ones are real. It seems that until now
there was no utility function for that, only some example code.
|
|
Continuation of https://developer.blender.org/D3802
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3808
|
|
|
|
Show-on-cage and show-in-editmode options now work as it did in 2.7x
(but only for deformation).
|
|
|
|
Copied from CDDM_from_bmesh, the modifier stack doesn't
need to handle shape keys, vertex parents or selection history
(needed for mode switching).
|
|
Use BKE_mesh_* prefix for mesh module.
|
|
|
|
This makes the Edit Mesh display settings common to all objects. They can
also be set differently per viewport.
Modifying extra data (seams, sharp edges etc...) will no longer set them
automaticaly visible.
Bumping version because we need to force set all extra draw options for
older files.
|
|
Differential Revision: https://developer.blender.org/D3718
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
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
|
|
|