* Brush editor tab now defaults to old
interface, with two options:
- Advanced, which shows more options
- Edit Mode, which shows workspace visibility buttons
* Hard edge mode (which forcibly sets face set slide to 0
and enables preserve faceset boundarys) now works again.
* Smooth_strength_factor is now a brush channel with
inheritance set to true.
* Alt-smooth now restores the hard edge mode and
smooth_strength_factor from the active brush context.
While both are default inherited from toolsetting defaults,
it can be quite confusing if either have inheritance unset
by the user in the Smooth brush.
* Fixed a particularly nasty memory leak
where the entire process of entering sculpt
mode was being done twice.
* Discovered that range tree is extremely slow.
Got the alternative freelist version up and running,
and replace a usage of GSet with a bitmap. However
the new code is disabled pending further testing.
Literally an order of magnutude improvement.
* Cleaned up the SculptCustomLayer API that is
used for custom data.
* Various SculptCustomLayer references are now maintained
in ss->custom_layers and are updated automatically when
the CD layout changes.
* PBVH_GRIDS now forcibly allocate custom layers in simple_array
mode (i.e. they don't allocated real customdata layers at all).
* SculptCustomLayers can optionally be preserved in the final mesh.
* Fixed handling of CD_TEMPORARY which was broken.
* The layer brush can now split the pbvh during use.
* Persistent base data is now saved as permanent CD layers (except
for PBVH_GRIDS). This is necessary for undo, if we want we can
add special code to remove them on exising sculpt mode.
* The layer brush now uses the SculptCustomLayer API instead of
having seperate bmesh and faces/grids implementations.
* In unrelated changes, fixed curve presets for clay brushes.
- Still need to implement stabilized input mappings, which the
clay thumb brush needs.
* BrushChannelSet is now a pure collection. This
eliminated the annoying brush.channels.channels
paths, and also makes library overriding work.
* Now sure I've done this correctly. Struct extended
collection properties are a bit confusing.
* Move more dyntopo settings to brush channels
* Implemented the unprojected radius hack in
the new brush system. I'm not really happy
with it, but doing it properly is going to
take some thought.
* Added a new curve brush channel type
* Added a BKE_brush_curve_strength_ex method
that just takes preset and curve as arguments,
instead of pulling them from Brush.
* Autosmooth and topology rake now have their
own falloff curves.
* Moved brush settings (in sculpt mode) to
(for now) a new properties editor tab.
* Brush settings can now be individually configured
to show up in the workspace buttons.
* Brush settings can also be reordered.
* The new brush tab has a "preview" subpanel
to preview the workspace settings layout.
This is where settings are reordered.
* Sculpt now has an API to get brush channel settings.
If a sculpt cache exists it will use the channels there
(ss->cache->channels_final), otherwise it pulls them
from a brush and Sculpt toolsettings. Exampes:
float f = SCULPT_get_float(ss, "setting", sd, brush);
itn i = SCULPT_get_int(ss, "setting", sd, brush);
* Improved the UI a bit
* The input device curves for brush channels
now use a copy on write mechanism.
+ It's based on a global cache of curves.
The alternative is to reference count
BrushChannels, which I also implemented
then abandoned.
+ Profiling showed that copying CurveMapping
instances was actually a problem.
* Lots of small fixes to the old<-> new brush setting
conversion code;
* Brush commands can now, sortof, have individual
spacing. The default brush spacing still acts
as a minimum though.
* Added a BLI_ghash_lookup_p_ex method that
returns the key ptr inside the ghash (it
returns the actual key, not a pointer to
Entry.key).
* Added a general 1d CurveMapping preset operator
that uses an RNA path to get the curve.
BrushChannels are now stored in linked lists
instead of simple arrays. This helps to
avoid memory corruption.
I had originally wanted to be able to pass
BrushChannels by value, but that doesn't really
work since they heap allocd data (the input
mapping curves).