Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-01-12 21:22:32 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-01-12 21:22:32 +0400
commit9fe88a8488ad9e209956f047496c838f38562c19 (patch)
treea26ef83231a995364e8382fd5e56665fe38c8e5c /source/blender/blenloader
parentb20a56b2caa25b06c33e0aa85f17b0b5a9145b5e (diff)
Move unified paint fields from ToolSettings into their own UnifiedPaintSettings struct.
File subversion is bumped to two in order to copy over the old fields. This removes two RNA properties, sculpt_paint_use_unified_size and sculpt_paint_use_unified_strength. Code review link: http://codereview.appspot.com/5529077
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a1d583624cd..1c9cbc6b1ee 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -12940,7 +12940,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- /* put compatibility code here until next subversion bump */
+ if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 2))
{
{
/* convert Camera Actuator values to defines */
@@ -12959,6 +12959,24 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
+
+ {
+ /* convert deprecated sculpt_paint_unified_* fields to
+ UnifiedPaintSettings */
+ Scene *scene;
+ for(scene= main->scene.first; scene; scene= scene->id.next) {
+ ToolSettings *ts= scene->toolsettings;
+ UnifiedPaintSettings *ups= &ts->unified_paint_settings;
+ ups->size= ts->sculpt_paint_unified_size;
+ ups->unprojected_radius= ts->sculpt_paint_unified_unprojected_radius;
+ ups->alpha= ts->sculpt_paint_unified_alpha;
+ ups->flag= ts->sculpt_paint_settings;
+ }
+ }
+ }
+
+ /* put compatibility code here until next subversion bump */
+ {
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */