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:
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 50363e3f42a..761424a5879 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -36,6 +36,7 @@
#include "DNA_cloth_types.h"
#include "DNA_collection_types.h"
#include "DNA_constraint_types.h"
+#include "DNA_curveprofile_types.h"
#include "DNA_gpu_types.h"
#include "DNA_light_types.h"
#include "DNA_layer_types.h"
@@ -74,6 +75,7 @@
#include "BKE_node.h"
#include "BKE_paint.h"
#include "BKE_pointcache.h"
+#include "BKE_curveprofile.h"
#include "BKE_report.h"
#include "BKE_rigidbody.h"
#include "BKE_screen.h"
@@ -3932,10 +3934,35 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
{
/* Versioning code until next subversion bump goes here. */
+
for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
sa->flag &= ~AREA_FLAG_UNUSED_6;
}
}
+
+ /* Add custom curve profile to toolsettings for bevel tool */
+ if (!DNA_struct_elem_find(fd->filesdna, "ToolSettings", "CurveProfile", "custom_profile")) {
+ for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
+ ToolSettings *ts = scene->toolsettings;
+ if ((ts) && (ts->custom_bevel_profile_preset == NULL)) {
+ ts->custom_bevel_profile_preset = BKE_curveprofile_add(PROF_PRESET_LINE);
+ }
+ }
+ }
+
+ /* Add custom curve profile to bevel modifier */
+ if (!DNA_struct_elem_find(fd->filesdna, "BevelModifier", "CurveProfile", "custom_profile")) {
+ for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) {
+ for (ModifierData *md = object->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Bevel) {
+ BevelModifierData *bmd = (BevelModifierData *)md;
+ if (!bmd->custom_profile) {
+ bmd->custom_profile = BKE_curveprofile_add(PROF_PRESET_LINE);
+ }
+ }
+ }
+ }
+ }
}
}