* Volume preservation had wrong bounds in
elastic deform brush leading to wrong
behavior.
* Fixed unprojected_radius channel not
being shown in header when scene radius
unit is on.
* Draw face sets now only fully rebuild draw buffers
in indexed draw modes that require it.
in weighted smooth
* Cached face areas are now updated
in a double buffered fashion;
all threads read from one side of
the buffer while the other is written
to by the threads that own a given
face; the buffers are swapped on
each iteration of a tool that uses
face areas.
* Fixes smooth flickering.
* This was actually kind of annoying; the
vertex->face-area-list code is in pbvh and
relies on edge ordering
around verts, but that order is non-trivial for
PBVH_FACES (relying as it does on a vertex->poly
map). This ordering was calculated entirely in
editors/sculpt_paint/sculpt.c, not callable from
pbvh.
* The solution was to add a helper function to pbvh
for building vertex->edge lists from vertex->poly
maps. This is then used by both sculpt.c and the
vertex->face-area-list code.
* Also improved boundary bevel smooth a bit. I'm
thinking of extracting it from SCULPT_neighbor_coords_average_interior
into its own function and possibly its own brush.
* Paint now has a brush_eval field which
is used in leu of ->brush if non-null.
* This lets us get rid of all the annoying:
`brush = ss->cache ? ss->cache->brush : BKE_paint_brush`
code. Now it's just BKE_paint_brush.
* Used by SCULPT_run_command.
* Also fixed nasty scene spacing bug.
* Fixed PBVH_FACES vcol draw bug.
* Fixed boundary smooth being turned on
if its temp customdata layer exists.
* Fixed unnesting of brush panels from
last commit improperly showing up
in the workspace tab for sculpt
instead of the brush tab.
related fixes
Various fixes so sculpt_init_tool_override_channels
for shift-smooth can replicate the prior behavior:
* Brush spacing will now look up brush channel
spacing directly for sculpt, instead of relying
on copying the channel data into Brush.
* Brush spacing code will now use brush channel
pressure for sculpt. Fixes broken shift-smooth
pen pressure.
* The falloff_curve channel is now automatically
added (before it was only used internally by
command lists, the code was defaulting to
the Brush field otherwise).
* BrushCurve now has an option for custom curve
presets to have negative slopes.
* The Falloff panel now puts the type dropbox
inside the panel header.
* Falloff panel also now uses brush channel data in
sculpt mode.
* falloff_shape is now a brush channel
In a somewhat unrelated change, I also unnested the
Brush Settings subpanels. It's been driving me
insane for a very, very long time. Much more
usable this way.
* Fixed bug where BRUSH_MAPPING_INHERIT was
being or'd to BrushMapping->flag instead
of assigned to ->inherit_mode.
* Fixed smooth_strength_factor
and smooth_strength_projection.
* Also added yet more asan poisoning to mempool
* Added a function to build final inherited brush
channel, BKE_brush_channel_copy_final_data. Takes
BrushMapping->inherit_mode into account.
* PBVH drawing for eevee is now used for
PBVH_FACES as well as PBVH_BMESH.
* PBVH_FACES now uses pbvh draw for eevee rendering
* Refactored gpu_pbvh_gpu_make_vcol_offs into a
more general gpu_pbvh_gpu_make_attr_offs.
This should be a usable alternative to using a generic
attribute gpu system (whether the one that's #ifdef'd out
in gpu_buffers.c, or the new one that hit master
recently).
* Textured workbench draw mode now works for pbvh drawing.
* Fixed nasty stack overflow in dyntopo edge collapse.
* Mask by color now works for dyntopo.
* Attribute and vertex color lists in the UI
now hide temporary CD layers.
* Added a specific op for removing vertex color
attributes.
* Fixed various bugs.
It simply wasn't maintainable to store active/render
vertex color layer as integer indices into the
global attribute list. Making that work would've
required a great deal of boilerplate that would
have to be inserted in lots of places. There
is simply no justification for doing that.
Instead, I've coded an AttributeRef struct that
simply stores a (type, name, domain) triplet to
uniquely reference an attribute layer.
This will be submitted as a patch for master
too.
* Brush input mappings now have three
inheritance mode: "always", "never" and
"channel" (use channel's inheritance mode).
* Note that the UI exposes a single inherit icon,
which just toggles between "always" and
"never," to lessen user confusion.
* Brush mappings default to "never" inheritance
mode.
* Fixed wrong node update flag in bke_pbvh_insert_face_finalize
leading to disappearing parts of the mesh.
Allow the use of floating-point values for font point sizes, which
allows greater precision and flexibility for text output.
See D8960 for more information, details, and justification.
Differential Revision: https://developer.blender.org/D8960
Reviewed by Campbell Barton
* PBVH_BMESH construction is now partially
threaded.
* Fixed n**2 behavior in freelist-based
bmesh id implementation. I'd really
rather get range-tree faster, but
this works as a stopgap.
* Removed a bunch of debug ATTR_NO_OPTs.
Suppressing the splash was only done when passing in an argument from
the command line.
Remove G.file_loaded, as it is misleading, only set once on startup,
replace with G.relbase_valid which is used everywhere else to check
if the file path should be used.
Previously both `.` and `_` were used as separators when finding
a unique name for a socket. This removes the use of `.`, since `_`
was more common. It also does versioning for all of a file's node
trees to make sure that they all use the `_` convention.
Differential Revision: https://developer.blender.org/D13181
Blender 3.0 will only support single-frame Actions in the pose library.
The goal of this patch is to lay the groundwork for making it possible
for the Asset Browser to reject/hide "animation snippet" Action assets.
Determining whether an Action has one or more frames (i.e. whether it
has a single pose or animation) requires inspecting the Action itself,
and thus loading the data-block itself. This would make it impossible to
quickly determine from the asset browser.
To solve this, the Action is inspected before saving, and a
`"is_single_frame"` boolean (well, 0/1 integer) IDProperty is added.
Reviewed by: Severin
Differential Revision: https://developer.blender.org/D13202
* Rename the 'copy' functions to make it clear they belong to the same
'group' and are to be used together.
* Fix `flag` parameter of `BKE_copybuffer_paste` being a short instead
of an int.
* Improve documentation.
The mirror modifiers merge option caused unnecessary re-ordering
to the vertex array with original vertices merging into their copies.
While this wasn't an error, it meant creating a 1:1 mapping from input
vertices to their final output wasn't reliable (when looping over
vertices first to last) as is done in
BKE_editmesh_vert_coords_when_deformed.
As merging in either direction is supported, keep the source meshes
vertices in-order since it allows the vertex coordinates to be extracted.
When Constructing bezier splines from dna, the positions of the
left/right handles were set directly in the internal vectors, by
requesting a reference to them. The problem is that
BezierSpline::handle_positions_left() calls ensure_auto_handles()
before returning the reference. That function does some calculations on
uninitialized memory if the positions array is not yet filled.
Differential Revision: https://developer.blender.org/D13107