Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
When bmesh was in a branch we had both edit_mesh and edit_btmesh,
now there is no reason to use this odd name.
|
|
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.
|
|
|
|
The issue was caused by intermediate DerivedMesh being created with
scene's Simplify settings taken into account. This is what happens
when one area makes implicit decisions based on whether passed Scene
pointer is not NULL.
Made it so ignoring simplification serttings is an explicit flag,
which makes it easier to follow what's going on.
|
|
Needed for clang formatting to workaround bug/limit, see: T53211
|
|
There is no point having operations that iterate over the whole
bit array as macros, so convert BLI_BITMAP_SET_ALL to a function.
Also, add more utilities for copying and manipulating masks.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D4101
|
|
|
|
This is sued by both object joinig and object apply scale operations.
Currently only uniform scale is working correct. Non-uniform gets averaged
and will produce slightly distorted results. This is something we should
fix, but priority of this particular case is not so high.
|
|
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 only works thing around, just so we can unlock production here.
Joining objects of a different scale will not yet work correctly.
Proper fix is coming later (the code needs to be ported to new
Subdiv API).
|
|
Partially revert 41216d5ad4c722e2ad9f15c968af454fc7566d5e
Some of this code had comments to be left as is for readability,
or comment the code should be kept.
Other functions were only for debugging.
|
|
Continuation of https://developer.blender.org/D3802
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3808
|
|
Matches type better, avoiding possible confusion.
|
|
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.
|
|
The main goal of this patch is to cleanup the interface of every modifier. More specifically the interface of modifiers should be DerivedMesh-free.
Internally some modifiers still use DerivedMesh. However I think it is better when the wrappers are in the modifiers so that higher level functions can use the simplified interface.
This patch removes the applyModifier_DM and applyModifierEM_DM functions. In a previous patch (rB3614d9d) the other functions that used DerivedMesh have been removed.
Reviewers: brecht
|
|
|
|
Will speed up (or rather bring speed back to what it is supposed to be)
for brushes like smooth.
|
|
Currently is only working on an "inner" grid boundaries.
Need to implement averaging across face edges.
|
|
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.
|
|
|
|
The issue there was that number of layers did not include normals,
while element size counts bytes used by normals. This sounds very
fragile and dangerous to work further. Also, one value can easily
be delivered from another, so it is redundancy going on here.
Possible difference now is that multires subdivision will copy
normals to a higher levels. Shouldn't be big of a problem, since
leaving old normals and updating coordinates is not correct either.
|
|
The one which is used by applying deformation modifiers on the multires.
|
|
Should use evaluated object to query deformed mesh from.
|
|
It is rather fully annoying to have same sets of obscure flags all over.
|
|
|
|
|
|
Currently behaves same as subsurf, support of displacement is the
next task in the line to tackle!
|
|
Currently no functional changes, just exposes all settings which we need
for OpenSubdiv, similar to what Subsurf modifier is doing already.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3602
|
|
For users it defines how accurate vertex positions are in terms
of limit surface (as in, how close the vertices locations to the
condition when they are calculated for an infinitely subdivided
mesh).
This affects things like:
- Irregular vertices (joint of 3 or more edges)
- Crease
Keep quality value low for performance.
NOTE: Going higher does not necessarily mean real improvement
in quality, ideal case might be reached well before maximum
quality of 10. Quality of 3 is a good starting point.
Internally quality is translated directly to adaptive subdivision
level.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3599
|
|
This replaces old single toggle option to subdivide UVs with
an enum which can have more options. The usecase for this is
to be compatible with other software. But we also might choose
different subdivision type as default in the future.
DNA and underlying code supports all possible options, but
only the ones which are compatible with old subdivision code
are currently exposes.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3575
|
|
|
|
We did not tell proper render/viewport context to subsurf derived mesh
created for multires.
|
|
|
|
|
|
It uses derived mesh, and relies on scene stored in modifier data.
So port is needed anyway.
|
|
|
|
|
|
The function definitions still reside in DerivedMesh.c. Once we're done
porting all the DerivedMesh use to Mesh, we'll move the still-relevant
functions to mesh_runtime.c. This move is now cumbersome due to shared
statically-declared utility functions in DerivedMesh.c
|
|
The contents of the ModifierEvalContext struct are constant while iterating
over the modifier stack. The struct thus should be only created once, outside
any loop over the modifiers.
|
|
Makes the follow changes:
- Add new `deform*` and `apply*` function pointers to `ModifierTypeInfo` that take `Mesh`, and rename the old functions to indicate that they take `DerivedMesh`. These new functions are currently set to `NULL` for all modifiers.
- Add wrapper `modifier_deform*` and `modifier_apply*` functions in two variants: one that works with `Mesh` and the other which works with `DerivedMesh` that is named with `*_DM_depercated`. These functions check which type of data the modifier supports and converts if necessary
- Update the rest of Blender to be aware and make use of these new functions
The goal of these changes is to make it possible to port to using `Mesh` incrementally without ever needing to enter into a state where modifiers don't work. After everything has been ported over the old functions and wrappers could be removed.
Reviewers: campbellbarton, sergey, mont29
Subscribers: sybren
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D3155
|