Age | Commit message (Collapse) | Author |
|
|
|
This adds XYZ symmetry as a property of meshes and updates all modes to
use the mesh symmetry by default to have a consistent tool behavior
between all modes and when switching objects.
Reviewed By: brecht, mano-wii, campbellbarton
Maniphest Tasks: T79785
Differential Revision: https://developer.blender.org/D8587
|
|
This puts all generic float/int/vector/color/string geometry attributes in a new
.attributes property. For meshes it provides a more general API for existing
attributes, for point clouds attributes will be used as an essential part of
particle nodes.
This patch was implemented by @lichtwerk, with further changes by me. It's
still a work in progress, but posting here to show what is going on and for
early feedback.
Ref T76659
Differential Revision: https://developer.blender.org/D8200
|
|
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
|
|
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time.
This commit includes:
- SCULPT_UNDO_COLOR for undo support in sculpt mode
- SCULPT_UPDATE_COLOR and PBVH flags and rendering
- Sculpt Color API functions
- Sculpt capability for sculpt tools (only enabled in the Paint Brush for now)
- Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint)
- Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint)
- Remesher reprojection in the Voxel Remehser
- Paint Brush and Smear Brush with color smoothing in alt-smooth mode
- Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors
- Color Filter
- Color picker (uses S shortcut, replaces smooth)
- Color selector in the top bar
Reviewed By: brecht
Maniphest Tasks: T72866
Differential Revision: https://developer.blender.org/D5975
|
|
This patch changes the BVHCache implementation. It will use
a primitive array in stead of the ListBase. The locking is also
changed from a global lock to a per cache instance lock.
The performance of `gabby.blend` available on the cloud increased from 9.7
fps to 10.5 fps.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D7817
|
|
This resolves a performance regression in 2.8x where every edit-mode
update performed an edit-mesh to mesh conversion.
Now the conversion will be lazily initialized if/when it's required.
New BKE_mesh_wrapper_* functions abstract over mesh data access.
Currently only edit-mesh and regular meshes are supported.
In the future sub-surface meshes may be supported too.
|
|
|
|
|
|
|
|
|
|
This introduces a variable to store a face set ID which is going to be
rendered white. When initializing a mesh or randomizing the colors, this
variable gets updated to always render a white face set. This way the
face set overlay can be enabled without adding colors to the mesh if
face sets are not in use. After creating the first face set, new colors
are generated randomly like usual.
The face set stored as default does not have any special meaning for
tools or brushes, it just affects the rendering color.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D7035
|
|
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces.
This initial commit includes:
- Sculpt Face Sets data structures and PBVH rendering.
- Face Set overlay and opacity controls.
- Sculpt Undo support.
- Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing.
- Automasking and Mesh filter support.
- Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding).
- Sculpt Mode Face Sets and Visibility API.
- Sculpt Face Sets creation and visibility management operators.
- Operator to randomize the Face Sets colors.
- Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke.
- Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide).
- Pie menu on the W key with Face common Sets operations.
Know limitations:
- Multires support. The Face Sets and Visibility API needs to be implemented for Multires.
Reviewed By: jbakker, #user_interface, Severin
Differential Revision: https://developer.blender.org/D6070
|
|
Also remove dead code which checked for SPACE_TIME.
|
|
C++ is used more and more, and it is becoming more and more annoying to
keep track of whether header have C++ guard or not.
Is easier and more clear to be consistent in all headers and have such
guards in all headers.
|
|
This commit enables OpenVDB adaptivity in the voxel remesher. It can be useful to reduce the polygon count if you want to switch to dyntopo after using the voxel remesher workflow.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5918
|
|
This commit fixes most of the issues we currently have in the voxel remesher. Mesh volume is preserved when doing multiple iterations, so the sculpt won't shrink and smooth each time you run the remesher. Mesh topology is much better, fixing most issues related to mask extraction and other topology based operations.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D5863
|
|
|
|
These were only strictly valid for texture space calculation, don't store them
since they should not be used after that. Only store a flag to indicate if the
auto texture space has been evaluated.
In the future it might make sense to store bounding boxes at the mesh level to
speed up bounding box computation for multiple objects using the same mesh, but
then it will need to be implemented differently.
|
|
|
|
|
|
|
|
The voxel remesher introduces a new workflow for sculpting without any of the limitations of Dyntopo (no geometry errors or performance penalty when blocking shapes). It is also useful for simulations and 3D printing.
This commit includes:
- Voxel remesh operator, voxel size mesh property and general remesh flags.
- Paint mask reprojection.
- Geometry undo/redo for sculpt mode. This should support remesh operations as well as future tools that modify the topology of the sculpt in a single step, like trimming tools or mesh insert brushes.
- UI changes in the sculpt topbar and the mesh properties pannel.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5407
|
|
The idea is to share a mesh data-block as a result across all objects
which are sharing same original mesh and have no effective modifiers.
This mesh is owned by an original copy-on-written version of object data.
Tricky part is to make sure it is only initialized once, and currently a
silly mutex lock is used. In practice it only locks if the mesh is not
already there.
As an extra bonus, even viewport memory is also lower after this change.
Reviewers: brecht, mont29
Reviewed By: brecht, mont29
Differential Revision: https://developer.blender.org/D4954
|
|
This is legacy option from fixed-function graphics hardware, where per-vertex
lighting meant this had a significant performance impact.
|
|
|
|
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
|
|
Some alignment rules from Visual Studion on 32 bit are not taken into
account, this fixes the structs to confirm. We now have static asserts
to catch when such breakage happens in the future.
|
|
While the flags have been deprecated they're currently unused.
Rename for clarity.
|
|
Avoids mixing these in with regular variables in code-completion.
Use char for pad members except for 'void *', to make size clearer.
Removed/shrink a few redundant padding vars which were >= 8 bytes.
|
|
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.
|
|
Prevents clang-format wrapping text before comments.
|
|
Needed for clang-format in some cases, see: T53211
|
|
- 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.
|
|
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
|
|
Show-on-cage and show-in-editmode options now work as it did in 2.7x
(but only for deformation).
|
|
Apparently, part of code got lost last minute prior to push.
|
|
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.
|
|
Matches type better, avoiding possible confusion.
|
|
Attempts to substitude CCGDM with an OpenSubdiv based structure
which has less abstraction levels. The missing part in this
substitude is a face pointers which old CCGDM/multires code was
using to stitch faces (averaging boundaries).
Another curial bit missing: "reshaping" of multires CD_MDISPS
to the state of new PBVH grids.
The new code is only available when OpenSubdiv modifier is
enabled (WITH_OPENSUBDIV_MODIFIER=ON) and with debug value of
128. This is so this WIP code is not interfering with current
production machines in the studio.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3685
|
|
This matches 2.7x behavior
|
|
|
|
This was used for saving files for Blender 2.6x.
|
|
|
|
|