Age | Commit message (Collapse) | Author |
|
|
|
Previously the smooth shading of the voxel remesher was controlled by a
mesh property. With this change, the output will try to match the
current shading of the object. This only takes into consideration the
shading mode of the first polygon of the model, but it is probably what
most users expect as it works as intended with the shade smooth/flat
object mode options.
Reviewed By: JulienKaspar, JacquesLucke
Differential Revision: https://developer.blender.org/D11626
|
|
When projecting into screen space Z value isn't always needed.
Add 2D projection functions, renaming them to avoid accidents
happening again.
- Add GPU_matrix_project_2fv
- Add ED_view3d_project_v2
- Rename ED_view3d_project to ED_view3d_project_v3
- Use the 2D versions of these functions when the Z value isn't used.
|
|
|
|
|
|
'Caused'/revealed by rBd29a720c45e5: Operators that fully re-create the
mesh would previously rely on `sculpt_update_object` called from update
code to get required sculpt-specific data layers re-added to the new
mesh.
Now instead put all code adding data to orig mesh for sculpt purpose
into a new util function (`BKE_sculpt_ensure_orig_mesh_data`), and call
that function when entering sculpt mode, and from voxel remesher code.
This is contonuing effort to more clearly separate orig data from evaluated
data handling/usage in sculpt code.
TODO: there are likely other code paths that would need to call that
new function?
Reviewers: @sergey, @pablodp606
Subscribers:
|
|
Use the BMesh symmetrize operator instead of using the modifier code.
While we could support shape-keys with the existing code used by the
mirror modifier, we'd need to add code-paths for evaluated mesh & bmesh
conversion to handle shape-keys differently just for this one case,
since we want to avoid copying & processing shape-keys layers for
evaluated meshes in general.
|
|
As proposed in T74432 and already implemented in several commits,
"region" is the preferred name for `ARegion` variables, rather than
any variant of "ar". This commit changes a few "ar" variables that have
popped up over time and also adjusted names of variants like "arnew".
|
|
The original name was chosen because symmetry was a property of
the Paint struct. Now symmetry is a property of meshes, which
also makes the name of the property easier to understand.
Reviewed By: sergey, dbystedt
Differential Revision: https://developer.blender.org/D9618
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
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
|
|
We now use GPU_blend for enabling / disabling blending and explicitly
set the blend equation.
|
|
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/object` module.
No functional changes.
|
|
Reviewed By: sergey
Maniphest Tasks: T78525
Differential Revision: https://developer.blender.org/D8181
|
|
Prevent operators that should not perform on override data to be
callable in those cases.
|
|
Previously, the text rotation was always calculated in object space, so
the text rotation always had the object rotation applied. Now the
rotation is calculated in world space, so it always aligns correctly to
the view. Same applies to text scale not taking into account the object
position.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8068
|
|
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
|
|
Previously the scale of the text was using object space, so when working
with scaled objects or small meshes the size of the text was wrong. Now
it calculates a scale in screen space, so the text size should be much
more predictable
Reviewed By: sergey, Severin
Differential Revision: https://developer.blender.org/D7941
|
|
The format string was wrong so it was rendering an extra % character
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7942
|
|
Accessed `RegionView3D` data from context, which of course would only be set if
actually executed from a main 3D View region.
|
|
|
|
|
|
|
|
|
|
Add missing sections.
|
|
|
|
This operator lets the user control the voxel/detail size of the voxel remesher directly from the 3D view in a similar way the Brush radius and strength are controlled. The shorcut from sculpt mode is Shift + R (similar to Shift + F for brush strength).
It shows a grid that represents the real voxel size of the object. The grid and the text are automatically aligned to the view to avoid rendering all voxels with thousands of lines.
It also has a slow mode when pressing shift that works like the slow mode of the brush radius control.
This operator controls the value changes sensitivity automatically to avoid jumping to extremelly high resolutions and run out of memory.
This way, adjusments done in lower voxel sizes are more precise. Pressing Ctrl disables this functionality and allows changing the voxel size directly in a linear way.
Reviewed By: jbakker, #user_interface, billreynish
Differential Revision: https://developer.blender.org/D6449
|
|
|
|
deform
The issue was that we were creating temporary mesh copies and storing
them in bmain and then later using BKE_mesh_nomain_to_mesh which would
add them to bmain once more (duplicates).
This would lead to crashes later as the custom data of the mesh could be
trashed quite easily.
|
|
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
|
|
Avoids duplicated comments,
also quiet warning accessing non-existing variable.
|
|
Made an explicit call to the exec function be a blocking call and a call
from invoke (or otherwise) be nonblocking.
Reviewed By: Bastien
Differential Revision: http://developer.blender.org/D7006
|
|
It sometimes caused the solver to get into an seemingly unrecoverable
state and crash. Therefore I will disable this feature for now.
|
|
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
|
|
Missed in recent BKE_remesh renaming.
|
|
The term mirror on it's own is too ambiguous, use BKE_mesh prefix.
|
|
|
|
|
|
|
|
This should fix most of the shrinkwrap artifacts when the preserve volume option is active. After this commit the default voxel remehser settings should not fail in the default cube.
Reviewed By: zeddb
Differential Revision: https://developer.blender.org/D6010
|
|
No need to iterate over all polygons if we just want to iterate over all
face loops anyways.
|
|
Quadriflow does not support non manifold meshes. (Edges with > 3
connected faces and discontinuous face normal directions)
While it does sometimes "work" in these configurations, the results are
not good and in most cases it just flat out will crash.
Added a sanity check to make sure that the input mesh is manifold.
Reviewed By: Brecht
Differential Revision: http://developer.blender.org/D5877
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5964
|
|
Reviewed By: brecht
Maniphest Tasks: T70358
Differential Revision: https://developer.blender.org/D5958
|
|
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
|
|
Reviewed By: brecht
Maniphest Tasks: T70291
Differential Revision: https://developer.blender.org/D5916
|