Age | Commit message (Collapse) | Author |
|
See T64324 for discussion re improving normal editing ui.
As next step, remove the face_strength tool settings because
menu operator now includes that. Move face_strenth enum to
better place.
Remove normals toolbar panel because only thing left
(normal_vector) can stay hidden for copy/paste.
Remove add vector and multiply vector menu entries as
they are useless without ui method for specifying operand,
and they are very low utility operations anyway.
|
|
Update more relevant fields in the sculpt session. Really becoming annoying, but
was also annoying in the old code as well.
|
|
* The cache file datablock is now evaluated as part of the dependency graph,
creating/freeing the Alembic file handle matching the current frame.
Modifiers and constraints depend on this evaluation.
* Cache file handles and readers now only exist on COW datablocks, never the
original ones.
* Object data paths are flushed back to the original for the user interface.
* The cache file keeps a list of all readers associated with its handle, and
automatically frees them when the handle is freed. This kind of sharing of
data across datablocks is weak but we have no better mechanism for it.
Fix T62720: Alembic sequences not working and crashing
Differential Revision: https://developer.blender.org/D4774
|
|
Also remove duplicate comments in headers.
|
|
|
|
When the modifier uses vertex groups, the set of the bones it actually
needs is precisely defined by the set of the group names. If envelopes
are enabled, this refinement is not available, because any bone can
potentially be used.
This can be used in the dependency graph construction to allow objects
deformed by a part of the armature to be used in constraints on other
bones, e.g. for placing cartoon-style face elements on top of the body
mesh via Shrinkwrap constraints.
Since the list of vertex group names is now used as an input by
the dependency graph, adding/removing/renaming groups should now
be triggering a graph rebuild.
Differential Revision: https://developer.blender.org/D4715
|
|
|
|
|
|
|
|
|
|
|
|
Previous cleanups didn't account for space after '#'.
|
|
|
|
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
|
|
Tested to work on Linux and macOS.
This will be enabled once all platforms are verified.
See D4684
|
|
|
|
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.
Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.
See T46725.
|
|
This is something where there is no single correct behavior,
sometimes it's needed to ignore the crease to make mesh more
smooth. But sometimes crease is to be considered after first
subdivision surface: for example, when adding extra subdivisions
for render-time displacement.
Made it an option whether modifier needs to take crease into
account or not.
Existing files should be openable in the 2.7 compatible way,
to re-create an old behavior the options is to be manually
disabled in the modifier settings.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4652
|
|
A regression since 64c8d72ef1ad.
The solution is to force modifier evaluation for an evaluated
object, and let it to copy binding data back to original when
is being evaluated for binding.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4642
|
|
Missing dependency, which made collission to access object transform
prior it was evaluated.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D4636
|
|
Allows to preserve topology cache even when copy-on-write is
fully re-copying the object. For example, toggling edit mode
in and out does no longer causes full topology to be re-created.
|
|
This was wrong and violating design to force modifiers to query
evaluated objects and IDs. It is up to the caller to make sure
the object is properly evaluatable.
Effectively, reverting changes from de491abf9962 (and possibly
other related changes).
|
|
|
|
It should not assume there to be an origindex layer. Checked other modifiers
and they all seem to explicitly create it or verify if it's NULl.
|
|
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.
|
|
This lets you only triangulate n-gons when setting the number to 5 or more.
Differential Revision: https://developer.blender.org/D4367
|
|
target too.
Only create DEG_OB_COMP_GEOMETRY relation to target object when it has
some, and we use it.
|
|
The issue was caused by mesh needed for dynamic paint brush being
stored in the modifier. That make it to be freed and set to NULL
when running copy-on-write.
Solved by moving the mesh to be stored in modifier's runtime data.
|
|
Use prefix now there isn't only the 3d version.
|
|
The general idea of this change is to have a runtime data pointer
in the ModifierData, so it can be preserved through copy-on-write
updates by the dependency graph.
This is where subdivision surface modifier can store its topology
cache, so it is not getting trashed on every copy-on-write which
is happening when moving a vertex.
Similar mechanism should be used by multiresolution, dynamic paint
and some other modifiers which cache evaluated data.
This fixes T61746.
Thing to keep in mind, that there are more reports about slow
subdivision surface in the tracker, but that boils down to the
fact that those have a lot of extraordinary vertices, and hence
a lot slower to evaluated topology.
Other thing is, this speeds up oeprations which doesn't change
topology (i.e. moving vertices).
Reviewers: brecht
Reviewed By: brecht
Maniphest Tasks: T61746
Differential Revision: https://developer.blender.org/D4541
|
|
|
|
Mostly functions wrapping args, not confirming to our style guide.
|
|
Stupid mistake in previous 'fixing' commit, I put the call computing
extra required source cddata masks into the callback used to get
destination (current object) cddata masks...
|
|
Source (i.e. other) mesh should not be modified in any case in modifier
evaluation case (this is forbidden by design and can lead to all kind of
threaded locks and crashes), and doing so even in operator case was
never a good idea either.
Now that we can specifically request needed data (poly and/or loop
normals) from evaluation code, we can finally get rid of those
computations inside data transfer/mesh remapping area.
This is hopefully the last remaining bit of this 'bad crashing code' in
datatransfer area.
|
|
|
|
The SubdivCCG structure was re-allocated, but the cached one in
the sculpt session was still pointing to an original one.
This is rather a workaround, but is least evil from what i can
currently think. Remember something similar was also required in
2.7 as well.
Definitely need to revision this change.
|
|
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
|
|
This was a missing flag.
|
|
Now it will be simpler for code jsut wanting to preserve custom normals
around to set them, without having to add same boiler plate code all the
time around actual code.
|
|
Currently modifier stack assumes there are no poly normals data passed
around, so in case a modifier generates such data, it has to clean it up
after usage.
Whole handling of normals is a bit annoying and week currently, we can
probably enhance that once fully per-mesh item type cddata masks are in?
|
|
Not a bug, but supporting preservation of custom normals in that
specific modifier makes sense, in game pipeline contexts.
Could also ease work of IO add-ons that want to export
triangulated geometry...
|
|
In Blender face is for tesselated faces, that kind of miss-naming is a
pretty good way to shoot yourself in the foot at some point or another
(see T61979)...
|
|
Broken logic in rB181356edba04, thanks most likely to stupid naming
(face in Blender is for tessellated faces, use poly for BMesh polygons).
Cleanup to follow in next commit...
|
|
Removed a clnors field unneeded after a recent refactor.
Finished deprecation of flags that haven't been used since pre-bmesh.
|
|
For some reason forgot to handle half of modifier files...
|
|
BLI should always comes first, before DNA, BKE etc. And
`BLI_utildefines.h` should come before any other BLI (since it's some
sort of system include really, among other things...).
Thisi should help to reduce the noise in patches when adding stuff
like uint64_t members to DNA structs... ;)
|
|
Fixes crash when leaving multires mode.
Fixes T61836: Saving while in multires makes blender crash
|
|
This commit makes it so both Subdivision Surface and Multiresolution
modifiers are caching OpenSubdiv topology. This cuts down evaluation
time quite a bit, especially for meshes which don't have many extra
ordinary verticies.
Only working for animation. Other modifications like edit mode needs
more work to make topology cache preserved by copy-on-write.
|
|
|
|
Resolves a common cause of confusion.
|