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.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
* and keep comment above the defines.
|
||||
* Use STRINGIFY() rather than defining with quotes */
|
||||
#define BLENDER_VERSION 280
|
||||
#define BLENDER_SUBVERSION 46
|
||||
#define BLENDER_SUBVERSION 47
|
||||
/* Several breakages with 280, e.g. collections vs layers */
|
||||
#define BLENDER_MINVERSION 280
|
||||
#define BLENDER_MINSUBVERSION 0
|
||||
|
||||
@@ -729,7 +729,7 @@ void BKE_scene_init(Scene *sce)
|
||||
pset->emitterdist = 0.25f;
|
||||
pset->totrekey = 5;
|
||||
pset->totaddkey = 5;
|
||||
pset->brushtype = PE_BRUSH_NONE;
|
||||
pset->brushtype = PE_BRUSH_COMB;
|
||||
pset->draw_step = 2;
|
||||
pset->fade_frames = 2;
|
||||
pset->selectmode = SCE_SELECT_PATH;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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. */
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -622,8 +622,9 @@ static void disconnect_hair(
|
||||
|
||||
psys->flag |= PSYS_GLOBAL_HAIR;
|
||||
|
||||
if (ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_PUFF))
|
||||
pset->brushtype = PE_BRUSH_NONE;
|
||||
if (ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_PUFF)) {
|
||||
pset->brushtype = PE_BRUSH_COMB;
|
||||
}
|
||||
|
||||
PE_update_object(depsgraph, scene, ob, 0);
|
||||
}
|
||||
|
||||
@@ -137,13 +137,13 @@ typedef struct bArmature {
|
||||
typedef enum eArmature_Flag {
|
||||
ARM_RESTPOS = (1<<0),
|
||||
/** XRAY is here only for backwards converting */
|
||||
ARM_DRAWXRAY = (1<<1),
|
||||
ARM_FLAG_DEPRECATED_1 = (1 << 1), /* cleared */
|
||||
ARM_DRAWAXES = (1<<2),
|
||||
ARM_DRAWNAMES = (1<<3),
|
||||
ARM_POSEMODE = (1<<4),
|
||||
ARM_EDITMODE = (1<<5),
|
||||
ARM_FLAG_DEPRECATED_5 = (1<<5), /* cleared */
|
||||
ARM_DELAYDEFORM = (1<<6),
|
||||
ARM_DONT_USE = (1<<7),
|
||||
ARM_FLAG_DEPRECATED_7 = (1 << 7), /* cleared */
|
||||
ARM_MIRROR_EDIT = (1<<8),
|
||||
ARM_AUTO_IK = (1<<9),
|
||||
/** made option negative, for backwards compat */
|
||||
@@ -151,7 +151,7 @@ typedef enum eArmature_Flag {
|
||||
/** draw custom colors */
|
||||
ARM_COL_CUSTOM = (1<<11),
|
||||
/** when ghosting, only show selected bones (this should belong to ghostflag instead) */
|
||||
ARM_GHOST_ONLYSEL = (1<<12), /* XXX deprecated */
|
||||
ARM_FLAG_DEPRECATED_12 = (1 << 12), /* cleared */
|
||||
/** dopesheet channel is expanded */
|
||||
ARM_DS_EXPAND = (1<<13),
|
||||
/** other objects are used for visualizing various states (hack for efficient updates) */
|
||||
|
||||
@@ -356,13 +356,13 @@ typedef enum eBrushGradientSourceFill {
|
||||
/* Brush.flag */
|
||||
typedef enum eBrushFlags {
|
||||
BRUSH_AIRBRUSH = (1 << 0),
|
||||
BRUSH_FLAG_DEPRECATED_1 = (1 << 1),
|
||||
BRUSH_FLAG_DEPRECATED_1 = (1 << 1), /* cleared */
|
||||
BRUSH_ALPHA_PRESSURE = (1 << 2),
|
||||
BRUSH_SIZE_PRESSURE = (1 << 3),
|
||||
BRUSH_JITTER_PRESSURE = (1 << 4),
|
||||
BRUSH_SPACING_PRESSURE = (1 << 5),
|
||||
BRUSH_FLAG_DEPRECATED_2 = (1 << 6),
|
||||
BRUSH_FLAG_DEPRECATED_3 = (1 << 7),
|
||||
BRUSH_FLAG_DEPRECATED_6 = (1 << 6), /* cleared */
|
||||
BRUSH_FLAG_DEPRECATED_7 = (1 << 7), /* cleared */
|
||||
BRUSH_ANCHORED = (1 << 8),
|
||||
BRUSH_DIR_IN = (1 << 9),
|
||||
BRUSH_SPACE = (1 << 10),
|
||||
@@ -372,7 +372,7 @@ typedef enum eBrushFlags {
|
||||
BRUSH_LOCK_ALPHA = (1 << 14),
|
||||
BRUSH_ORIGINAL_NORMAL = (1 << 15),
|
||||
BRUSH_OFFSET_PRESSURE = (1 << 16),
|
||||
BRUSH_FLAG_DEPRECATED_4 = (1 << 17),
|
||||
BRUSH_FLAG_DEPRECATED_17 = (1 << 17), /* cleared */
|
||||
BRUSH_SPACE_ATTEN = (1 << 18),
|
||||
BRUSH_ADAPTIVE_SPACE = (1 << 19),
|
||||
BRUSH_LOCK_SIZE = (1 << 20),
|
||||
|
||||
@@ -428,12 +428,11 @@ enum {
|
||||
OB_SPEAKER = 12,
|
||||
OB_LIGHTPROBE = 13,
|
||||
|
||||
/* OB_WAVE = 21, */
|
||||
OB_LATTICE = 22,
|
||||
|
||||
/* 23 and 24 are for life and sector (old file compat.) */
|
||||
OB_ARMATURE = 25,
|
||||
/* Grease Pencil object used in 3D view but not used for annotation in 2D */
|
||||
|
||||
/** Grease Pencil object used in 3D view but not used for annotation in 2D. */
|
||||
OB_GPENCIL = 26,
|
||||
|
||||
OB_TYPE_MAX,
|
||||
@@ -464,35 +463,29 @@ enum {
|
||||
enum {
|
||||
PARTYPE = (1 << 4) - 1,
|
||||
PAROBJECT = 0,
|
||||
#ifdef DNA_DEPRECATED
|
||||
PARCURVE = 1, /* Deprecated. */
|
||||
#endif
|
||||
PARKEY = 2, /* XXX Unused, deprecated? */
|
||||
|
||||
PARSKEL = 4,
|
||||
PARVERT1 = 5,
|
||||
PARVERT3 = 6,
|
||||
PARBONE = 7,
|
||||
|
||||
PAR_DEPRECATED = 16,
|
||||
};
|
||||
|
||||
/* (short) transflag */
|
||||
enum {
|
||||
OB_TRANSFLAG_DEPRECATED_0 = 1 << 0,
|
||||
OB_TRANSFLAG_DEPRECATED_1 = 1 << 1,
|
||||
OB_TRANSFLAG_DEPRECATED_0 = 1 << 0, /* cleared */
|
||||
OB_TRANSFLAG_DEPRECATED_1 = 1 << 1, /* cleared */
|
||||
OB_NEG_SCALE = 1 << 2,
|
||||
OB_TRANSFLAG_DEPRECATED_3 = 1 << 3,
|
||||
OB_TRANSFLAG_DEPRECATED_3 = 1 << 3, /* cleared */
|
||||
OB_DUPLIVERTS = 1 << 4,
|
||||
OB_DUPLIROT = 1 << 5,
|
||||
OB_TRANSFLAG_DEPRECATED_4 = 1 << 6,
|
||||
OB_TRANSFLAG_DEPRECATED_6 = 1 << 6, /* cleared */
|
||||
/* runtime, calculate derivedmesh for dupli before it's used */
|
||||
OB_DUPLICALCDERIVED = 1 << 7,
|
||||
OB_DUPLICOLLECTION = 1 << 8,
|
||||
OB_DUPLIFACES = 1 << 9,
|
||||
OB_DUPLIFACES_SCALE = 1 << 10,
|
||||
OB_DUPLIPARTS = 1 << 11,
|
||||
OB_TRANSLFAG_DEPRECATED_2 = 1 << 12,
|
||||
OB_TRANSFLAG_DEPRECATED_12 = 1 << 12, /* cleared */
|
||||
/* runtime constraints disable */
|
||||
OB_NO_CONSTRAINTS = 1 << 13,
|
||||
/* hack to work around particle issue */
|
||||
@@ -623,7 +616,8 @@ enum {
|
||||
|
||||
/* ob->nlaflag */
|
||||
enum {
|
||||
/* WARNING: flags (1 << 0) and (1 << 1) were from old animsys */
|
||||
OB_ADS_DEPRECATED_1 = 1 << 0, /* cleared */
|
||||
OB_ADS_DEPRECATED_2 = 1 << 1, /* cleared */
|
||||
/* object-channel expanded status */
|
||||
OB_ADS_COLLAPSED = 1 << 10,
|
||||
/* object's ipo-block */
|
||||
|
||||
@@ -63,8 +63,6 @@ typedef struct Text {
|
||||
#define TXT_ISMEM (1 << 2)
|
||||
#define TXT_ISEXT (1 << 3)
|
||||
#define TXT_ISSCRIPT (1 << 4) /* used by space handler scriptlinks */
|
||||
// #define TXT_READONLY (1 << 8)
|
||||
// #define TXT_FOLLOW (1 << 9) /* always follow cursor (console) */
|
||||
#define TXT_TABSTOSPACES (1 << 10) /* use space instead of tabs */
|
||||
|
||||
#endif /* __DNA_TEXT_TYPES_H__ */
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
#include "bmesh.h"
|
||||
|
||||
const EnumPropertyItem rna_enum_particle_edit_hair_brush_items[] = {
|
||||
{PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"},
|
||||
{PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs"},
|
||||
{PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs"},
|
||||
{PE_BRUSH_ADD, "ADD", 0, "Add", "Add hairs"},
|
||||
@@ -136,7 +135,6 @@ static void rna_GPencil_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UN
|
||||
}
|
||||
|
||||
const EnumPropertyItem rna_enum_particle_edit_disconnected_hair_brush_items[] = {
|
||||
{PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"},
|
||||
{PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs"},
|
||||
{PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs"},
|
||||
{PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make hairs longer or shorter"},
|
||||
@@ -146,7 +144,6 @@ const EnumPropertyItem rna_enum_particle_edit_disconnected_hair_brush_items[] =
|
||||
};
|
||||
|
||||
static const EnumPropertyItem particle_edit_cache_brush_items[] = {
|
||||
{PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"},
|
||||
{PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb paths"},
|
||||
{PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth paths"},
|
||||
{PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make paths longer or shorter"},
|
||||
@@ -158,8 +155,7 @@ static PointerRNA rna_ParticleEdit_brush_get(PointerRNA *ptr)
|
||||
ParticleEditSettings *pset = (ParticleEditSettings *)ptr->data;
|
||||
ParticleBrushData *brush = NULL;
|
||||
|
||||
if (pset->brushtype != PE_BRUSH_NONE)
|
||||
brush = &pset->brush[pset->brushtype];
|
||||
brush = &pset->brush[pset->brushtype];
|
||||
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_ParticleBrush, brush);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user