Cleanup: remove redundant id lookups in versioning code
This commit is contained in:
@@ -486,54 +486,28 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
|
||||
Brush *brush;
|
||||
|
||||
/* Pencil brush. */
|
||||
brush = BLI_findstring(&bmain->brushes, "Draw Pencil", offsetof(ID, name) + 2);
|
||||
if (brush) {
|
||||
/* Change brush name. */
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Pencil", "Pencil");
|
||||
}
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Pencil", "Pencil");
|
||||
|
||||
/* Pen brush. */
|
||||
brush = BLI_findstring(&bmain->brushes, "Draw Pen", offsetof(ID, name) + 2);
|
||||
if (brush) {
|
||||
/* Change brush name. */
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Pen", "Pen");
|
||||
}
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Pen", "Pen");
|
||||
|
||||
/* Pen Soft brush. */
|
||||
brush = BLI_findstring(&bmain->brushes, "Draw Soft", offsetof(ID, name) + 2);
|
||||
brush = (Brush *)rename_id_for_versioning(bmain, ID_BR, "Draw Soft", "Pencil Soft");
|
||||
if (brush) {
|
||||
brush->gpencil_settings->icon_id = GP_BRUSH_ICON_PEN;
|
||||
/* Change brush name. */
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Soft", "Pencil Soft");
|
||||
}
|
||||
|
||||
/* Ink Pen brush. */
|
||||
brush = BLI_findstring(&bmain->brushes, "Draw Ink", offsetof(ID, name) + 2);
|
||||
if (brush) {
|
||||
/* Change brush name. */
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Ink", "Ink Pen");
|
||||
}
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Ink", "Ink Pen");
|
||||
|
||||
/* Ink Pen Rough brush. */
|
||||
brush = BLI_findstring(&bmain->brushes, "Draw Noise", offsetof(ID, name) + 2);
|
||||
if (brush) {
|
||||
/* Change brush name. */
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Noise", "Ink Pen Rough");
|
||||
}
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Noise", "Ink Pen Rough");
|
||||
|
||||
/* Marker Bold brush. */
|
||||
brush = BLI_findstring(&bmain->brushes, "Draw Marker", offsetof(ID, name) + 2);
|
||||
if (brush) {
|
||||
/* Change brush name. */
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Marker", "Marker Bold");
|
||||
}
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Marker", "Marker Bold");
|
||||
|
||||
/* Marker Chisel brush. */
|
||||
brush = BLI_findstring(&bmain->brushes, "Draw Block", offsetof(ID, name) + 2);
|
||||
if (brush) {
|
||||
/* Change brush name. */
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Block", "Marker Chisel");
|
||||
}
|
||||
rename_id_for_versioning(bmain, ID_BR, "Draw Block", "Marker Chisel");
|
||||
|
||||
/* Remove useless Fill Area.001 brush. */
|
||||
brush = BLI_findstring(&bmain->brushes, "Fill Area.001", offsetof(ID, name) + 2);
|
||||
|
||||
Reference in New Issue
Block a user