[Bf-blender-cvs] [7f19c4f] master: Fix T49738: Hair Add Brush doesn't work
Sergey Sharybin
noreply at git.blender.org
Mon Oct 17 12:38:57 CEST 2016
Commit: 7f19c4fdf920c47d288a279af64bcf151e021877
Author: Sergey Sharybin
Date: Mon Oct 17 12:37:50 2016 +0200
Branches: master
https://developer.blender.org/rB7f19c4fdf920c47d288a279af64bcf151e021877
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?
===================================================================
M source/blender/blenloader/intern/versioning_270.c
M source/blender/blenloader/intern/versioning_defaults.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 0d4ff00..a2a10f5 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1425,4 +1425,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;
+ }
+ }
+ }
+ }
+ }
}
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index ec817b9..99d9e14 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -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;
}
More information about the Bf-blender-cvs
mailing list