Age | Commit message (Collapse) | Author |
|
Show control edges stores the control edges in the mesh which is
picked up by the draw manager. When applyng a subsurf (or multires) we
don't want that data present in the base mesh. Any rebuilding of the mesh
would overwrite the data anyway.
This patch introduces a new flag for applying modifiers
that can be checked to ignore storing display specific data in
the base mesh.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D7163
|
|
|
|
The initial code from earlier from today didn't really work reliable
since it is not possible to apply virtual modifiers but not the real
multires one (in a situation like mesh with shapekeys and multires).
New code uses less memory and has better performance for the case
when there are actual modifiers leading the multires. The case when
there is only multires will not be as performant as possible at this
moment.
|
|
The new function will use original object as a starting point
and apply all enabled deformation modifiers prior to the multires.
|
|
Use full argument name.
Also order arguments in the generosity order: from depsgraph
(which has everything) to object (which contains multires)
specific multires modifier.
|
|
Scene can be queried from the dependency graph.
|
|
Was happening when object does not have CD_MDISPS allocated yet.
Need to make sure totdisp and level is specified on CD_MDISPS data
prior to loading (as the load expects them to be properly set).
|
|
This change fixes artifacts produced by these operations.
On a technical aspect this is done by porting all of the operations
to the new subdivision surface implementation which ensures that
tangent space used to evaluate modifier and those operations is
exactly the same (before modifier will use new code and the operations
will still use an old one).
The next step is to get sculpting on a non-top level to work, and
that actually requires fixes in the undo system.
|
|
|
|
|
|
This is a workaround for T58473 to avoid likely event of ruining
sculpted data.
Differential Revision: https://developer.blender.org/D6244
|
|
Make a distinction between flush sculpt changes for rendering, and forcing
sculpt data structures to be rebuilt after mesh changes. Also don't use PBVH
for renders.
|
|
|
|
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
|
|
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
|
|
The idea is to run reshaping for every boundary vertex
of a grid rather than trying to copy boundary grid
elements.
While this is somewhat slower, this avoids all this
tangent flipping magic, which tempts to be rather tricky
and fragile.
|
|
Without this clang-format may wrap them onto a single line.
|
|
Causes clang-format not to detect header guards,
indenting all preprocessor lines in the header.
|
|
|
|
First of all, follow our naming convention to use module prefix.
Second of all, mesh is being created and is to be freed, we also
have convention for such function names.
|
|
|
|
This is the only thing which needs to be done to perform propoer
reshape. Makes it easier to re-use code from other places.
|
|
There is nothing we need from object in this case.
|
|
Added propagation of displacement to a higher levels.
Has the same limitation as reshape from object, which makes
grids somewhat choppy due to linear interpolation nature.
This is to be addressed next.
|
|
Allows to go to sculpt mode, do brush strokes, get out of sculpt mode
and have deformation preserved.
The issues currently is that the current implementation of CCG
storage is created from the limit surface, without displacement
taken into account. It is trivial to get displaced coordinates,
but it is more tricky to get displaced normals. This is something
to be solved next.
Another limitation is that this only works for sculpting at a maximal
multires level. There is code to be done to support propagation
of displacement onto a higher levels.
|
|
There are so many reshapes now, and one more is to come.
Better be explicit.
|
|
|
|
|
|
|
|
The one which is used by applying deformation modifiers on the multires.
|
|
|
|
|
|
Currently behaves same as subsurf, support of displacement is the
next task in the line to tackle!
|
|
|
|
It uses derived mesh, and relies on scene stored in modifier data.
So port is needed anyway.
|
|
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
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
|
|
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
|
|
- Read-only access can often use EvaluationContext.object_mode
- Write access to go to WorkSpace.object_mode.
- Some TODO's remain (marked as "TODO/OBMODE")
- Add-ons will need updating
(context.active_object.mode -> context.workspace.object_mode)
- There will be small/medium issues that still need resolving
this does work on a basic level though.
See D3037
|
|
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.
|
|
Notes:
* Code in rendering and in game engine will still convert
tangents to a tessface representation. Added code that
takes care of tangent layer only, might be removed
when BGE and rendering goes full mlooptri mode.
* Baking should work discovered some dead code while
I was working on the patch, also tangents are broken
when baking from multires (also in master), but those
are separate issues that can be fixed later.
This should fix T45491 as well
|
|
modifier.
Since it was not ensuring dest has valid mdisp data matching new multires modifier subdiv level...
Also, fixed a bug in `multires_subdivide()`, which would crash when trying to
increase from level 0 (aka no subdiv) to > 1 (wrong check, trying to interpolate
when it should not). And added a few sanity checks.
|
|
|
|
Reshape and applying scale matrix on multires needs to create DM with simplify
setting disabled. Added a special flag to modifier apply for this now.
|
|
|