Fix T49738: Hair Add Brush doesn't work

the issue was caused by wrong default value for brush particle count
which was clamped on display from 0 to 1. This is technically a regression
but how to port this to 2.78a?
This commit is contained in:
Sergey Sharybin 2016-10-17 12:37:50 +02:00
parent a6220f459b
commit 50751d62e9
2 changed files with 15 additions and 0 deletions

View File

@ -1392,4 +1392,18 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
{
for (Scene *scene = main->scene.first; scene != NULL; scene = scene->id.next) {
if (scene->toolsettings != NULL) {
ToolSettings *ts = scene->toolsettings;
ParticleEditSettings *pset = &ts->particle;
for (int a = 0; a < PE_TOT_BRUSH; a++) {
if (pset->brush[a].count == 0) {
pset->brush[a].count = 10;
}
}
}
}
}
}

View File

@ -147,6 +147,7 @@ void BLO_update_defaults_startup_blend(Main *bmain)
ParticleEditSettings *pset = &ts->particle;
for (int a = 0; a < PE_TOT_BRUSH; a++) {
pset->brush[a].strength = 0.5f;
pset->brush[a].count = 10;
}
pset->brush[PE_BRUSH_CUT].strength = 1.0f;
}