Settings for existing brushes are applied correctly, but this is not working with the new tools because they are not in the default blendfile.
Details
Details
- Reviewers
Jeroen Bakker (jbakker) Brecht Van Lommel (brecht) - Maniphest Tasks
- T68745: Sculpt mode defaults
- Commits
- rBa0d4c2e607fc: Sculpt: Brush default settings
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
Personally we should wrap BLI_findstring(&bmain->brushes, "Pose", offsetof(ID, name) + 2) into a macro/function so the code will be more clear, but that is not related to this patch.
Comment Actions
My reading of the description is that this patch is not working for new tools, and some further work is needed?
In brush_generic_tool_set, a brush will automatically be created when the tool is first activated. Probably some function can be added that initializes sculpt brushes to the right defaults, that is used in both places?
Comment Actions
- Add default cursor colors
- Create the brushes if they don't exist
Now the defaults for the new tools work fine when loading factory settings.
| source/blender/blenloader/intern/versioning_defaults.c | ||
|---|---|---|
| 478 | Is it possible to only add brushes here, and then initialize all the other defaults by doing this, and extending BKE_brush_sculpt_reset as needed? for (Brush *brush = bmain->brushes.first; brush; brush = brush->id.next) {
if (brush->sculpt_tool) {
BKE_brush_sculpt_reset(brush);
}
} | |