Cleanup: use bit-shifted flag definitions in DNA

This commit is contained in:
Campbell Barton 2018-12-17 09:55:02 +11:00
parent 4e3562f45a
commit 98f43ba3e4
16 changed files with 482 additions and 481 deletions

View File

@ -52,17 +52,17 @@ typedef enum eBoidRuleType {
} eBoidRuleType;
/* boidrule->flag */
#define BOIDRULE_CURRENT 1
#define BOIDRULE_IN_AIR 4
#define BOIDRULE_ON_LAND 8
#define BOIDRULE_CURRENT (1 << 0)
#define BOIDRULE_IN_AIR (1 << 2)
#define 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
#define BRULE_GOAL_AVOID_ARRIVE 2
#define BRULE_GOAL_AVOID_SIGNAL 4
#define BRULE_GOAL_AVOID_PREDICT (1 << 0)
#define BRULE_GOAL_AVOID_ARRIVE (1 << 1)
#define BRULE_GOAL_AVOID_SIGNAL (1 << 2)
typedef struct BoidRuleGoalAvoid {
BoidRule rule;
struct Object *ob;
@ -72,14 +72,14 @@ typedef struct BoidRuleGoalAvoid {
/* signals */
int signal_id, channels;
} BoidRuleGoalAvoid;
#define BRULE_ACOLL_WITH_BOIDS 1
#define BRULE_ACOLL_WITH_DEFLECTORS 2
#define BRULE_ACOLL_WITH_BOIDS (1 << 0)
#define BRULE_ACOLL_WITH_DEFLECTORS (1 << 1)
typedef struct BoidRuleAvoidCollision {
BoidRule rule;
int options;
float look_ahead;
} BoidRuleAvoidCollision;
#define BRULE_LEADER_IN_LINE 1
#define BRULE_LEADER_IN_LINE (1 << 0)
typedef struct BoidRuleFollowLeader {
BoidRule rule;
struct Object *ob;
@ -210,16 +210,16 @@ typedef struct BoidSettings {
} BoidSettings;
/* boidsettings->options */
#define BOID_ALLOW_FLIGHT 1
#define BOID_ALLOW_LAND 2
#define BOID_ALLOW_CLIMB 4
#define BOID_ALLOW_FLIGHT (1 << 0)
#define BOID_ALLOW_LAND (1 << 1)
#define BOID_ALLOW_CLIMB (1 << 2)
/* boidrule->options */
//#define BOID_RULE_FOLLOW_LINE 1 /* follow leader */
//#define BOID_RULE_PREDICT 2 /* goal/avoid */
//#define BOID_RULE_ARRIVAL 4 /* goal */
//#define BOID_RULE_LAND 8 /* goal */
//#define BOID_RULE_WITH_BOIDS 16 /* avoid collision */
//#define BOID_RULE_WITH_DEFLECTORS 32 /* avoid collision */
//#define BOID_RULE_FOLLOW_LINE (1 << 0) /* follow leader */
//#define BOID_RULE_PREDICT (1 << 1) /* goal/avoid */
//#define BOID_RULE_ARRIVAL (1 << 2) /* goal */
//#define BOID_RULE_LAND (1 << 3) /* goal */
//#define BOID_RULE_WITH_BOIDS (1 << 4) /* avoid collision */
//#define BOID_RULE_WITH_DEFLECTORS (1 << 5) /* avoid collision */
#endif

View File

@ -126,9 +126,6 @@ enum {
CAM_SHOW_SAFE_CENTER = (1 << 9),
};
/* yafray: dof sampling switch */
/* #define CAM_YF_NO_QMC 512 */ /* deprecated */
/* Sensor fit */
enum {
CAMERA_SENSOR_FIT_AUTO = 0,

View File

@ -48,9 +48,9 @@ typedef struct CurveMapPoint {
/* curvepoint->flag */
enum {
CUMA_SELECT = 1,
CUMA_HANDLE_VECTOR = 2,
CUMA_HANDLE_AUTO_ANIM = 4,
CUMA_SELECT = (1 << 0),
CUMA_HANDLE_VECTOR = (1 << 1),
CUMA_HANDLE_AUTO_ANIM = (1 << 2),
};
typedef struct CurveMap {
@ -85,10 +85,10 @@ typedef struct CurveMapping {
} CurveMapping;
/* cumapping->flag */
#define CUMA_DO_CLIP 1
#define CUMA_PREMULLED 2
#define CUMA_DRAW_CFRA 4
#define CUMA_DRAW_SAMPLE 8
#define CUMA_DO_CLIP (1 << 0)
#define CUMA_PREMULLED (1 << 1)
#define CUMA_DRAW_CFRA (1 << 2)
#define CUMA_DRAW_SAMPLE (1 << 3)
/* cumapping->preset */
typedef enum eCurveMappingPreset {

View File

@ -842,8 +842,8 @@ typedef enum eObjectSolver_Flags {
} eObjectSolver_Flags;
/* Rigid-Body Constraint */
#define CONSTRAINT_DRAW_PIVOT 0x40
#define CONSTRAINT_DISABLE_LINKED_COLLISION 0x80
#define CONSTRAINT_DRAW_PIVOT (1 << 6)
#define CONSTRAINT_DISABLE_LINKED_COLLISION (1 << 7)
/* ObjectSolver Constraint -> flag */
typedef enum eStretchTo_Flags {
@ -852,10 +852,10 @@ typedef enum eStretchTo_Flags {
} eStretchTo_Flags;
/* important: these defines need to match up with PHY_DynamicTypes headerfile */
#define CONSTRAINT_RB_BALL 1
#define CONSTRAINT_RB_HINGE 2
#define CONSTRAINT_RB_CONETWIST 4
#define CONSTRAINT_RB_VEHICLE 11
#define CONSTRAINT_RB_GENERIC6DOF 12
#define CONSTRAINT_RB_BALL 1
#define CONSTRAINT_RB_HINGE 2
#define CONSTRAINT_RB_CONETWIST 4
#define CONSTRAINT_RB_VEHICLE 11
#define CONSTRAINT_RB_GENERIC6DOF 12
#endif

View File

@ -84,11 +84,11 @@ typedef struct RenderSlot {
} RenderSlot;
/* iuser->flag */
#define IMA_ANIM_ALWAYS 1
#define IMA_ANIM_REFRESHED 2
/* #define IMA_DO_PREMUL 4 */
#define IMA_NEED_FRAME_RECALC 8
#define IMA_SHOW_STEREO 16
#define IMA_ANIM_ALWAYS (1 << 0)
#define IMA_ANIM_REFRESHED (1 << 1)
/* #define IMA_DO_PREMUL (1 << 2) */
#define IMA_NEED_FRAME_RECALC (1 << 3)
#define IMA_SHOW_STEREO (1 << 4)
enum {
TEXTARGET_TEXTURE_2D = 0,
@ -184,20 +184,20 @@ enum {
};
/* Image.tpageflag */
#define IMA_TILES 1
#define IMA_TWINANIM 2
#define IMA_COLCYCLE 4 /* Depreciated */
#define IMA_MIPMAP_COMPLETE 8 /* all mipmap levels in OpenGL texture set? */
#define IMA_CLAMP_U 16
#define IMA_CLAMP_V 32
#define IMA_TPAGE_REFRESH 64
#define IMA_GLBIND_IS_DATA 128 /* opengl image texture bound as non-color data */
#define IMA_TILES (1 << 0)
#define IMA_TWINANIM (1 << 1)
#define IMA_COLCYCLE (1 << 2) /* Depreciated */
#define IMA_MIPMAP_COMPLETE (1 << 3) /* all mipmap levels in OpenGL texture set? */
#define IMA_CLAMP_U (1 << 4)
#define IMA_CLAMP_V (1 << 5)
#define IMA_TPAGE_REFRESH (1 << 6)
#define IMA_GLBIND_IS_DATA (1 << 7) /* opengl image texture bound as non-color data */
/* ima->type and ima->source moved to BKE_image.h, for API */
/* render */
#define IMA_MAX_RENDER_TEXT 512
#define IMA_MAX_RENDER_SLOT 8
#define IMA_MAX_RENDER_TEXT (1 << 9)
#define IMA_MAX_RENDER_SLOT (1 << 3)
/* gen_flag */
#define IMA_GEN_FLOAT 1

View File

@ -116,11 +116,11 @@ typedef struct Lamp {
/* **************** LAMP ********************* */
/* flag */
#define LA_DS_EXPAND 1
#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 4
#define LA_DS_SHOW_TEXS (1 << 2)
/* type */
#define LA_LOCAL 0
@ -158,8 +158,8 @@ typedef struct Lamp {
#define LA_LAYER_SHADOW_RECEIVE 2
/* sun effect type*/
#define LA_SUN_EFFECT_SKY 1
#define LA_SUN_EFFECT_AP 2
#define LA_SUN_EFFECT_SKY (1 << 0)
#define LA_SUN_EFFECT_AP (1 << 1)
/* falloff_type */
#define LA_FALLOFF_CONSTANT 0
@ -177,8 +177,8 @@ typedef struct Lamp {
#define LA_SHADBUF_DEEP 3
/* bufflag, auto clipping */
#define LA_SHADBUF_AUTO_START 1
#define LA_SHADBUF_AUTO_END 2
#define LA_SHADBUF_AUTO_START (1 << 0)
#define LA_SHADBUF_AUTO_END (1 << 1)
/* filtertype */
#define LA_SHADBUF_BOX 0
@ -198,14 +198,14 @@ typedef struct Lamp {
/* ray_samp_type */
// #define LA_SAMP_ROUND 1 // UNUSED
#define LA_SAMP_UMBRA 2
#define LA_SAMP_DITHER 4
#define LA_SAMP_JITTER 8
// #define LA_SAMP_ROUND (1 << 0) // UNUSED
#define LA_SAMP_UMBRA (1 << 1)
#define LA_SAMP_DITHER (1 << 2)
#define LA_SAMP_JITTER (1 << 3)
/* mapto */
#define LAMAP_COL 1
#define LAMAP_SHAD 2
#define LAMAP_COL (1 << 0)
#define LAMAP_SHAD (1 << 1)
/* shadowmap_type */
#define LA_SHADMAP_SIMPLE 0

View File

@ -172,13 +172,13 @@ enum {
/* ob->restrictflag */
#define MASK_RESTRICT_VIEW 1
#define MASK_RESTRICT_SELECT 2
#define MASK_RESTRICT_RENDER 4
#define MASK_RESTRICT_VIEW (1 << 0)
#define MASK_RESTRICT_SELECT (1 << 1)
#define MASK_RESTRICT_RENDER (1 << 2)
/* SpaceClip->mask_draw_flag */
#define MASK_DRAWFLAG_SMOOTH 1
#define MASK_DRAWFLAG_OVERLAY 2
#define MASK_DRAWFLAG_SMOOTH (1 << 0)
#define MASK_DRAWFLAG_OVERLAY (1 << 1)
/* copy of eSpaceImage_UVDT */
/* SpaceClip->mask_draw_type */

View File

@ -209,25 +209,25 @@ typedef struct Material {
/* **************** GAME PROPERTIES ********************* */
// Blend Transparency Options - alpha_blend /* match GPU_material::GPUBlendMode */
#define GEMAT_SOLID 0 /* GPU_BLEND_SOLID */
#define GEMAT_ADD 1 /* GPU_BLEND_ADD */
#define GEMAT_ALPHA 2 /* GPU_BLEND_ALPHA */
#define GEMAT_CLIP 4 /* GPU_BLEND_CLIP */
#define GEMAT_ALPHA_SORT 8 /* GPU_BLEND_ALPHA_SORT */
#define GEMAT_ALPHA_TO_COVERAGE 16 /* GPU_BLEND_ALPHA_TO_COVERAGE */
#define GEMAT_SOLID 0 /* GPU_BLEND_SOLID */
#define GEMAT_ADD (1 << 0) /* GPU_BLEND_ADD */
#define GEMAT_ALPHA (1 << 1) /* GPU_BLEND_ALPHA */
#define GEMAT_CLIP (1 << 2) /* GPU_BLEND_CLIP */
#define GEMAT_ALPHA_SORT (1 << 3) /* GPU_BLEND_ALPHA_SORT */
#define GEMAT_ALPHA_TO_COVERAGE (1 << 4) /* GPU_BLEND_ALPHA_TO_COVERAGE */
// Game Options - flag
#define GEMAT_BACKCULL 16 /* KX_BACKCULL */
#define GEMAT_SHADED 32 /* KX_LIGHT */
#define GEMAT_TEXT 64 /* RAS_RENDER_3DPOLYGON_TEXT */
#define GEMAT_NOPHYSICS 128
#define GEMAT_INVISIBLE 256
#define GEMAT_BACKCULL (1 << 4) /* KX_BACKCULL */
#define GEMAT_SHADED (1 << 5) /* KX_LIGHT */
#define GEMAT_TEXT (1 << 6) /* RAS_RENDER_3DPOLYGON_TEXT */
#define GEMAT_NOPHYSICS (1 << 7)
#define GEMAT_INVISIBLE (1 << 8)
// Face Orientation Options - face_orientation
#define GEMAT_NORMAL 0
#define GEMAT_HALO 512 /* BILLBOARD_SCREENALIGNED */
#define GEMAT_BILLBOARD 1024 /* BILLBOARD_AXISALIGNED */
#define GEMAT_SHADOW 2048 /* SHADOW */
#define GEMAT_NORMAL 0
#define GEMAT_HALO (1 << 9) /* BILLBOARD_SCREENALIGNED */
#define GEMAT_BILLBOARD (1 << 10) /* BILLBOARD_AXISALIGNED */
#define GEMAT_SHADOW (1 << 11) /* SHADOW */
// Use Textures - not defined directly in the UI
#define GEMAT_TEX 4096 /* KX_TEX */
@ -249,59 +249,59 @@ typedef struct Material {
/* flag */
/* for render */
#define MA_IS_USED 1
#define MA_IS_USED (1 << 0)
/* for dopesheet */
#define MA_DS_EXPAND 2
#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 4
#define MA_DS_SHOW_TEXS (1 << 2)
/* mode (is int) */
#define MA_TRACEBLE 1
#define MA_SHADOW 2
#define MA_SHLESS 4
#define MA_WIRE 8 /* deprecated */
#define MA_VERTEXCOL 16
#define MA_HALO_SOFT 16
#define MA_HALO 32 /* deprecated */
#define MA_ZTRANSP 64
#define MA_VERTEXCOLP 128
#define MA_ZINV 256
#define MA_HALO_RINGS 256
#define MA_ENV 512
#define MA_HALO_LINES 512
#define MA_ONLYSHADOW 1024
#define MA_HALO_XALPHA 1024
#define MA_STAR 0x800
#define MA_FACETEXTURE 0x800
#define MA_HALOTEX 0x1000
#define MA_HALOPUNO 0x2000
#define MA_ONLYCAST 0x2000
#define MA_NOMIST 0x4000
#define MA_HALO_SHADE 0x4000
#define MA_HALO_FLARE 0x8000
#define MA_TRANSP 0x10000
#define MA_RAYTRANSP 0x20000
#define MA_RAYMIRROR 0x40000
#define MA_SHADOW_TRA 0x80000
#define MA_RAMP_COL 0x100000
#define MA_RAMP_SPEC 0x200000
#define MA_RAYBIAS 0x400000
#define MA_FULL_OSA 0x800000
#define MA_TANGENT_STR 0x1000000
#define MA_SHADBUF 0x2000000
#define MA_TRACEBLE (1 << 0)
#define MA_SHADOW (1 << 1)
#define MA_SHLESS (1 << 2)
#define MA_WIRE (1 << 3) /* deprecated */
#define MA_VERTEXCOL (1 << 4)
#define MA_HALO_SOFT (1 << 4)
#define MA_HALO (1 << 5) /* deprecated */
#define MA_ZTRANSP (1 << 6)
#define MA_VERTEXCOLP (1 << 7)
#define MA_ZINV (1 << 8)
#define MA_HALO_RINGS (1 << 8)
#define MA_ENV (1 << 9)
#define MA_HALO_LINES (1 << 9)
#define MA_ONLYSHADOW (1 << 10)
#define MA_HALO_XALPHA (1 << 10)
#define MA_STAR (1 << 11)
#define MA_FACETEXTURE (1 << 11)
#define MA_HALOTEX (1 << 12)
#define MA_HALOPUNO (1 << 13)
#define MA_ONLYCAST (1 << 13)
#define MA_NOMIST (1 << 14)
#define MA_HALO_SHADE (1 << 14)
#define MA_HALO_FLARE (1 << 15)
#define MA_TRANSP (1 << 16)
#define MA_RAYTRANSP (1 << 17)
#define MA_RAYMIRROR (1 << 18)
#define MA_SHADOW_TRA (1 << 19)
#define MA_RAMP_COL (1 << 20)
#define MA_RAMP_SPEC (1 << 21)
#define MA_RAYBIAS (1 << 22)
#define MA_FULL_OSA (1 << 23)
#define MA_TANGENT_STR (1 << 24)
#define MA_SHADBUF (1 << 25)
/* note; we drop MA_TANGENT_STR later to become tangent_u */
#define MA_TANGENT_V 0x4000000
#define MA_TANGENT_V (1 << 26)
/* qdn: a bit clumsy this, tangents needed for normal maps separated from shading */
#define MA_NORMAP_TANG 0x8000000
#define MA_GROUP_NOLAY 0x10000000
#define MA_FACETEXTURE_ALPHA 0x20000000
#define MA_STR_B_UNITS 0x40000000
#define MA_STR_SURFDIFF 0x80000000
#define MA_NORMAP_TANG (1 << 27)
#define MA_GROUP_NOLAY (1 << 28)
#define MA_FACETEXTURE_ALPHA (1 << 29)
#define MA_STR_B_UNITS (1 << 30)
#define MA_STR_SURFDIFF (1 << 31u)
#define MA_MODE_MASK 0x6fffffff /* all valid mode bits */
#define MA_MODE_MASK (((1 << 31u) - 1) & ~(1 << 28u)) /* all valid mode bits */
#define MA_MODE_PIPELINE (MA_TRANSP | MA_ZTRANSP | MA_RAYTRANSP \
| MA_TRACEBLE | MA_FULL_OSA | MA_ENV | MA_ZINV \
| MA_ONLYCAST | MA_SHADBUF)
@ -373,78 +373,77 @@ typedef struct Material {
#define MA_RAMP_LINEAR 17
/* texco */
#define TEXCO_ORCO 1
#define TEXCO_REFL 2
#define TEXCO_NORM 4
#define TEXCO_GLOB 8
#define TEXCO_UV 16
#define TEXCO_OBJECT 32
#define TEXCO_LAVECTOR 64
#define TEXCO_VIEW 128
#define TEXCO_STICKY_ 256 // DEPRECATED
#define TEXCO_OSA 512
#define TEXCO_WINDOW 1024
#define NEED_UV 2048
#define TEXCO_TANGENT 4096
#define TEXCO_ORCO (1 << 0)
#define TEXCO_REFL (1 << 1)
#define TEXCO_NORM (1 << 2)
#define TEXCO_GLOB (1 << 3)
#define TEXCO_UV (1 << 4)
#define TEXCO_OBJECT (1 << 5)
#define TEXCO_LAVECTOR (1 << 6)
#define TEXCO_VIEW (1 << 7)
#define TEXCO_STICKY_ (1 << 8) // DEPRECATED
#define TEXCO_OSA (1 << 9)
#define TEXCO_WINDOW (1 << 10)
#define NEED_UV (1 << 11)
#define TEXCO_TANGENT (1 << 12)
/* still stored in vertex->accum, 1 D */
#define TEXCO_STRAND 8192
#define TEXCO_PARTICLE 8192 /* strand is used for normal materials, particle for halo materials */
#define TEXCO_STRESS 16384
#define TEXCO_SPEED 32768
#define TEXCO_STRAND (1 << 13)
#define TEXCO_PARTICLE (1 << 13) /* strand is used for normal materials, particle for halo materials */
#define TEXCO_STRESS (1 << 14)
#define TEXCO_SPEED (1 << 15)
/* mapto */
#define MAP_COL 1
#define MAP_NORM 2
#define MAP_COLSPEC 4
#define MAP_COLMIR 8
#define MAP_VARS (0xFFF0)
#define MAP_REF 16
#define MAP_SPEC 32
#define MAP_EMIT 64
#define MAP_ALPHA 128
#define MAP_HAR 256
#define MAP_RAYMIRR 512
#define MAP_TRANSLU 1024
#define MAP_AMB 2048
#define MAP_DISPLACE 4096
#define MAP_WARP 8192
// #define MAP_LAYER 16384 /* unused */
#define MAP_COL (1 << 0)
#define MAP_NORM (1 << 1)
#define MAP_COLSPEC (1 << 2)
#define MAP_COLMIR (1 << 3)
#define MAP_VARS (((1 << 16) - 1) & ~((1 << 4) - 1))
#define MAP_REF (1 << 4)
#define MAP_SPEC (1 << 5)
#define MAP_EMIT (1 << 6)
#define MAP_ALPHA (1 << 7)
#define MAP_HAR (1 << 8)
#define MAP_RAYMIRR (1 << 9)
#define MAP_TRANSLU (1 << 10)
#define MAP_AMB (1 << 11)
#define MAP_DISPLACE (1 << 12)
#define MAP_WARP (1 << 13)
// #define MAP_LAYER (1 << 14) /* unused */
/* volume mapto - reuse definitions for now - a bit naughty! */
#define MAP_DENSITY 128
#define MAP_EMISSION 64
#define MAP_EMISSION_COL 1
#define MAP_SCATTERING 16
#define MAP_TRANSMISSION_COL 8
#define MAP_REFLECTION_COL 4
#define MAP_REFLECTION 32
#define MAP_DENSITY (1 << 7)
#define MAP_EMISSION (1 << 6)
#define MAP_EMISSION_COL (1 << 0)
#define MAP_SCATTERING (1 << 4)
#define MAP_TRANSMISSION_COL (1 << 3)
#define MAP_REFLECTION_COL (1 << 2)
#define MAP_REFLECTION (1 << 5)
/* mapto for halo */
//#define MAP_HA_COL 1
//#define MAP_HA_ALPHA 128
//#define MAP_HA_HAR 256
//#define MAP_HA_SIZE 2
//#define MAP_HA_ADD 64
//#define MAP_HA_COL (1 << 0)
//#define MAP_HA_ALPHA (1 << 7)
//#define MAP_HA_HAR (1 << 8)
//#define MAP_HA_SIZE (1 << 1)
//#define MAP_HA_ADD (1 << 6)
/* pmapto */
/* init */
#define MAP_PA_INIT 31
#define MAP_PA_TIME 1
#define MAP_PA_LIFE 2
#define MAP_PA_DENS 4
#define MAP_PA_SIZE 8
#define MAP_PA_LENGTH 16
#define MAP_PA_INIT ((1 << 5) - 1)
#define MAP_PA_TIME (1 << 0)
#define MAP_PA_LIFE (1 << 1)
#define MAP_PA_DENS (1 << 2)
#define MAP_PA_SIZE (1 << 3)
#define MAP_PA_LENGTH (1 << 4)
/* reset */
#define MAP_PA_IVEL 32
#define MAP_PA_IVEL (1 << 5)
/* physics */
#define MAP_PA_PVEL 64
#define MAP_PA_PVEL (1 << 6)
/* path cache */
#define MAP_PA_CACHE 912
#define MAP_PA_CLUMP 128
#define MAP_PA_KINK 256
#define MAP_PA_ROUGH 512
#define MAP_PA_FREQ 1024
#define MAP_PA_CLUMP (1 << 7)
#define MAP_PA_KINK (1 << 8)
#define MAP_PA_ROUGH (1 << 9)
#define MAP_PA_FREQ (1 << 10)
/* pr_type */
#define MA_FLAT 0

View File

@ -1233,8 +1233,8 @@ enum {
/* Remesh modifier */
typedef enum eRemeshModifierFlags {
MOD_REMESH_FLOOD_FILL = 1,
MOD_REMESH_SMOOTH_SHADING = 2,
MOD_REMESH_FLOOD_FILL = (1 << 0),
MOD_REMESH_SMOOTH_SHADING = (1 << 1),
} RemeshModifierFlags;
typedef enum eRemeshModifierMode {

View File

@ -158,15 +158,15 @@ typedef enum eNodeSocketInOut {
/* sock->flag, first bit is select */
typedef enum eNodeSocketFlag {
SOCK_HIDDEN = 2, /* hidden is user defined, to hide unused */
SOCK_IN_USE = 4, /* for quick check if socket is linked */
SOCK_UNAVAIL = 8, /* unavailable is for dynamic sockets */
// SOCK_DYNAMIC = 16, /* DEPRECATED dynamic socket (can be modified by user) */
// SOCK_INTERNAL = 32, /* DEPRECATED group socket should not be exposed */
SOCK_COLLAPSED = 64, /* socket collapsed in UI */
SOCK_HIDE_VALUE = 128, /* hide socket value, if it gets auto default */
SOCK_AUTO_HIDDEN__DEPRECATED = 256, /* socket hidden automatically, to distinguish from manually hidden */
SOCK_NO_INTERNAL_LINK = 512
SOCK_HIDDEN = (1 << 1), /* hidden is user defined, to hide unused */
SOCK_IN_USE = (1 << 2), /* for quick check if socket is linked */
SOCK_UNAVAIL = (1 << 3), /* unavailable is for dynamic sockets */
// SOCK_DYNAMIC = (1 << 4), /* DEPRECATED dynamic socket (can be modified by user) */
// SOCK_INTERNAL = (1 << 5), /* DEPRECATED group socket should not be exposed */
SOCK_COLLAPSED = (1 << 6), /* socket collapsed in UI */
SOCK_HIDE_VALUE = (1 << 7), /* hide socket value, if it gets auto default */
SOCK_AUTO_HIDDEN__DEPRECATED = (1 << 8), /* socket hidden automatically, to distinguish from manually hidden */
SOCK_NO_INTERNAL_LINK = (1 << 9),
} eNodeSocketFlag;
/* limit data in bNode to what we want to see saved? */
@ -314,9 +314,9 @@ typedef struct bNodeLink {
} bNodeLink;
/* link->flag */
#define NODE_LINKFLAG_HILITE 1 /* link has been successfully validated */
#define NODE_LINK_VALID 2
#define NODE_LINK_TEST 4 /* free test flag, undefined */
#define NODE_LINKFLAG_HILITE (1 << 0) /* link has been successfully validated */
#define NODE_LINK_VALID (1 << 1)
#define NODE_LINK_TEST (1 << 2) /* free test flag, undefined */
/* tree->edit_quality/tree->render_quality */
#define NTREE_QUALITY_HIGH 0
@ -411,28 +411,33 @@ typedef struct bNodeTree {
#define NTREE_TYPE_INIT 1
/* ntree->flag */
#define NTREE_DS_EXPAND 1 /* for animation editors */
#define NTREE_COM_OPENCL 2 /* use opencl */
#define NTREE_TWO_PASS 4 /* two pass */
#define NTREE_COM_GROUPNODE_BUFFER 8 /* use groupnode buffers */
#define NTREE_VIEWER_BORDER 16 /* use a border for viewer nodes */
#define NTREE_IS_LOCALIZED 32 /* tree is localized copy, free when deleting node groups */
#define NTREE_DS_EXPAND (1 << 0) /* for animation editors */
#define NTREE_COM_OPENCL (1 << 1) /* use opencl */
#define NTREE_TWO_PASS (1 << 2) /* two pass */
#define NTREE_COM_GROUPNODE_BUFFER (1 << 3) /* use groupnode buffers */
#define NTREE_VIEWER_BORDER (1 << 4) /* use a border for viewer nodes */
#define NTREE_IS_LOCALIZED (1 << 5) /* tree is localized copy, free when deleting node groups */
/* XXX not nice, but needed as a temporary flags
* for group updates after library linking.
*/
#define NTREE_DO_VERSIONS_GROUP_EXPOSE_2_56_2 1024 /* changes from r35033 */
#define NTREE_DO_VERSIONS_CUSTOMNODES_GROUP 2048 /* custom_nodes branch: remove links to node tree sockets */
#define NTREE_DO_VERSIONS_CUSTOMNODES_GROUP_CREATE_INTERFACE 4096 /* custom_nodes branch: create group input/output nodes */
/* changes from r35033 */
#define NTREE_DO_VERSIONS_GROUP_EXPOSE_2_56_2 (1 << 10)
/* custom_nodes branch: remove links to node tree sockets */
#define NTREE_DO_VERSIONS_CUSTOMNODES_GROUP (1 << 11)
/* custom_nodes branch: create group input/output nodes */
#define NTREE_DO_VERSIONS_CUSTOMNODES_GROUP_CREATE_INTERFACE (1 << 12)
/* ntree->update */
typedef enum eNodeTreeUpdate {
NTREE_UPDATE = 0xFFFF, /* generic update flag (includes all others) */
NTREE_UPDATE_LINKS = 1, /* links have been added or removed */
NTREE_UPDATE_NODES = 2, /* nodes or sockets have been added or removed */
NTREE_UPDATE_GROUP_IN = 16, /* group inputs have changed */
NTREE_UPDATE_GROUP_OUT = 32, /* group outputs have changed */
NTREE_UPDATE_GROUP = 48 /* group has changed (generic flag including all other group flags) */
NTREE_UPDATE_LINKS = (1 << 0), /* links have been added or removed */
NTREE_UPDATE_NODES = (1 << 1), /* nodes or sockets have been added or removed */
NTREE_UPDATE_GROUP_IN = (1 << 4), /* group inputs have changed */
NTREE_UPDATE_GROUP_OUT = (1 << 5), /* group outputs have changed */
/* group has changed (generic flag including all other group flags) */
NTREE_UPDATE_GROUP = (NTREE_UPDATE_GROUP_IN | NTREE_UPDATE_GROUP_OUT)
} eNodeTreeUpdate;
@ -482,10 +487,10 @@ enum {
};
enum {
CMP_NODE_LENSFLARE_GHOST = 1,
CMP_NODE_LENSFLARE_GLOW = 2,
CMP_NODE_LENSFLARE_CIRCLE = 4,
CMP_NODE_LENSFLARE_STREAKS = 8
CMP_NODE_LENSFLARE_GHOST = (1 << 0),
CMP_NODE_LENSFLARE_GLOW = (1 << 1),
CMP_NODE_LENSFLARE_CIRCLE = (1 << 2),
CMP_NODE_LENSFLARE_STREAKS = (1 << 3)
};
enum {

View File

@ -352,27 +352,27 @@ typedef struct SoftBody {
/* pd->flag: various settings */
#define PFIELD_USEMAX 1
/*#define PDEFLE_DEFORM 2*/ /*UNUSED*/
#define PFIELD_GUIDE_PATH_ADD 4 /* TODO: do_versions for below */
#define PFIELD_PLANAR 8 /* used for do_versions */
#define PDEFLE_KILL_PART 16
#define PFIELD_POSZ 32 /* used for do_versions */
#define PFIELD_TEX_OBJECT 64
#define PFIELD_GLOBAL_CO 64 /* used for turbulence */
#define PFIELD_TEX_2D 128
#define PFIELD_MULTIPLE_SPRINGS 128 /* used for harmonic force */
#define PFIELD_USEMIN 256
#define PFIELD_USEMAXR 512
#define PFIELD_USEMINR 1024
#define PFIELD_TEX_ROOTCO 2048
#define PFIELD_SURFACE (1<<12) /* used for do_versions */
#define PFIELD_VISIBILITY (1<<13)
#define PFIELD_DO_LOCATION (1<<14)
#define PFIELD_DO_ROTATION (1<<15)
#define PFIELD_GUIDE_PATH_WEIGHT (1<<16) /* apply curve weights */
#define PFIELD_SMOKE_DENSITY (1<<17) /* multiply smoke force by density */
#define PFIELD_GRAVITATION (1<<18) /* used for (simple) force */
#define PFIELD_USEMAX (1 << 0)
/*#define PDEFLE_DEFORM (1 << 1)*/ /*UNUSED*/
#define PFIELD_GUIDE_PATH_ADD (1 << 2) /* TODO: do_versions for below */
#define PFIELD_PLANAR (1 << 3) /* used for do_versions */
#define PDEFLE_KILL_PART (1 << 4)
#define PFIELD_POSZ (1 << 5) /* used for do_versions */
#define PFIELD_TEX_OBJECT (1 << 6)
#define PFIELD_GLOBAL_CO (1 << 6) /* used for turbulence */
#define PFIELD_TEX_2D (1 << 7)
#define PFIELD_MULTIPLE_SPRINGS (1 << 7) /* used for harmonic force */
#define PFIELD_USEMIN (1 << 8)
#define PFIELD_USEMAXR (1 << 9)
#define PFIELD_USEMINR (1 << 10)
#define PFIELD_TEX_ROOTCO (1 << 11)
#define PFIELD_SURFACE (1 << 12) /* used for do_versions */
#define PFIELD_VISIBILITY (1 << 13)
#define PFIELD_DO_LOCATION (1 << 14)
#define PFIELD_DO_ROTATION (1 << 15)
#define PFIELD_GUIDE_PATH_WEIGHT (1 << 16) /* apply curve weights */
#define PFIELD_SMOKE_DENSITY (1 << 17) /* multiply smoke force by density */
#define PFIELD_GRAVITATION (1 << 18) /* used for (simple) force */
/* pd->falloff */
#define PFIELD_FALL_SPHERE 0
@ -396,22 +396,22 @@ typedef struct SoftBody {
#define PFIELD_Z_NEG 2
/* pointcache->flag */
#define PTCACHE_BAKED 1
#define PTCACHE_OUTDATED 2
#define PTCACHE_SIMULATION_VALID 4
#define PTCACHE_BAKING 8
//#define PTCACHE_BAKE_EDIT 16
//#define PTCACHE_BAKE_EDIT_ACTIVE 32
#define PTCACHE_DISK_CACHE 64
//#define PTCACHE_QUICK_CACHE 128 /* removed since 2.64 - [#30974], could be added back in a more useful way */
#define PTCACHE_FRAMES_SKIPPED 256
#define PTCACHE_EXTERNAL 512
#define PTCACHE_READ_INFO 1024
#define PTCACHE_BAKED (1 << 0)
#define PTCACHE_OUTDATED (1 << 1)
#define PTCACHE_SIMULATION_VALID (1 << 2)
#define PTCACHE_BAKING (1 << 3)
//#define PTCACHE_BAKE_EDIT (1 << 4)
//#define PTCACHE_BAKE_EDIT_ACTIVE (1 << 5)
#define PTCACHE_DISK_CACHE (1 << 6)
//#define PTCACHE_QUICK_CACHE (1 << 7) /* removed since 2.64 - [#30974], could be added back in a more useful way */
#define PTCACHE_FRAMES_SKIPPED (1 << 8)
#define PTCACHE_EXTERNAL (1 << 9)
#define PTCACHE_READ_INFO (1 << 10)
/* don't use the filename of the blendfile the data is linked from (write a local cache) */
#define PTCACHE_IGNORE_LIBPATH 2048
#define PTCACHE_IGNORE_LIBPATH (1 << 11)
/* high resolution cache is saved for smoke for backwards compatibility, so set this flag to know it's a "fake" cache */
#define PTCACHE_FAKE_SMOKE (1<<12)
#define PTCACHE_IGNORE_CLEAR (1<<13)
#define PTCACHE_FAKE_SMOKE (1 << 12)
#define PTCACHE_IGNORE_CLEAR (1 << 13)
/* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */
#define PTCACHE_REDO_NEEDED 258

View File

@ -221,21 +221,21 @@ typedef struct SceneRenderLayer {
} SceneRenderLayer;
/* SceneRenderLayer.layflag */
#define SCE_LAY_SOLID 1
#define SCE_LAY_ZTRA 2
#define SCE_LAY_HALO 4
#define SCE_LAY_EDGE 8
#define SCE_LAY_SKY 16
#define SCE_LAY_STRAND 32
#define SCE_LAY_FRS 64
#define SCE_LAY_AO 128
/* flags between 256 and 0x8000 are set to 1 already, for future options */
#define SCE_LAY_SOLID (1 << 0)
#define SCE_LAY_ZTRA (1 << 1)
#define SCE_LAY_HALO (1 << 2)
#define SCE_LAY_EDGE (1 << 3)
#define SCE_LAY_SKY (1 << 4)
#define SCE_LAY_STRAND (1 << 5)
#define SCE_LAY_FRS (1 << 6)
#define SCE_LAY_AO (1 << 7)
/* flags between (1 << 8) and (1 << 15) are set to 1 already, for future options */
#define SCE_LAY_ALL_Z 0x8000
#define SCE_LAY_XOR 0x10000
#define SCE_LAY_DISABLE 0x20000
#define SCE_LAY_ZMASK 0x40000
#define SCE_LAY_NEG_ZMASK 0x80000
#define SCE_LAY_ALL_Z (1 << 15)
#define SCE_LAY_XOR (1 << 16)
#define SCE_LAY_DISABLE (1 << 17)
#define SCE_LAY_ZMASK (1 << 18)
#define SCE_LAY_NEG_ZMASK (1 << 19)
/* SceneRenderLayer.passflag */
typedef enum eScenePassType {
@ -1737,41 +1737,41 @@ typedef struct Scene {
#define SCER_SHOW_SUBFRAME (1<<3)
/* RenderData.mode */
#define R_OSA 0x0001
#define R_SHADOW 0x0002
#define R_GAMMA 0x0004
#define R_ORTHO 0x0008
#define R_ENVMAP 0x0010
#define R_EDGE 0x0020
#define R_FIELDS 0x0040
#define R_FIELDSTILL 0x0080
/*#define R_RADIO 0x0100 */ /* deprecated */
#define R_BORDER 0x0200
#define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
#define R_CROP 0x0800
#define R_OSA (1 << 0)
#define R_SHADOW (1 << 1)
#define R_GAMMA (1 << 2)
#define R_ORTHO (1 << 3)
#define R_ENVMAP (1 << 4)
#define R_EDGE (1 << 5)
#define R_FIELDS (1 << 6)
#define R_FIELDSTILL (1 << 7)
/*#define R_RADIO (1 << 8) */ /* deprecated */
#define R_BORDER (1 << 9)
#define R_PANORAMA (1 << 10) /* deprecated as scene option, still used in renderer */
#define R_CROP (1 << 11)
/* Disable camera switching: runtime (DURIAN_CAMERA_SWITCH) */
#define R_NO_CAMERA_SWITCH 0x1000
#define R_ODDFIELD 0x2000
#define R_MBLUR 0x4000
#define R_NO_CAMERA_SWITCH (1 << 12)
#define R_ODDFIELD (1 << 13)
#define R_MBLUR (1 << 14)
/* unified was here */
#define R_RAYTRACE 0x10000
#define R_RAYTRACE (1 << 16)
/* R_GAUSS is obsolete, but used to retrieve setting from old files */
#define R_GAUSS 0x20000
#define R_GAUSS (1 << 17)
/* fbuf obsolete... */
/*#define R_FBUF 0x40000*/
/*#define R_FBUF (1 << 18)*/
/* threads obsolete... is there for old files, now use for autodetect threads */
#define R_THREADS 0x80000
#define R_THREADS (1 << 19)
/* Use the same flag for autothreads */
#define R_FIXED_THREADS 0x80000
#define R_FIXED_THREADS (1 << 19)
#define R_SPEED 0x100000
#define R_SSS 0x200000
#define R_NO_OVERWRITE 0x400000 /* skip existing files */
#define R_TOUCH 0x800000 /* touch files before rendering */
#define R_SIMPLIFY 0x1000000
#define R_EDGE_FRS 0x2000000 /* R_EDGE reserved for Freestyle */
#define R_PERSISTENT_DATA 0x4000000 /* keep data around for re-render */
#define R_USE_WS_SHADING 0x8000000 /* use world space interpretation of lighting data */
#define R_SPEED (1 << 20)
#define R_SSS (1 << 21)
#define R_NO_OVERWRITE (1 << 22) /* skip existing files */
#define R_TOUCH (1 << 23) /* touch files before rendering */
#define R_SIMPLIFY (1 << 24)
#define R_EDGE_FRS (1 << 25) /* R_EDGE reserved for Freestyle */
#define R_PERSISTENT_DATA (1 << 26) /* keep data around for re-render */
#define R_USE_WS_SHADING (1 << 27) /* use world space interpretation of lighting data */
/* RenderData.seq_flag */
enum {
@ -1807,51 +1807,51 @@ enum {
#define R_RAYSTRUCTURE_SIMD_QBVH 5 /* needs SIMD */
/* RenderData.raytrace_options */
#define R_RAYTRACE_USE_LOCAL_COORDS 0x0001
#define R_RAYTRACE_USE_INSTANCES 0x0002
#define R_RAYTRACE_USE_LOCAL_COORDS (1 << 0)
#define R_RAYTRACE_USE_INSTANCES (1 << 1)
/* RenderData.scemode (int now) */
#define R_DOSEQ 0x0001
#define R_BG_RENDER 0x0002
#define R_DOSEQ (1 << 0)
#define R_BG_RENDER (1 << 1)
/* passepartout is camera option now, keep this for backward compatibility */
#define R_PASSEPARTOUT 0x0004
#define R_BUTS_PREVIEW 0x0008
#define R_EXTENSION 0x0010
#define R_MATNODE_PREVIEW 0x0020
#define R_DOCOMP 0x0040
#define R_COMP_CROP 0x0080
#define R_FREE_IMAGE 0x0100
#define R_SINGLE_LAYER 0x0200
#define R_EXR_TILE_FILE 0x0400
/* #define R_COMP_FREE 0x0800 */
#define R_NO_IMAGE_LOAD 0x1000
#define R_NO_TEX 0x2000
#define R_NO_FRAME_UPDATE 0x4000
#define R_FULL_SAMPLE 0x8000
/* #define R_DEPRECATED 0x10000 */
/* #define R_RECURS_PROTECTION 0x20000 */
#define R_TEXNODE_PREVIEW 0x40000
#define R_VIEWPORT_PREVIEW 0x80000
#define R_EXR_CACHE_FILE 0x100000
#define R_MULTIVIEW 0x200000
#define R_PASSEPARTOUT (1 << 2)
#define R_BUTS_PREVIEW (1 << 3)
#define R_EXTENSION (1 << 4)
#define R_MATNODE_PREVIEW (1 << 5)
#define R_DOCOMP (1 << 6)
#define R_COMP_CROP (1 << 7)
#define R_FREE_IMAGE (1 << 8)
#define R_SINGLE_LAYER (1 << 9)
#define R_EXR_TILE_FILE (1 << 10)
/* #define R_COMP_FREE (1 << 11) */
#define R_NO_IMAGE_LOAD (1 << 12)
#define R_NO_TEX (1 << 13)
#define R_NO_FRAME_UPDATE (1 << 14)
#define R_FULL_SAMPLE (1 << 15)
/* #define R_DEPRECATED (1 << 16) */
/* #define R_RECURS_PROTECTION (1 << 17) */
#define R_TEXNODE_PREVIEW (1 << 18)
#define R_VIEWPORT_PREVIEW (1 << 19)
#define R_EXR_CACHE_FILE (1 << 20)
#define R_MULTIVIEW (1 << 21)
/* RenderData.stamp */
#define R_STAMP_TIME 0x0001
#define R_STAMP_FRAME 0x0002
#define R_STAMP_DATE 0x0004
#define R_STAMP_CAMERA 0x0008
#define R_STAMP_SCENE 0x0010
#define R_STAMP_NOTE 0x0020
#define R_STAMP_DRAW 0x0040 /* draw in the image */
#define R_STAMP_MARKER 0x0080
#define R_STAMP_FILENAME 0x0100
#define R_STAMP_SEQSTRIP 0x0200
#define R_STAMP_RENDERTIME 0x0400
#define R_STAMP_CAMERALENS 0x0800
#define R_STAMP_STRIPMETA 0x1000
#define R_STAMP_MEMORY 0x2000
#define R_STAMP_HIDE_LABELS 0x4000
#define R_STAMP_FRAME_RANGE 0x8000
#define R_STAMP_TIME (1 << 0)
#define R_STAMP_FRAME (1 << 1)
#define R_STAMP_DATE (1 << 2)
#define R_STAMP_CAMERA (1 << 3)
#define R_STAMP_SCENE (1 << 4)
#define R_STAMP_NOTE (1 << 5)
#define R_STAMP_DRAW (1 << 6) /* draw in the image */
#define R_STAMP_MARKER (1 << 7)
#define R_STAMP_FILENAME (1 << 8)
#define R_STAMP_SEQSTRIP (1 << 9)
#define R_STAMP_RENDERTIME (1 << 10)
#define R_STAMP_CAMERALENS (1 << 11)
#define R_STAMP_STRIPMETA (1 << 12)
#define R_STAMP_MEMORY (1 << 13)
#define R_STAMP_HIDE_LABELS (1 << 14)
#define R_STAMP_FRAME_RANGE (1 << 15)
#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE| \
R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP| \
R_STAMP_RENDERTIME|R_STAMP_CAMERALENS|R_STAMP_MEMORY| \
@ -1871,33 +1871,33 @@ enum {
#ifdef DNA_DEPRECATED
/* RenderData.subimtype flag options for imtype */
enum {
R_OPENEXR_HALF = 1, /*deprecated*/
R_OPENEXR_ZBUF = 2, /*deprecated*/
R_PREVIEW_JPG = 4, /*deprecated*/
R_CINEON_LOG = 8, /*deprecated*/
R_TIFF_16BIT = 16, /*deprecated*/
R_OPENEXR_HALF = (1 << 0), /*deprecated*/
R_OPENEXR_ZBUF = (1 << 1), /*deprecated*/
R_PREVIEW_JPG = (1 << 2), /*deprecated*/
R_CINEON_LOG = (1 << 3), /*deprecated*/
R_TIFF_16BIT = (1 << 4), /*deprecated*/
R_JPEG2K_12BIT = 32, /* Jpeg2000 */ /*deprecated*/
R_JPEG2K_16BIT = 64, /*deprecated*/
R_JPEG2K_YCC = 128, /* when disabled use RGB */ /*deprecated*/
R_JPEG2K_CINE_PRESET = 256, /*deprecated*/
R_JPEG2K_CINE_48FPS = 512, /*deprecated*/
R_JPEG2K_12BIT = (1 << 5), /* Jpeg2000 */ /*deprecated*/
R_JPEG2K_16BIT = (1 << 6), /*deprecated*/
R_JPEG2K_YCC = (1 << 7), /* when disabled use RGB */ /*deprecated*/
R_JPEG2K_CINE_PRESET = (1 << 8), /*deprecated*/
R_JPEG2K_CINE_48FPS = (1 << 9), /*deprecated*/
};
#endif
/* bake_mode: same as RE_BAKE_xxx defines */
/* RenderData.bake_flag */
#define R_BAKE_CLEAR 1
#define R_BAKE_OSA 2
#define R_BAKE_TO_ACTIVE 4
#define R_BAKE_NORMALIZE 8
#define R_BAKE_MULTIRES 16
#define R_BAKE_LORES_MESH 32
#define R_BAKE_VCOL 64
#define R_BAKE_USERSCALE 128
#define R_BAKE_CAGE 256
#define R_BAKE_SPLIT_MAT 512
#define R_BAKE_AUTO_NAME 1024
#define R_BAKE_CLEAR (1 << 0)
#define R_BAKE_OSA (1 << 1)
#define R_BAKE_TO_ACTIVE (1 << 2)
#define R_BAKE_NORMALIZE (1 << 3)
#define R_BAKE_MULTIRES (1 << 4)
#define R_BAKE_LORES_MESH (1 << 5)
#define R_BAKE_VCOL (1 << 6)
#define R_BAKE_USERSCALE (1 << 7)
#define R_BAKE_CAGE (1 << 8)
#define R_BAKE_SPLIT_MAT (1 << 9)
#define R_BAKE_AUTO_NAME (1 << 10)
/* RenderData.bake_normal_space */
#define R_BAKE_SPACE_CAMERA 0
@ -1986,12 +1986,12 @@ extern const char *RE_engine_id_CYCLES;
/* Base.flag is in DNA_object_types.h */
/* ToolSettings.snap_flag */
#define SCE_SNAP 1
#define SCE_SNAP_ROTATE 2
#define SCE_SNAP_PEEL_OBJECT 4
#define SCE_SNAP_PROJECT 8
#define SCE_SNAP_NO_SELF 16
#define SCE_SNAP_ABS_GRID 32
#define SCE_SNAP (1 << 0)
#define SCE_SNAP_ROTATE (1 << 1)
#define SCE_SNAP_PEEL_OBJECT (1 << 2)
#define SCE_SNAP_PROJECT (1 << 3)
#define SCE_SNAP_NO_SELF (1 << 4)
#define SCE_SNAP_ABS_GRID (1 << 5)
/* ToolSettings.snap_target */
#define SCE_SNAP_TARGET_CLOSEST 0
@ -2010,9 +2010,9 @@ extern const char *RE_engine_id_CYCLES;
#define SCE_SNAP_MODE_GRID 8
/* ToolSettings.selectmode */
#define SCE_SELECT_VERTEX 1 /* for mesh */
#define SCE_SELECT_EDGE 2
#define SCE_SELECT_FACE 4
#define SCE_SELECT_VERTEX (1 << 0) /* for mesh */
#define SCE_SELECT_EDGE (1 << 1)
#define SCE_SELECT_FACE (1 << 2)
/* MeshStatVis.type */
#define SCE_STATVIS_OVERHANG 0
@ -2022,9 +2022,9 @@ extern const char *RE_engine_id_CYCLES;
#define SCE_STATVIS_SHARP 4
/* ParticleEditSettings.selectmode for particles */
#define SCE_SELECT_PATH 1
#define SCE_SELECT_POINT 2
#define SCE_SELECT_END 4
#define SCE_SELECT_PATH (1 << 0)
#define SCE_SELECT_POINT (1 << 1)
#define SCE_SELECT_END (1 << 2)
/* ToolSettings.prop_mode (proportional falloff) */
#define PROP_SMOOTH 0
@ -2090,10 +2090,10 @@ typedef enum eVGroupSelect {
/* FFMpegCodecData.flags */
enum {
#ifdef DNA_DEPRECATED
FFMPEG_MULTIPLEX_AUDIO = 1, /* deprecated, you can choose none as audiocodec now */
FFMPEG_MULTIPLEX_AUDIO = (1 << 0), /* deprecated, you can choose none as audiocodec now */
#endif
FFMPEG_AUTOSPLIT_OUTPUT = 2,
FFMPEG_LOSSLESS_OUTPUT = 4,
FFMPEG_AUTOSPLIT_OUTPUT = (1 << 1),
FFMPEG_LOSSLESS_OUTPUT = (1 << 2),
FFMPEG_USE_MAX_B_FRAMES = (1 << 3),
};
@ -2163,9 +2163,9 @@ typedef enum eImagePaintMode {
} eImagePaintMode;
/* ImagePaintSettings.flag */
#define IMAGEPAINT_DRAWING 1
// #define IMAGEPAINT_DRAW_TOOL 2 // deprecated
// #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 // deprecated
#define IMAGEPAINT_DRAWING (1 << 0)
// #define IMAGEPAINT_DRAW_TOOL (1 << 1) // deprecated
// #define IMAGEPAINT_DRAW_TOOL_DRAWING (1 << 2) // deprecated
/* projection painting only */
/* ImagePaintSettings.flag */
@ -2183,10 +2183,10 @@ typedef enum eImagePaintMode {
#define IMAGEPAINT_MISSING_STENCIL (1 << 3)
/* ToolSettings.uvcalc_flag */
#define UVCALC_FILLHOLES 1
#define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
#define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
#define UVCALC_USESUBSURF 8 /* Use mesh data after subsurf to compute UVs*/
#define UVCALC_FILLHOLES (1 << 0)
#define UVCALC_NO_ASPECT_CORRECT (1 << 1) /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
#define UVCALC_TRANSFORM_CORRECT (1 << 2) /* adjust UV's while transforming to avoid distortion */
#define UVCALC_USESUBSURF (1 << 3) /* Use mesh data after subsurf to compute UVs*/
/* ToolSettings.uv_flag */
#define UV_SYNC_SELECTION 1
@ -2239,14 +2239,14 @@ typedef enum eGPencil_Placement_Flags {
} eGPencil_Placement_Flags;
/* ToolSettings.particle flag */
#define PE_KEEP_LENGTHS 1
#define PE_LOCK_FIRST 2
#define PE_DEFLECT_EMITTER 4
#define PE_INTERPOLATE_ADDED 8
#define PE_DRAW_PART 16
/* #define PE_X_MIRROR 64 */ /* deprecated */
#define PE_FADE_TIME 128
#define PE_AUTO_VELOCITY 256
#define PE_KEEP_LENGTHS (1 << 0)
#define PE_LOCK_FIRST (1 << 1)
#define PE_DEFLECT_EMITTER (1 << 2)
#define PE_INTERPOLATE_ADDED (1 << 3)
#define PE_DRAW_PART (1 << 4)
/* #define PE_X_MIRROR (1 << 6) */ /* deprecated */
#define PE_FADE_TIME (1 << 7)
#define PE_AUTO_VELOCITY (1 << 8)
/* ParticleEditSettings.brushtype */
#define PE_BRUSH_NONE -1

View File

@ -67,12 +67,12 @@ typedef struct Text {
#define TXT_MAX_UNDO (TXT_INIT_UNDO*TXT_INIT_UNDO)
/* text flags */
#define TXT_ISDIRTY 0x0001
#define TXT_ISMEM 0x0004
#define TXT_ISEXT 0x0008
#define TXT_ISSCRIPT 0x0010 /* used by space handler scriptlinks */
// #define TXT_READONLY 0x0100
// #define TXT_FOLLOW 0x0200 /* always follow cursor (console) */
#define TXT_TABSTOSPACES 0x0400 /* use space instead of tabs */
#define TXT_ISDIRTY (1 << 0)
#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__ */

View File

@ -353,15 +353,15 @@ typedef struct ColorMapping {
#define TEX_MINKOVSKY 6
/* imaflag */
#define TEX_INTERPOL 1
#define TEX_USEALPHA 2
#define TEX_MIPMAP 4
#define TEX_IMAROT 16
#define TEX_CALCALPHA 32
#define TEX_NORMALMAP 2048
#define TEX_GAUSS_MIP 4096
#define TEX_FILTER_MIN 8192
#define TEX_DERIVATIVEMAP 16384
#define TEX_INTERPOL (1 << 0)
#define TEX_USEALPHA (1 << 1)
#define TEX_MIPMAP (1 << 2)
#define TEX_IMAROT (1 << 4)
#define TEX_CALCALPHA (1 << 5)
#define TEX_NORMALMAP (1 << 11)
#define TEX_GAUSS_MIP (1 << 12)
#define TEX_FILTER_MIN (1 << 13)
#define TEX_DERIVATIVEMAP (1 << 14)
/* texfilter */
// TXF_BOX -> blender's old texture filtering method
@ -372,27 +372,27 @@ typedef struct ColorMapping {
/* imaflag unused, only for version check */
#ifdef DNA_DEPRECATED_ALLOW
#define TEX_FIELDS_ 8
#define TEX_ANIMCYCLIC_ 64
#define TEX_ANIM5_ 128
#define TEX_ANTIALI_ 256
#define TEX_ANTISCALE_ 512
#define TEX_STD_FIELD_ 1024
#define TEX_FIELDS_ (1 << 3)
#define TEX_ANIMCYCLIC_ (1 << 6)
#define TEX_ANIM5_ (1 << 7)
#define TEX_ANTIALI_ (1 << 8)
#define TEX_ANTISCALE_ (1 << 9)
#define TEX_STD_FIELD_ (1 << 10)
#endif
/* flag */
#define TEX_COLORBAND 1
#define TEX_FLIPBLEND 2
#define TEX_NEGALPHA 4
#define TEX_CHECKER_ODD 8
#define TEX_CHECKER_EVEN 16
#define TEX_PRV_ALPHA 32
#define TEX_PRV_NOR 64
#define TEX_REPEAT_XMIR 128
#define TEX_REPEAT_YMIR 256
#define TEX_FLAG_MASK ( TEX_COLORBAND | TEX_FLIPBLEND | TEX_NEGALPHA | TEX_CHECKER_ODD | TEX_CHECKER_EVEN | TEX_PRV_ALPHA | TEX_PRV_NOR | TEX_REPEAT_XMIR | TEX_REPEAT_YMIR )
#define TEX_DS_EXPAND 512
#define TEX_NO_CLAMP 1024
#define TEX_COLORBAND (1 << 0)
#define TEX_FLIPBLEND (1 << 1)
#define TEX_NEGALPHA (1 << 2)
#define TEX_CHECKER_ODD (1 << 3)
#define TEX_CHECKER_EVEN (1 << 4)
#define TEX_PRV_ALPHA (1 << 5)
#define TEX_PRV_NOR (1 << 6)
#define TEX_REPEAT_XMIR (1 << 7)
#define TEX_REPEAT_YMIR (1 << 8)
#define TEX_FLAG_MASK (TEX_COLORBAND | TEX_FLIPBLEND | TEX_NEGALPHA | TEX_CHECKER_ODD | TEX_CHECKER_EVEN | TEX_PRV_ALPHA | TEX_PRV_NOR | TEX_REPEAT_XMIR | TEX_REPEAT_YMIR)
#define TEX_DS_EXPAND (1 << 9)
#define TEX_NO_CLAMP (1 << 10)
/* extend (starts with 1 because of backward comp.) */
#define TEX_EXTEND 1
@ -476,22 +476,22 @@ typedef struct ColorMapping {
#define PROJ_Z 3
/* texflag */
#define MTEX_RGBTOINT 1
#define MTEX_STENCIL 2
#define MTEX_NEGATIVE 4
#define MTEX_ALPHAMIX 8
#define MTEX_VIEWSPACE 16
#define MTEX_DUPLI_MAPTO 32
#define MTEX_OB_DUPLI_ORIG 64
#define MTEX_COMPAT_BUMP 128
#define MTEX_3TAP_BUMP 256
#define MTEX_5TAP_BUMP 512
#define MTEX_BUMP_OBJECTSPACE 1024
#define MTEX_BUMP_TEXTURESPACE 2048
/* #define MTEX_BUMP_FLIPPED 4096 */ /* UNUSED */
#define MTEX_TIPS 4096 /* should use with_freestyle flag? */
#define MTEX_BICUBIC_BUMP 8192
#define MTEX_MAPTO_BOUNDS 16384
#define MTEX_RGBTOINT (1 << 0)
#define MTEX_STENCIL (1 << 1)
#define MTEX_NEGATIVE (1 << 2)
#define MTEX_ALPHAMIX (1 << 3)
#define MTEX_VIEWSPACE (1 << 4)
#define MTEX_DUPLI_MAPTO (1 << 5)
#define MTEX_OB_DUPLI_ORIG (1 << 6)
#define MTEX_COMPAT_BUMP (1 << 7)
#define MTEX_3TAP_BUMP (1 << 8)
#define MTEX_5TAP_BUMP (1 << 9)
#define MTEX_BUMP_OBJECTSPACE (1 << 10)
#define MTEX_BUMP_TEXTURESPACE (1 << 11)
/* #define MTEX_BUMP_FLIPPED (1 << 12) */ /* UNUSED */
#define MTEX_TIPS (1 << 12) /* should use with_freestyle flag? */
#define MTEX_BICUBIC_BUMP (1 << 13)
#define MTEX_MAPTO_BOUNDS (1 << 14)
/* blendtype */
#define MTEX_BLEND 0

View File

@ -251,16 +251,16 @@ typedef struct View3D {
#define V3D_S3D_DISPVOLUME (1 << 2)
/* View3D->flag (short) */
/*#define V3D_DISPIMAGE 1*/ /*UNUSED*/
#define V3D_DISPBGPICS 2
#define V3D_HIDE_HELPLINES 4
#define V3D_INVALID_BACKBUF 8
/*#define V3D_DISPIMAGE (1 << 0) */ /*UNUSED*/
#define V3D_DISPBGPICS (1 << 1)
#define V3D_HIDE_HELPLINES (1 << 2)
#define V3D_INVALID_BACKBUF (1 << 3)
#define V3D_ALIGN 1024
#define V3D_SELECT_OUTLINE 2048
#define V3D_ZBUF_SELECT 4096
#define V3D_GLOBAL_STATS 8192
#define V3D_DRAW_CENTERS 32768
#define V3D_ALIGN (1 << 10)
#define V3D_SELECT_OUTLINE (1 << 11)
#define V3D_ZBUF_SELECT (1 << 12)
#define V3D_GLOBAL_STATS (1 << 13)
#define V3D_DRAW_CENTERS (1 << 15)
/* RegionView3d->persp */
#define RV3D_ORTHO 0
@ -268,10 +268,10 @@ typedef struct View3D {
#define RV3D_CAMOB 2
/* RegionView3d->rflag */
#define RV3D_CLIPPING 4
#define RV3D_NAVIGATING 8
#define RV3D_GPULIGHT_UPDATE 16
#define RV3D_IS_GAME_ENGINE 32 /* runtime flag, used to check if LoD's should be used */
#define RV3D_CLIPPING (1 << 2)
#define RV3D_NAVIGATING (1 << 3)
#define RV3D_GPULIGHT_UPDATE (1 << 4)
#define RV3D_IS_GAME_ENGINE (1 << 5) /* runtime flag, used to check if LoD's should be used */
/**
* Disable zbuffer offset, skip calls to #ED_view3d_polygon_offset.
* Use when precise surface depth is needed and picking bias isn't, see T45434).
@ -341,15 +341,15 @@ enum {
#define V3D_VIEW_PANUP 8
/* View3d->gridflag */
#define V3D_SHOW_FLOOR 1
#define V3D_SHOW_X 2
#define V3D_SHOW_Y 4
#define V3D_SHOW_Z 8
#define V3D_SHOW_FLOOR (1 << 0)
#define V3D_SHOW_X (1 << 1)
#define V3D_SHOW_Y (1 << 2)
#define V3D_SHOW_Z (1 << 3)
/* View3d->twtype (bits, we can combine them) */
#define V3D_MANIP_TRANSLATE 1
#define V3D_MANIP_ROTATE 2
#define V3D_MANIP_SCALE 4
#define V3D_MANIP_TRANSLATE (1 << 0)
#define V3D_MANIP_ROTATE (1 << 1)
#define V3D_MANIP_SCALE (1 << 2)
/* View3d->twmode */
#define V3D_MANIP_GLOBAL 0
@ -361,9 +361,9 @@ enum {
/* View3d->twflag */
/* USE = user setting, DRAW = based on selection */
#define V3D_USE_MANIPULATOR 1
#define V3D_DRAW_MANIPULATOR 2
/* #define V3D_CALC_MANIPULATOR 4 */ /*UNUSED*/
#define V3D_USE_MANIPULATOR (1 << 0)
#define V3D_DRAW_MANIPULATOR (1 << 1)
/* #define V3D_CALC_MANIPULATOR (1 << 2) */ /*UNUSED*/
/* BGPic->flag */
/* may want to use 1 for select ? */

View File

@ -134,22 +134,22 @@ typedef struct World {
/* **************** WORLD ********************* */
/* skytype */
#define WO_SKYBLEND 1
#define WO_SKYREAL 2
#define WO_SKYPAPER 4
#define WO_SKYBLEND (1 << 0)
#define WO_SKYREAL (1 << 1)
#define WO_SKYPAPER (1 << 2)
/* while render: */
#define WO_SKYTEX 8
#define WO_ZENUP 16
#define WO_SKYTEX (1 << 3)
#define WO_ZENUP (1 << 4)
/* mode */
#define WO_MIST 1
//#define WO_STARS 2 /* deprecated */
/*#define WO_DOF 4*/
#define WO_ACTIVITY_CULLING 8
#define WO_ENV_LIGHT 16
#define WO_DBVT_CULLING 32
#define WO_AMB_OCC 64
#define WO_INDIRECT_LIGHT 128
#define WO_MIST (1 << 0)
//#define WO_STARS (1 << 1) /* deprecated */
/*#define WO_DOF (1 << 2) */
#define WO_ACTIVITY_CULLING (1 << 3)
#define WO_ENV_LIGHT (1 << 4)
#define WO_DBVT_CULLING (1 << 5)
#define WO_AMB_OCC (1 << 6)
#define WO_INDIRECT_LIGHT (1 << 7)
/* aomix */
enum {
@ -167,9 +167,9 @@ enum {
#define WO_AOSAMP_HAMMERSLEY 2
/* aomode (use distances & random sampling modes) */
#define WO_AODIST 1
#define WO_AORNDSMP 2
#define WO_AOCACHE 4
#define WO_AODIST (1 << 0)
#define WO_AORNDSMP (1 << 1)
#define WO_AOCACHE (1 << 2)
/* aocolor */
#define WO_AOPLAIN 0
@ -181,17 +181,17 @@ enum {
#define WO_AOGATHER_APPROX 1
/* texco (also in DNA_material_types.h) */
#define TEXCO_ANGMAP 64
#define TEXCO_H_SPHEREMAP 256
#define TEXCO_H_TUBEMAP 1024
#define TEXCO_EQUIRECTMAP 2048
#define TEXCO_ANGMAP (1 << 6)
#define TEXCO_H_SPHEREMAP (1 << 8)
#define TEXCO_H_TUBEMAP (1 << 10)
#define TEXCO_EQUIRECTMAP (1 << 11)
/* mapto */
#define WOMAP_BLEND 1
#define WOMAP_HORIZ 2
#define WOMAP_ZENUP 4
#define WOMAP_ZENDOWN 8
// #define WOMAP_MIST 16 /* Deprecated */
#define WOMAP_BLEND (1 << 0)
#define WOMAP_HORIZ (1 << 1)
#define WOMAP_ZENUP (1 << 2)
#define WOMAP_ZENDOWN (1 << 3)
// #define WOMAP_MIST (1 << 4) /* Deprecated */
/* flag */
#define WO_DS_EXPAND (1<<0)