Cleanup: replace defines with enum in DNA

- Group ambiguous flags Object::flag & Base::legacy_flag.
- Replace ambiguous hints (e.g. `paf->flag` with doxygen types).
- Remove unused flag PAF_MAXMULT.
This commit is contained in:
Campbell Barton
2023-06-26 12:09:49 +10:00
parent 863d93fe46
commit 0222876a34
30 changed files with 1891 additions and 1441 deletions
@@ -401,7 +401,8 @@ void OVERLAY_image_empty_cache_populate(OVERLAY_Data *vedata, Object *ob)
}
/* Use the actual depth if we are doing depth tests to determine the distance to the object */
char depth_mode = DRW_state_is_depth() ? OB_EMPTY_IMAGE_DEPTH_DEFAULT : ob->empty_image_depth;
char depth_mode = DRW_state_is_depth() ? char(OB_EMPTY_IMAGE_DEPTH_DEFAULT) :
ob->empty_image_depth;
DRWPass *pass = nullptr;
if ((ob->dtx & OB_DRAW_IN_FRONT) != 0) {
/* Object In Front overrides image empty depth mode. */
@@ -1768,7 +1768,7 @@ static int vieworbit_exec(bContext *C, wmOperator *op)
/* support for switching to the opposite view (even when in locked views) */
view_opposite = (fabsf(angle) == float(M_PI)) ? ED_view3d_axis_view_opposite(rv3d->view) :
RV3D_VIEW_USER;
char(RV3D_VIEW_USER);
orbitdir = RNA_enum_get(op->ptr, "type");
if ((RV3D_LOCK_FLAGS(rv3d) & RV3D_LOCK_ROTATION) && (view_opposite == RV3D_VIEW_USER)) {
+20 -12
View File
@@ -45,17 +45,21 @@ typedef enum eBoidRuleType {
} eBoidRuleType;
/* boidrule->flag */
#define BOIDRULE_CURRENT (1 << 0)
#define BOIDRULE_IN_AIR (1 << 2)
#define BOIDRULE_ON_LAND (1 << 3)
enum {
BOIDRULE_CURRENT = 1 << 0,
BOIDRULE_IN_AIR = 1 << 2,
BOIDRULE_ON_LAND = 1 << 3,
};
typedef struct BoidRule {
struct BoidRule *next, *prev;
int type, flag;
char name[32];
} BoidRule;
#define BRULE_GOAL_AVOID_PREDICT (1 << 0)
#define BRULE_GOAL_AVOID_ARRIVE (1 << 1)
#define BRULE_GOAL_AVOID_SIGNAL (1 << 2)
enum {
BRULE_GOAL_AVOID_PREDICT = 1 << 0,
BRULE_GOAL_AVOID_ARRIVE = 1 << 1,
BRULE_GOAL_AVOID_SIGNAL = 1 << 2,
};
typedef struct BoidRuleGoalAvoid {
BoidRule rule;
struct Object *ob;
@@ -65,8 +69,10 @@ typedef struct BoidRuleGoalAvoid {
/* signals */
int signal_id, channels;
} BoidRuleGoalAvoid;
#define BRULE_ACOLL_WITH_BOIDS (1 << 0)
#define BRULE_ACOLL_WITH_DEFLECTORS (1 << 1)
enum {
BRULE_ACOLL_WITH_BOIDS = 1 << 0,
BRULE_ACOLL_WITH_DEFLECTORS = 1 << 1,
};
typedef struct BoidRuleAvoidCollision {
BoidRule rule;
int options;
@@ -200,10 +206,12 @@ typedef struct BoidSettings {
struct ListBase states;
} BoidSettings;
/* boidsettings->options */
#define BOID_ALLOW_FLIGHT (1 << 0)
#define BOID_ALLOW_LAND (1 << 1)
#define BOID_ALLOW_CLIMB (1 << 2)
/** #BoidSettings::options */
enum {
BOID_ALLOW_FLIGHT = 1 << 0,
BOID_ALLOW_LAND = 1 << 1,
BOID_ALLOW_CLIMB = 1 << 2,
};
/* boidrule->options */
//#define BOID_RULE_FOLLOW_LINE (1 << 0) /* follow leader */
+4 -4
View File
@@ -30,7 +30,7 @@ struct Material;
struct Object;
struct VFont;
/* These two Lines with # tell makesdna this struct can be excluded. */
/* These two Lines with # tell `makesdna` this struct can be excluded. */
#
#
typedef struct BevPoint {
@@ -42,7 +42,7 @@ typedef struct BevPoint {
short dupe_tag;
} BevPoint;
/* These two Lines with # tell makesdna this struct can be excluded. */
/* These two Lines with # tell `makesdna` this struct can be excluded. */
#
#
typedef struct BevList {
@@ -170,7 +170,7 @@ typedef struct TextBox {
float x, y, w, h;
} TextBox;
/* These two Lines with # tell makesdna this struct can be excluded. */
/* These two Lines with # tell `makesdna` this struct can be excluded. */
#
#
typedef struct EditNurb {
@@ -611,7 +611,7 @@ enum {
#define KEY_CU_EASE 3
/* indicates point has been seen during surface duplication */
#define SURF_SEEN 4
#define SURF_SEEN (1 << 2)
#ifdef __cplusplus
}
+1 -1
View File
@@ -10,7 +10,7 @@
#pragma once
/* makesdna ignores */
/* `makesdna` ignores. */
#ifdef DNA_DEPRECATED_ALLOW
/* allow use of deprecated items */
# define DNA_DEPRECATED
+45 -32
View File
@@ -18,43 +18,56 @@ extern "C" {
#define PAF_MAXMULT 4
/* paf->flag (keep bit 0 free for compatibility). */
#define PAF_BSPLINE 2
#define PAF_STATIC 4
#define PAF_FACE 8
#define PAF_ANIMATED 16
/* show particles before they're emitted. */
#define PAF_UNBORN 32
/* Emit only from faces. */
#define PAF_OFACE 64
/* show emitter (don't hide actual mesh). */
#define PAF_SHOWE 128
/* true random emit from faces (not just ordered jitter). */
#define PAF_TRAND 256
/* even distribution in face emission based on face areas. */
#define PAF_EDISTR 512
/* Show particles after they've died. */
#define PAF_DIED 2048
/** #PartEff::flag. */
enum {
// PAF_UNUSED_0 = 1 << 0, /* DEPRECATED, dirty. */
PAF_BSPLINE = 1 << 1,
PAF_STATIC = 1 << 2,
PAF_FACE = 1 << 3,
PAF_ANIMATED = 1 << 4,
/** Show particles before they're emitted. */
PAF_UNBORN = 1 << 5,
/** Emit only from faces. */
PAF_OFACE = 1 << 6,
/** show emitter (don't hide actual mesh). */
PAF_SHOWE = 1 << 7,
/** True random emit from faces (not just ordered jitter). */
PAF_TRAND = 1 << 8,
/** even distribution in face emission based on face areas. */
PAF_EDISTR = 1 << 9,
/** Show particles after they've died. */
PAF_DIED = 1 << 11,
};
/* `paf->flag2` for pos/neg `paf->flag2neg`. */
#define PAF_TEXTIME 1 /* Texture timing. */
/** #PartEff::flag2, for pos/neg #PartEff::flag2neg. */
enum {
PAF_TEXTIME = 1, /* Texture timing. */
};
/* eff->type */
#define EFF_BUILD 0
#define EFF_PARTICLE 1
#define EFF_WAVE 2
/** #PartEff::type. */
enum {
EFF_BUILD = 0,
EFF_PARTICLE = 1,
EFF_WAVE = 2,
};
/* eff->flag */
#define EFF_SELECT 1
/** #PartEff::flag. */
enum {
EFF_SELECT = 1,
};
/* paf->stype */
#define PAF_NORMAL 0
#define PAF_VECT 1
/** #PartEff::stype. */
enum {
PAF_NORMAL = 0,
PAF_VECT = 1,
};
/* paf->texmap */
#define PAF_TEXINT 0
#define PAF_TEXRGB 1
#define PAF_TEXGRAD 2
/** #PartEff::texmap. */
enum {
PAF_TEXINT = 0,
PAF_TEXRGB = 1,
PAF_TEXGRAD = 2,
};
typedef struct Effect {
struct Effect *next, *prev;
+1 -1
View File
@@ -20,7 +20,7 @@ extern "C" {
/**
* DNAstr contains the prebuilt SDNA structure defining the layouts of the types
* used by this version of Blender. It is defined in a file dna.c, which is
* generated by the makesdna program during the build process (see makesdna.c).
* generated by the `makesdna` program during the build process (see `makesdna.c`).
*/
extern const unsigned char DNAstr[];
/** Length of DNAstr. */
+9 -7
View File
@@ -104,13 +104,15 @@ typedef struct ImageTile {
char label[64];
} ImageTile;
/* iuser->flag */
#define IMA_ANIM_ALWAYS (1 << 0)
/* #define IMA_UNUSED_1 (1 << 1) */
/* #define IMA_UNUSED_2 (1 << 2) */
#define IMA_NEED_FRAME_RECALC (1 << 3)
#define IMA_SHOW_STEREO (1 << 4)
/* #define IMA_UNUSED_5 (1 << 5) */
/** #ImageUser::flag */
enum {
IMA_ANIM_ALWAYS = 1 << 0,
// IMA_UNUSED_1 = 1 << 1,
// IMA_UNUSED_2 = 1 << 2,
IMA_NEED_FRAME_RECALC = 1 << 3,
IMA_SHOW_STEREO = 1 << 4,
// IMA_UNUSED_5 = 1 << 5,
};
/* Used to get the correct gpu texture from an Image datablock. */
typedef enum eGPUTextureTarget {
+6 -4
View File
@@ -73,11 +73,13 @@ typedef struct Lattice {
/* ***************** LATTICE ********************* */
/* flag */
#define LT_GRID 1
#define LT_OUTSIDE 2
/** #Lattice::flag */
enum {
LT_GRID = 1 << 0,
LT_OUTSIDE = 1 << 1,
#define LT_DS_EXPAND 4
LT_DS_EXPAND = 1 << 2,
};
#define LT_ACTBP_NONE -1
+63 -50
View File
@@ -88,60 +88,73 @@ typedef struct Light {
/* **************** LIGHT ********************* */
/* flag */
#define LA_DS_EXPAND (1 << 0)
/* NOTE: this must have the same value as MA_DS_SHOW_TEXS,
* otherwise anim-editors will not read correctly
*/
#define LA_DS_SHOW_TEXS (1 << 2)
/** #Light::flag */
enum {
LA_DS_EXPAND = 1 << 0,
/**
* NOTE: this must have the same value as #MA_DS_SHOW_TEXS,
* otherwise anim-editors will not read correctly.
*/
LA_DS_SHOW_TEXS = 1 << 2,
};
/* type */
#define LA_LOCAL 0
#define LA_SUN 1
#define LA_SPOT 2
/* #define LA_HEMI 3 */ /* not used anymore */
#define LA_AREA 4
/** #Light::type */
enum {
LA_LOCAL = 0,
LA_SUN = 1,
LA_SPOT = 2,
// LA_HEMI = 3, /* Deprecated. */
LA_AREA = 4,
};
/* mode */
#define LA_SHADOW (1 << 0)
/* #define LA_HALO (1 << 1) */ /* not used anymore */
/* #define LA_LAYER (1 << 2) */ /* not used anymore */
/* #define LA_QUAD (1 << 3) */ /* not used anymore */
/* #define LA_NEG (1 << 4) */ /* not used anymore */
/* #define LA_ONLYSHADOW(1 << 5) */ /* not used anymore */
/* #define LA_SPHERE (1 << 6) */ /* not used anymore */
#define LA_SQUARE (1 << 7)
/* #define LA_TEXTURE (1 << 8) */ /* not used anymore */
/* #define LA_OSATEX (1 << 9) */ /* not used anymore */
/* #define LA_DEEP_SHADOW (1 << 10) */ /* not used anywhere */
/* #define LA_NO_DIFF (1 << 11) */ /* not used anywhere */
/* #define LA_NO_SPEC (1 << 12) */ /* not used anywhere */
/* #define LA_SHAD_RAY (1 << 13) */ /* not used anywhere - cleaned */
/* YAFRAY: light shadow-buffer flag, soft-light. */
/* Since it is used with LOCAL light, can't use LA_SHAD */
/* #define LA_YF_SOFT (1 << 14) */ /* not used anymore */
/* #define LA_LAYER_SHADOW (1 << 15) */ /* not used anymore */
/* #define LA_SHAD_TEX (1 << 16) */ /* not used anymore */
#define LA_SHOW_CONE (1 << 17)
/* #define LA_SHOW_SHADOW_BOX (1 << 18) */
#define LA_SHAD_CONTACT (1 << 19)
#define LA_CUSTOM_ATTENUATION (1 << 20)
/** #Light::mode */
enum {
LA_SHADOW = 1 << 0,
// LA_HALO = 1 << 1, /* Deprecated. .*/
// LA_LAYER = 1 << 2, /* Deprecated. */
// LA_QUAD = 1 << 3, /* Deprecated. */
// LA_NEG = 1 << 4, /* Deprecated. */
// LA_ONLYSHADOW = 1 << 5, /* Deprecated. */
// LA_SPHERE = 1 << 6, /* Deprecated. */
LA_SQUARE = 1 << 7,
// LA_TEXTURE = 1 << 8, /* Deprecated. */
// LA_OSATEX = 1 << 9, /* Deprecated. */
// LA_DEEP_SHADOW = 1 << 10, /* Deprecated. */
// LA_NO_DIFF = 1 << 11, /* Deprecated. */
// LA_NO_SPEC = 1 << 12, /* Deprecated. */
LA_SHAD_RAY = 1 << 13, /* Deprecated, cleaned. */
/**
* YAFRAY: light shadow-buffer flag, soft-light.
* Since it is used with LOCAL light, can't use LA_SHAD.
* */
// LA_YF_SOFT = 1 << 14, /* Deprecated. */
// LA_LAYER_SHADOW = 1 << 15, /* Deprecated. */
// LA_SHAD_TEX = 1 << 16, /* Deprecated. */
LA_SHOW_CONE = 1 << 17,
// LA_SHOW_SHADOW_BOX = 1 << 18,
LA_SHAD_CONTACT = 1 << 19,
LA_CUSTOM_ATTENUATION = 1 << 20,
};
/* falloff_type */
#define LA_FALLOFF_CONSTANT 0
#define LA_FALLOFF_INVLINEAR 1
#define LA_FALLOFF_INVSQUARE 2
#define LA_FALLOFF_CURVE 3
#define LA_FALLOFF_SLIDERS 4
#define LA_FALLOFF_INVCOEFFICIENTS 5
/** #Light::falloff_type */
enum {
LA_FALLOFF_CONSTANT = 0,
LA_FALLOFF_INVLINEAR = 1,
LA_FALLOFF_INVSQUARE = 2,
LA_FALLOFF_CURVE = 3,
LA_FALLOFF_SLIDERS = 4,
LA_FALLOFF_INVCOEFFICIENTS = 5,
};
/* area shape */
#define LA_AREA_SQUARE 0
#define LA_AREA_RECT 1
/* #define LA_AREA_CUBE 2 */ /* UNUSED */
/* #define LA_AREA_BOX 3 */ /* UNUSED */
#define LA_AREA_DISK 4
#define LA_AREA_ELLIPSE 5
/** #Light::area_shape */
enum {
LA_AREA_SQUARE = 0,
LA_AREA_RECT = 1,
// LA_AREA_CUBE = 2, /* Deprecated. */
// LA_AREA_BOX = 3, /* Deprecated. */
LA_AREA_DISK = 4,
LA_AREA_ELLIPSE = 5,
};
#ifdef __cplusplus
}
+154 -119
View File
@@ -42,55 +42,67 @@ typedef struct LineStyleModifier {
int blend;
} LineStyleModifier;
/* LineStyleModifier::type */
#define LS_MODIFIER_ALONG_STROKE 1
#define LS_MODIFIER_DISTANCE_FROM_CAMERA 2
#define LS_MODIFIER_DISTANCE_FROM_OBJECT 3
#define LS_MODIFIER_MATERIAL 4
#define LS_MODIFIER_SAMPLING 5
#define LS_MODIFIER_BEZIER_CURVE 6
#define LS_MODIFIER_SINUS_DISPLACEMENT 7
#define LS_MODIFIER_SPATIAL_NOISE 8
#define LS_MODIFIER_PERLIN_NOISE_1D 9
#define LS_MODIFIER_PERLIN_NOISE_2D 10
#define LS_MODIFIER_BACKBONE_STRETCHER 11
#define LS_MODIFIER_TIP_REMOVER 12
#define LS_MODIFIER_CALLIGRAPHY 13
#define LS_MODIFIER_POLYGONIZATION 14
#define LS_MODIFIER_GUIDING_LINES 15
#define LS_MODIFIER_BLUEPRINT 16
#define LS_MODIFIER_2D_OFFSET 17
#define LS_MODIFIER_2D_TRANSFORM 18
#define LS_MODIFIER_TANGENT 19
#define LS_MODIFIER_NOISE 20
#define LS_MODIFIER_CREASE_ANGLE 21
#define LS_MODIFIER_SIMPLIFICATION 22
#define LS_MODIFIER_CURVATURE_3D 23
#define LS_MODIFIER_NUM 24
/** #LineStyleModifier::type */
enum {
LS_MODIFIER_ALONG_STROKE = 1,
LS_MODIFIER_DISTANCE_FROM_CAMERA = 2,
LS_MODIFIER_DISTANCE_FROM_OBJECT = 3,
LS_MODIFIER_MATERIAL = 4,
LS_MODIFIER_SAMPLING = 5,
LS_MODIFIER_BEZIER_CURVE = 6,
LS_MODIFIER_SINUS_DISPLACEMENT = 7,
LS_MODIFIER_SPATIAL_NOISE = 8,
LS_MODIFIER_PERLIN_NOISE_1D = 9,
LS_MODIFIER_PERLIN_NOISE_2D = 10,
LS_MODIFIER_BACKBONE_STRETCHER = 11,
LS_MODIFIER_TIP_REMOVER = 12,
LS_MODIFIER_CALLIGRAPHY = 13,
LS_MODIFIER_POLYGONIZATION = 14,
LS_MODIFIER_GUIDING_LINES = 15,
LS_MODIFIER_BLUEPRINT = 16,
LS_MODIFIER_2D_OFFSET = 17,
LS_MODIFIER_2D_TRANSFORM = 18,
LS_MODIFIER_TANGENT = 19,
LS_MODIFIER_NOISE = 20,
LS_MODIFIER_CREASE_ANGLE = 21,
LS_MODIFIER_SIMPLIFICATION = 22,
LS_MODIFIER_CURVATURE_3D = 23,
LS_MODIFIER_NUM = 24,
};
/* LineStyleModifier::flags */
#define LS_MODIFIER_ENABLED 1
#define LS_MODIFIER_EXPANDED 2
/** #LineStyleModifier::flags */
enum {
LS_MODIFIER_ENABLED = 1,
LS_MODIFIER_EXPANDED = 2,
};
/* flags (for color) */
#define LS_MODIFIER_USE_RAMP 1
/** Flags (for color) */
enum {
LS_MODIFIER_USE_RAMP = 1,
};
/* flags (for alpha & thickness) */
#define LS_MODIFIER_USE_CURVE 1
#define LS_MODIFIER_INVERT 2
/** Flags (for alpha & thickness) */
enum {
LS_MODIFIER_USE_CURVE = 1,
LS_MODIFIER_INVERT = 2,
};
/* flags (for asymmetric thickness application) */
#define LS_THICKNESS_ASYMMETRIC 1
/** Flags (for asymmetric thickness application). */
enum {
LS_THICKNESS_ASYMMETRIC = 1,
};
/* blend (for alpha & thickness) */
#define LS_VALUE_BLEND 0
#define LS_VALUE_ADD 1
#define LS_VALUE_MULT 2
#define LS_VALUE_SUB 3
#define LS_VALUE_DIV 4
#define LS_VALUE_DIFF 5
#define LS_VALUE_MIN 6
#define LS_VALUE_MAX 7
/** Blend (for alpha & thickness). */
enum {
LS_VALUE_BLEND = 0,
LS_VALUE_ADD = 1,
LS_VALUE_MULT = 2,
LS_VALUE_SUB = 3,
LS_VALUE_DIV = 4,
LS_VALUE_DIFF = 5,
LS_VALUE_MIN = 6,
LS_VALUE_MAX = 7,
};
/* Along Stroke modifiers */
@@ -331,21 +343,23 @@ typedef struct LineStyleThicknessModifier_Tangent {
/* Material modifiers */
/* mat_attr */
#define LS_MODIFIER_MATERIAL_DIFF 1
#define LS_MODIFIER_MATERIAL_DIFF_R 2
#define LS_MODIFIER_MATERIAL_DIFF_G 3
#define LS_MODIFIER_MATERIAL_DIFF_B 4
#define LS_MODIFIER_MATERIAL_SPEC 5
#define LS_MODIFIER_MATERIAL_SPEC_R 6
#define LS_MODIFIER_MATERIAL_SPEC_G 7
#define LS_MODIFIER_MATERIAL_SPEC_B 8
#define LS_MODIFIER_MATERIAL_SPEC_HARD 9
#define LS_MODIFIER_MATERIAL_ALPHA 10
#define LS_MODIFIER_MATERIAL_LINE 11
#define LS_MODIFIER_MATERIAL_LINE_R 12
#define LS_MODIFIER_MATERIAL_LINE_G 13
#define LS_MODIFIER_MATERIAL_LINE_B 14
#define LS_MODIFIER_MATERIAL_LINE_A 15
enum {
LS_MODIFIER_MATERIAL_DIFF = 1,
LS_MODIFIER_MATERIAL_DIFF_R = 2,
LS_MODIFIER_MATERIAL_DIFF_G = 3,
LS_MODIFIER_MATERIAL_DIFF_B = 4,
LS_MODIFIER_MATERIAL_SPEC = 5,
LS_MODIFIER_MATERIAL_SPEC_R = 6,
LS_MODIFIER_MATERIAL_SPEC_G = 7,
LS_MODIFIER_MATERIAL_SPEC_B = 8,
LS_MODIFIER_MATERIAL_SPEC_HARD = 9,
LS_MODIFIER_MATERIAL_ALPHA = 10,
LS_MODIFIER_MATERIAL_LINE = 11,
LS_MODIFIER_MATERIAL_LINE_R = 12,
LS_MODIFIER_MATERIAL_LINE_G = 13,
LS_MODIFIER_MATERIAL_LINE_B = 14,
LS_MODIFIER_MATERIAL_LINE_A = 15,
};
typedef struct LineStyleColorModifier_Material {
DNA_DEFINE_CXX_METHODS(LineStyleColorModifier_Material)
@@ -407,9 +421,11 @@ typedef struct LineStyleGeometryModifier_SinusDisplacement {
char _pad[4];
} LineStyleGeometryModifier_SinusDisplacement;
/* LineStyleGeometryModifier_SpatialNoise::flags */
#define LS_MODIFIER_SPATIAL_NOISE_SMOOTH 1
#define LS_MODIFIER_SPATIAL_NOISE_PURERANDOM 2
/** #LineStyleGeometryModifier_SpatialNoise::flags */
enum {
LS_MODIFIER_SPATIAL_NOISE_SMOOTH = 1,
LS_MODIFIER_SPATIAL_NOISE_PURERANDOM = 2,
};
typedef struct LineStyleGeometryModifier_SpatialNoise {
DNA_DEFINE_CXX_METHODS(LineStyleGeometryModifier_SpatialNoise)
@@ -483,10 +499,12 @@ typedef struct LineStyleGeometryModifier_GuidingLines {
char _pad[4];
} LineStyleGeometryModifier_GuidingLines;
/* LineStyleGeometryModifier_BluePrintLines::shape */
#define LS_MODIFIER_BLUEPRINT_CIRCLES 1
#define LS_MODIFIER_BLUEPRINT_ELLIPSES 2
#define LS_MODIFIER_BLUEPRINT_SQUARES 4
/** #LineStyleGeometryModifier_BluePrintLines::shape */
enum {
LS_MODIFIER_BLUEPRINT_CIRCLES = 1,
LS_MODIFIER_BLUEPRINT_ELLIPSES = 2,
LS_MODIFIER_BLUEPRINT_SQUARES = 4,
};
typedef struct LineStyleGeometryModifier_Blueprint {
DNA_DEFINE_CXX_METHODS(LineStyleGeometryModifier_Blueprint)
@@ -510,12 +528,14 @@ typedef struct LineStyleGeometryModifier_2DOffset {
float x, y;
} LineStyleGeometryModifier_2DOffset;
/* LineStyleGeometryModifier_2DTransform::pivot */
#define LS_MODIFIER_2D_TRANSFORM_PIVOT_CENTER 1
#define LS_MODIFIER_2D_TRANSFORM_PIVOT_START 2
#define LS_MODIFIER_2D_TRANSFORM_PIVOT_END 3
#define LS_MODIFIER_2D_TRANSFORM_PIVOT_PARAM 4
#define LS_MODIFIER_2D_TRANSFORM_PIVOT_ABSOLUTE 5
/** #LineStyleGeometryModifier_2DTransform::pivot */
enum {
LS_MODIFIER_2D_TRANSFORM_PIVOT_CENTER = 1,
LS_MODIFIER_2D_TRANSFORM_PIVOT_START = 2,
LS_MODIFIER_2D_TRANSFORM_PIVOT_END = 3,
LS_MODIFIER_2D_TRANSFORM_PIVOT_PARAM = 4,
LS_MODIFIER_2D_TRANSFORM_PIVOT_ABSOLUTE = 5,
};
typedef struct LineStyleGeometryModifier_2DTransform {
DNA_DEFINE_CXX_METHODS(LineStyleGeometryModifier_2DTransform)
@@ -553,59 +573,74 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
char _pad[4];
} LineStyleThicknessModifier_Calligraphy;
/* FreestyleLineStyle::panel */
#define LS_PANEL_STROKES 1
#define LS_PANEL_COLOR 2
#define LS_PANEL_ALPHA 3
#define LS_PANEL_THICKNESS 4
#define LS_PANEL_GEOMETRY 5
#define LS_PANEL_TEXTURE 6
#define LS_PANEL_MISC 7
/** #FreestyleLineStyle::panel */
enum {
LS_PANEL_STROKES = 1,
LS_PANEL_COLOR = 2,
LS_PANEL_ALPHA = 3,
LS_PANEL_THICKNESS = 4,
LS_PANEL_GEOMETRY = 5,
LS_PANEL_TEXTURE = 6,
LS_PANEL_MISC = 7,
};
/* FreestyleLineStyle::flag */
#define LS_DS_EXPAND (1 << 0) /* for animation editors */
#define LS_SAME_OBJECT (1 << 1)
#define LS_DASHED_LINE (1 << 2)
#define LS_MATERIAL_BOUNDARY (1 << 3)
#define LS_MIN_2D_LENGTH (1 << 4)
#define LS_MAX_2D_LENGTH (1 << 5)
#define LS_NO_CHAINING (1 << 6)
#define LS_MIN_2D_ANGLE (1 << 7)
#define LS_MAX_2D_ANGLE (1 << 8)
#define LS_SPLIT_LENGTH (1 << 9)
#define LS_SPLIT_PATTERN (1 << 10)
#define LS_NO_SORTING (1 << 11)
#define LS_REVERSE_ORDER (1 << 12) /* for sorting */
#define LS_TEXTURE (1 << 13)
#define LS_CHAIN_COUNT (1 << 14)
/** #FreestyleLineStyle::flag */
enum {
LS_DS_EXPAND = 1 << 0, /* for animation editors */
LS_SAME_OBJECT = 1 << 1,
LS_DASHED_LINE = 1 << 2,
LS_MATERIAL_BOUNDARY = 1 << 3,
LS_MIN_2D_LENGTH = 1 << 4,
LS_MAX_2D_LENGTH = 1 << 5,
LS_NO_CHAINING = 1 << 6,
LS_MIN_2D_ANGLE = 1 << 7,
LS_MAX_2D_ANGLE = 1 << 8,
LS_SPLIT_LENGTH = 1 << 9,
LS_SPLIT_PATTERN = 1 << 10,
LS_NO_SORTING = 1 << 11,
LS_REVERSE_ORDER = 1 << 12, /* for sorting */
LS_TEXTURE = 1 << 13,
LS_CHAIN_COUNT = 1 << 14,
};
/* FreestyleLineStyle::chaining */
#define LS_CHAINING_PLAIN 1
#define LS_CHAINING_SKETCHY 2
/** #FreestyleLineStyle::chaining */
enum {
LS_CHAINING_PLAIN = 1,
LS_CHAINING_SKETCHY = 2,
};
/* FreestyleLineStyle::caps */
#define LS_CAPS_BUTT 1
#define LS_CAPS_ROUND 2
#define LS_CAPS_SQUARE 3
/** #FreestyleLineStyle::caps */
enum {
LS_CAPS_BUTT = 1,
LS_CAPS_ROUND = 2,
LS_CAPS_SQUARE = 3,
};
/* FreestyleLineStyle::thickness_position */
#define LS_THICKNESS_CENTER 1
#define LS_THICKNESS_INSIDE 2
#define LS_THICKNESS_OUTSIDE 3
#define LS_THICKNESS_RELATIVE 4 /* thickness_ratio is used */
/** #FreestyleLineStyle::thickness_position */
enum {
LS_THICKNESS_CENTER = 1,
LS_THICKNESS_INSIDE = 2,
LS_THICKNESS_OUTSIDE = 3,
/** Thickness_ratio is used. */
LS_THICKNESS_RELATIVE = 4,
};
/* FreestyleLineStyle::sort_key */
#define LS_SORT_KEY_DISTANCE_FROM_CAMERA 1
#define LS_SORT_KEY_2D_LENGTH 2
#define LS_SORT_KEY_PROJECTED_X 3
#define LS_SORT_KEY_PROJECTED_Y 4
/** #FreestyleLineStyle::sort_key */
enum {
LS_SORT_KEY_DISTANCE_FROM_CAMERA = 1,
LS_SORT_KEY_2D_LENGTH = 2,
LS_SORT_KEY_PROJECTED_X = 3,
LS_SORT_KEY_PROJECTED_Y = 4,
};
/* FreestyleLineStyle::integration_type */
#define LS_INTEGRATION_MEAN 1
#define LS_INTEGRATION_MIN 2
#define LS_INTEGRATION_MAX 3
#define LS_INTEGRATION_FIRST 4
#define LS_INTEGRATION_LAST 5
/** #FreestyleLineStyle::integration_type */
enum {
LS_INTEGRATION_MEAN = 1,
LS_INTEGRATION_MIN = 2,
LS_INTEGRATION_MAX = 3,
LS_INTEGRATION_FIRST = 4,
LS_INTEGRATION_LAST = 5,
};
typedef struct FreestyleLineStyle {
DNA_DEFINE_CXX_METHODS(FreestyleLineStyle)
+14 -8
View File
@@ -164,8 +164,10 @@ typedef struct MaskLayer {
char visibility_flag;
} MaskLayer;
/* MaskParent->flag */
/* #define MASK_PARENT_ACTIVE (1 << 0) */ /* UNUSED */
// /** #MaskParent::flag */
// enum {
// MASK_PARENT_ACTIVE = 1 << 0, /* UNUSED. */
// };
/* MaskParent->type */
enum {
@@ -194,14 +196,18 @@ enum {
};
/* MaskLayer->visibility_flag */
#define MASK_HIDE_VIEW (1 << 0)
#define MASK_HIDE_SELECT (1 << 1)
#define MASK_HIDE_RENDER (1 << 2)
enum {
MASK_HIDE_VIEW = 1 << 0,
MASK_HIDE_SELECT = 1 << 1,
MASK_HIDE_RENDER = 1 << 2,
};
/* SpaceClip->mask_draw_flag */
/* #define MASK_DRAWFLAG_SMOOTH_DEPRECATED (1 << 0) */ /* Deprecated */
#define MASK_DRAWFLAG_OVERLAY (1 << 1)
#define MASK_DRAWFLAG_SPLINE (1 << 2)
enum {
MASK_DRAWFLAG_SMOOTH_DEPRECATED = 1 << 0, /* Deprecated. */
MASK_DRAWFLAG_OVERLAY = 1 << 1,
MASK_DRAWFLAG_SPLINE = 1 << 2,
};
/* copy of eSpaceImage_UVDT */
/* SpaceClip->mask_draw_type */
+69 -58
View File
@@ -243,64 +243,73 @@ typedef struct Material {
* -1 because for active material we store the index + 1 */
#define MAXMAT (32767 - 1)
/* flag */
/* for render */
/* #define MA_IS_USED (1 << 0) */ /* UNUSED */
/* for dopesheet */
#define MA_DS_EXPAND (1 << 1)
/* for dopesheet (texture stack expander)
* NOTE: this must have the same value as other texture stacks,
* otherwise anim-editors will not read correctly
*/
#define MA_DS_SHOW_TEXS (1 << 2)
/** #Material::flag */
enum {
/** For render. */
MA_IS_USED = 1 << 0, /* UNUSED */
/** For dope-sheet. */
MA_DS_EXPAND = 1 << 1,
/**
* For dope-sheet (texture stack expander)
* NOTE: this must have the same value as other texture stacks,
* otherwise anim-editors will not read correctly.
*/
MA_DS_SHOW_TEXS = 1 << 2,
};
/* ramps */
#define MA_RAMP_BLEND 0
#define MA_RAMP_ADD 1
#define MA_RAMP_MULT 2
#define MA_RAMP_SUB 3
#define MA_RAMP_SCREEN 4
#define MA_RAMP_DIV 5
#define MA_RAMP_DIFF 6
#define MA_RAMP_DARK 7
#define MA_RAMP_LIGHT 8
#define MA_RAMP_OVERLAY 9
#define MA_RAMP_DODGE 10
#define MA_RAMP_BURN 11
#define MA_RAMP_HUE 12
#define MA_RAMP_SAT 13
#define MA_RAMP_VAL 14
#define MA_RAMP_COLOR 15
#define MA_RAMP_SOFT 16
#define MA_RAMP_LINEAR 17
#define MA_RAMP_EXCLUSION 18
enum {
MA_RAMP_BLEND = 0,
MA_RAMP_ADD = 1,
MA_RAMP_MULT = 2,
MA_RAMP_SUB = 3,
MA_RAMP_SCREEN = 4,
MA_RAMP_DIV = 5,
MA_RAMP_DIFF = 6,
MA_RAMP_DARK = 7,
MA_RAMP_LIGHT = 8,
MA_RAMP_OVERLAY = 9,
MA_RAMP_DODGE = 10,
MA_RAMP_BURN = 11,
MA_RAMP_HUE = 12,
MA_RAMP_SAT = 13,
MA_RAMP_VAL = 14,
MA_RAMP_COLOR = 15,
MA_RAMP_SOFT = 16,
MA_RAMP_LINEAR = 17,
MA_RAMP_EXCLUSION = 18,
};
/* texco */
#define TEXCO_ORCO (1 << 0)
/* #define TEXCO_REFL (1 << 1) */ /* deprecated */
/* #define TEXCO_NORM (1 << 2) */ /* deprecated */
#define TEXCO_GLOB (1 << 3)
#define TEXCO_UV (1 << 4)
#define TEXCO_OBJECT (1 << 5)
/* #define TEXCO_LAVECTOR (1 << 6) */ /* deprecated */
/* #define TEXCO_VIEW (1 << 7) */ /* deprecated */
/* #define TEXCO_STICKY (1 << 8) */ /* deprecated */
/* #define TEXCO_OSA (1 << 9) */ /* deprecated */
#define TEXCO_WINDOW (1 << 10)
/* #define NEED_UV (1 << 11) */ /* deprecated */
/* #define TEXCO_TANGENT (1 << 12) */ /* deprecated */
/* still stored in vertex->accum, 1 D */
#define TEXCO_STRAND (1 << 13)
/** strand is used for normal materials, particle for halo materials */
#define TEXCO_PARTICLE (1 << 13)
/* #define TEXCO_STRESS (1 << 14) */ /* deprecated */
/* #define TEXCO_SPEED (1 << 15) */ /* deprecated */
/** #MTex::texco */
enum {
TEXCO_ORCO = 1 << 0,
// TEXCO_REFL = 1 << 1, /* Deprecated. */
// TEXCO_NORM = 1 << 2, /* Deprecated. */
TEXCO_GLOB = 1 << 3,
TEXCO_UV = 1 << 4,
TEXCO_OBJECT = 1 << 5,
// TEXCO_LAVECTOR = 1 << 6, /* Deprecated. */
// TEXCO_VIEW = 1 << 7, /* Deprecated. */
// TEXCO_STICKY = 1 << 8, /* Deprecated. */
// TEXCO_OSA = 1 << 9, /* Deprecated. */
TEXCO_WINDOW = 1 << 10,
// NEED_UV = 1 << 11, /* Deprecated. */
// TEXCO_TANGENT = 1 << 12, /* Deprecated. */
/** still stored in `vertex->accum`, 1 D. */
TEXCO_STRAND = 1 << 13,
/** strand is used for normal materials, particle for halo materials */
TEXCO_PARTICLE = 1 << 13,
// TEXCO_STRESS = 1 << 14, /* Deprecated. */
// TEXCO_SPEED = 1 << 15, /* Deprecated. */
};
/** #MTex.mapto */
#define MAP_COL (1 << 0)
#define MAP_ALPHA (1 << 7)
/** #MTex::mapto */
enum {
MAP_COL = 1 << 0,
MAP_ALPHA = 1 << 7,
};
/* pr_type */
/** #Material::pr_type */
typedef enum ePreviewType {
MA_FLAT = 0,
MA_SPHERE = 1,
@@ -316,10 +325,12 @@ typedef enum ePreviewType {
MA_FLUID = 13,
} ePreviewType;
/* pr_flag */
#define MA_PREVIEW_WORLD (1 << 0)
/** #Material::pr_flag */
enum {
MA_PREVIEW_WORLD = 1 << 0,
};
/* blend_method */
/** #Material::blend_method */
enum {
MA_BM_SOLID = 0,
// MA_BM_ADD = 1, /* deprecated */
@@ -329,7 +340,7 @@ enum {
MA_BM_BLEND = 5,
};
/* blend_flag */
/** #Material::blend_flag */
enum {
MA_BL_HIDE_BACKFACE = (1 << 0),
MA_BL_SS_REFRACTION = (1 << 1),
@@ -337,7 +348,7 @@ enum {
MA_BL_TRANSLUCENCY = (1 << 3),
};
/* blend_shadow */
/** #Material::blend_shadow */
enum {
MA_BS_NONE = 0,
MA_BS_SOLID = 1,
+30 -22
View File
@@ -96,36 +96,44 @@ typedef struct MetaBall {
/* **************** METABALL ********************* */
/** #MetaBall.texspace_flag */
/** #MetaBall::texspace_flag */
enum {
MB_TEXSPACE_FLAG_AUTO = 1 << 0,
};
/* mb->flag */
#define MB_UPDATE_ALWAYS 0
#define MB_UPDATE_HALFRES 1
#define MB_UPDATE_FAST 2
#define MB_UPDATE_NEVER 3
/** #MetaBall::flag */
enum {
MB_UPDATE_ALWAYS = 0,
MB_UPDATE_HALFRES = 1,
MB_UPDATE_FAST = 2,
MB_UPDATE_NEVER = 3,
};
/* mb->flag2 */
#define MB_DS_EXPAND (1 << 0)
/** #MetaBall::flag2 */
enum {
MB_DS_EXPAND = 1 << 0,
};
/* ml->type */
#define MB_BALL 0
#define MB_TUBEX 1 /* deprecated. */
#define MB_TUBEY 2 /* deprecated. */
#define MB_TUBEZ 3 /* deprecated. */
#define MB_TUBE 4
#define MB_PLANE 5
#define MB_ELIPSOID 6
#define MB_CUBE 7
/** #MetaElem::type */
enum {
MB_BALL = 0,
MB_TUBEX = 1, /* Deprecated. */
MB_TUBEY = 2, /* Deprecated. */
MB_TUBEZ = 3, /* Deprecated. */
MB_TUBE = 4,
MB_PLANE = 5,
MB_ELIPSOID = 6,
MB_CUBE = 7,
};
#define MB_TYPE_SIZE_SQUARED(type) (type == MB_ELIPSOID)
#define MB_TYPE_SIZE_SQUARED(type) ((type) == MB_ELIPSOID)
/* ml->flag */
#define MB_NEGATIVE 2
#define MB_HIDE 8
#define MB_SCALE_RAD 16
/** #MetaElem::flag */
enum {
MB_NEGATIVE = 1 << 1,
MB_HIDE = 1 << 3,
MB_SCALE_RAD = 1 << 4,
};
#ifdef __cplusplus
}
+10 -6
View File
@@ -33,9 +33,11 @@ typedef struct bActionModifier {
struct Object *ob;
} bActionModifier;
/* NLA-Modifier Types (UNUSED) */
// #define ACTSTRIP_MOD_DEFORM 0
// #define ACTSTRIP_MOD_NOISE 1
// /* NLA-Modifier Types (UNUSED) */
// enum {
// ACTSTRIP_MOD_DEFORM = 0,
// ACTSTRIP_MOD_NOISE = 1,
// };
typedef struct bActionStrip {
struct bActionStrip *next, *prev;
@@ -76,9 +78,11 @@ typedef struct bActionStrip {
ListBase modifiers;
} bActionStrip;
/* strip->mode (these defines aren't really used, but are here for reference) */
#define ACTSTRIPMODE_BLEND 0
#define ACTSTRIPMODE_ADD 1
/** #Strip::mode (these defines aren't really used, but are here for reference) */
enum {
ACTSTRIPMODE_BLEND = 0,
ACTSTRIPMODE_ADD = 1,
};
/** #bActionStrip.flag */
typedef enum eActStrip_Flag {
File diff suppressed because it is too large Load Diff
@@ -124,15 +124,17 @@ typedef struct FluidsimSettings {
float animRate;
} FluidsimSettings;
/* ob->fluidsimSettings defines */
#define OB_FLUIDSIM_ENABLE 1
#define OB_FLUIDSIM_DOMAIN 2
#define OB_FLUIDSIM_FLUID 4
#define OB_FLUIDSIM_OBSTACLE 8
#define OB_FLUIDSIM_INFLOW 16
#define OB_FLUIDSIM_OUTFLOW 32
#define OB_FLUIDSIM_PARTICLE 64
#define OB_FLUIDSIM_CONTROL 128
/** #Object::fluidsimSettings */
enum {
OB_FLUIDSIM_ENABLE = 1,
OB_FLUIDSIM_DOMAIN = 1 << 1,
OB_FLUIDSIM_FLUID = 1 << 2,
OB_FLUIDSIM_OBSTACLE = 1 << 3,
OB_FLUIDSIM_INFLOW = 1 << 4,
OB_FLUIDSIM_OUTFLOW = 1 << 5,
OB_FLUIDSIM_PARTICLE = 1 << 6,
OB_FLUIDSIM_CONTROL = 1 << 7,
};
#define OB_TYPEFLAG_START 7
#define OB_FSGEO_THIN (1 << (OB_TYPEFLAG_START + 1))
@@ -156,9 +158,11 @@ typedef struct FluidsimSettings {
#define OB_FSPART_TRACER (1 << 5)
// new fluid bit flags for fss->flags
#define OB_FLUIDSIM_REVERSE (1 << 0)
#define OB_FLUIDSIM_ACTIVE (1 << 1)
#define OB_FLUIDSIM_OVERRIDE_TIME (1 << 2)
enum {
OB_FLUIDSIM_REVERSE = 1 << 0,
OB_FLUIDSIM_ACTIVE = 1 << 1,
OB_FLUIDSIM_OVERRIDE_TIME = 1 << 2,
};
#ifdef __cplusplus
}
@@ -173,8 +173,10 @@ typedef struct EffectorWeights {
char _pad[2];
} EffectorWeights;
/* EffectorWeights->flag */
#define EFF_WEIGHT_DO_HAIR 1
/** #EffectorWeights::flag */
enum {
EFF_WEIGHT_DO_HAIR = 1,
};
typedef struct SBVertex {
float vec[4];
@@ -303,92 +305,108 @@ typedef struct SoftBody {
int last_frame;
} SoftBody;
/* pd->flag: various settings */
#define PFIELD_USEMAX (1 << 0)
// #define PDEFLE_DEFORM (1 << 1) /* UNUSED */
/** TODO: do_versions for below */
#define PFIELD_GUIDE_PATH_ADD (1 << 2)
/** used for do_versions */
#define PFIELD_PLANAR (1 << 3)
#define PDEFLE_KILL_PART (1 << 4)
/** used for do_versions */
#define PFIELD_POSZ (1 << 5)
#define PFIELD_TEX_OBJECT (1 << 6)
/** used for turbulence */
#define PFIELD_GLOBAL_CO (1 << 6)
#define PFIELD_TEX_2D (1 << 7)
/** used for harmonic force */
#define PFIELD_MULTIPLE_SPRINGS (1 << 7)
#define PFIELD_USEMIN (1 << 8)
#define PFIELD_USEMAXR (1 << 9)
#define PFIELD_USEMINR (1 << 10)
#define PFIELD_TEX_ROOTCO (1 << 11)
/** used for do_versions */
#define PFIELD_SURFACE (1 << 12)
#define PFIELD_VISIBILITY (1 << 13)
#define PFIELD_DO_LOCATION (1 << 14)
#define PFIELD_DO_ROTATION (1 << 15)
/** apply curve weights */
#define PFIELD_GUIDE_PATH_WEIGHT (1 << 16)
/** multiply smoke force by density */
#define PFIELD_SMOKE_DENSITY (1 << 17)
/** used for (simple) force */
#define PFIELD_GRAVITATION (1 << 18)
/** Enable cloth collision side detection based on normal. */
#define PFIELD_CLOTH_USE_CULLING (1 << 19)
/** Replace collision direction with collider normal. */
#define PFIELD_CLOTH_USE_NORMAL (1 << 20)
/** #PartDeflect::flag: various settings. */
enum {
PFIELD_USEMAX = 1 << 0,
// PDEFLE_DEFORM = 1 << 1, /* UNUSED */
/** TODO: do_versions for below */
PFIELD_GUIDE_PATH_ADD = 1 << 2,
/** used for do_versions */
PFIELD_PLANAR = 1 << 3,
PDEFLE_KILL_PART = 1 << 4,
/** used for do_versions */
PFIELD_POSZ = 1 << 5,
PFIELD_TEX_OBJECT = 1 << 6,
/** used for turbulence */
PFIELD_GLOBAL_CO = 1 << 6,
PFIELD_TEX_2D = 1 << 7,
/** used for harmonic force */
PFIELD_MULTIPLE_SPRINGS = 1 << 7,
PFIELD_USEMIN = 1 << 8,
PFIELD_USEMAXR = 1 << 9,
PFIELD_USEMINR = 1 << 10,
PFIELD_TEX_ROOTCO = 1 << 11,
/** used for do_versions */
PFIELD_SURFACE = 1 << 12,
PFIELD_VISIBILITY = 1 << 13,
PFIELD_DO_LOCATION = 1 << 14,
PFIELD_DO_ROTATION = 1 << 15,
/** apply curve weights */
PFIELD_GUIDE_PATH_WEIGHT = 1 << 16,
/** multiply smoke force by density */
PFIELD_SMOKE_DENSITY = 1 << 17,
/** used for (simple) force */
PFIELD_GRAVITATION = 1 << 18,
/** Enable cloth collision side detection based on normal. */
PFIELD_CLOTH_USE_CULLING = 1 << 19,
/** Replace collision direction with collider normal. */
PFIELD_CLOTH_USE_NORMAL = 1 << 20,
};
/* pd->falloff */
#define PFIELD_FALL_SPHERE 0
#define PFIELD_FALL_TUBE 1
#define PFIELD_FALL_CONE 2
/** #PartDeflect::falloff */
enum {
PFIELD_FALL_SPHERE = 0,
PFIELD_FALL_TUBE = 1,
PFIELD_FALL_CONE = 2,
};
/* pd->shape */
#define PFIELD_SHAPE_POINT 0
#define PFIELD_SHAPE_PLANE 1
#define PFIELD_SHAPE_SURFACE 2
#define PFIELD_SHAPE_POINTS 3
#define PFIELD_SHAPE_LINE 4
/** #PartDeflect::shape */
enum {
PFIELD_SHAPE_POINT = 0,
PFIELD_SHAPE_PLANE = 1,
PFIELD_SHAPE_SURFACE = 2,
PFIELD_SHAPE_POINTS = 3,
PFIELD_SHAPE_LINE = 4,
};
/* pd->tex_mode */
#define PFIELD_TEX_RGB 0
#define PFIELD_TEX_GRAD 1
#define PFIELD_TEX_CURL 2
/** #PartDeflect::tex_mode */
enum {
PFIELD_TEX_RGB = 0,
PFIELD_TEX_GRAD = 1,
PFIELD_TEX_CURL = 2,
};
/* pd->zdir */
#define PFIELD_Z_BOTH 0
#define PFIELD_Z_POS 1
#define PFIELD_Z_NEG 2
/** #PartDeflect::zdir */
enum {
PFIELD_Z_BOTH = 0,
PFIELD_Z_POS = 1,
PFIELD_Z_NEG = 2,
};
/* ob->softflag */
#define OB_SB_ENABLE 1 /* deprecated, use modifier */
#define OB_SB_GOAL 2
#define OB_SB_EDGES 4
#define OB_SB_QUADS 8
#define OB_SB_POSTDEF 16
// #define OB_SB_REDO 32
// #define OB_SB_BAKESET 64
// #define OB_SB_BAKEDO 128
// #define OB_SB_RESET 256
#define OB_SB_SELF 512
#define OB_SB_FACECOLL 1024
#define OB_SB_EDGECOLL 2048
/* #define OB_SB_COLLFINAL 4096 */ /* deprecated */
/* #define OB_SB_BIG_UI 8192 */ /* deprecated */
#define OB_SB_AERO_ANGLE 16384
/** #Object::softflag */
enum {
OB_SB_ENABLE = 1 << 0, /* Deprecated (use modifier). */
OB_SB_GOAL = 1 << 1,
OB_SB_EDGES = 1 << 2,
OB_SB_QUADS = 1 << 3,
OB_SB_POSTDEF = 1 << 4,
// OB_SB_REDO = 1 << 5,
// OB_SB_BAKESET = 1 << 6,
// OB_SB_BAKEDO = 1 << 7,
// OB_SB_RESET = 1 << 8,
OB_SB_SELF = 1 << 9,
OB_SB_FACECOLL = 1 << 10,
OB_SB_EDGECOLL = 1 << 11,
// OB_SB_COLLFINAL = 1 << 12, /* Deprecated. */
// OB_SB_BIG_UI = 1 << 13, /* Deprecated. */
OB_SB_AERO_ANGLE = 1 << 14,
};
/* sb->solverflags */
#define SBSO_MONITOR 1
#define SBSO_OLDERR 2
#define SBSO_ESTIMATEIPO 4
/** #SoftBody::solverflags */
enum {
SBSO_MONITOR = 1 << 0,
SBSO_OLDERR = 1 << 1,
SBSO_ESTIMATEIPO = 1 << 2,
};
/* sb->sbc_mode */
#define SBC_MODE_MANUAL 0
#define SBC_MODE_AVG 1
#define SBC_MODE_MIN 2
#define SBC_MODE_MAX 3
#define SBC_MODE_AVGMINMAX 4
/** #SoftBody::sbc_mode */
enum {
SBC_MODE_MANUAL = 0,
SBC_MODE_AVG = 1,
SBC_MODE_MIN = 2,
SBC_MODE_MAX = 3,
SBC_MODE_AVGMINMAX = 4,
};
#ifdef __cplusplus
}
+29 -23
View File
@@ -66,8 +66,10 @@ typedef struct bDeformGroup {
#define MAX_VGROUP_NAME 64
/* bDeformGroup->flag */
#define DG_LOCK_WEIGHT 1
/** #bDeformGroup::flag */
enum {
DG_LOCK_WEIGHT = 1,
};
/**
* The following illustrates the orientation of the
@@ -755,34 +757,36 @@ enum {
/* **************** BASE ********************* */
/** #Base.flag_legacy */
/** #Base::flag_legacy (also used for #Object::flag). */
enum {
BA_WAS_SEL = (1 << 1),
/* NOTE: BA_HAS_RECALC_DATA can be re-used later if freed in readfile.c. */
// BA_HAS_RECALC_OB = (1 << 2), /* DEPRECATED */
// BA_HAS_RECALC_DATA = (1 << 3), /* DEPRECATED */
// BA_HAS_RECALC_OB = 1 << 2, /* DEPRECATED */
// BA_HAS_RECALC_DATA = 1 << 3, /* DEPRECATED */
/** DEPRECATED, was runtime only, but was reusing an older flag. */
BA_SNAP_FIX_DEPS_FIASCO = (1 << 2),
};
/* NOTE: this was used as a proper setting in past, so nullify before using */
#define BA_TEMP_TAG (1 << 5)
/** NOTE: this was used as a proper setting in past, so nullify before using */
BA_TEMP_TAG = 1 << 5,
/**
* Even if this is tagged for transform, this flag means it's being locked in place.
* Use for #SCE_XFORM_SKIP_CHILDREN.
*/
BA_TRANSFORM_LOCKED_IN_PLACE = 1 << 7,
/**
* Even if this is tagged for transform, this flag means it's being locked in place.
* Use for #SCE_XFORM_SKIP_CHILDREN.
*/
#define BA_TRANSFORM_LOCKED_IN_PLACE (1 << 7)
/** Child of a transformed object. */
BA_TRANSFORM_CHILD = 1 << 8,
/** Parent of a transformed object. */
BA_TRANSFORM_PARENT = 1 << 13,
#define BA_TRANSFORM_CHILD (1 << 8) /* child of a transformed object */
#define BA_TRANSFORM_PARENT (1 << 13) /* parent of a transformed object */
#define OB_FROMDUPLI (1 << 9)
#define OB_DONE (1 << 10) /* unknown state, clear before use */
#define OB_FLAG_USE_SIMULATION_CACHE (1 << 11)
OB_FROMDUPLI = 1 << 9,
/** Unknown state, clear before use. */
OB_DONE = 1 << 10,
OB_FLAG_USE_SIMULATION_CACHE = 1 << 11,
#ifdef DNA_DEPRECATED_ALLOW
# define OB_FLAG_UNUSED_12 (1 << 12) /* cleared */
OB_FLAG_UNUSED_12 = 1 << 12, /* cleared */
#endif
};
/** #Object.visibility_flag */
enum {
@@ -849,9 +853,11 @@ enum {
};
/** #Object.empty_image_depth */
#define OB_EMPTY_IMAGE_DEPTH_DEFAULT 0
#define OB_EMPTY_IMAGE_DEPTH_FRONT 1
#define OB_EMPTY_IMAGE_DEPTH_BACK 2
enum {
OB_EMPTY_IMAGE_DEPTH_DEFAULT = 0,
OB_EMPTY_IMAGE_DEPTH_FRONT = 1,
OB_EMPTY_IMAGE_DEPTH_BACK = 2,
};
/** #Object.empty_image_visibility_flag */
enum {
+222 -165
View File
@@ -160,18 +160,22 @@ typedef struct SPHFluidSettings {
char _pad[6];
} SPHFluidSettings;
/** #SPHFluidSettings.flag */
#define SPH_VISCOELASTIC_SPRINGS 1
#define SPH_CURRENT_REST_LENGTH 2
#define SPH_FAC_REPULSION 4
#define SPH_FAC_DENSITY 8
#define SPH_FAC_RADIUS 16
#define SPH_FAC_VISCOSITY 32
#define SPH_FAC_REST_LENGTH 64
/** #SPHFluidSettings::flag */
enum {
SPH_VISCOELASTIC_SPRINGS = 1 << 0,
SPH_CURRENT_REST_LENGTH = 1 << 1,
SPH_FAC_REPULSION = 1 << 2,
SPH_FAC_DENSITY = 1 << 3,
SPH_FAC_RADIUS = 1 << 4,
SPH_FAC_VISCOSITY = 1 << 5,
SPH_FAC_REST_LENGTH = 1 << 6,
};
/** #SPHFluidSettings.solver (numerical ID field, not bit-field). */
#define SPH_SOLVER_DDR 0
#define SPH_SOLVER_CLASSICAL 1
/** #SPHFluidSettings::solver (numerical ID field, not bit-field). */
enum {
SPH_SOLVER_DDR = 0,
SPH_SOLVER_CLASSICAL = 1,
};
typedef struct ParticleSettings {
ID id;
@@ -391,12 +395,13 @@ typedef struct ParticleSystem {
void *batch_cache;
/* Set by dependency graph's copy-on-write, allows to quickly go
/**
* Set by dependency graph's copy-on-write, allows to quickly go
* from evaluated particle system to original one.
*
* Original system will have this set to NULL.
*
* Use psys_orig_get() function to access,
* Use #psys_orig_get() function to access.
*/
struct ParticleSystem *orig_psys;
} ParticleSystem;
@@ -463,69 +468,85 @@ enum {
};
/** #ParticleSettings.flag */
#define PART_REACT_STA_END 1
#define PART_REACT_MULTIPLE 2
enum {
PART_REACT_STA_END = 1 << 0,
PART_REACT_MULTIPLE = 1 << 1,
//#define PART_LOOP 4 /* not used anymore */
/* For dope-sheet. */
#define PART_DS_EXPAND 8
// PART_LOOP = 1 << 2, /* not used anymore */
#define PART_HAIR_REGROW 16 /* regrow hair for each frame */
/* For dope-sheet. */
PART_DS_EXPAND = 1 << 3,
#define PART_UNBORN 32 /* Show unborn particles. */
#define PART_DIED 64 /* Show died particles. */
/** Regrow hair for each frame. */
PART_HAIR_REGROW = 1 << 4,
#define PART_TRAND 128
#define PART_EDISTR 256 /* particle/face from face areas */
/** Show unborn particles. */
PART_UNBORN = 1 << 5,
/** Show died particles. */
PART_DIED = 1 << 6,
#define PART_ROTATIONS 512 /* calculate particle rotations (and store them in pointcache) */
#define PART_DIE_ON_COL (1 << 12)
#define PART_SIZE_DEFL (1 << 13) /* swept sphere deflections */
#define PART_ROT_DYN (1 << 14) /* dynamic rotation */
#define PART_SIZEMASS (1 << 16)
PART_TRAND = 1 << 7,
/** Particle/face from face areas. */
PART_EDISTR = 1 << 8,
#define PART_HIDE_ADVANCED_HAIR (1 << 15)
/** Calculate particle rotations (and store them in point-cache). */
PART_ROTATIONS = 1 << 9,
PART_HAIR_BSPLINE = 1 << 10,
PART_DIE_ON_COL = 1 << 12,
/** Swept sphere deflections. */
PART_SIZE_DEFL = 1 << 13,
/** Dynamic rotation. */
PART_ROT_DYN = 1 << 14,
//#define PART_ABS_TIME (1 << 17)
//#define PART_GLOB_TIME (1 << 18)
PART_HIDE_ADVANCED_HAIR = 1 << 15,
#define PART_BOIDS_2D (1 << 19)
PART_SIZEMASS = 1 << 16,
//#define PART_BRANCHING (1 << 20)
//#define PART_ANIM_BRANCHING (1 << 21)
// PART_ABS_TIME = 1 << 17,
// PART_GLOB_TIME = 1 << 18,
#define PART_HAIR_BSPLINE 1024
PART_BOIDS_2D = 1 << 19,
#define PART_GRID_HEXAGONAL (1 << 24)
#define PART_GRID_INVERT (1 << 26)
// PART_BRANCHING = 1 << 20,
// PART_ANIM_BRANCHING = 1 << 21,
PART_SELF_EFFECT = 1 << 22,
#define PART_CHILD_EFFECT (1 << 27)
#define PART_CHILD_LONG_HAIR (1 << 28)
// #define PART_CHILD_RENDER (1 << 29) /* UNUSED */
#define PART_CHILD_GUIDE (1 << 30)
PART_GRID_HEXAGONAL = 1 << 24,
PART_GRID_INVERT = 1 << 26,
#define PART_SELF_EFFECT (1 << 22)
PART_CHILD_EFFECT = 1 << 27,
PART_CHILD_LONG_HAIR = 1 << 28,
// PART_CHILD_RENDER = 1 << 29, /* UNUSED */
PART_CHILD_GUIDE = 1 << 30,
/** #ParticleSettings.from */
#define PART_FROM_VERT 0
#define PART_FROM_FACE 1
#define PART_FROM_VOLUME 2
/* #define PART_FROM_PARTICLE 3 deprecated! */
#define PART_FROM_CHILD 4
};
/** #ParticleSettings.distr */
#define PART_DISTR_JIT 0
#define PART_DISTR_RAND 1
#define PART_DISTR_GRID 2
/** #ParticleSettings::from */
enum {
PART_FROM_VERT = 0,
PART_FROM_FACE = 1,
PART_FROM_VOLUME = 2,
// PART_FROM_PARTICLE = 3, /* Deprecated. */
PART_FROM_CHILD = 4,
};
/** #ParticleSettings.phystype */
#define PART_PHYS_NO 0
#define PART_PHYS_NEWTON 1
#define PART_PHYS_KEYED 2
#define PART_PHYS_BOIDS 3
#define PART_PHYS_FLUID 4
/** #ParticleSettings::distr */
enum {
PART_DISTR_JIT = 0,
PART_DISTR_RAND = 1,
PART_DISTR_GRID = 2,
};
/** #ParticleSettings.kink */
/** #ParticleSettings::phystype */
enum {
PART_PHYS_NO = 0,
PART_PHYS_NEWTON = 1,
PART_PHYS_KEYED = 2,
PART_PHYS_BOIDS = 3,
PART_PHYS_FLUID = 4,
};
/** #ParticleSettings::kink */
typedef enum eParticleKink {
PART_KINK_NO = 0,
PART_KINK_CURL = 1,
@@ -535,7 +556,7 @@ typedef enum eParticleKink {
PART_KINK_SPIRAL = 5,
} eParticleKink;
/** #ParticleSettings.child_flag */
/** #ParticleSettings::child_flag */
typedef enum eParticleChildFlag {
PART_CHILD_USE_CLUMP_NOISE = (1 << 0),
PART_CHILD_USE_CLUMP_CURVE = (1 << 1),
@@ -543,131 +564,167 @@ typedef enum eParticleChildFlag {
PART_CHILD_USE_TWIST_CURVE = (1 << 3),
} eParticleChildFlag;
/** #ParticleSettings.shape_flag */
/** #ParticleSettings::shape_flag */
typedef enum eParticleShapeFlag {
PART_SHAPE_CLOSE_TIP = (1 << 0),
} eParticleShapeFlag;
/* #ParticleSettings.draw_col */
#define PART_DRAW_COL_NONE 0
#define PART_DRAW_COL_MAT 1
#define PART_DRAW_COL_VEL 2
#define PART_DRAW_COL_ACC 3
/** #ParticleSettings::draw_col */
enum {
PART_DRAW_COL_NONE = 0,
PART_DRAW_COL_MAT = 1,
PART_DRAW_COL_VEL = 2,
PART_DRAW_COL_ACC = 3,
};
/* #ParticleSettings.time_flag */
#define PART_TIME_AUTOSF 1 /* Automatic subframes */
/** #ParticleSettings::time_flag */
enum {
/** Automatic sub-frames. */
PART_TIME_AUTOSF = 1 << 0,
};
/* #ParticleSettings.draw_as */
/* #ParticleSettings.ren_as */
#define PART_DRAW_NOT 0
#define PART_DRAW_DOT 1
#define PART_DRAW_HALO 1
#define PART_DRAW_CIRC 2
#define PART_DRAW_CROSS 3
#define PART_DRAW_AXIS 4
#define PART_DRAW_LINE 5
#define PART_DRAW_PATH 6
#define PART_DRAW_OB 7
#define PART_DRAW_GR 8
#define PART_DRAW_BB 9 /* deprecated */
#define PART_DRAW_REND 10
/** #ParticleSettings::draw_as, #ParticleSettings::ren_as */
enum {
PART_DRAW_NOT = 0,
PART_DRAW_DOT = 1,
PART_DRAW_HALO = 1,
PART_DRAW_CIRC = 2,
PART_DRAW_CROSS = 3,
PART_DRAW_AXIS = 4,
PART_DRAW_LINE = 5,
PART_DRAW_PATH = 6,
PART_DRAW_OB = 7,
PART_DRAW_GR = 8,
PART_DRAW_BB = 9, /* Deprecated. */
PART_DRAW_REND = 10,
};
/* #ParticleSettings.integrator */
#define PART_INT_EULER 0
#define PART_INT_MIDPOINT 1
#define PART_INT_RK4 2
#define PART_INT_VERLET 3
/** #ParticleSettings::integrator */
enum {
PART_INT_EULER = 0,
PART_INT_MIDPOINT = 1,
PART_INT_RK4 = 2,
PART_INT_VERLET = 3,
};
/* #ParticleSettings.rotmode */
#define PART_ROT_NOR 1
#define PART_ROT_VEL 2
#define PART_ROT_GLOB_X 3
#define PART_ROT_GLOB_Y 4
#define PART_ROT_GLOB_Z 5
#define PART_ROT_OB_X 6
#define PART_ROT_OB_Y 7
#define PART_ROT_OB_Z 8
#define PART_ROT_NOR_TAN 9
/** #ParticleSettings::rotmode */
enum {
PART_ROT_NOR = 1,
PART_ROT_VEL = 2,
PART_ROT_GLOB_X = 3,
PART_ROT_GLOB_Y = 4,
PART_ROT_GLOB_Z = 5,
PART_ROT_OB_X = 6,
PART_ROT_OB_Y = 7,
PART_ROT_OB_Z = 8,
PART_ROT_NOR_TAN = 9,
};
/* #ParticleSettings.avemode */
#define PART_AVE_VELOCITY 1
#define PART_AVE_RAND 2
#define PART_AVE_HORIZONTAL 3
#define PART_AVE_VERTICAL 4
#define PART_AVE_GLOBAL_X 5
#define PART_AVE_GLOBAL_Y 6
#define PART_AVE_GLOBAL_Z 7
/** #ParticleSettings::avemode */
enum {
PART_AVE_VELOCITY = 1,
PART_AVE_RAND = 2,
PART_AVE_HORIZONTAL = 3,
PART_AVE_VERTICAL = 4,
PART_AVE_GLOBAL_X = 5,
PART_AVE_GLOBAL_Y = 6,
PART_AVE_GLOBAL_Z = 7,
};
/* #ParticleSettings.reactevent */
#define PART_EVENT_DEATH 0
#define PART_EVENT_COLLIDE 1
#define PART_EVENT_NEAR 2
/** #ParticleSettings::reactevent */
enum {
PART_EVENT_DEATH = 0,
PART_EVENT_COLLIDE = 1,
PART_EVENT_NEAR = 2,
};
/* #ParticleSettings.childtype */
#define PART_CHILD_PARTICLES 1
#define PART_CHILD_FACES 2
/** #ParticleSettings::childtype */
enum {
PART_CHILD_PARTICLES = 1,
PART_CHILD_FACES = 2,
};
/* psys->flag */
#define PSYS_CURRENT 1
#define PSYS_GLOBAL_HAIR 2
#define PSYS_HAIR_DYNAMICS 4
#define PSYS_KEYED_TIMING 8
//#define PSYS_ENABLED 16 /* deprecated */
#define PSYS_HAIR_UPDATED 32 /* signal for updating hair particle mode */
/* #define PSYS_DRAWING 64 */ /* deprecated */
/* #define PSYS_USE_IMAT 128 */ /* deprecated */
#define PSYS_DELETE 256 /* remove particlesystem as soon as possible */
#define PSYS_HAIR_DONE 512
#define PSYS_KEYED 1024
#define PSYS_EDITED 2048
//#define PSYS_PROTECT_CACHE 4096 /* deprecated */
#define PSYS_DISABLED 8192
#define PSYS_OB_ANIM_RESTORE 16384 /* runtime flag */
#define PSYS_SHARED_CACHES 32768
/** #PartialSystem::flag */
enum {
PSYS_CURRENT = 1 << 0,
PSYS_GLOBAL_HAIR = 1 << 1,
PSYS_HAIR_DYNAMICS = 1 << 2,
PSYS_KEYED_TIMING = 1 << 3,
// PSYS_ENABLED = 1 << 4, /* Deprecated. */
/** Signal for updating hair particle mode. */
PSYS_HAIR_UPDATED = 1 << 5,
// PSYS_DRAWING = 1 << 6, /* Deprecated. */
// PSYS_USE_IMAT = 1 << 7, /* Deprecated. */
/** Remove particle-system as soon as possible. */
PSYS_DELETE = 1 << 8,
PSYS_HAIR_DONE = 1 << 9,
PSYS_KEYED = 1 << 10,
PSYS_EDITED = 1 << 11,
// PSYS_PROTECT_CACHE = 1 << 12, /* Deprecated. */
PSYS_DISABLED = 1 << 13,
/** Runtime flag. */
PSYS_OB_ANIM_RESTORE = 1 << 14,
PSYS_SHARED_CACHES = 1 << 15,
};
/* pars->flag */
#define PARS_UNEXIST 1
#define PARS_NO_DISP 2
//#define PARS_STICKY 4 /* deprecated */
#define PARS_REKEY 8
/** #ParticleData::flag */
enum {
PARS_UNEXIST = 1 << 0,
PARS_NO_DISP = 1 << 1,
// PARS_STICKY = 1 << 2, /* deprecated */
PARS_REKEY = 1 << 3,
};
/* pars->alive */
//#define PARS_KILLED 0 /* deprecated */
#define PARS_DEAD 1
#define PARS_UNBORN 2
#define PARS_ALIVE 3
#define PARS_DYING 4
/** #ParticleData::alive */
enum {
PARS_KILLED = 0, /* Deprecated. */
PARS_DEAD = 1,
PARS_UNBORN = 2,
PARS_ALIVE = 3,
PARS_DYING = 4,
};
/* ParticleDupliWeight->flag */
#define PART_DUPLIW_CURRENT 1
/** #ParticleDupliWeight::flag */
enum {
PART_DUPLIW_CURRENT = 1,
};
/* psys->vg */
#define PSYS_TOT_VG 13
/** #PartialSystem::vg */
enum {
PSYS_TOT_VG = 13,
};
#define PSYS_VG_DENSITY 0
#define PSYS_VG_VEL 1
#define PSYS_VG_LENGTH 2
#define PSYS_VG_CLUMP 3
#define PSYS_VG_KINK 4
#define PSYS_VG_ROUGH1 5
#define PSYS_VG_ROUGH2 6
#define PSYS_VG_ROUGHE 7
#define PSYS_VG_SIZE 8
#define PSYS_VG_TAN 9
#define PSYS_VG_ROT 10
#define PSYS_VG_EFFECTOR 11
#define PSYS_VG_TWIST 12
/** #PartialSystem::vgroup (indices into this array). */
enum {
PSYS_VG_DENSITY = 0,
PSYS_VG_VEL = 1,
PSYS_VG_LENGTH = 2,
PSYS_VG_CLUMP = 3,
PSYS_VG_KINK = 4,
PSYS_VG_ROUGH1 = 5,
PSYS_VG_ROUGH2 = 6,
PSYS_VG_ROUGHE = 7,
PSYS_VG_SIZE = 8,
PSYS_VG_TAN = 9,
PSYS_VG_ROT = 10,
PSYS_VG_EFFECTOR = 11,
PSYS_VG_TWIST = 12,
};
/* ParticleTarget->flag */
#define PTARGET_CURRENT 1
#define PTARGET_VALID 2
/** #ParticleTarget::flag */
enum {
PTARGET_CURRENT = 1,
PTARGET_VALID = 2,
};
/* ParticleTarget->mode */
#define PTARGET_MODE_NEUTRAL 0
#define PTARGET_MODE_FRIEND 1
#define PTARGET_MODE_ENEMY 2
/** #ParticleTarget::mode */
enum {
PTARGET_MODE_NEUTRAL = 0,
PTARGET_MODE_FRIEND = 1,
PTARGET_MODE_ENEMY = 2,
};
/** #MTex.mapto */
/** #MTex::mapto */
typedef enum eParticleTextureInfluence {
/* init */
PAMAP_TIME = (1 << 0), /* emission time */
+23 -17
View File
@@ -21,23 +21,27 @@ extern "C" {
* - #BKE_ptcache_data_size()
* - #ptcache_file_pointers_init()
*/
#define BPHYS_DATA_INDEX 0
#define BPHYS_DATA_LOCATION 1
#define BPHYS_DATA_SMOKE_LOW 1
#define BPHYS_DATA_VELOCITY 2
#define BPHYS_DATA_SMOKE_HIGH 2
#define BPHYS_DATA_ROTATION 3
#define BPHYS_DATA_DYNAMICPAINT 3
#define BPHYS_DATA_AVELOCITY 4 /* used for particles */
#define BPHYS_DATA_XCONST 4 /* used for cloth */
#define BPHYS_DATA_SIZE 5
#define BPHYS_DATA_TIMES 6
#define BPHYS_DATA_BOIDS 7
enum {
BPHYS_DATA_INDEX = 0,
BPHYS_DATA_LOCATION = 1,
BPHYS_DATA_SMOKE_LOW = 1,
BPHYS_DATA_VELOCITY = 2,
BPHYS_DATA_SMOKE_HIGH = 2,
BPHYS_DATA_ROTATION = 3,
BPHYS_DATA_DYNAMICPAINT = 3,
BPHYS_DATA_AVELOCITY = 4, /* Used for particles. */
BPHYS_DATA_XCONST = 4, /* Used for cloth. */
BPHYS_DATA_SIZE = 5,
BPHYS_DATA_TIMES = 6,
BPHYS_DATA_BOIDS = 7,
#define BPHYS_TOT_DATA 8
};
#define BPHYS_EXTRA_FLUID_SPRINGS 1
#define BPHYS_EXTRA_CLOTH_ACCELERATION 2
enum {
BPHYS_EXTRA_FLUID_SPRINGS = 1,
BPHYS_EXTRA_CLOTH_ACCELERATION = 2,
};
typedef struct PTCacheExtra {
struct PTCacheExtra *next, *prev;
@@ -148,9 +152,11 @@ enum {
PTCACHE_FLAGS_COPY = PTCACHE_DISK_CACHE | PTCACHE_EXTERNAL | PTCACHE_IGNORE_LIBPATH,
};
#define PTCACHE_COMPRESS_NO 0
#define PTCACHE_COMPRESS_LZO 1
#define PTCACHE_COMPRESS_LZMA 2
enum {
PTCACHE_COMPRESS_NO = 0,
PTCACHE_COMPRESS_LZO = 1,
PTCACHE_COMPRESS_LZMA = 2,
};
#ifdef __cplusplus
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -237,7 +237,7 @@ typedef struct PanelCategoryStack {
typedef void (*uiListFreeRuntimeDataFunc)(struct uiList *ui_list);
/* uiList dynamic data... */
/* These two Lines with # tell makesdna this struct can be excluded. */
/* These two lines with # tell `makesdna` this struct can be excluded. */
#
#
typedef struct uiListDyn {
+52 -32
View File
@@ -543,22 +543,28 @@ typedef struct SequencerScopes {
#define MAXSEQ 128
/** #Editor.overlay_frame_flag */
#define SEQ_EDIT_OVERLAY_FRAME_SHOW 1
#define SEQ_EDIT_OVERLAY_FRAME_ABS 2
/** #Editor::overlay_frame_flag */
enum {
SEQ_EDIT_OVERLAY_FRAME_SHOW = 1,
SEQ_EDIT_OVERLAY_FRAME_ABS = 2,
};
#define SEQ_STRIP_OFSBOTTOM 0.05f
#define SEQ_STRIP_OFSTOP 0.95f
/* Editor->proxy_storage */
/* store proxies in project directory */
#define SEQ_EDIT_PROXY_DIR_STORAGE 1
/** #Editor::proxy_storage */
enum {
/** Store proxies in project directory. */
SEQ_EDIT_PROXY_DIR_STORAGE = 1,
};
/* SpeedControlVars->flags */
#define SEQ_SPEED_UNUSED_2 (1 << 0) /* cleared */
#define SEQ_SPEED_UNUSED_1 (1 << 1) /* cleared */
#define SEQ_SPEED_UNUSED_3 (1 << 2) /* cleared */
#define SEQ_SPEED_USE_INTERPOLATION (1 << 3)
/** #SpeedControlVars::flags */
enum {
SEQ_SPEED_UNUSED_2 = 1 << 0, /* cleared */
SEQ_SPEED_UNUSED_1 = 1 << 1, /* cleared */
SEQ_SPEED_UNUSED_3 = 1 << 2, /* cleared */
SEQ_SPEED_USE_INTERPOLATION = 1 << 3,
};
/** \} */
@@ -626,26 +632,36 @@ enum {
/* Deprecated, don't use a flag anymore. */
// #define SEQ_ACTIVE 1048576
#define SEQ_COLOR_BALANCE_INVERSE_GAIN 1
#define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2
#define SEQ_COLOR_BALANCE_INVERSE_LIFT 4
#define SEQ_COLOR_BALANCE_INVERSE_SLOPE 8
#define SEQ_COLOR_BALANCE_INVERSE_OFFSET 16
#define SEQ_COLOR_BALANCE_INVERSE_POWER 32
enum {
SEQ_COLOR_BALANCE_INVERSE_GAIN = 1 << 0,
SEQ_COLOR_BALANCE_INVERSE_GAMMA = 1 << 1,
SEQ_COLOR_BALANCE_INVERSE_LIFT = 1 << 2,
SEQ_COLOR_BALANCE_INVERSE_SLOPE = 1 << 3,
SEQ_COLOR_BALANCE_INVERSE_OFFSET = 1 << 4,
SEQ_COLOR_BALANCE_INVERSE_POWER = 1 << 5,
};
/* !!! has to be same as IMB_imbuf.h IMB_PROXY_... and IMB_TC_... */
/**
* \warning has to be same as `IMB_imbuf.h`: `IMB_PROXY_*` and `IMB_TC_*`.
*/
enum {
SEQ_PROXY_IMAGE_SIZE_25 = 1 << 0,
SEQ_PROXY_IMAGE_SIZE_50 = 1 << 1,
SEQ_PROXY_IMAGE_SIZE_75 = 1 << 2,
SEQ_PROXY_IMAGE_SIZE_100 = 1 << 3,
};
#define SEQ_PROXY_IMAGE_SIZE_25 1
#define SEQ_PROXY_IMAGE_SIZE_50 2
#define SEQ_PROXY_IMAGE_SIZE_75 4
#define SEQ_PROXY_IMAGE_SIZE_100 8
#define SEQ_PROXY_TC_NONE 0
#define SEQ_PROXY_TC_RECORD_RUN 1
#define SEQ_PROXY_TC_FREE_RUN 2
#define SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN 4
#define SEQ_PROXY_TC_RECORD_RUN_NO_GAPS 8
#define SEQ_PROXY_TC_ALL 15
/**
* \warning has to be same as `IMB_imbuf.h`: `IMB_TC_*`.
*/
enum {
SEQ_PROXY_TC_NONE = 0,
SEQ_PROXY_TC_RECORD_RUN = 1 << 0,
SEQ_PROXY_TC_FREE_RUN = 1 << 1,
SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN = 1 << 2,
SEQ_PROXY_TC_RECORD_RUN_NO_GAPS = 1 << 3,
SEQ_PROXY_TC_ALL = (1 << 4) - 1,
};
/** SeqProxy.build_flags */
enum {
@@ -717,10 +733,14 @@ enum {
SEQ_TYPE_MAX = 60,
};
#define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1 << 0)
#define SEQ_MOVIECLIP_RENDER_STABILIZED (1 << 1)
enum {
SEQ_MOVIECLIP_RENDER_UNDISTORTED = 1 << 0,
SEQ_MOVIECLIP_RENDER_STABILIZED = 1 << 1,
};
#define SEQ_BLEND_REPLACE 0
enum {
SEQ_BLEND_REPLACE = 0,
};
/* all other BLEND_MODEs are simple SEQ_TYPE_EFFECT ids and therefore identical
* to the table above. (Only those effects that handle _exactly_ two inputs,
* otherwise, you can't really blend, right :) !)
@@ -14,15 +14,18 @@
extern "C" {
#endif
/* Is a structure because of the following considerations:
/**
* Is a structure because of the following considerations:
*
* - It is not possible to use custom types in DNA members: makesdna does not recognize them.
* - It is not possible to use custom types in DNA members: `makesdna` does not recognize them.
* - It allows to add more bits, more than standard fixed-size types can store. For example, if
* we ever need to go 128 bits, it is as simple as adding extra 64bit field.
*/
typedef struct SessionUUID {
/* Never access directly, as it might cause a headache when more bits are needed: if the field
* is used directly it will not be easy to find all places where partial access is used. */
/**
* Never access directly, as it might cause a headache when more bits are needed: if the field
* is used directly it will not be easy to find all places where partial access is used.
*/
uint64_t uuid_;
} SessionUUID;
+28 -24
View File
@@ -184,31 +184,35 @@ typedef struct SpaceProperties {
/* button defines (deprecated) */
#ifdef DNA_DEPRECATED_ALLOW
/* WARNING: the values of these defines are used in SpaceProperties.tabs[8] */
/* SpaceProperties.mainb new */
# define CONTEXT_SCENE 0
# define CONTEXT_OBJECT 1
// #define CONTEXT_TYPES 2
# define CONTEXT_SHADING 3
# define CONTEXT_EDITING 4
// #define CONTEXT_SCRIPT 5
// #define CONTEXT_LOGIC 6
/** #SpaceProperties::mainb new */
enum {
CONTEXT_SCENE = 0,
CONTEXT_OBJECT = 1,
// CONTEXT_TYPES = 2,
CONTEXT_SHADING = 3,
CONTEXT_EDITING = 4,
// CONTEXT_SCRIPT = 5,
// CONTEXT_LOGIC = 6,
};
/* SpaceProperties.mainb old (deprecated) */
// #define BUTS_VIEW 0
# define BUTS_LAMP 1
# define BUTS_MAT 2
# define BUTS_TEX 3
# define BUTS_ANIM 4
# define BUTS_WORLD 5
# define BUTS_RENDER 6
# define BUTS_EDIT 7
// #define BUTS_GAME 8
# define BUTS_FPAINT 9
# define BUTS_RADIO 10
# define BUTS_SCRIPT 11
// #define BUTS_SOUND 12
# define BUTS_CONSTRAINT 13
// #define BUTS_EFFECTS 14
/** #SpaceProperties::mainb old (deprecated) */
enum {
// BUTS_VIEW = 0,
BUTS_LAMP = 1,
BUTS_MAT = 2,
BUTS_TEX = 3,
BUTS_ANIM = 4,
BUTS_WORLD = 5,
BUTS_RENDER = 6,
BUTS_EDIT = 7,
// BUTS_GAME = 8,
BUTS_FPAINT = 9,
BUTS_RADIO = 10,
BUTS_SCRIPT = 11,
// BUTS_SOUND = 12,
BUTS_CONSTRAINT = 13,
// BUTS_EFFECTS = 14,
};
#endif /* DNA_DEPRECATED_ALLOW */
/** #SpaceProperties.mainb new */
+6 -4
View File
@@ -45,10 +45,12 @@ typedef struct Speaker {
/* **************** SPEAKER ********************* */
/* flag */
#define SPK_DS_EXPAND (1 << 0)
#define SPK_MUTED (1 << 1)
// #define SPK_RELATIVE (1 << 2) /* UNUSED */
/** #Speaker::flag */
enum {
SPK_DS_EXPAND = 1 << 0,
SPK_MUTED = 1 << 1,
// SPK_RELATIVE = 1 << 2, /* UNUSED */
};
#ifdef __cplusplus
}
+101 -75
View File
@@ -365,24 +365,28 @@ typedef struct View3D {
View3D_Runtime runtime;
} View3D;
/** #View3D.stereo3d_flag */
#define V3D_S3D_DISPCAMERAS (1 << 0)
#define V3D_S3D_DISPPLANE (1 << 1)
#define V3D_S3D_DISPVOLUME (1 << 2)
/** #View3D::stereo3d_flag */
enum {
V3D_S3D_DISPCAMERAS = 1 << 0,
V3D_S3D_DISPPLANE = 1 << 1,
V3D_S3D_DISPVOLUME = 1 << 2,
};
/** #View3D.flag */
#define V3D_LOCAL_COLLECTIONS (1 << 0)
#define V3D_FLAG_UNUSED_1 (1 << 1) /* cleared */
#define V3D_HIDE_HELPLINES (1 << 2)
#define V3D_FLAG_UNUSED_2 (1 << 3) /* cleared */
#define V3D_XR_SESSION_MIRROR (1 << 4)
#define V3D_XR_SESSION_SURFACE (1 << 5)
/** #View3D::flag */
enum {
V3D_LOCAL_COLLECTIONS = 1 << 0,
V3D_FLAG_UNUSED_1 = 1 << 1, /* cleared */
V3D_HIDE_HELPLINES = 1 << 2,
V3D_FLAG_UNUSED_2 = 1 << 3, /* cleared */
V3D_XR_SESSION_MIRROR = 1 << 4,
V3D_XR_SESSION_SURFACE = 1 << 5,
#define V3D_FLAG_UNUSED_10 (1 << 10) /* cleared */
#define V3D_SELECT_OUTLINE (1 << 11)
#define V3D_FLAG_UNUSED_12 (1 << 12) /* cleared */
#define V3D_GLOBAL_STATS (1 << 13)
#define V3D_DRAW_CENTERS (1 << 15)
V3D_FLAG_UNUSED_10 = 1 << 10, /* cleared */
V3D_SELECT_OUTLINE = 1 << 11,
V3D_FLAG_UNUSED_12 = 1 << 12, /* cleared */
V3D_GLOBAL_STATS = 1 << 13,
V3D_DRAW_CENTERS = 1 << 15,
};
/** #View3D_Runtime.flag */
enum {
@@ -392,22 +396,26 @@ enum {
V3D_RUNTIME_DEPTHBUF_OVERRIDDEN = (1 << 1),
};
/** #RegionView3D.persp */
#define RV3D_ORTHO 0
#define RV3D_PERSP 1
#define RV3D_CAMOB 2
/** #RegionView3D::persp */
enum {
RV3D_ORTHO = 0,
RV3D_PERSP = 1,
RV3D_CAMOB = 2,
};
/** #RegionView3D.rflag */
#define RV3D_CLIPPING (1 << 2)
#define RV3D_NAVIGATING (1 << 3)
#define RV3D_GPULIGHT_UPDATE (1 << 4)
#define RV3D_PAINTING (1 << 5)
/*#define RV3D_IS_GAME_ENGINE (1 << 5) */ /* UNUSED */
/**
* Disable Z-buffer offset, skip calls to #ED_view3d_polygon_offset.
* Use when precise surface depth is needed and picking bias isn't, see #45434).
*/
#define RV3D_ZOFFSET_DISABLED 64
/** #RegionView3D::rflag */
enum {
RV3D_CLIPPING = 1 << 2,
RV3D_NAVIGATING = 1 << 3,
RV3D_GPULIGHT_UPDATE = 1 << 4,
RV3D_PAINTING = 1 << 5,
// RV3D_IS_GAME_ENGINE = 1 << 5, /* UNUSED */
/**
* Disable Z-buffer offset, skip calls to #ED_view3d_polygon_offset.
* Use when precise surface depth is needed and picking bias isn't, see #45434).
*/
RV3D_ZOFFSET_DISABLED = 1 << 6,
};
/** #RegionView3D.viewlock */
enum {
@@ -423,18 +431,22 @@ enum {
/** Bit-wise OR of the regular lock-flags with runtime only lock-flags. */
#define RV3D_LOCK_FLAGS(rv3d) ((rv3d)->viewlock | ((rv3d)->runtime_viewlock))
/** #RegionView3D.viewlock_quad */
#define RV3D_VIEWLOCK_INIT (1 << 7)
/** #RegionView3D::viewlock_quad */
enum {
RV3D_VIEWLOCK_INIT = 1 << 7,
};
/** #RegionView3D.view */
#define RV3D_VIEW_USER 0
#define RV3D_VIEW_FRONT 1
#define RV3D_VIEW_BACK 2
#define RV3D_VIEW_LEFT 3
#define RV3D_VIEW_RIGHT 4
#define RV3D_VIEW_TOP 5
#define RV3D_VIEW_BOTTOM 6
#define RV3D_VIEW_CAMERA 8
/** #RegionView3D::view */
enum {
RV3D_VIEW_USER = 0,
RV3D_VIEW_FRONT = 1,
RV3D_VIEW_BACK = 2,
RV3D_VIEW_LEFT = 3,
RV3D_VIEW_RIGHT = 4,
RV3D_VIEW_TOP = 5,
RV3D_VIEW_BOTTOM = 6,
RV3D_VIEW_CAMERA = 8,
};
#define RV3D_VIEW_IS_AXIS(view) (((view) >= RV3D_VIEW_FRONT) && ((view) <= RV3D_VIEW_BOTTOM))
@@ -454,35 +466,47 @@ enum {
((rv3d) && (v3d) && ((rv3d)->rflag & RV3D_CLIPPING) && \
ELEM((v3d)->shading.type, OB_WIRE, OB_SOLID) && (rv3d)->clipbb)
/** #View3D.flag2 (int) */
#define V3D_HIDE_OVERLAYS (1 << 2)
#define V3D_SHOW_VIEWER (1 << 3)
#define V3D_SHOW_ANNOTATION (1 << 4)
#define V3D_LOCK_CAMERA (1 << 5)
#define V3D_FLAG2_UNUSED_6 (1 << 6) /* cleared */
#define V3D_SHOW_RECONSTRUCTION (1 << 7)
#define V3D_SHOW_CAMERAPATH (1 << 8)
#define V3D_SHOW_BUNDLENAME (1 << 9)
#define V3D_FLAG2_UNUSED_10 (1 << 10) /* cleared */
#define V3D_RENDER_BORDER (1 << 11)
#define V3D_FLAG2_UNUSED_12 (1 << 12) /* cleared */
#define V3D_FLAG2_UNUSED_13 (1 << 13) /* cleared */
#define V3D_FLAG2_UNUSED_14 (1 << 14) /* cleared */
#define V3D_FLAG2_UNUSED_15 (1 << 15) /* cleared */
#define V3D_XR_SHOW_CONTROLLERS (1 << 16)
#define V3D_XR_SHOW_CUSTOM_OVERLAYS (1 << 17)
/** #View3D::flag2 (int) */
enum {
V3D_HIDE_OVERLAYS = 1 << 2,
V3D_SHOW_VIEWER = 1 << 3,
V3D_SHOW_ANNOTATION = 1 << 4,
V3D_LOCK_CAMERA = 1 << 5,
V3D_FLAG2_UNUSED_6 = 1 << 6, /* cleared */
V3D_SHOW_RECONSTRUCTION = 1 << 7,
V3D_SHOW_CAMERAPATH = 1 << 8,
V3D_SHOW_BUNDLENAME = 1 << 9,
V3D_FLAG2_UNUSED_10 = 1 << 10, /* cleared */
V3D_RENDER_BORDER = 1 << 11,
V3D_FLAG2_UNUSED_12 = 1 << 12, /* cleared */
V3D_FLAG2_UNUSED_13 = 1 << 13, /* cleared */
V3D_FLAG2_UNUSED_14 = 1 << 14, /* cleared */
V3D_FLAG2_UNUSED_15 = 1 << 15, /* cleared */
V3D_XR_SHOW_CONTROLLERS = 1 << 16,
V3D_XR_SHOW_CUSTOM_OVERLAYS = 1 << 17,
};
/** #View3D.gp_flag (short) */
#define V3D_GP_FADE_OBJECTS (1 << 0) /* Fade all non GP objects */
#define V3D_GP_SHOW_GRID (1 << 1) /* Activate paper grid */
#define V3D_GP_SHOW_EDIT_LINES (1 << 2)
#define V3D_GP_SHOW_MULTIEDIT_LINES (1 << 3)
#define V3D_GP_SHOW_ONION_SKIN (1 << 4) /* main switch at view level */
#define V3D_GP_FADE_NOACTIVE_LAYERS (1 << 5) /* fade layers not active */
#define V3D_GP_FADE_NOACTIVE_GPENCIL (1 << 6) /* Fade other GPencil objects */
#define V3D_GP_SHOW_STROKE_DIRECTION (1 << 7) /* Show Strokes Directions */
#define V3D_GP_SHOW_MATERIAL_NAME (1 << 8) /* Show Material names */
#define V3D_GP_SHOW_GRID_XRAY (1 << 9) /* Show Canvas Grid on Top */
/** #View3D::gp_flag (short) */
enum {
/** Fade all non GP objects. */
V3D_GP_FADE_OBJECTS = 1 << 0,
/** Activate paper grid. */
V3D_GP_SHOW_GRID = 1 << 1,
V3D_GP_SHOW_EDIT_LINES = 1 << 2,
V3D_GP_SHOW_MULTIEDIT_LINES = 1 << 3,
/** main switch at view level. */
V3D_GP_SHOW_ONION_SKIN = 1 << 4,
/** fade layers not active. */
V3D_GP_FADE_NOACTIVE_LAYERS = 1 << 5,
/** Fade other GPencil objects. */
V3D_GP_FADE_NOACTIVE_GPENCIL = 1 << 6,
/** Show Strokes Directions. */
V3D_GP_SHOW_STROKE_DIRECTION = 1 << 7,
/** Show Material names. */
V3D_GP_SHOW_MATERIAL_NAME = 1 << 8,
/** Show Canvas Grid on Top. */
V3D_GP_SHOW_GRID_XRAY = 1 << 9,
};
/** #View3DShading.flag */
enum {
@@ -617,11 +641,13 @@ enum {
};
/** #View3D.gridflag */
#define V3D_SHOW_FLOOR (1 << 0)
#define V3D_SHOW_X (1 << 1)
#define V3D_SHOW_Y (1 << 2)
#define V3D_SHOW_Z (1 << 3)
#define V3D_SHOW_ORTHO_GRID (1 << 4)
enum {
V3D_SHOW_FLOOR = 1 << 0,
V3D_SHOW_X = 1 << 1,
V3D_SHOW_Y = 1 << 2,
V3D_SHOW_Z = 1 << 3,
V3D_SHOW_ORTHO_GRID = 1 << 4,
};
/** #TransformOrientationSlot.type */
enum {
@@ -75,7 +75,7 @@ enum ReportListFlags {
RPT_PRINT_HANDLED_BY_OWNER = (1 << 4),
};
/* These two Lines with # tell makesdna this struct can be excluded. */
/* These two lines with # tell `makesdna` this struct can be excluded. */
#
#
typedef struct Report {
@@ -103,8 +103,8 @@ typedef struct ReportList {
struct wmTimer *reporttimer;
} ReportList;
/* timer customdata to control reports display */
/* These two Lines with # tell makesdna this struct can be excluded. */
/* Timer custom-data to control reports display. */
/* These two lines with # tell `makesdna` this struct can be excluded. */
#
#
typedef struct ReportTimerInfo {
@@ -381,7 +381,7 @@ typedef struct wmWindow {
# undef ime_data
#endif
/* These two Lines with # tell makesdna this struct can be excluded. */
/* These two lines with # tell `makesdna` this struct can be excluded. */
/* should be something like DNA_EXCLUDE
* but the preprocessor first removes all comments, spaces etc */
#
+21 -15
View File
@@ -83,28 +83,34 @@ typedef struct World {
/* **************** WORLD ********************* */
/* mode */
#define WO_MIST (1 << 0)
#define WO_MODE_UNUSED_1 (1 << 1) /* cleared */
#define WO_MODE_UNUSED_2 (1 << 2) /* cleared */
#define WO_MODE_UNUSED_3 (1 << 3) /* cleared */
#define WO_MODE_UNUSED_4 (1 << 4) /* cleared */
#define WO_MODE_UNUSED_5 (1 << 5) /* cleared */
#define WO_AMB_OCC (1 << 6)
#define WO_MODE_UNUSED_7 (1 << 7) /* cleared */
/** #World::mode */
enum {
WO_MIST = 1 << 0,
WO_MODE_UNUSED_1 = 1 << 1, /* cleared */
WO_MODE_UNUSED_2 = 1 << 2, /* cleared */
WO_MODE_UNUSED_3 = 1 << 3, /* cleared */
WO_MODE_UNUSED_4 = 1 << 4, /* cleared */
WO_MODE_UNUSED_5 = 1 << 5, /* cleared */
WO_AMB_OCC = 1 << 6,
WO_MODE_UNUSED_7 = 1 << 7, /* cleared */
};
/** #World::mistype */
enum {
WO_MIST_QUADRATIC = 0,
WO_MIST_LINEAR = 1,
WO_MIST_INVERSE_QUADRATIC = 2,
};
/* flag */
#define WO_DS_EXPAND (1 << 0)
/* NOTE: this must have the same value as MA_DS_SHOW_TEXS,
* otherwise anim-editors will not read correctly
*/
#define WO_DS_SHOW_TEXS (1 << 2)
/** #World::flag */
enum {
WO_DS_EXPAND = 1 << 0,
/**
* NOTE: this must have the same value as #MA_DS_SHOW_TEXS,
* otherwise anim-editors will not read correctly.
*/
WO_DS_SHOW_TEXS = 1 << 2,
};
#ifdef __cplusplus
}