From 9fe88a8488ad9e209956f047496c838f38562c19 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 12 Jan 2012 17:22:32 +0000 Subject: 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 --- source/blender/blenloader/intern/readfile.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'source/blender/blenloader') 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! */ -- cgit v1.2.3