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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-06 16:07:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-06 16:10:04 +0300
commit92094c76a949fb9ad9f85ea09aa1f518b402a916 (patch)
tree25ceb40034df4564c6c54f2ac30ebcb6329ce648 /source/blender/blenloader/intern
parentebcea3029d8ffa893431620947caf7e16e6fb8e9 (diff)
DNA: remove none particle brush & deprecated flags
The none brush doesn't make sense to have anymore with the tool system. Also remove deprecated flags & types for object, armature & text.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/versioning_250.c1
-rw-r--r--source/blender/blenloader/intern/versioning_270.c4
-rw-r--r--source/blender/blenloader/intern/versioning_280.c48
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c2
4 files changed, 52 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index 4e64b8d0925..ab518646565 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -1545,6 +1545,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
if (ob->parent) {
Object *parent = (Object *)blo_do_versions_newlibadr(fd, lib, ob->parent);
if (parent) { /* parent may not be in group */
+ enum { PARCURVE = 1 };
if (parent->type == OB_ARMATURE && ob->partype == PARSKEL) {
ArmatureModifierData *amd;
bArmature *arm = (bArmature *)blo_do_versions_newlibadr(fd, lib, parent->data);
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index e5d3b9d473e..ab32a6d60a1 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1709,8 +1709,8 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
for (Brush *br = bmain->brush.first; br; br = br->id.next) {
br->falloff_angle = DEG2RADF(80);
br->flag &= ~(
- BRUSH_FLAG_DEPRECATED_1 | BRUSH_FLAG_DEPRECATED_2 |
- BRUSH_FLAG_DEPRECATED_3 | BRUSH_FLAG_DEPRECATED_4 |
+ BRUSH_FLAG_DEPRECATED_1 | BRUSH_FLAG_DEPRECATED_6 |
+ BRUSH_FLAG_DEPRECATED_7 | BRUSH_FLAG_DEPRECATED_17 |
BRUSH_FRONTFACE_FALLOFF);
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 1179149bf90..d00554e7cd4 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -53,6 +53,7 @@
#include "DNA_key_types.h"
#include "DNA_curve_types.h"
#include "DNA_armature_types.h"
+#include "DNA_text_types.h"
#include "BKE_action.h"
#include "BKE_cloth.h"
@@ -2825,6 +2826,53 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 280, 47)) {
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scene) {
+ ParticleEditSettings *pset = &scene->toolsettings->particle;
+ if (pset->brushtype < 0) {
+ pset->brushtype = PE_BRUSH_COMB;
+ }
+ }
+
+ LISTBASE_FOREACH (Object *, ob, &bmain->object) {
+ {
+ enum { PARCURVE = 1, PARKEY = 2, PAR_DEPRECATED = 16};
+ if (ELEM(ob->partype, PARCURVE, PARKEY, PAR_DEPRECATED)) {
+ ob->partype = PAROBJECT;
+ }
+ }
+
+ {
+ enum { OB_WAVE = 21, OB_LIFE = 23, OB_SECTOR = 24};
+ if (ELEM(ob->type, OB_WAVE, OB_LIFE, OB_SECTOR)) {
+ ob->type = OB_EMPTY;
+ }
+ }
+
+ ob->transflag &= ~(
+ OB_TRANSFLAG_DEPRECATED_0 |
+ OB_TRANSFLAG_DEPRECATED_1 |
+ OB_TRANSFLAG_DEPRECATED_3 |
+ OB_TRANSFLAG_DEPRECATED_6 |
+ OB_TRANSFLAG_DEPRECATED_12);
+
+ ob->nlaflag &= ~(OB_ADS_DEPRECATED_1 | OB_ADS_DEPRECATED_2);
+ }
+
+ LISTBASE_FOREACH (bArmature *, arm, &bmain->armature) {
+ arm->flag &= ~(
+ ARM_FLAG_DEPRECATED_1 |
+ ARM_FLAG_DEPRECATED_5 |
+ ARM_FLAG_DEPRECATED_7 |
+ ARM_FLAG_DEPRECATED_12);
+ }
+
+ LISTBASE_FOREACH (Text *, text, &bmain->text) {
+ enum { TXT_READONLY = 1 << 8, TXT_FOLLOW = 1 << 9};
+ text->flags &= ~(TXT_READONLY | TXT_FOLLOW);
+ }
+ }
+
{
/* Versioning code until next subversion bump goes here. */
}
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 6bebb332c96..9f26ddf4ffd 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -1305,6 +1305,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
/* new generic xray option */
arm = blo_do_versions_newlibadr(fd, lib, ob->data);
+ enum { ARM_DRAWXRAY = (1 << 1) };
if (arm->flag & ARM_DRAWXRAY) {
ob->dtx |= OB_DRAWXRAY;
}
@@ -2319,7 +2320,6 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
pset->emitterdist = 0.25f;
pset->totrekey = 5;
pset->totaddkey = 5;
- pset->brushtype = PE_BRUSH_NONE;
for (a = 0; a < ARRAY_SIZE(pset->brush); a++) {
pset->brush[a].strength = 50;