Commit: e7dea06ba513b0c49cca0305e0935ea3a2b2d272 Author: Antonio Vazquez Date: Thu Nov 30 22:06:53 2017 +0100 Branches: greasepencil-object https://developer.blender.org/rBe7dea06ba513b0c49cca0305e0935ea3a2b2d272
Temp Hack: Fix initialization code for Hero open movie files The initialization code must be moved to next version to manage Hero files. This section of code must be merged to the previous version as described in the comments. =================================================================== M source/blender/blenloader/intern/versioning_280.c =================================================================== diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 0938cd8592a..e5c598d6c91 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -613,6 +613,23 @@ void do_versions_after_linking_280(Main *main) } } } + + /* Grease pencil multiframe falloff curve */ + /* add this line when move to right place: + * if (!DNA_struct_elem_find(fd->filesdna, "GP_BrushEdit_Settings", "CurveMapping", "cur_falloff")) + */ + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { + /* sculpt brushes */ + GP_BrushEdit_Settings *gset = &scene->toolsettings->gp_sculpt; + if (gset) { + gset->cur_falloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); + curvemapping_initialize(gset->cur_falloff); + curvemap_reset(gset->cur_falloff->cm, + &gset->cur_falloff->clipr, + CURVE_PRESET_GAUSS, + CURVEMAP_SLOPE_POSITIVE); + } + } } } @@ -888,22 +905,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) } } - /* Grease pencil multiframe falloff curve */ - if (!DNA_struct_elem_find(fd->filesdna, "GP_BrushEdit_Settings", "CurveMapping", "cur_falloff")) { - for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { - /* sculpt brushes */ - GP_BrushEdit_Settings *gset = &scene->toolsettings->gp_sculpt; - if (gset) { - gset->cur_falloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); - curvemapping_initialize(gset->cur_falloff); - curvemap_reset(gset->cur_falloff->cm, - &gset->cur_falloff->clipr, - CURVE_PRESET_GAUSS, - CURVEMAP_SLOPE_POSITIVE); - } - } - } - if (!DNA_struct_elem_find(fd->filesdna, "bGPDbrush", "float", "curcolor[3]")) { float curcolor[3], curcolor_add[3], curcolor_sub[3]; ARRAY_SET_ITEMS(curcolor, 1.0f, 1.0f, 1.0f); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs