Cleanup: move comments above definitions
For clang-format not to wrap definitions.
This commit is contained in:
parent
a1d73d03eb
commit
f91b21f85b
|
@ -86,29 +86,42 @@
|
|||
/* define a single unit */
|
||||
typedef struct bUnitDef {
|
||||
const char *name;
|
||||
const char *name_plural; /* abused a bit for the display name */
|
||||
const char *name_short; /* this is used for display*/
|
||||
const char *name_alt; /* keyboard-friendly ASCII-only version of name_short, can be NULL */
|
||||
/** abused a bit for the display name */
|
||||
const char *name_plural;
|
||||
/** this is used for display*/
|
||||
const char *name_short;
|
||||
/** keyboard-friendly ASCII-only version of name_short, can be NULL */
|
||||
const char *name_alt;
|
||||
/* if name_short has non-ASCII chars, name_alt should be present */
|
||||
|
||||
const char *name_display; /* can be NULL */
|
||||
const char *identifier; /* when NULL, a transformed version of the name will be taken */
|
||||
/** can be NULL */
|
||||
const char *name_display;
|
||||
/** when NULL, a transformed version of the name will be taken */
|
||||
const char *identifier;
|
||||
|
||||
double scalar;
|
||||
double bias; /* not used yet, needed for converting temperature */
|
||||
/** not used yet, needed for converting temperature */
|
||||
double bias;
|
||||
int flag;
|
||||
} bUnitDef;
|
||||
|
||||
#define B_UNIT_DEF_NONE 0
|
||||
#define B_UNIT_DEF_SUPPRESS 1 /* Use for units that are not used enough to be translated into for common use */
|
||||
#define B_UNIT_DEF_TENTH 2 /* Display a unit even if its value is 0.1, eg 0.1mm instead of 100um */
|
||||
enum {
|
||||
B_UNIT_DEF_NONE = 0,
|
||||
/** Use for units that are not used enough to be translated into for common use */
|
||||
B_UNIT_DEF_SUPPRESS = 1,
|
||||
/** Display a unit even if its value is 0.1, eg 0.1mm instead of 100um */
|
||||
B_UNIT_DEF_TENTH = 2,
|
||||
};
|
||||
|
||||
/* define a single unit */
|
||||
typedef struct bUnitCollection {
|
||||
const struct bUnitDef *units;
|
||||
int base_unit; /* basic unit index (when user doesn't specify unit explicitly) */
|
||||
int flag; /* options for this system */
|
||||
int length; /* to quickly find the last item */
|
||||
/** basic unit index (when user doesn't specify unit explicitly) */
|
||||
int base_unit;
|
||||
/** options for this system */
|
||||
int flag;
|
||||
/** to quickly find the last item */
|
||||
int length;
|
||||
} bUnitCollection;
|
||||
|
||||
#define UNIT_COLLECTION_LENGTH(def) (sizeof(def) / sizeof(bUnitDef) - 1)
|
||||
|
|
|
@ -58,17 +58,18 @@
|
|||
/* defines for testing */
|
||||
#define USE_CUSTOMDATA
|
||||
#define USE_TRIANGULATE
|
||||
#define USE_VERT_NORMAL_INTERP /* has the advantage that flipped faces don't mess up vertex normals */
|
||||
/** Has the advantage that flipped faces don't mess up vertex normals. */
|
||||
#define USE_VERT_NORMAL_INTERP
|
||||
|
||||
/* if the cost from #BLI_quadric_evaluate is 'noise', fallback to topology */
|
||||
/** if the cost from #BLI_quadric_evaluate is 'noise', fallback to topology */
|
||||
#define USE_TOPOLOGY_FALLBACK
|
||||
#ifdef USE_TOPOLOGY_FALLBACK
|
||||
/* cost is calculated with double precision, it's ok to use a very small epsilon, see T48154. */
|
||||
/** cost is calculated with double precision, it's ok to use a very small epsilon, see T48154. */
|
||||
# define TOPOLOGY_FALLBACK_EPS 1e-12f
|
||||
#endif
|
||||
|
||||
#define BOUNDARY_PRESERVE_WEIGHT 100.0f
|
||||
/* Uses double precision, impacts behavior on near-flat surfaces,
|
||||
/** Uses double precision, impacts behavior on near-flat surfaces,
|
||||
* cane give issues with very small faces. 1e-2 is too big, see: T48154. */
|
||||
#define OPTIMIZE_EPS 1e-8
|
||||
#define COST_INVALID FLT_MAX
|
||||
|
|
|
@ -71,7 +71,8 @@
|
|||
# define IRRADIANCE_FORMAT GPU_RGBA8
|
||||
#endif
|
||||
|
||||
#define IRRADIANCE_MAX_POOL_LAYER 256 /* OpenGL 3.3 core requirement, can be extended but it's already very big */
|
||||
/* OpenGL 3.3 core requirement, can be extended but it's already very big */
|
||||
#define IRRADIANCE_MAX_POOL_LAYER 256
|
||||
#define IRRADIANCE_MAX_POOL_SIZE 1024
|
||||
#define MAX_IRRADIANCE_SAMPLES \
|
||||
(IRRADIANCE_MAX_POOL_SIZE / IRRADIANCE_SAMPLE_SIZE_X) * \
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
#define VERTEX_ACTIVE 1 << 0
|
||||
#define VERTEX_SELECTED 1 << 1
|
||||
#define ACTIVE_NURB 1 << 2 /* Keep the same value of `ACTIVE_NURB` in `draw_cache_imp_curve.c` */
|
||||
/* Keep the same value of `ACTIVE_NURB` in `draw_cache_imp_curve.c` */
|
||||
#define ACTIVE_NURB 1 << 2
|
||||
#define EVEN_U_BIT 1 << 3
|
||||
|
||||
layout(lines) in;
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
//# define NDOF_FLY_DEBUG
|
||||
//# define NDOF_FLY_DRAW_TOOMUCH /* is this needed for ndof? - commented so redraw doesn't thrash - campbell */
|
||||
/* is this needed for ndof? - commented so redraw doesn't thrash - campbell */
|
||||
//# define NDOF_FLY_DRAW_TOOMUCH
|
||||
#endif /* WITH_INPUT_NDOF */
|
||||
|
||||
#include "DNA_object_types.h"
|
||||
|
@ -62,7 +63,8 @@
|
|||
|
||||
#include "view3d_intern.h" /* own include */
|
||||
|
||||
/* NOTE: these defines are saved in keymap files, do not change values but just add new ones */
|
||||
/* NOTE: these defines are saved in keymap files,
|
||||
* do not change values but just add new ones */
|
||||
enum {
|
||||
FLY_MODAL_CANCEL = 1,
|
||||
FLY_MODAL_CONFIRM,
|
||||
|
|
|
@ -65,7 +65,8 @@
|
|||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
//# define NDOF_WALK_DEBUG
|
||||
//# define NDOF_WALK_DRAW_TOOMUCH /* is this needed for ndof? - commented so redraw doesn't thrash - campbell */
|
||||
/* is this needed for ndof? - commented so redraw doesn't thrash - campbell */
|
||||
//# define NDOF_WALK_DRAW_TOOMUCH
|
||||
#endif
|
||||
|
||||
#define USE_TABLET_SUPPORT
|
||||
|
@ -76,7 +77,8 @@
|
|||
/* prototypes */
|
||||
static float getVelocityZeroTime(const float gravity, const float velocity);
|
||||
|
||||
/* NOTE: these defines are saved in keymap files, do not change values but just add new ones */
|
||||
/* NOTE: these defines are saved in keymap files,
|
||||
* do not change values but just add new ones */
|
||||
enum {
|
||||
WALK_MODAL_CANCEL = 1,
|
||||
WALK_MODAL_CONFIRM,
|
||||
|
@ -1378,7 +1380,8 @@ static int walk_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
|||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, walk_object);
|
||||
}
|
||||
|
||||
// puts("redraw!"); // too frequent, commented with NDOF_WALK_DRAW_TOOMUCH for now
|
||||
// too frequent, commented with NDOF_WALK_DRAW_TOOMUCH for now
|
||||
// puts("redraw!");
|
||||
ED_region_tag_redraw(CTX_wm_region(C));
|
||||
}
|
||||
|
||||
|
|
|
@ -464,7 +464,8 @@ typedef enum eRotationModes {
|
|||
/* quaternion rotations (default, and for older Blender versions) */
|
||||
ROT_MODE_QUAT = 0,
|
||||
/* euler rotations - keep in sync with enum in BLI_math.h */
|
||||
ROT_MODE_EUL = 1, /* Blender 'default' (classic) - must be as 1 to sync with BLI_math_rotation.h defines */
|
||||
/** Blender 'default' (classic) - must be as 1 to sync with BLI_math_rotation.h defines */
|
||||
ROT_MODE_EUL = 1,
|
||||
ROT_MODE_XYZ = 1,
|
||||
ROT_MODE_XZY = 2,
|
||||
ROT_MODE_YXZ = 3,
|
||||
|
|
|
@ -185,7 +185,8 @@ enum {
|
|||
IMA_OLD_PREMUL = (1 << 7),
|
||||
IMA_FLAG_DEPRECATED_8 = (1 << 8), /* cleared */
|
||||
IMA_USED_FOR_RENDER = (1 << 9),
|
||||
IMA_USER_FRAME_IN_RANGE = (1 << 10), /* for image user, but these flags are mixed */
|
||||
/** For image user, but these flags are mixed. */
|
||||
IMA_USER_FRAME_IN_RANGE = (1 << 10),
|
||||
IMA_VIEW_AS_RENDER = (1 << 11),
|
||||
IMA_IGNORE_ALPHA = (1 << 12),
|
||||
IMA_DEINTERLACE = (1 << 13),
|
||||
|
@ -195,14 +196,18 @@ enum {
|
|||
};
|
||||
|
||||
/* Image.tpageflag */
|
||||
#define IMA_TPAGEFLAG_DEPRECATED_0 (1 << 0) /* cleared */
|
||||
#define IMA_TPAGEFLAG_DEPRECATED_1 (1 << 1) /* cleared */
|
||||
#define IMA_TPAGEFLAG_DEPRECATED_2 (1 << 2) /* cleared */
|
||||
#define IMA_MIPMAP_COMPLETE (1 << 3) /* all mipmap levels in OpenGL texture set? */
|
||||
#define IMA_TPAGEFLAG_DEPRECATED_4 (1 << 4) /* cleared */
|
||||
#define IMA_TPAGEFLAG_DEPRECATED_5 (1 << 5) /* cleared */
|
||||
#define IMA_TPAGE_REFRESH (1 << 6)
|
||||
#define IMA_GLBIND_IS_DATA (1 << 7) /* opengl image texture bound as non-color data */
|
||||
enum {
|
||||
IMA_TPAGEFLAG_DEPRECATED_0 = (1 << 0), /* cleared */
|
||||
IMA_TPAGEFLAG_DEPRECATED_1 = (1 << 1), /* cleared */
|
||||
IMA_TPAGEFLAG_DEPRECATED_2 = (1 << 2), /* cleared */
|
||||
/** All mipmap levels in OpenGL texture set? */
|
||||
IMA_MIPMAP_COMPLETE = (1 << 3),
|
||||
IMA_TPAGEFLAG_DEPRECATED_4 = (1 << 4), /* cleared */
|
||||
IMA_TPAGEFLAG_DEPRECATED_5 = (1 << 5), /* cleared */
|
||||
IMA_TPAGE_REFRESH = (1 << 6),
|
||||
/** OpenGL image texture bound as non-color data. */
|
||||
IMA_GLBIND_IS_DATA = (1 << 7),
|
||||
};
|
||||
|
||||
/* ima->type and ima->source moved to BKE_image.h, for API */
|
||||
|
||||
|
|
|
@ -283,10 +283,16 @@ typedef struct SmokeDomainSettings {
|
|||
#define MOD_SMOKE_FLOW_TEXTURE_MAP_UV 1
|
||||
|
||||
/* flags */
|
||||
#define MOD_SMOKE_FLOW_ABSOLUTE (1<<1) /*old style emission*/
|
||||
#define MOD_SMOKE_FLOW_INITVELOCITY (1<<2) /* passes particles speed to the smoke */
|
||||
#define MOD_SMOKE_FLOW_TEXTUREEMIT (1<<3) /* use texture to control emission speed */
|
||||
#define MOD_SMOKE_FLOW_USE_PART_SIZE (1<<4) /* use specific size for particles instead of closest cell */
|
||||
enum {
|
||||
/**old style emission*/
|
||||
MOD_SMOKE_FLOW_ABSOLUTE = (1 << 1),
|
||||
/** passes particles speed to the smoke */
|
||||
MOD_SMOKE_FLOW_INITVELOCITY = (1 << 2),
|
||||
/** use texture to control emission speed */
|
||||
MOD_SMOKE_FLOW_TEXTUREEMIT = (1 << 3),
|
||||
/** use specific size for particles instead of closest cell */
|
||||
MOD_SMOKE_FLOW_USE_PART_SIZE = (1 << 4),
|
||||
};
|
||||
|
||||
typedef struct SmokeFlowSettings {
|
||||
/** For fast RNA access. */
|
||||
|
|
Loading…
Reference in New Issue