diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
commit | 9892736206676c5b7fabc8d1184f9655511ff2dd (patch) | |
tree | 83562ac50c93fe3004959d35c1af4a5b380fdd97 /source/blender/editors/include | |
parent | cffaa42d3a34c6b310c3c87c98e1f8313881e473 (diff) |
code cleanup: header cleanup and remove some duplicate defines.
Diffstat (limited to 'source/blender/editors/include')
28 files changed, 950 insertions, 955 deletions
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h index e29e0af59b1..a5e5d7ce2e0 100644 --- a/source/blender/editors/include/BIF_gl.h +++ b/source/blender/editors/include/BIF_gl.h @@ -35,20 +35,20 @@ #include "GL/glew.h" - /* - * these should be phased out. cpack should be replaced in - * code with calls to glColor3ub. - zr - */ +/* + * these should be phased out. cpack should be replaced in + * code with calls to glColor3ub. - zr + */ /* * * This define converts a numerical value to the equivalent 24-bit * color, while not being endian-sensitive. On little-endians, this * is the same as doing a 'naive' indexing, on big-endian, it is not! * */ -#define cpack(x) glColor3ub( ((x)&0xFF), (((x)>>8)&0xFF), (((x)>>16)&0xFF) ) +#define cpack(x) glColor3ub( ((x) & 0xFF), (((x) >> 8) & 0xFF), (((x) >> 16) & 0xFF) ) -#define glMultMatrixf(x) glMultMatrixf( (float *)(x)) -#define glLoadMatrixf(x) glLoadMatrixf( (float *)(x)) +#define glMultMatrixf(x) glMultMatrixf( (float *)(x)) +#define glLoadMatrixf(x) glLoadMatrixf( (float *)(x)) #endif /* #ifdef __BIF_GL_H__ */ diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index 2172aa82acf..b939ae47ead 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -56,138 +56,138 @@ extern unsigned char stipple_quarttone[128]; extern unsigned char stipple_diag_stripes_pos[128]; extern unsigned char stipple_diag_stripes_neg[128]; - /** - * Draw a lined (non-looping) arc with the given - * \a radius, starting at angle \a start and arcing - * through \a angle. The arc is centered at the origin - * and drawn in the XY plane. - * - * \param start The initial angle (in radians). - * \param angle The length of the arc (in radians). - * \param radius The arc radius. - * \param nsegments The number of segments to use in drawing the arc. - */ -void glutil_draw_lined_arc (float start, float angle, float radius, int nsegments); - - /** - * Draw a filled arc with the given \a radius, - * starting at angle \a start and arcing through - * \a angle. The arc is centered at the origin - * and drawn in the XY plane. - * - * \param start The initial angle (in radians). - * \param angle The length of the arc (in radians). - * \param radius The arc radius. - * \param nsegments The number of segments to use in drawing the arc. - */ -void glutil_draw_filled_arc (float start, float angle, float radius, int nsegments); - - /** - * Routines an integer value as obtained by glGetIntegerv. - * The param must cause only one value to be gotten from GL. - */ -int glaGetOneInteger (int param); - - /** - * Routines a float value as obtained by glGetIntegerv. - * The param must cause only one value to be gotten from GL. - */ -float glaGetOneFloat (int param); - - /** - * Functions like glRasterPos2i, except ensures that the resulting - * raster position is valid. \a known_good_x and \a known_good_y - * should be coordinates of a point known to be within the current - * view frustum. - * \attention This routine should be used when the distance of \a x - * and \a y away from the known good point is small (ie. for small icons - * and for bitmap characters), when drawing large+zoomed images it is - * possible for overflow to occur, the glaDrawPixelsSafe routine should - * be used instead. - */ -void glaRasterPosSafe2f (float x, float y, float known_good_x, float known_good_y); - - /** - * Functions like a limited glDrawPixels, except ensures that - * the image is displayed onscreen even if the \a x and \a y - * coordinates for would be clipped. The routine respects the - * glPixelZoom values, pixel unpacking parameters are _not_ - * respected. - * - * \attention This routine makes many assumptions: the rect data - * is expected to be in RGBA unsigned byte format, the coordinate - * (0.375, 0.375) is assumed to be within the view frustum, and the - * modelview and projection matrices are assumed to define a - * 1-to-1 mapping to screen space. - * \attention Furthermore, in the case of zoomed or unpixel aligned - * images extending outside the view frustum, but still within the - * window, some portion of the image may be visible left and/or - * below of the given \a x and \a y coordinates. It is recommended - * to use the glScissor functionality if images are to be drawn - * with an inset view matrix. - */ -void glaDrawPixelsSafe (float x, float y, int img_w, int img_h, int row_w, int format, int type, void *rect); - - /** - * Functions like a limited glDrawPixels, but actually draws the - * image using textures, which can be tremendously faster on low-end - * cards, and also avoids problems with the raster position being - * clipped when offscreen. The routine respects the glPixelZoom values, - * pixel unpacking parameters are _not_ respected. - * - * \attention This routine makes many assumptions: the rect data - * is expected to be in RGBA byte or float format, and the - * modelview and projection matrices are assumed to define a - * 1-to-1 mapping to screen space. - */ - -void glaDrawPixelsTex (float x, float y, int img_w, int img_h, int format, void *rect); +/** + * Draw a lined (non-looping) arc with the given + * \a radius, starting at angle \a start and arcing + * through \a angle. The arc is centered at the origin + * and drawn in the XY plane. + * + * \param start The initial angle (in radians). + * \param angle The length of the arc (in radians). + * \param radius The arc radius. + * \param nsegments The number of segments to use in drawing the arc. + */ +void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments); + +/** + * Draw a filled arc with the given \a radius, + * starting at angle \a start and arcing through + * \a angle. The arc is centered at the origin + * and drawn in the XY plane. + * + * \param start The initial angle (in radians). + * \param angle The length of the arc (in radians). + * \param radius The arc radius. + * \param nsegments The number of segments to use in drawing the arc. + */ +void glutil_draw_filled_arc(float start, float angle, float radius, int nsegments); + +/** + * Routines an integer value as obtained by glGetIntegerv. + * The param must cause only one value to be gotten from GL. + */ +int glaGetOneInteger(int param); + +/** + * Routines a float value as obtained by glGetIntegerv. + * The param must cause only one value to be gotten from GL. + */ +float glaGetOneFloat(int param); + +/** + * Functions like glRasterPos2i, except ensures that the resulting + * raster position is valid. \a known_good_x and \a known_good_y + * should be coordinates of a point known to be within the current + * view frustum. + * \attention This routine should be used when the distance of \a x + * and \a y away from the known good point is small (ie. for small icons + * and for bitmap characters), when drawing large+zoomed images it is + * possible for overflow to occur, the glaDrawPixelsSafe routine should + * be used instead. + */ +void glaRasterPosSafe2f(float x, float y, float known_good_x, float known_good_y); + +/** + * Functions like a limited glDrawPixels, except ensures that + * the image is displayed onscreen even if the \a x and \a y + * coordinates for would be clipped. The routine respects the + * glPixelZoom values, pixel unpacking parameters are _not_ + * respected. + * + * \attention This routine makes many assumptions: the rect data + * is expected to be in RGBA unsigned byte format, the coordinate + * (0.375, 0.375) is assumed to be within the view frustum, and the + * modelview and projection matrices are assumed to define a + * 1-to-1 mapping to screen space. + * \attention Furthermore, in the case of zoomed or unpixel aligned + * images extending outside the view frustum, but still within the + * window, some portion of the image may be visible left and/or + * below of the given \a x and \a y coordinates. It is recommended + * to use the glScissor functionality if images are to be drawn + * with an inset view matrix. + */ +void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int format, int type, void *rect); + +/** + * Functions like a limited glDrawPixels, but actually draws the + * image using textures, which can be tremendously faster on low-end + * cards, and also avoids problems with the raster position being + * clipped when offscreen. The routine respects the glPixelZoom values, + * pixel unpacking parameters are _not_ respected. + * + * \attention This routine makes many assumptions: the rect data + * is expected to be in RGBA byte or float format, and the + * modelview and projection matrices are assumed to define a + * 1-to-1 mapping to screen space. + */ + +void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void *rect); void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format, void *rect, float scaleX, float scaleY); - /* 2D Drawing Assistance */ - - /** Define a 2D area (viewport, scissor, matrices) for OpenGL rendering. - * - * glwDefine2DArea and glaBegin2DDraw set up an OpenGL state appropriate - * for drawing using both vertice (Vertex, etc) and raster (RasterPos, Rect) - * commands. All coordinates should be at integer positions. There is little - * to no reason to use glVertex2f etc. functions during 2D rendering, and - * thus no reason to +-0.5 the coordinates or perform other silly - * tricks. - * - * \param screen_rect The screen rectangle to be defined for 2D drawing. - */ -void glaDefine2DArea (struct rcti *screen_rect); +/* 2D Drawing Assistance */ + +/** Define a 2D area (viewport, scissor, matrices) for OpenGL rendering. + * + * glwDefine2DArea and glaBegin2DDraw set up an OpenGL state appropriate + * for drawing using both vertice (Vertex, etc) and raster (RasterPos, Rect) + * commands. All coordinates should be at integer positions. There is little + * to no reason to use glVertex2f etc. functions during 2D rendering, and + * thus no reason to +-0.5 the coordinates or perform other silly + * tricks. + * + * \param screen_rect The screen rectangle to be defined for 2D drawing. + */ +void glaDefine2DArea(struct rcti *screen_rect); typedef struct gla2DDrawInfo gla2DDrawInfo; - /** Save the current OpenGL state and initialize OpenGL for 2D - * rendering. glaEnd2DDraw should be called on the returned structure - * to free it and to return OpenGL to its previous state. The - * scissor rectangle is set to match the viewport. - * - * See glaDefine2DArea for an explanation of why this function uses integers. - * - * \param screen_rect The screen rectangle to be used for 2D drawing. - * \param world_rect The world rectangle that the 2D area represented - * by \a screen_rect is supposed to represent. If NULL it is assumed the - * world has a 1 to 1 mapping to the screen. - */ -gla2DDrawInfo* glaBegin2DDraw (struct rcti *screen_rect, struct rctf *world_rect); - - /** Translate the (\a wo_x, \a wo_y) point from world coordinates into screen space. */ -void gla2DDrawTranslatePt (gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r); - - /** Translate the \a world point from world coordiantes into screen space. */ -void gla2DDrawTranslatePtv (gla2DDrawInfo *di, float world[2], int screen_r[2]); - - /* Restores the previous OpenGL state and free's the auxilary - * gla data. - */ -void glaEnd2DDraw (gla2DDrawInfo *di); - - /** Adjust the transformation mapping of a 2d area */ +/** Save the current OpenGL state and initialize OpenGL for 2D + * rendering. glaEnd2DDraw should be called on the returned structure + * to free it and to return OpenGL to its previous state. The + * scissor rectangle is set to match the viewport. + * + * See glaDefine2DArea for an explanation of why this function uses integers. + * + * \param screen_rect The screen rectangle to be used for 2D drawing. + * \param world_rect The world rectangle that the 2D area represented + * by \a screen_rect is supposed to represent. If NULL it is assumed the + * world has a 1 to 1 mapping to the screen. + */ +gla2DDrawInfo *glaBegin2DDraw(struct rcti *screen_rect, struct rctf *world_rect); + +/** Translate the (\a wo_x, \a wo_y) point from world coordinates into screen space. */ +void gla2DDrawTranslatePt(gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r); + +/** Translate the \a world point from world coordiantes into screen space. */ +void gla2DDrawTranslatePtv(gla2DDrawInfo * di, float world[2], int screen_r[2]); + +/* Restores the previous OpenGL state and free's the auxilary + * gla data. + */ +void glaEnd2DDraw(gla2DDrawInfo *di); + +/** Adjust the transformation mapping of a 2d area */ void gla2DGetMap(gla2DDrawInfo *di, struct rctf *rect); void gla2DSetMap(gla2DDrawInfo *di, struct rctf *rect); diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 391286a2a88..f4d922dba3c 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -68,36 +68,36 @@ struct PropertyRNA; * 'context' information */ typedef struct bAnimContext { - void *data; /* data to be filtered for use in animation editor */ - short datatype; /* type of data eAnimCont_Types */ + void *data; /* data to be filtered for use in animation editor */ + short datatype; /* type of data eAnimCont_Types */ - short mode; /* editor->mode */ - short spacetype; /* sa->spacetype */ - short regiontype; /* active region -> type (channels or main) */ - struct ScrArea *sa; /* editor host */ - struct SpaceLink *sl; /* editor data */ - struct ARegion *ar; /* region within editor */ + short mode; /* editor->mode */ + short spacetype; /* sa->spacetype */ + short regiontype; /* active region -> type (channels or main) */ + struct ScrArea *sa; /* editor host */ + struct SpaceLink *sl; /* editor data */ + struct ARegion *ar; /* region within editor */ struct bDopeSheet *ads; /* dopesheet data for editor (or which is being used) */ - struct Scene *scene; /* active scene */ - struct Object *obact; /* active object */ - ListBase *markers; /* active set of markers */ + struct Scene *scene; /* active scene */ + struct Object *obact; /* active object */ + ListBase *markers; /* active set of markers */ - struct ReportList *reports; /* pointer to current reports list */ + struct ReportList *reports; /* pointer to current reports list */ } bAnimContext; /* Main Data container types */ typedef enum eAnimCont_Types { - ANIMCONT_NONE = 0, /* invalid or no data */ - ANIMCONT_ACTION, /* action (bAction) */ - ANIMCONT_SHAPEKEY, /* shapekey (Key) */ - ANIMCONT_GPENCIL, /* grease pencil (screen) */ - ANIMCONT_DOPESHEET, /* dopesheet (bDopesheet) */ - ANIMCONT_FCURVES, /* animation F-Curves (bDopesheet) */ - ANIMCONT_DRIVERS, /* drivers (bDopesheet) */ - ANIMCONT_NLA, /* nla (bDopesheet) */ - ANIMCONT_CHANNEL /* animation channel (bAnimListElem) */ + ANIMCONT_NONE = 0, /* invalid or no data */ + ANIMCONT_ACTION, /* action (bAction) */ + ANIMCONT_SHAPEKEY, /* shapekey (Key) */ + ANIMCONT_GPENCIL, /* grease pencil (screen) */ + ANIMCONT_DOPESHEET, /* dopesheet (bDopesheet) */ + ANIMCONT_FCURVES, /* animation F-Curves (bDopesheet) */ + ANIMCONT_DRIVERS, /* drivers (bDopesheet) */ + ANIMCONT_NLA, /* nla (bDopesheet) */ + ANIMCONT_CHANNEL /* animation channel (bAnimListElem) */ } eAnimCont_Types; /* --------------- Channels -------------------- */ @@ -108,26 +108,26 @@ typedef enum eAnimCont_Types { typedef struct bAnimListElem { struct bAnimListElem *next, *prev; - void *data; /* source data this elem represents */ - int type; /* one of the ANIMTYPE_* values */ - int flag; /* copy of elem's flags for quick access */ - int index; /* for un-named data, the index of the data in it's collection */ + void *data; /* source data this elem represents */ + int type; /* one of the ANIMTYPE_* values */ + int flag; /* copy of elem's flags for quick access */ + int index; /* for un-named data, the index of the data in it's collection */ - short datatype; /* type of motion data to expect */ - void *key_data; /* motion data - mostly F-Curves, but can be other types too */ + short datatype; /* type of motion data to expect */ + void *key_data; /* motion data - mostly F-Curves, but can be other types too */ - struct ID *id; /* ID block that channel is attached to */ - struct AnimData *adt; /* source of the animation data attached to ID block (for convenience) */ + struct ID *id; /* ID block that channel is attached to */ + struct AnimData *adt; /* source of the animation data attached to ID block (for convenience) */ } bAnimListElem; /* Some types for easier type-testing * NOTE: need to keep the order of these synchronized with the channels define code - * which is used for drawing and handling channel lists for + * which is used for drawing and handling channel lists for */ typedef enum eAnim_ChannelType { - ANIMTYPE_NONE= 0, + ANIMTYPE_NONE = 0, ANIMTYPE_ANIMDATA, ANIMTYPE_SPECIALDATA, @@ -164,22 +164,22 @@ typedef enum eAnim_ChannelType { ANIMTYPE_NLATRACK, ANIMTYPE_NLAACTION, - /* always as last item, the total number of channel types... */ + /* always as last item, the total number of channel types... */ ANIMTYPE_NUM_TYPES } eAnim_ChannelType; /* types of keyframe data in bAnimListElem */ typedef enum eAnim_KeyType { - ALE_NONE = 0, /* no keyframe data */ - ALE_FCURVE, /* F-Curve */ - ALE_GPFRAME, /* Grease Pencil Frames */ - ALE_NLASTRIP, /* NLA Strips */ - - ALE_ALL, /* All channels summary */ - ALE_SCE, /* Scene summary */ - ALE_OB, /* Object summary */ - ALE_ACT, /* Action summary */ - ALE_GROUP /* Action Group summary */ + ALE_NONE = 0, /* no keyframe data */ + ALE_FCURVE, /* F-Curve */ + ALE_GPFRAME, /* Grease Pencil Frames */ + ALE_NLASTRIP, /* NLA Strips */ + + ALE_ALL, /* All channels summary */ + ALE_SCE, /* Scene summary */ + ALE_OB, /* Object summary */ + ALE_ACT, /* Action summary */ + ALE_GROUP /* Action Group summary */ } eAnim_KeyType; /* ----------------- Filtering -------------------- */ @@ -188,53 +188,53 @@ typedef enum eAnim_KeyType { typedef enum eAnimFilter_Flags { /* data which channel represents is fits the dopesheet filters (i.e. scene visibility criteria) */ // XXX: it's hard to think of any examples where this *ISN'T* the case... perhaps becomes implicit? - ANIMFILTER_DATA_VISIBLE = (1<<0), + ANIMFILTER_DATA_VISIBLE = (1 << 0), /* channel is visible within the channel-list hierarchy (i.e. F-Curves within Groups in ActEdit) */ - ANIMFILTER_LIST_VISIBLE = (1<<1), + ANIMFILTER_LIST_VISIBLE = (1 << 1), /* channel has specifically been tagged as visible in Graph Editor (* Graph Editor Only) */ - ANIMFILTER_CURVE_VISIBLE = (1<<2), + ANIMFILTER_CURVE_VISIBLE = (1 << 2), /* include summary channels and "expanders" (for drawing/mouse-selection in channel list) */ - ANIMFILTER_LIST_CHANNELS = (1<<3), + ANIMFILTER_LIST_CHANNELS = (1 << 3), /* for its type, channel should be "active" one */ - ANIMFILTER_ACTIVE = (1<<4), + ANIMFILTER_ACTIVE = (1 << 4), /* channel is a child of the active group (* Actions speciality) */ - ANIMFILTER_ACTGROUPED = (1<<5), + ANIMFILTER_ACTGROUPED = (1 << 5), /* channel must be selected/not-selected, but both must not be set together */ - ANIMFILTER_SEL = (1<<6), - ANIMFILTER_UNSEL = (1<<7), + ANIMFILTER_SEL = (1 << 6), + ANIMFILTER_UNSEL = (1 << 7), /* editability status - must be editable to be included */ - ANIMFILTER_FOREDIT = (1<<8), + ANIMFILTER_FOREDIT = (1 << 8), /* only selected animchannels should be considerable as editable - mainly for Graph Editor's option for keys on select curves only */ - ANIMFILTER_SELEDIT = (1<<9), + ANIMFILTER_SELEDIT = (1 << 9), /* flags used to enforce certain data types */ // NOTE: the ones for curves and NLA tracks were redundant and have been removed for now... - ANIMFILTER_ANIMDATA = (1<<10), + ANIMFILTER_ANIMDATA = (1 << 10), /* duplicate entries for animation data attached to multi-user blocks must not occur */ - ANIMFILTER_NODUPLIS = (1<<11), + ANIMFILTER_NODUPLIS = (1 << 11), /* for checking if we should keep some collapsed channel around (internal use only!) */ - ANIMFILTER_TMP_PEEK = (1<<30) + ANIMFILTER_TMP_PEEK = (1 << 30) } eAnimFilter_Flags; /* ---------- Flag Checking Macros ------------ */ // xxx check on all of these flags again... /* Dopesheet only */ - /* 'Scene' channels */ +/* 'Scene' channels */ #define SEL_SCEC(sce) ((sce->flag & SCE_DS_SELECTED)) -#define EXPANDED_SCEC(sce) ((sce->flag & SCE_DS_COLLAPSED)==0) - /* 'Sub-Scene' channels (flags stored in Data block) */ +#define EXPANDED_SCEC(sce) ((sce->flag & SCE_DS_COLLAPSED) == 0) +/* 'Sub-Scene' channels (flags stored in Data block) */ #define FILTER_WOR_SCED(wo) ((wo->flag & WO_DS_EXPAND)) - /* 'Object' channels */ +/* 'Object' channels */ #define SEL_OBJC(base) ((base->flag & SELECT)) -#define EXPANDED_OBJC(ob) ((ob->nlaflag & OB_ADS_COLLAPSED)==0) - /* 'Sub-object' channels (flags stored in Data block) */ +#define EXPANDED_OBJC(ob) ((ob->nlaflag & OB_ADS_COLLAPSED) == 0) +/* 'Sub-object' channels (flags stored in Data block) */ #define FILTER_SKE_OBJD(key) ((key->flag & KEY_DS_EXPAND)) #define FILTER_MAT_OBJD(ma) ((ma->flag & MA_DS_EXPAND)) #define FILTER_LAM_OBJD(la) ((la->flag & LA_DS_EXPAND)) @@ -246,74 +246,74 @@ typedef enum eAnimFilter_Flags { #define FILTER_MESH_OBJD(me) ((me->flag & ME_DS_EXPAND)) #define FILTER_LATTICE_OBJD(lt) ((lt->flag & LT_DS_EXPAND)) #define FILTER_SPK_OBJD(spk) ((spk->flag & SPK_DS_EXPAND)) - /* Variable use expanders */ +/* Variable use expanders */ #define FILTER_NTREE_DATA(ntree) ((ntree->flag & NTREE_DS_EXPAND)) #define FILTER_TEX_DATA(tex) ((tex->flag & TEX_DS_EXPAND)) - /* 'Sub-object/Action' channels (flags stored in Action) */ +/* 'Sub-object/Action' channels (flags stored in Action) */ #define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED)) -#define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED)==0) - /* 'Sub-AnimData' channels */ -#define EXPANDED_DRVD(adt) ((adt->flag & ADT_DRIVERS_COLLAPSED)==0) +#define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED) == 0) +/* 'Sub-AnimData' channels */ +#define EXPANDED_DRVD(adt) ((adt->flag & ADT_DRIVERS_COLLAPSED) == 0) /* Actions (also used for Dopesheet) */ - /* Action Channel Group */ -#define EDITABLE_AGRP(agrp) ((agrp->flag & AGRP_PROTECTED)==0) +/* Action Channel Group */ +#define EDITABLE_AGRP(agrp) ((agrp->flag & AGRP_PROTECTED) == 0) #define EXPANDED_AGRP(ac, agrp) \ ( ((!(ac) || ((ac)->spacetype != SPACE_IPO)) && (agrp->flag & AGRP_EXPANDED)) || \ (( (ac) && ((ac)->spacetype == SPACE_IPO)) && (agrp->flag & AGRP_EXPANDED_G)) ) #define SEL_AGRP(agrp) ((agrp->flag & AGRP_SELECTED) || (agrp->flag & AGRP_ACTIVE)) - /* F-Curve Channels */ -#define EDITABLE_FCU(fcu) ((fcu->flag & FCURVE_PROTECTED)==0) +/* F-Curve Channels */ +#define EDITABLE_FCU(fcu) ((fcu->flag & FCURVE_PROTECTED) == 0) #define SEL_FCU(fcu) (fcu->flag & FCURVE_SELECTED) /* ShapeKey mode only */ -#define EDITABLE_SHAPEKEY(kb) ((kb->flag & KEYBLOCK_LOCKED)==0) +#define EDITABLE_SHAPEKEY(kb) ((kb->flag & KEYBLOCK_LOCKED) == 0) #define SEL_SHAPEKEY(kb) (kb->flag & KEYBLOCK_SEL) /* Grease Pencil only */ - /* Grease Pencil datablock settings */ +/* Grease Pencil datablock settings */ #define EXPANDED_GPD(gpd) (gpd->flag & GP_DATA_EXPAND) - /* Grease Pencil Layer settings */ -#define EDITABLE_GPL(gpl) ((gpl->flag & GP_LAYER_LOCKED)==0) +/* Grease Pencil Layer settings */ +#define EDITABLE_GPL(gpl) ((gpl->flag & GP_LAYER_LOCKED) == 0) #define SEL_GPL(gpl) (gpl->flag & GP_LAYER_SELECT) /* NLA only */ #define SEL_NLT(nlt) (nlt->flag & NLATRACK_SELECTED) -#define EDITABLE_NLT(nlt) ((nlt->flag & NLATRACK_PROTECTED)==0) +#define EDITABLE_NLT(nlt) ((nlt->flag & NLATRACK_PROTECTED) == 0) /* -------------- Channel Defines -------------- */ /* channel heights */ -#define ACHANNEL_FIRST -16 -#define ACHANNEL_HEIGHT 16 -#define ACHANNEL_HEIGHT_HALF 8 -#define ACHANNEL_SKIP 2 -#define ACHANNEL_STEP (ACHANNEL_HEIGHT + ACHANNEL_SKIP) +#define ACHANNEL_FIRST -16 +#define ACHANNEL_HEIGHT 16 +#define ACHANNEL_HEIGHT_HALF 8 +#define ACHANNEL_SKIP 2 +#define ACHANNEL_STEP (ACHANNEL_HEIGHT + ACHANNEL_SKIP) /* channel widths */ -#define ACHANNEL_NAMEWIDTH 200 +#define ACHANNEL_NAMEWIDTH 200 /* channel toggle-buttons */ -#define ACHANNEL_BUTTON_WIDTH 16 +#define ACHANNEL_BUTTON_WIDTH 16 /* -------------- NLA Channel Defines -------------- */ /* NLA channel heights */ // XXX: NLACHANNEL_FIRST isn't used? -#define NLACHANNEL_FIRST -16 -#define NLACHANNEL_HEIGHT(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? 16 : 24) -#define NLACHANNEL_HEIGHT_HALF(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? 8 : 12) -#define NLACHANNEL_SKIP 2 +#define NLACHANNEL_FIRST -16 +#define NLACHANNEL_HEIGHT(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? 16 : 24) +#define NLACHANNEL_HEIGHT_HALF(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? 8 : 12) +#define NLACHANNEL_SKIP 2 #define NLACHANNEL_STEP(snla) (NLACHANNEL_HEIGHT(snla) + NLACHANNEL_SKIP) /* channel widths */ -#define NLACHANNEL_NAMEWIDTH 200 +#define NLACHANNEL_NAMEWIDTH 200 /* channel toggle-buttons */ -#define NLACHANNEL_BUTTON_WIDTH 16 +#define NLACHANNEL_BUTTON_WIDTH 16 /* ---------------- API -------------------- */ @@ -341,37 +341,37 @@ short ANIM_animdata_context_getdata(bAnimContext *ac); /* flag-setting behavior */ typedef enum eAnimChannels_SetFlag { - ACHANNEL_SETFLAG_CLEAR = 0, /* turn off */ - ACHANNEL_SETFLAG_ADD, /* turn on */ - ACHANNEL_SETFLAG_INVERT, /* on->off, off->on */ - ACHANNEL_SETFLAG_TOGGLE /* some on -> all off // all on */ + ACHANNEL_SETFLAG_CLEAR = 0, /* turn off */ + ACHANNEL_SETFLAG_ADD, /* turn on */ + ACHANNEL_SETFLAG_INVERT, /* on->off, off->on */ + ACHANNEL_SETFLAG_TOGGLE /* some on -> all off // all on */ } eAnimChannels_SetFlag; /* types of settings for AnimChannels */ typedef enum eAnimChannel_Settings { ACHANNEL_SETTING_SELECT = 0, - ACHANNEL_SETTING_PROTECT, // warning: for drawing UI's, need to check if this is off (maybe inverse this later) + ACHANNEL_SETTING_PROTECT, // warning: for drawing UI's, need to check if this is off (maybe inverse this later) ACHANNEL_SETTING_MUTE, ACHANNEL_SETTING_EXPAND, - ACHANNEL_SETTING_VISIBLE, /* only for Graph Editor */ - ACHANNEL_SETTING_SOLO /* only for NLA Tracks */ + ACHANNEL_SETTING_VISIBLE, /* only for Graph Editor */ + ACHANNEL_SETTING_SOLO /* only for NLA Tracks */ } eAnimChannel_Settings; /* Drawing, mouse handling, and flag setting behavior... */ typedef struct bAnimChannelType { /* type data */ - /* name of the channel type, for debugging */ + /* name of the channel type, for debugging */ const char *channel_type_name; /* drawing */ - /* get RGB color that is used to draw the majority of the backdrop */ + /* get RGB color that is used to draw the majority of the backdrop */ void (*get_backdrop_color)(bAnimContext *ac, bAnimListElem *ale, float r_color[3]); - /* draw backdrop strip for channel */ + /* draw backdrop strip for channel */ void (*draw_backdrop)(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc); - /* get depth of indention (relative to the depth channel is nested at) */ + /* get depth of indention (relative to the depth channel is nested at) */ short (*get_indent_level)(bAnimContext *ac, bAnimListElem *ale); - /* get offset in pixels for the start of the channel (in addition to the indent depth) */ + /* get offset in pixels for the start of the channel (in addition to the indent depth) */ short (*get_offset)(bAnimContext *ac, bAnimListElem *ale); /* get name (for channel lists) */ @@ -382,15 +382,15 @@ typedef struct bAnimChannelType { int (*icon)(bAnimListElem *ale); /* settings */ - /* check if the given setting is valid in the current context */ + /* check if the given setting is valid in the current context */ short (*has_setting)(bAnimContext *ac, bAnimListElem *ale, int setting); - /* get the flag used for this setting */ + /* get the flag used for this setting */ int (*setting_flag)(bAnimContext *ac, int setting, short *neg); - /* get the pointer to int/short where data is stored, - * with type being sizeof(ptr_data) which should be fine for runtime use... - * - assume that setting has been checked to be valid for current context - */ - void *(*setting_ptr)(bAnimListElem *ale, int setting, short *type); + /* get the pointer to int/short where data is stored, + * with type being sizeof(ptr_data) which should be fine for runtime use... + * - assume that setting has been checked to be valid for current context + */ + void *(*setting_ptr)(bAnimListElem * ale, int setting, short *type); } bAnimChannelType; /* ------------------------ Drawing API -------------------------- */ @@ -412,7 +412,7 @@ void ANIM_channel_draw_widgets(struct bContext *C, bAnimContext *ac, bAnimListEl /* Check if some setting for a channel is enabled * Returns: 1 = On, 0 = Off, -1 = Invalid * - * - setting: eAnimChannel_Settings + * - setting: eAnimChannel_Settings */ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, int setting); @@ -456,14 +456,14 @@ void ANIM_timecode_string_from_frame(char *str, struct Scene *scene, int power, /* flags for Current Frame Drawing */ enum { - /* plain time indicator with no special indicators */ - DRAWCFRA_PLAIN = 0, - /* draw box indicating current frame number */ - DRAWCFRA_SHOW_NUMBOX = (1<<0), - /* time indication in seconds or frames */ - DRAWCFRA_UNIT_SECONDS = (1<<1), - /* draw indicator extra wide (for timeline) */ - DRAWCFRA_WIDE = (1<<2) + /* plain time indicator with no special indicators */ + DRAWCFRA_PLAIN = 0, + /* draw box indicating current frame number */ + DRAWCFRA_SHOW_NUMBOX = (1 << 0), + /* time indication in seconds or frames */ + DRAWCFRA_UNIT_SECONDS = (1 << 1), + /* draw indicator extra wide (for timeline) */ + DRAWCFRA_WIDE = (1 << 2) } eAnimEditDraw_CurrentFrame; /* main call to draw current-frame indicator in an Animation Editor */ @@ -531,14 +531,14 @@ void ED_nla_postop_refresh(bAnimContext *ac); /* flags for conversion mapping */ typedef enum eAnimUnitConv_Flags { - /* restore to original internal values */ - ANIM_UNITCONV_RESTORE = (1<<0), - /* ignore handles (i.e. only touch main keyframes) */ - ANIM_UNITCONV_ONLYKEYS = (1<<1), - /* only touch selected BezTriples */ - ANIM_UNITCONV_ONLYSEL = (1<<2), - /* only touch selected vertices */ - ANIM_UNITCONV_SELVERTS = (1<<3) + /* restore to original internal values */ + ANIM_UNITCONV_RESTORE = (1 << 0), + /* ignore handles (i.e. only touch main keyframes) */ + ANIM_UNITCONV_ONLYKEYS = (1 << 1), + /* only touch selected BezTriples */ + ANIM_UNITCONV_ONLYSEL = (1 << 2), + /* only touch selected vertices */ + ANIM_UNITCONV_SELVERTS = (1 << 3) } eAnimUnitConv_Flags; /* Get unit conversion factor for given ID + F-Curve */ @@ -561,9 +561,9 @@ void ANIM_unit_mapping_apply_fcurve(struct Scene *scene, struct ID *id, struct F */ #define ACHANNEL_SET_FLAG(channel, smode, sflag) \ { \ - if (smode == ACHANNEL_SETFLAG_INVERT) (channel)->flag ^= (sflag); \ - else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag |= (sflag); \ - else (channel)->flag &= ~(sflag); \ + if (smode == ACHANNEL_SETFLAG_INVERT) (channel)->flag ^= (sflag); \ + else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag |= (sflag); \ + else (channel)->flag &= ~(sflag); \ } /* set/clear/toggle macro, where the flag is negative @@ -573,9 +573,9 @@ void ANIM_unit_mapping_apply_fcurve(struct Scene *scene, struct ID *id, struct F */ #define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \ { \ - if (smode == ACHANNEL_SETFLAG_INVERT) (channel)->flag ^= (sflag); \ - else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag &= ~(sflag); \ - else (channel)->flag |= (sflag); \ + if (smode == ACHANNEL_SETFLAG_INVERT) (channel)->flag ^= (sflag); \ + else if (smode == ACHANNEL_SETFLAG_ADD) (channel)->flag &= ~(sflag); \ + else (channel)->flag |= (sflag); \ } @@ -590,17 +590,17 @@ void ANIM_sync_animchannels_to_data(const struct bContext *C); /* ************************************************* */ /* OPERATORS */ - /* generic animation channels */ +/* generic animation channels */ void ED_operatortypes_animchannels(void); void ED_keymap_animchannels(struct wmKeyConfig *keyconf); - /* generic time editing */ +/* generic time editing */ void ED_operatortypes_anim(void); void ED_keymap_anim(struct wmKeyConfig *keyconf); - /* space_graph */ +/* space_graph */ void ED_operatormacros_graph(void); - /* space_action */ +/* space_action */ void ED_operatormacros_action(void); /* ************************************************ */ diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 851bd09dd29..daf959b1f10 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -53,13 +53,12 @@ struct ViewContext; struct wmKeyConfig; struct wmOperator; -typedef struct EditBone -{ +typedef struct EditBone { struct EditBone *next, *prev; - struct IDProperty *prop;/* User-Defined Properties on this Bone */ - struct EditBone *parent;/* Editbones have a one-way link (i.e. children refer - * to parents. This is converted to a two-way link for - * normal bones when leaving editmode. */ + struct IDProperty *prop; /* User-Defined Properties on this Bone */ + struct EditBone *parent; /* Editbones have a one-way link (i.e. children refer + * to parents. This is converted to a two-way link for + * normal bones when leaving editmode. */ void *temp; /* Used to store temporary data */ char name[64]; /* MAX_NAME */ @@ -68,13 +67,13 @@ typedef struct EditBone * is tail-head while roll provides the angle. Refer to Graphics * Gems 1 p. 466 (section IX.6) if it's not already in here somewhere*/ - float head[3]; /* Orientation and length is implicit during editing */ - float tail[3]; - /* All joints are considered to have zero rotation with respect to - * their parents. Therefore any rotations specified during the - * animation are automatically relative to the bones' rest positions*/ - int flag; - int layer; + float head[3]; /* Orientation and length is implicit during editing */ + float tail[3]; + /* All joints are considered to have zero rotation with respect to + * their parents. Therefore any rotations specified during the + * animation are automatically relative to the bones' rest positions*/ + int flag; + int layer; float dist, weight; float xwidth, length, zwidth; /* put them in order! transform uses this as scale */ @@ -86,20 +85,20 @@ typedef struct EditBone short segments; } EditBone; -#define BONESEL_ROOT (1<<28) -#define BONESEL_TIP (1<<29) -#define BONESEL_BONE (1<<30) -#define BONESEL_ANY (BONESEL_TIP|BONESEL_ROOT|BONESEL_BONE) +#define BONESEL_ROOT (1 << 28) +#define BONESEL_TIP (1 << 29) +#define BONESEL_BONE (1 << 30) +#define BONESEL_ANY (BONESEL_TIP | BONESEL_ROOT | BONESEL_BONE) -#define BONESEL_NOSEL (1<<31) /* Indicates a negative number */ +#define BONESEL_NOSEL (1 << 31) /* Indicates a negative number */ /* useful macros */ #define EBONE_VISIBLE(arm, ebone) (((arm)->layer & (ebone)->layer) && !((ebone)->flag & BONE_HIDDEN_A)) #define EBONE_EDITABLE(ebone) (((ebone)->flag & BONE_SELECTED) && !((ebone)->flag & BONE_EDITMODE_LOCKED)) /* used in bone_select_hierachy() */ -#define BONE_SELECT_PARENT 0 -#define BONE_SELECT_CHILD 1 +#define BONE_SELECT_PARENT 0 +#define BONE_SELECT_CHILD 1 /* armature_ops.c */ void ED_operatortypes_armature(void); @@ -114,10 +113,10 @@ void ED_armature_deselect_all(struct Object *obedit, int toggle); void ED_armature_deselect_all_visible(struct Object *obedit); int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, - short hits, short extend); + short hits, short extend); int mouse_armature(struct bContext *C, const int mval[2], int extend); int join_armature_exec(struct bContext *C, struct wmOperator *op); -struct Bone *get_indexed_bone (struct Object *ob, int index); +struct Bone *get_indexed_bone(struct Object *ob, int index); float ED_rollBoneToVector(EditBone *bone, const float new_up_axis[3], const short axis_only); EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, EditBone *ebo); // XXX this is needed for populating the context iterators void ED_armature_sync_selection(struct ListBase *edbo); @@ -128,13 +127,13 @@ struct EditBone *ED_armature_edit_bone_add(struct bArmature *arm, const char *na void ED_armature_edit_bone_remove(struct bArmature *arm, EditBone *exBone); void transform_armature_mirror_update(struct Object *obedit); -void docenter_armature (struct Scene *scene, struct Object *ob, float cursor[3], int centermode, int around); +void docenter_armature(struct Scene *scene, struct Object *ob, float cursor[3], int centermode, int around); void ED_armature_apply_transform(struct Object *ob, float mat[4][4]); -#define ARM_GROUPS_NAME 1 -#define ARM_GROUPS_ENVELOPE 2 -#define ARM_GROUPS_AUTO 3 +#define ARM_GROUPS_NAME 1 +#define ARM_GROUPS_ENVELOPE 2 +#define ARM_GROUPS_AUTO 3 void create_vgroups_from_armature(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct Object *par, int mode, int mirror); @@ -166,15 +165,15 @@ int BIF_currentTemplate(const struct bContext *C); void BIF_freeTemplates(struct bContext *C); void BIF_setTemplate(struct bContext *C, int index); int BIF_nbJointsTemplate(const struct bContext *C); -const char * BIF_nameBoneTemplate(const struct bContext *C); +const char *BIF_nameBoneTemplate(const struct bContext *C); void BDR_drawSketch(const struct bContext *vc); int BDR_drawSketchNames(struct ViewContext *vc); /* meshlaplacian.c */ void mesh_deform_bind(struct Scene *scene, - struct MeshDeformModifierData *mmd, - float *vertexcos, int totvert, float cagemat[][4]); + struct MeshDeformModifierData *mmd, + float *vertexcos, int totvert, float cagemat[][4]); #ifdef __cplusplus } diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h index 302c2940fef..02a8b99c280 100644 --- a/source/blender/editors/include/ED_clip.h +++ b/source/blender/editors/include/ED_clip.h @@ -61,7 +61,7 @@ struct ImBuf *ED_space_clip_get_stable_buffer(struct SpaceClip *sc, float loc[2] void ED_clip_update_frame(const struct Main *mainp, int cfra); int ED_clip_view_selection(struct SpaceClip *sc, struct ARegion *ar, int fit); -void ED_clip_point_undistorted_pos(SpaceClip *sc, float co[2], float nco[2]); +void ED_clip_point_undistorted_pos(SpaceClip * sc, float co[2], float nco[2]); void ED_clip_point_stable_pos(struct bContext *C, float x, float y, float *xr, float *yr); void ED_clip_mouse_pos(struct bContext *C, struct wmEvent *event, float co[2]); diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 73ff8e9304d..b42a6e391ce 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -46,9 +46,9 @@ struct BezTriple; struct BPoint; /* curve_ops.c */ -void ED_operatortypes_curve(void); -void ED_operatormacros_curve(void); -void ED_keymap_curve (struct wmKeyConfig *keyconf); +void ED_operatortypes_curve(void); +void ED_operatormacros_curve(void); +void ED_keymap_curve(struct wmKeyConfig *keyconf); /* editcurve.c */ void CU_deselect_all(struct Object *obedit); @@ -56,31 +56,31 @@ void CU_select_all(struct Object *obedit); void CU_select_swap(struct Object *obedit); -void undo_push_curve (struct bContext *C, const char *name); +void undo_push_curve(struct bContext *C, const char *name); ListBase *object_editcurve_get(struct Object *ob); -void load_editNurb (struct Object *obedit); -void make_editNurb (struct Object *obedit); -void free_editNurb (struct Object *obedit); +void load_editNurb(struct Object *obedit); +void make_editNurb(struct Object *obedit); +void free_editNurb(struct Object *obedit); -void BKE_curve_editNurb_free (struct Curve *cu); +void BKE_curve_editNurb_free(struct Curve *cu); -int mouse_nurb (struct bContext *C, const int mval[2], int extend); +int mouse_nurb(struct bContext *C, const int mval[2], int extend); struct Nurb *add_nurbs_primitive(struct bContext *C, float mat[4][4], int type, int newob); -int isNurbsel (struct Nurb *nu); -void ED_nurb_set_spline_type(struct Nurb *nu, int type); +int isNurbsel(struct Nurb *nu); +void ED_nurb_set_spline_type(struct Nurb *nu, int type); -int join_curve_exec (struct bContext *C, struct wmOperator *op); +int join_curve_exec(struct bContext *C, struct wmOperator *op); /* editfont.h */ -void undo_push_font (struct bContext *C, const char *name); -void make_editText (struct Object *obedit); -void load_editText (struct Object *obedit); -void free_editText (struct Object *obedit); +void undo_push_font(struct bContext *C, const char *name); +void make_editText(struct Object *obedit); +void load_editText(struct Object *obedit); +void free_editText(struct Object *obedit); -void ED_text_to_object(struct bContext *C, struct Text *text, int split_lines); +void ED_text_to_object(struct bContext *C, struct Text *text, int split_lines); int CU_select_nth(struct Object *obedit, int nth); diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index 7cf750f5a9b..d45504b3325 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -52,8 +52,7 @@ typedef enum FileListColumns { COLUMN_OWNER } FileListColumns; -typedef struct FileLayout -{ +typedef struct FileLayout { /* view settings - XXX - move into own struct */ int prv_w; int prv_h; @@ -80,7 +79,7 @@ typedef struct FileSelection { struct rcti; -struct FileSelectParams* ED_fileselect_get_params(struct SpaceFile *sfile); +struct FileSelectParams *ED_fileselect_get_params(struct SpaceFile *sfile); short ED_fileselect_set_params(struct SpaceFile *sfile); @@ -90,13 +89,13 @@ void ED_fileselect_reset_params(struct SpaceFile *sfile); void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar); -FileLayout* ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar); +FileLayout *ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar); -int ED_fileselect_layout_numfiles(FileLayout* layout, struct ARegion *ar); -int ED_fileselect_layout_offset(FileLayout* layout, int x, int y); -FileSelection ED_fileselect_layout_offset_rect(FileLayout* layout, const struct rcti* rect); +int ED_fileselect_layout_numfiles(FileLayout *layout, struct ARegion *ar); +int ED_fileselect_layout_offset(FileLayout *layout, int x, int y); +FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const struct rcti *rect); -void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, int *x, int *y); +void ED_fileselect_layout_tilepos(FileLayout *layout, int tile, int *x, int *y); void ED_operatormacros_file(void); diff --git a/source/blender/editors/include/ED_fluidsim.h b/source/blender/editors/include/ED_fluidsim.h index 1a0c90978e6..4790dc5e03d 100644 --- a/source/blender/editors/include/ED_fluidsim.h +++ b/source/blender/editors/include/ED_fluidsim.h @@ -37,12 +37,12 @@ struct FluidsimSettings; /* allocates and initializes fluidsim data */ -struct FluidsimSettings* fluidsimSettingsNew(struct Object *srcob); +struct FluidsimSettings *fluidsimSettingsNew(struct Object *srcob); /* frees internal data itself */ -void fluidsimSettingsFree(struct FluidsimSettings* sb); +void fluidsimSettingsFree(struct FluidsimSettings *sb); /* duplicate internal data */ -struct FluidsimSettings* fluidsimSettingsCopy(struct FluidsimSettings* sb); +struct FluidsimSettings *fluidsimSettingsCopy(struct FluidsimSettings *sb); #endif /* __ED_FLUIDSIM_H__ */ diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 213fbda5aa7..bd3e4371a79 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -54,8 +54,8 @@ struct wmKeyConfig; * Used as part of the 'stroke cache' used during drawing of new strokes */ typedef struct tGPspoint { - int x, y; /* x and y coordinates of cursor (in relative to area) */ - float pressure; /* pressure of tablet at this point */ + int x, y; /* x and y coordinates of cursor (in relative to area) */ + float pressure; /* pressure of tablet at this point */ } tGPspoint; diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 7f68325e5ee..cd64427de78 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -50,16 +50,16 @@ struct DLRBT_Tree; /* Keyframe Column Struct */ typedef struct ActKeyColumn { - /* ListBase linkage */ + /* ListBase linkage */ struct ActKeyColumn *next, *prev; - /* sorting-tree linkage */ - struct ActKeyColumn *left, *right; /* 'children' of this node, less than and greater than it (respectively) */ - struct ActKeyColumn *parent; /* parent of this node in the tree */ - char tree_col; /* DLRB_BLACK or DLRB_RED */ + /* sorting-tree linkage */ + struct ActKeyColumn *left, *right; /* 'children' of this node, less than and greater than it (respectively) */ + struct ActKeyColumn *parent; /* parent of this node in the tree */ + char tree_col; /* DLRB_BLACK or DLRB_RED */ - /* keyframe info */ - char key_type; /* eBezTripe_KeyframeType */ + /* keyframe info */ + char key_type; /* eBezTripe_KeyframeType */ short sel; float cfra; @@ -70,15 +70,15 @@ typedef struct ActKeyColumn { /* 'Long Keyframe' Struct */ typedef struct ActKeyBlock { - /* ListBase linkage */ + /* ListBase linkage */ struct ActKeyBlock *next, *prev; - /* sorting-tree linkage */ - struct ActKeyBlock *left, *right; /* 'children' of this node, less than and greater than it (respectively) */ - struct ActKeyBlock *parent; /* parent of this node in the tree */ - char tree_col; /* DLRB_BLACK or DLRB_RED */ + /* sorting-tree linkage */ + struct ActKeyBlock *left, *right; /* 'children' of this node, less than and greater than it (respectively) */ + struct ActKeyBlock *parent; /* parent of this node in the tree */ + char tree_col; /* DLRB_BLACK or DLRB_RED */ - /* key-block info */ + /* key-block info */ char sel; short handle_type; float val; @@ -93,11 +93,11 @@ typedef struct ActKeyBlock { /* options for keyframe shape drawing */ typedef enum eKeyframeShapeDrawOpts { - /* only the border */ - KEYFRAME_SHAPE_FRAME = 0, - /* only the inside filling */ + /* only the border */ + KEYFRAME_SHAPE_FRAME = 0, + /* only the inside filling */ KEYFRAME_SHAPE_INSIDE, - /* the whole thing */ + /* the whole thing */ KEYFRAME_SHAPE_BOTH } eKeyframeShapeDrawOpts; diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 7ba37b49f85..bdb70696742 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -43,15 +43,15 @@ struct Scene; /* --------- BezTriple Selection ------------- */ -#define BEZ_SEL(bezt) { (bezt)->f1 |= SELECT; (bezt)->f2 |= SELECT; (bezt)->f3 |= SELECT; } -#define BEZ_DESEL(bezt) { (bezt)->f1 &= ~SELECT; (bezt)->f2 &= ~SELECT; (bezt)->f3 &= ~SELECT; } -#define BEZ_INVSEL(bezt) { (bezt)->f1 ^= SELECT; (bezt)->f2 ^= SELECT; (bezt)->f3 ^= SELECT; } +#define BEZ_SEL(bezt) { (bezt)->f1 |= SELECT; (bezt)->f2 |= SELECT; (bezt)->f3 |= SELECT; } +#define BEZ_DESEL(bezt) { (bezt)->f1 &= ~SELECT; (bezt)->f2 &= ~SELECT; (bezt)->f3 &= ~SELECT; } +#define BEZ_INVSEL(bezt) { (bezt)->f1 ^= SELECT; (bezt)->f2 ^= SELECT; (bezt)->f3 ^= SELECT; } /* --------- Tool Flags ------------ */ /* bezt validation */ typedef enum eEditKeyframes_Validate { - BEZT_OK_FRAME = 1, + BEZT_OK_FRAME = 1, BEZT_OK_FRAMERANGE, BEZT_OK_SELECTED, BEZT_OK_VALUE, @@ -63,19 +63,19 @@ typedef enum eEditKeyframes_Validate { /* select modes */ typedef enum eEditKeyframes_Select { - /* SELECT_SUBTRACT for all, followed by SELECT_ADD for some */ - SELECT_REPLACE = (1<<0), - /* add ok keyframes to selection */ - SELECT_ADD = (1<<1), - /* remove ok keyframes from selection */ - SELECT_SUBTRACT = (1<<2), - /* flip ok status of keyframes based on key status */ - SELECT_INVERT = (1<<3) + /* SELECT_SUBTRACT for all, followed by SELECT_ADD for some */ + SELECT_REPLACE = (1 << 0), + /* add ok keyframes to selection */ + SELECT_ADD = (1 << 1), + /* remove ok keyframes from selection */ + SELECT_SUBTRACT = (1 << 2), + /* flip ok status of keyframes based on key status */ + SELECT_INVERT = (1 << 3) } eEditKeyframes_Select; /* "selection map" building modes */ typedef enum eEditKeyframes_SelMap { - SELMAP_MORE = 0, + SELMAP_MORE = 0, SELMAP_LESS } eEditKeyframes_SelMap; @@ -104,92 +104,92 @@ typedef enum eEditKeyframes_Mirror { /* --- Generic Properties for Keyframe Edit Tools ----- */ typedef struct KeyframeEditData { - /* generic properties/data access */ - ListBase list; /* temp list for storing custom list of data to check */ - struct Scene *scene; /* pointer to current scene - many tools need access to cfra/etc. */ - void *data; /* pointer to custom data - usually 'Object' but also 'rectf', but could be other types too */ - float f1, f2; /* storage of times/values as 'decimals' */ - int i1, i2; /* storage of times/values/flags as 'whole' numbers */ - - /* current iteration data */ - struct FCurve *fcu; /* F-Curve that is being iterated over */ - int curIndex; /* index of current keyframe being iterated over */ - - /* flags */ - short curflags; /* current flags for the keyframe we're reached in the iteration process */ - short iterflags; /* settings for iteration process */ // XXX: unused... + /* generic properties/data access */ + ListBase list; /* temp list for storing custom list of data to check */ + struct Scene *scene; /* pointer to current scene - many tools need access to cfra/etc. */ + void *data; /* pointer to custom data - usually 'Object' but also 'rectf', but could be other types too */ + float f1, f2; /* storage of times/values as 'decimals' */ + int i1, i2; /* storage of times/values/flags as 'whole' numbers */ + + /* current iteration data */ + struct FCurve *fcu; /* F-Curve that is being iterated over */ + int curIndex; /* index of current keyframe being iterated over */ + + /* flags */ + short curflags; /* current flags for the keyframe we're reached in the iteration process */ + short iterflags; /* settings for iteration process */ // XXX: unused... } KeyframeEditData; /* ------- Function Pointer Typedefs ---------------- */ - /* callback function that refreshes the F-Curve after use */ +/* callback function that refreshes the F-Curve after use */ typedef void (*FcuEditFunc)(struct FCurve *fcu); - /* callback function that operates on the given BezTriple */ +/* callback function that operates on the given BezTriple */ typedef short (*KeyframeEditFunc)(KeyframeEditData *ked, struct BezTriple *bezt); /* ---------- Defines for 'OK' polls ----------------- */ /* which verts of a keyframe is active (after polling) */ typedef enum eKeyframeVertOk { - /* 'key' itself is ok */ - KEYFRAME_OK_KEY = (1<<0), - /* 'handle 1' is ok */ - KEYFRAME_OK_H1 = (1<<1), - /* 'handle 2' is ok */ - KEYFRAME_OK_H2 = (1<<2), - /* all flags */ - KEYFRAME_OK_ALL = (KEYFRAME_OK_KEY|KEYFRAME_OK_H1|KEYFRAME_OK_H2) + /* 'key' itself is ok */ + KEYFRAME_OK_KEY = (1 << 0), + /* 'handle 1' is ok */ + KEYFRAME_OK_H1 = (1 << 1), + /* 'handle 2' is ok */ + KEYFRAME_OK_H2 = (1 << 2), + /* all flags */ + KEYFRAME_OK_ALL = (KEYFRAME_OK_KEY | KEYFRAME_OK_H1 | KEYFRAME_OK_H2) } eKeyframeVertOk; /* Flags for use during iteration */ typedef enum eKeyframeIterFlags { - /* consider handles in addition to key itself */ - KEYFRAME_ITER_INCL_HANDLES = (1<<0), + /* consider handles in addition to key itself */ + KEYFRAME_ITER_INCL_HANDLES = (1 << 0), } eKeyframeIterFlags; /* ------- Custom Data Type Defines ------------------ */ /* Custom data for remapping one range to another in a fixed way */ typedef struct KeyframeEditCD_Remap { - float oldMin, oldMax; /* old range */ - float newMin, newMax; /* new range */ + float oldMin, oldMax; /* old range */ + float newMin, newMax; /* new range */ } KeyframeEditCD_Remap; /* Paste options */ typedef enum eKeyPasteOffset { - /* paste keys starting at current frame */ + /* paste keys starting at current frame */ KEYFRAME_PASTE_OFFSET_CFRA_START, - /* paste keys ending at current frame */ + /* paste keys ending at current frame */ KEYFRAME_PASTE_OFFSET_CFRA_END, - /* paste keys relative to the current frame when copying */ + /* paste keys relative to the current frame when copying */ KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, - /* paste keys from original time */ + /* paste keys from original time */ KEYFRAME_PASTE_OFFSET_NONE } eKeyPasteOffset; typedef enum eKeyMergeMode { - /* overlay existing with new keys */ + /* overlay existing with new keys */ KEYFRAME_PASTE_MERGE_MIX, - /* replace entire fcurve */ + /* replace entire fcurve */ KEYFRAME_PASTE_MERGE_OVER, - /* overwrite keys in pasted range */ + /* overwrite keys in pasted range */ KEYFRAME_PASTE_MERGE_OVER_RANGE, - /* overwrite keys in pasted range (use all keyframe start & end for range) */ + /* overwrite keys in pasted range (use all keyframe start & end for range) */ KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL } eKeyMergeMode; /* ---------------- Looping API --------------------- */ /* functions for looping over keyframes */ - /* function for working with F-Curve data only (i.e. when filters have been chosen to explicitly use this) */ +/* function for working with F-Curve data only (i.e. when filters have been chosen to explicitly use this) */ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, struct FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb); - /* function for working with any type (i.e. one of the known types) of animation channel - * - filterflag is bDopeSheet->flag (DOPESHEET_FILTERFLAG) - */ +/* function for working with any type (i.e. one of the known types) of animation channel + * - filterflag is bDopeSheet->flag (DOPESHEET_FILTERFLAG) + */ short ANIM_animchannel_keyframes_loop(KeyframeEditData *ked, struct bDopeSheet *ads, struct bAnimListElem *ale, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb); - /* same as above, except bAnimListElem wrapper is not needed... - * - keytype is eAnim_KeyType - */ +/* same as above, except bAnimListElem wrapper is not needed... + * - keytype is eAnim_KeyType + */ short ANIM_animchanneldata_keyframes_loop(KeyframeEditData *ked, struct bDopeSheet *ads, void *data, int keytype, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb); /* functions for making sure all keyframes are in good order */ @@ -250,7 +250,7 @@ void sample_fcurve(struct FCurve *fcu); void free_anim_copybuf(void); short copy_animedit_keys(struct bAnimContext *ac, ListBase *anim_data); short paste_animedit_keys(struct bAnimContext *ac, ListBase *anim_data, - const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode); + const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode); /* ************************************************ */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 490a8830d3a..be5ad5b0c70 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -80,15 +80,15 @@ struct FCurve *verify_fcurve(struct bAction *act, const char group[], const char /* -------- */ /* Lesser Keyframing API call: - * Use this when validation of necessary animation data isn't necessary as it already - * exists, and there is a beztriple that can be directly copied into the array. + * Use this when validation of necessary animation data isn't necessary as it already + * exists, and there is a beztriple that can be directly copied into the array. */ int insert_bezt_fcurve(struct FCurve *fcu, struct BezTriple *bezt, short flag); /* Main Keyframing API call: - * Use this when validation of necessary animation data isn't necessary as it - * already exists. It will insert a keyframe using the current value being keyframed. - * Returns the index at which a keyframe was added (or -1 if failed) + * Use this when validation of necessary animation data isn't necessary as it + * already exists. It will insert a keyframe using the current value being keyframed. + * Returns the index at which a keyframe was added (or -1 if failed) */ int insert_vert_fcurve(struct FCurve *fcu, float x, float y, short flag); @@ -109,7 +109,7 @@ short insert_keyframe_direct(struct ReportList *reports, struct PointerRNA ptr, short insert_keyframe(struct ReportList *reports, struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag); /* Main Keyframing API call: - * Use this to delete keyframe on current frame for relevant channel. Will perform checks just in case. + * Use this to delete keyframe on current frame for relevant channel. Will perform checks just in case. */ short delete_keyframe(struct ReportList *reports, struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag); @@ -132,26 +132,26 @@ typedef struct KeyingSetInfo { struct KeyingSetInfo *next, *prev; /* info */ - /* identifier used for class name, which KeyingSet instances reference as "Typeinfo Name" */ + /* identifier used for class name, which KeyingSet instances reference as "Typeinfo Name" */ char idname[64]; - /* identifier so that user can hook this up to a KeyingSet (used as label). */ + /* identifier so that user can hook this up to a KeyingSet (used as label). */ char name[64]; - /* short help/description. */ + /* short help/description. */ char description[240]; /* RNA_DYN_DESCR_MAX */ - /* keying settings */ + /* keying settings */ short keyingflag; /* polling callbacks */ - /* callback for polling the context for whether the right data is available */ + /* callback for polling the context for whether the right data is available */ cbKeyingSet_Poll poll; /* generate callbacks */ - /* iterator to use to go through collections of data in context - * - this callback is separate from the 'adding' stage, allowing - * BuiltIn KeyingSets to be manually specified to use - */ + /* iterator to use to go through collections of data in context + * - this callback is separate from the 'adding' stage, allowing + * BuiltIn KeyingSets to be manually specified to use + */ cbKeyingSet_Iterator iter; - /* generator to use to add properties based on the data found by iterator */ + /* generator to use to add properties based on the data found by iterator */ cbKeyingSet_Generate generate; /* RNA integration */ @@ -172,9 +172,9 @@ typedef enum eModifyKey_Modes { /* return codes for errors (with Relative KeyingSets) */ typedef enum eModifyKey_Returns { - /* context info was invalid for using the Keying Set */ + /* context info was invalid for using the Keying Set */ MODIFYKEY_INVALID_CONTEXT = -1, - /* there isn't any typeinfo for generating paths from context */ + /* there isn't any typeinfo for generating paths from context */ MODIFYKEY_MISSING_TYPEINFO = -2, } eModifyKey_Returns; @@ -220,7 +220,7 @@ short ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks); /* Flags for use by driver creation calls */ typedef enum eCreateDriverFlags { - CREATEDRIVER_WITH_DEFAULT_DVAR = (1<<0), /* create drivers with a default variable for nicer UI */ + CREATEDRIVER_WITH_DEFAULT_DVAR = (1 << 0), /* create drivers with a default variable for nicer UI */ } eCreateDriverFlags; /* -------- */ @@ -236,22 +236,22 @@ struct FCurve *verify_driver_fcurve(struct ID *id, const char rna_path[], const short ANIM_driver_can_paste(void); /* Main Driver Management API calls: - * Add a new driver for the specified property on the given ID block + * Add a new driver for the specified property on the given ID block */ short ANIM_add_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag, int type); /* Main Driver Management API calls: - * Remove the driver for the specified property on the given ID block (if available) + * Remove the driver for the specified property on the given ID block (if available) */ short ANIM_remove_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); /* Main Driver Management API calls: - * Make a copy of the driver for the specified property on the given ID block + * Make a copy of the driver for the specified property on the given ID block */ short ANIM_copy_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); /* Main Driver Management API calls: - * Add a new driver for the specified property on the given ID block or replace an existing one + * Add a new driver for the specified property on the given ID block or replace an existing one * with the driver + driver-curve data from the buffer */ short ANIM_paste_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); @@ -259,21 +259,21 @@ short ANIM_paste_driver(struct ReportList *reports, struct ID *id, const char rn /* ************ Auto-Keyframing ********************** */ /* Notes: * - All the defines for this (User-Pref settings and Per-Scene settings) - * are defined in DNA_userdef_types.h + * are defined in DNA_userdef_types.h * - Scene settings take presidence over those for userprefs, with old files - * inheriting userpref settings for the scene settings + * inheriting userpref settings for the scene settings * - "On/Off + Mode" are stored per Scene, but "settings" are currently stored - * as userprefs + * as userprefs */ /* Auto-Keying macros for use by various tools */ - /* check if auto-keyframing is enabled (per scene takes presidence) */ -#define IS_AUTOKEY_ON(scene) ((scene) ? (scene->toolsettings->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON)) - /* check the mode for auto-keyframing (per scene takes presidence) */ -#define IS_AUTOKEY_MODE(scene, mode) ((scene) ? (scene->toolsettings->autokey_mode == AUTOKEY_MODE_##mode) : (U.autokey_mode == AUTOKEY_MODE_##mode)) - /* check if a flag is set for auto-keyframing (per scene takes presidence) */ +/* check if auto-keyframing is enabled (per scene takes presidence) */ +#define IS_AUTOKEY_ON(scene) ((scene) ? (scene->toolsettings->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON)) +/* check the mode for auto-keyframing (per scene takes presidence) */ +#define IS_AUTOKEY_MODE(scene, mode) ((scene) ? (scene->toolsettings->autokey_mode == AUTOKEY_MODE_##mode) : (U.autokey_mode == AUTOKEY_MODE_##mode)) +/* check if a flag is set for auto-keyframing (per scene takes presidence) */ #define IS_AUTOKEY_FLAG(scene, flag) \ - ((scene)? \ + ((scene) ? \ ((scene->toolsettings->autokey_flag & AUTOKEY_FLAG_##flag) || (U.autokey_flag & AUTOKEY_FLAG_##flag)) \ : \ (U.autokey_flag & AUTOKEY_FLAG_##flag)) @@ -291,7 +291,7 @@ short fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter); /* Main Keyframe Checking API call: * Checks whether a keyframe exists for the given ID-block one the given frame. * - It is recommended to call this method over the other keyframe-checkers directly, - * in case some detail of the implementation changes... + * in case some detail of the implementation changes... * - frame: the value of this is quite often result of BKE_scene_frame_get() */ short id_frame_has_keyframe(struct ID *id, float frame, short filter); @@ -302,14 +302,14 @@ short id_frame_has_keyframe(struct ID *id, float frame, short filter); * (for v3d->keyflags) */ typedef enum eAnimFilterFlags { - /* general */ - ANIMFILTER_KEYS_LOCAL = (1<<0), /* only include locally available anim data */ - ANIMFILTER_KEYS_MUTED = (1<<1), /* include muted elements */ - ANIMFILTER_KEYS_ACTIVE = (1<<2), /* only include active-subelements */ - - /* object specific */ - ANIMFILTER_KEYS_NOMAT = (1<<9), /* don't include material keyframes */ - ANIMFILTER_KEYS_NOSKEY = (1<<10), /* don't include shape keys (for geometry) */ + /* general */ + ANIMFILTER_KEYS_LOCAL = (1 << 0), /* only include locally available anim data */ + ANIMFILTER_KEYS_MUTED = (1 << 1), /* include muted elements */ + ANIMFILTER_KEYS_ACTIVE = (1 << 2), /* only include active-subelements */ + + /* object specific */ + ANIMFILTER_KEYS_NOMAT = (1 << 9), /* don't include material keyframes */ + ANIMFILTER_KEYS_NOSKEY = (1 << 10), /* don't include shape keys (for geometry) */ } eAnimFilterFlags; /* utility funcs for auto keyframe */ diff --git a/source/blender/editors/include/ED_markers.h b/source/blender/editors/include/ED_markers.h index c0b5ba6ecf8..cb065646f0a 100644 --- a/source/blender/editors/include/ED_markers.h +++ b/source/blender/editors/include/ED_markers.h @@ -42,8 +42,8 @@ struct TimeMarker; /* flags for drawing markers */ enum { - DRAW_MARKERS_LINES = (1<<0), - DRAW_MARKERS_LOCAL = (1<<1) + DRAW_MARKERS_LINES = (1 << 0), + DRAW_MARKERS_LOCAL = (1 << 1) }; void draw_markers_time(const struct bContext *C, int flag); @@ -78,4 +78,3 @@ void ED_marker_keymap_animedit_conflictfree(struct wmKeyMap *keymap); void debug_markers_print_list(struct ListBase *markers); #endif /* __ED_MARKERS_H__ */ - diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h index d51ece58e92..411df88fb28 100644 --- a/source/blender/editors/include/ED_numinput.h +++ b/source/blender/editors/include/ED_numinput.h @@ -48,11 +48,11 @@ typedef struct NumInput { } NumInput; /* NUMINPUT FLAGS */ -#define NUM_NULL_ONE 2 -#define NUM_NO_NEGATIVE 4 -#define NUM_NO_ZERO 8 -#define NUM_NO_FRACTION 16 -#define NUM_AFFECT_ALL 32 +#define NUM_NULL_ONE 2 +#define NUM_NO_NEGATIVE 4 +#define NUM_NO_ZERO 8 +#define NUM_NO_FRACTION 16 +#define NUM_AFFECT_ALL 32 /*********************** NumInput ********************************/ diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 85e68ba7ab4..429dcb88c78 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -90,21 +90,21 @@ void ED_object_parent_clear(struct bContext *C, int type); /* generic editmode keys like pet * do_pet - * 0: No - * 1: Object - * 2: Edit - * 3: Edit with connected + * 0: No + * 1: Object + * 2: Edit + * 3: Edit with connected * */ void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int do_pet); - /* send your own notifier for select! */ +/* send your own notifier for select! */ void ED_base_object_select(struct Base *base, short mode); - /* includes notifier */ +/* includes notifier */ void ED_base_object_activate(struct bContext *C, struct Base *base); void ED_base_object_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Base *base); - /* single object duplicate, if dupflag==0, fully linked, else it uses the flags given */ +/* single object duplicate, if dupflag==0, fully linked, else it uses the flags given */ struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct Base *base, int dupflag); void ED_object_parent(struct Object *ob, struct Object *parent, int type, const char *substr); @@ -112,11 +112,11 @@ void ED_object_parent(struct Object *ob, struct Object *parent, int type, const void ED_object_toggle_modes(struct bContext *C, int mode); /* bitflags for enter/exit editmode */ -#define EM_FREEDATA 1 -#define EM_FREEUNDO 2 -#define EM_WAITCURSOR 4 -#define EM_DO_UNDO 8 -#define EM_IGNORE_LAYER 16 +#define EM_FREEDATA 1 +#define EM_FREEUNDO 2 +#define EM_WAITCURSOR 4 +#define EM_DO_UNDO 8 +#define EM_IGNORE_LAYER 16 void ED_object_exit_editmode(struct bContext *C, int flag); void ED_object_enter_editmode(struct bContext *C, int flag); @@ -128,10 +128,10 @@ float ED_object_new_primitive_matrix(struct bContext *C, struct Object *editob, void ED_object_add_generic_props(struct wmOperatorType *ot, int do_editmode); int ED_object_add_generic_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, - float *loc, float *rot, int *enter_editmode, unsigned int *layer, int *is_view_aligned); + float *loc, float *rot, int *enter_editmode, unsigned int *layer, int *is_view_aligned); struct Object *ED_object_add_type(struct bContext *C, int type, float *loc, - float *rot, int enter_editmode, unsigned int layer); + float *rot, int enter_editmode, unsigned int layer); void ED_object_single_users(struct Main *bmain, struct Scene *scene, int full); void ED_object_single_user(struct Scene *scene, struct Object *ob); @@ -161,7 +161,7 @@ void ED_setflagsLatt(struct Object *obedit, int flag); /* object_modifier.c */ enum { - MODIFIER_APPLY_DATA=1, + MODIFIER_APPLY_DATA = 1, MODIFIER_APPLY_SHAPE }; diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h index 5392ef86ba7..7891315be9f 100644 --- a/source/blender/editors/include/ED_render.h +++ b/source/blender/editors/include/ED_render.h @@ -57,16 +57,16 @@ typedef struct RenderInfo { int pr_rectx; int pr_recty; short curtile, tottile, status; - rcti disprect; /* storage for view3d preview rect */ - unsigned int* rect; - struct Render *re; /* persistent render */ + rcti disprect; /* storage for view3d preview rect */ + unsigned int *rect; + struct Render *re; /* persistent render */ } RenderInfo; /* ri->status */ -#define PR_DBASE 1 -#define PR_DISPRECT 2 -#define PR_PROJECTED 4 -#define PR_ROTATED 8 +#define PR_DBASE 1 +#define PR_DISPRECT 2 +#define PR_PROJECTED 4 +#define PR_ROTATED 8 /* Render the preview * @@ -76,9 +76,9 @@ typedef struct RenderInfo { * - PR_NODE_RENDER: preview is rendered for node editor */ -#define PR_BUTS_RENDER 0 -#define PR_ICON_RENDER 1 -#define PR_NODE_RENDER 2 +#define PR_BUTS_RENDER 0 +#define PR_ICON_RENDER 1 +#define PR_NODE_RENDER 2 void ED_preview_init_dbase(void); void ED_preview_free_dbase(void); diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index f62befdaa31..2fc72f7e8da 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -50,135 +50,135 @@ struct uiBlock; struct rcti; /* regions */ -void ED_region_do_listen(struct ARegion *ar, struct wmNotifier *note); -void ED_region_do_draw(struct bContext *C, struct ARegion *ar); -void ED_region_exit(struct bContext *C, struct ARegion *ar); -void ED_region_pixelspace(struct ARegion *ar); -void ED_region_set(const struct bContext *C, struct ARegion *ar); -void ED_region_init(struct bContext *C, struct ARegion *ar); -void ED_region_tag_redraw(struct ARegion *ar); -void ED_region_tag_redraw_partial(struct ARegion *ar, struct rcti *rct); -void ED_region_tag_redraw_overlay(struct ARegion *ar); -void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *ar); -void ED_region_panels(const struct bContext *C, struct ARegion *ar, int vertical, const char *context, int contextnr); -void ED_region_header_init(struct ARegion *ar); -void ED_region_header(const struct bContext *C, struct ARegion *ar); -void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar); -void region_scissor_winrct(struct ARegion *ar, struct rcti *winrct); -void ED_region_info_draw(struct ARegion *ar, const char *text, int block, float alpha); -void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy); +void ED_region_do_listen(struct ARegion *ar, struct wmNotifier *note); +void ED_region_do_draw(struct bContext *C, struct ARegion *ar); +void ED_region_exit(struct bContext *C, struct ARegion *ar); +void ED_region_pixelspace(struct ARegion *ar); +void ED_region_set(const struct bContext *C, struct ARegion *ar); +void ED_region_init(struct bContext *C, struct ARegion *ar); +void ED_region_tag_redraw(struct ARegion *ar); +void ED_region_tag_redraw_partial(struct ARegion *ar, struct rcti *rct); +void ED_region_tag_redraw_overlay(struct ARegion *ar); +void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *ar); +void ED_region_panels(const struct bContext *C, struct ARegion *ar, int vertical, const char *context, int contextnr); +void ED_region_header_init(struct ARegion *ar); +void ED_region_header(const struct bContext *C, struct ARegion *ar); +void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar); +void region_scissor_winrct(struct ARegion *ar, struct rcti *winrct); +void ED_region_info_draw(struct ARegion *ar, const char *text, int block, float alpha); +void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy); /* spaces */ -void ED_spacetypes_init(void); -void ED_spacetypes_keymap(struct wmKeyConfig *keyconf); -int ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco); -int ED_area_header_standardbuttons(const struct bContext *C, struct uiBlock *block, int yco); -void ED_area_overdraw(struct bContext *C); -void ED_area_overdraw_flush(struct ScrArea *sa, struct ARegion *ar); +void ED_spacetypes_init(void); +void ED_spacetypes_keymap(struct wmKeyConfig *keyconf); +int ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco); +int ED_area_header_standardbuttons(const struct bContext *C, struct uiBlock *block, int yco); +void ED_area_overdraw(struct bContext *C); +void ED_area_overdraw_flush(struct ScrArea *sa, struct ARegion *ar); /* areas */ -void ED_area_initialize(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *sa); -void ED_area_exit(struct bContext *C, struct ScrArea *sa); -int ED_screen_area_active(const struct bContext *C); -void ED_area_do_listen(ScrArea *sa, struct wmNotifier *note); -void ED_area_tag_redraw(ScrArea *sa); -void ED_area_tag_redraw_regiontype(ScrArea *sa, int type); -void ED_area_tag_refresh(ScrArea *sa); -void ED_area_do_refresh(struct bContext *C, ScrArea *sa); -void ED_area_headerprint(ScrArea *sa, const char *str); -void ED_area_newspace(struct bContext *C, ScrArea *sa, int type); -void ED_area_prevspace(struct bContext *C, ScrArea *sa); -void ED_area_swapspace(struct bContext *C, ScrArea *sa1, ScrArea *sa2); -int ED_area_headersize(void); +void ED_area_initialize(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *sa); +void ED_area_exit(struct bContext *C, struct ScrArea *sa); +int ED_screen_area_active(const struct bContext *C); +void ED_area_do_listen(ScrArea *sa, struct wmNotifier *note); +void ED_area_tag_redraw(ScrArea *sa); +void ED_area_tag_redraw_regiontype(ScrArea *sa, int type); +void ED_area_tag_refresh(ScrArea *sa); +void ED_area_do_refresh(struct bContext *C, ScrArea *sa); +void ED_area_headerprint(ScrArea *sa, const char *str); +void ED_area_newspace(struct bContext *C, ScrArea *sa, int type); +void ED_area_prevspace(struct bContext *C, ScrArea *sa); +void ED_area_swapspace(struct bContext *C, ScrArea *sa1, ScrArea *sa2); +int ED_area_headersize(void); /* screens */ -void ED_screens_initialize(struct wmWindowManager *wm); -void ED_screen_draw(struct wmWindow *win); -void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win); -void ED_screen_do_listen(struct bContext *C, struct wmNotifier *note); +void ED_screens_initialize(struct wmWindowManager *wm); +void ED_screen_draw(struct wmWindow *win); +void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win); +void ED_screen_do_listen(struct bContext *C, struct wmNotifier *note); bScreen *ED_screen_duplicate(struct wmWindow *win, struct bScreen *sc); bScreen *ED_screen_add(struct wmWindow *win, struct Scene *scene, const char *name); -void ED_screen_set(struct bContext *C, struct bScreen *sc); -void ED_screen_delete(struct bContext *C, struct bScreen *sc); -void ED_screen_set_scene(struct bContext *C, struct bScreen *screen, struct Scene *scene); -void ED_screen_delete_scene(struct bContext *C, struct Scene *scene); -void ED_screen_set_subwinactive(struct bContext *C, struct wmEvent *event); -void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen); -void ED_screen_animation_timer(struct bContext *C, int redraws, int refresh, int sync, int enable); -void ED_screen_animation_timer_update(struct bScreen *screen, int redraws, int refresh); +void ED_screen_set(struct bContext *C, struct bScreen *sc); +void ED_screen_delete(struct bContext *C, struct bScreen *sc); +void ED_screen_set_scene(struct bContext *C, struct bScreen *screen, struct Scene *scene); +void ED_screen_delete_scene(struct bContext *C, struct Scene *scene); +void ED_screen_set_subwinactive(struct bContext *C, struct wmEvent *event); +void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen); +void ED_screen_animation_timer(struct bContext *C, int redraws, int refresh, int sync, int enable); +void ED_screen_animation_timer_update(struct bScreen *screen, int redraws, int refresh); ScrArea *ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type); -void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa); -void ED_screen_full_restore(struct bContext *C, ScrArea *sa); +void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa); +void ED_screen_full_restore(struct bContext *C, ScrArea *sa); struct ScrArea *ED_screen_full_toggle(struct bContext *C, struct wmWindow *win, struct ScrArea *sa); /* anim */ -void ED_update_for_newframe(struct Main *bmain, struct Scene *scene, struct bScreen *screen, int mute); +void ED_update_for_newframe(struct Main *bmain, struct Scene *scene, struct bScreen *screen, int mute); -void ED_refresh_viewport_fps(struct bContext *C); +void ED_refresh_viewport_fps(struct bContext *C); int ED_screen_animation_play(struct bContext *C, int sync, int mode); /* screen keymaps */ -void ED_operatortypes_screen(void); -void ED_keymap_screen(struct wmKeyConfig *keyconf); +void ED_operatortypes_screen(void); +void ED_keymap_screen(struct wmKeyConfig *keyconf); /* operators; context poll callbacks */ -int ED_operator_screenactive(struct bContext *C); -int ED_operator_screen_mainwinactive(struct bContext *C); -int ED_operator_areaactive(struct bContext *C); -int ED_operator_regionactive(struct bContext *C); - -int ED_operator_scene_editable(struct bContext *C); -int ED_operator_objectmode(struct bContext *C); - -int ED_operator_view3d_active(struct bContext *C); -int ED_operator_region_view3d_active(struct bContext *C); -int ED_operator_animview_active(struct bContext *C); -int ED_operator_timeline_active(struct bContext *C); -int ED_operator_outliner_active(struct bContext *C); -int ED_operator_outliner_active_no_editobject(struct bContext *C); -int ED_operator_file_active(struct bContext *C); -int ED_operator_action_active(struct bContext *C); -int ED_operator_buttons_active(struct bContext *C); -int ED_operator_node_active(struct bContext *C); -int ED_operator_graphedit_active(struct bContext *C); -int ED_operator_sequencer_active(struct bContext *C); -int ED_operator_image_active(struct bContext *C); -int ED_operator_nla_active(struct bContext *C); -int ED_operator_logic_active(struct bContext *C); -int ED_operator_info_active(struct bContext *C); -int ED_operator_console_active(struct bContext *C); - - -int ED_operator_object_active(struct bContext *C); -int ED_operator_object_active_editable(struct bContext *C); -int ED_operator_object_active_editable_mesh(struct bContext *C); -int ED_operator_object_active_editable_font(struct bContext *C); -int ED_operator_editmesh(struct bContext *C); -int ED_operator_editmesh_view3d(struct bContext *C); -int ED_operator_editmesh_region_view3d(struct bContext *C); -int ED_operator_editarmature(struct bContext *C); -int ED_operator_editcurve(struct bContext *C); -int ED_operator_editcurve_3d(struct bContext *C); -int ED_operator_editsurf(struct bContext *C); -int ED_operator_editsurfcurve(struct bContext *C); -int ED_operator_editsurfcurve_region_view3d(struct bContext *C); -int ED_operator_editfont(struct bContext *C); -int ED_operator_editlattice(struct bContext *C); -int ED_operator_editmball(struct bContext *C); -int ED_operator_uvedit(struct bContext *C); -int ED_operator_uvmap(struct bContext *C); -int ED_operator_posemode(struct bContext *C); +int ED_operator_screenactive(struct bContext *C); +int ED_operator_screen_mainwinactive(struct bContext *C); +int ED_operator_areaactive(struct bContext *C); +int ED_operator_regionactive(struct bContext *C); + +int ED_operator_scene_editable(struct bContext *C); +int ED_operator_objectmode(struct bContext *C); + +int ED_operator_view3d_active(struct bContext *C); +int ED_operator_region_view3d_active(struct bContext *C); +int ED_operator_animview_active(struct bContext *C); +int ED_operator_timeline_active(struct bContext *C); +int ED_operator_outliner_active(struct bContext *C); +int ED_operator_outliner_active_no_editobject(struct bContext *C); +int ED_operator_file_active(struct bContext *C); +int ED_operator_action_active(struct bContext *C); +int ED_operator_buttons_active(struct bContext *C); +int ED_operator_node_active(struct bContext *C); +int ED_operator_graphedit_active(struct bContext *C); +int ED_operator_sequencer_active(struct bContext *C); +int ED_operator_image_active(struct bContext *C); +int ED_operator_nla_active(struct bContext *C); +int ED_operator_logic_active(struct bContext *C); +int ED_operator_info_active(struct bContext *C); +int ED_operator_console_active(struct bContext *C); + + +int ED_operator_object_active(struct bContext *C); +int ED_operator_object_active_editable(struct bContext *C); +int ED_operator_object_active_editable_mesh(struct bContext *C); +int ED_operator_object_active_editable_font(struct bContext *C); +int ED_operator_editmesh(struct bContext *C); +int ED_operator_editmesh_view3d(struct bContext *C); +int ED_operator_editmesh_region_view3d(struct bContext *C); +int ED_operator_editarmature(struct bContext *C); +int ED_operator_editcurve(struct bContext *C); +int ED_operator_editcurve_3d(struct bContext *C); +int ED_operator_editsurf(struct bContext *C); +int ED_operator_editsurfcurve(struct bContext *C); +int ED_operator_editsurfcurve_region_view3d(struct bContext *C); +int ED_operator_editfont(struct bContext *C); +int ED_operator_editlattice(struct bContext *C); +int ED_operator_editmball(struct bContext *C); +int ED_operator_uvedit(struct bContext *C); +int ED_operator_uvmap(struct bContext *C); +int ED_operator_posemode(struct bContext *C); /* default keymaps, bitflags */ -#define ED_KEYMAP_UI 1 -#define ED_KEYMAP_VIEW2D 2 -#define ED_KEYMAP_MARKERS 4 -#define ED_KEYMAP_ANIMATION 8 -#define ED_KEYMAP_FRAMES 16 -#define ED_KEYMAP_GPENCIL 32 -#define ED_KEYMAP_HEADER 64 +#define ED_KEYMAP_UI 1 +#define ED_KEYMAP_VIEW2D 2 +#define ED_KEYMAP_MARKERS 4 +#define ED_KEYMAP_ANIMATION 8 +#define ED_KEYMAP_FRAMES 16 +#define ED_KEYMAP_GPENCIL 32 +#define ED_KEYMAP_HEADER 64 #endif /* __ED_SCREEN_H__ */ diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h index 6f7d0c55b9a..c53dca47da9 100644 --- a/source/blender/editors/include/ED_screen_types.h +++ b/source/blender/editors/include/ED_screen_types.h @@ -35,27 +35,27 @@ /* for animplayer */ typedef struct ScreenAnimData { - ARegion *ar; /* do not read from this, only for comparing if region exists */ + ARegion *ar; /* do not read from this, only for comparing if region exists */ short redraws; short refresh; - short flag; /* flags for playback */ - int sfra; /* frame that playback was started from */ - int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */ - double last_duration; /* used for frame dropping */ + short flag; /* flags for playback */ + int sfra; /* frame that playback was started from */ + int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */ + double last_duration; /* used for frame dropping */ } ScreenAnimData; /* for animplayer */ enum { - /* user-setting - frame range is played backwards */ - ANIMPLAY_FLAG_REVERSE = (1<<0), - /* temporary - playback just jumped to the start/end */ - ANIMPLAY_FLAG_JUMPED = (1<<1), - /* drop frames as needed to maintain framerate */ - ANIMPLAY_FLAG_SYNC = (1<<2), - /* don't drop frames (and ignore SCE_FRAME_DROP flag) */ - ANIMPLAY_FLAG_NO_SYNC = (1<<3), - /* use nextfra at next timer update */ - ANIMPLAY_FLAG_USE_NEXT_FRAME = (1<<4) + /* user-setting - frame range is played backwards */ + ANIMPLAY_FLAG_REVERSE = (1 << 0), + /* temporary - playback just jumped to the start/end */ + ANIMPLAY_FLAG_JUMPED = (1 << 1), + /* drop frames as needed to maintain framerate */ + ANIMPLAY_FLAG_SYNC = (1 << 2), + /* don't drop frames (and ignore SCE_FRAME_DROP flag) */ + ANIMPLAY_FLAG_NO_SYNC = (1 << 3), + /* use nextfra at next timer update */ + ANIMPLAY_FLAG_USE_NEXT_FRAME = (1 << 4) }; /* ----------------------------------------------------- */ @@ -76,10 +76,10 @@ typedef struct ScreenFrameRateInfo { /* Enum for Action Zone Edges. Which edge of area is action zone. */ typedef enum { - AE_RIGHT_TO_TOPLEFT, /* Region located on the left, _right_ edge is action zone. Region minimised to the top left */ - AE_LEFT_TO_TOPRIGHT, /* Region located on the right, _left_ edge is action zone. Region minimised to the top right */ - AE_TOP_TO_BOTTOMRIGHT, /* Region located at the bottom, _top_ edge is action zone. Region minimised to the bottom right */ - AE_BOTTOM_TO_TOPLEFT /* Region located at the top, _bottom_edge is action zone. Region minimised to the top left */ + AE_RIGHT_TO_TOPLEFT, /* Region located on the left, _right_ edge is action zone. Region minimised to the top left */ + AE_LEFT_TO_TOPRIGHT, /* Region located on the right, _left_ edge is action zone. Region minimised to the top right */ + AE_TOP_TO_BOTTOMRIGHT, /* Region located at the bottom, _top_ edge is action zone. Region minimised to the bottom right */ + AE_BOTTOM_TO_TOPLEFT /* Region located at the top, _bottom_edge is action zone. Region minimised to the top left */ } AZEdge; /* for editing areas/regions */ @@ -98,7 +98,7 @@ typedef struct AZone { } AZone; /* actionzone type */ -#define AZONE_AREA 1 -#define AZONE_REGION 2 +#define AZONE_AREA 1 +#define AZONE_REGION 2 #endif /* __ED_SCREEN_TYPES_H__ */ diff --git a/source/blender/editors/include/ED_sequencer.h b/source/blender/editors/include/ED_sequencer.h index abeb00c301f..f20ebe81189 100644 --- a/source/blender/editors/include/ED_sequencer.h +++ b/source/blender/editors/include/ED_sequencer.h @@ -27,6 +27,6 @@ #ifndef __ED_SEQUENCER_H__ #define __ED_SEQUENCER_H__ -#define SEQ_ZOOM_FAC(szoom) ((szoom) > 0.0f)? (szoom) : ((szoom) == 0.0f)? (1.0f) : (-1.0f/(szoom)) +#define SEQ_ZOOM_FAC(szoom) ((szoom) > 0.0f) ? (szoom) : ((szoom) == 0.0f) ? (1.0f) : (-1.0f / (szoom)) #endif /* __ED_SEQUENCER_H__ */ diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index 8023eef8370..c8521cb194a 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -62,13 +62,13 @@ void ED_spacetype_clip(void); void ED_file_init(void); void ED_file_exit(void); -#define REGION_DRAW_POST_VIEW 0 -#define REGION_DRAW_POST_PIXEL 1 -#define REGION_DRAW_PRE_VIEW 2 +#define REGION_DRAW_POST_VIEW 0 +#define REGION_DRAW_POST_PIXEL 1 +#define REGION_DRAW_PRE_VIEW 2 void *ED_region_draw_cb_activate(struct ARegionType *, - void (*draw)(const struct bContext *, struct ARegion *, void *), - void *custumdata, int type); + void (*draw)(const struct bContext *, struct ARegion *, void *), + void *custumdata, int type); void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int); void ED_region_draw_cb_exit(struct ARegionType *, void *); void *ED_region_draw_cb_customdata(void *handle); diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index f6dee351c29..30d49748626 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -85,16 +85,16 @@ enum { } TfmMode; /* TRANSFORM CONTEXTS */ -#define CTX_NONE 0 -#define CTX_TEXTURE 1 -#define CTX_EDGE 2 -#define CTX_NO_PET 4 -#define CTX_TWEAK 8 -#define CTX_NO_MIRROR 16 -#define CTX_AUTOCONFIRM 32 -#define CTX_BMESH 64 -#define CTX_NDOF 128 -#define CTX_MOVIECLIP 256 +#define CTX_NONE 0 +#define CTX_TEXTURE 1 +#define CTX_EDGE 2 +#define CTX_NO_PET 4 +#define CTX_TWEAK 8 +#define CTX_NO_MIRROR 16 +#define CTX_AUTOCONFIRM 32 +#define CTX_BMESH 64 +#define CTX_NDOF 128 +#define CTX_MOVIECLIP 256 /* Standalone call to get the transformation center corresponding to the current situation * returns 1 if successful, 0 otherwise (usually means there's no selection) @@ -124,7 +124,7 @@ void BIF_selectTransformOrientationValue(struct bContext *C, int orientation); void ED_getTransformOrientationMatrix(const struct bContext *C, float orientation_mat[][3], int activeOnly); struct EnumPropertyItem *BIF_enumTransformOrientation(struct bContext *C); -const char * BIF_menustringTransformOrientation(const struct bContext *C, const char *title); /* the returned value was allocated and needs to be freed after use */ +const char *BIF_menustringTransformOrientation(const struct bContext *C, const char *title); /* the returned value was allocated and needs to be freed after use */ int BIF_countTransformOrientation(const struct bContext *C); void BIF_TransformSetUndo(const char *str); @@ -133,15 +133,15 @@ void BIF_selectOrientation(void); /* to be able to add operator properties to other operators */ -#define P_MIRROR (1 << 0) -#define P_PROPORTIONAL (1 << 1) -#define P_AXIS (1 << 2) -#define P_SNAP (1 << 3) -#define P_GEO_SNAP (P_SNAP|(1 << 4)) -#define P_ALIGN_SNAP (P_GEO_SNAP|(1 << 5)) -#define P_CONSTRAINT (1 << 6) -#define P_OPTIONS (1 << 7) -#define P_CORRECT_UV (1 << 8) +#define P_MIRROR (1 << 0) +#define P_PROPORTIONAL (1 << 1) +#define P_AXIS (1 << 2) +#define P_SNAP (1 << 3) +#define P_GEO_SNAP (P_SNAP | (1 << 4)) +#define P_ALIGN_SNAP (P_GEO_SNAP | (1 << 5)) +#define P_CONSTRAINT (1 << 6) +#define P_OPTIONS (1 << 7) +#define P_CORRECT_UV (1 << 8) void Transform_Properties(struct wmOperatorType *ot, int flags); @@ -153,8 +153,7 @@ void BIF_draw_manipulator(const struct bContext *C); /* Snapping */ -typedef struct DepthPeel -{ +typedef struct DepthPeel { struct DepthPeel *next, *prev; float depth; diff --git a/source/blender/editors/include/ED_types.h b/source/blender/editors/include/ED_types.h index c4104472a82..5908dbf3a1d 100644 --- a/source/blender/editors/include/ED_types.h +++ b/source/blender/editors/include/ED_types.h @@ -35,8 +35,8 @@ /* old blender defines... should be depricated? */ #define DESELECT 0 -#define SELECT 1 -#define ACTIVE 2 +#define SELECT 1 +#define ACTIVE 2 /* proposal = put scene pointers on function calls? */ // #define BASACT (scene->basact) @@ -45,4 +45,3 @@ #endif /* __ED_TYPES_H__ */ - diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 9bde252e776..e10f049d0bc 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -43,39 +43,39 @@ struct Mesh; /* ed_util.c */ -void ED_editors_init (struct bContext *C); -void ED_editors_exit (struct bContext *C); +void ED_editors_init(struct bContext *C); +void ED_editors_exit(struct bContext *C); /* ************** Undo ************************ */ /* undo.c */ -void ED_undo_push (struct bContext *C, const char *str); -void ED_undo_push_op (struct bContext *C, struct wmOperator *op); -void ED_undo_pop_op (struct bContext *C, struct wmOperator *op); -void ED_undo_pop (struct bContext *C); -void ED_undo_redo (struct bContext *C); -void ED_OT_undo (struct wmOperatorType *ot); -void ED_OT_undo_push (struct wmOperatorType *ot); -void ED_OT_redo (struct wmOperatorType *ot); -void ED_OT_undo_history (struct wmOperatorType *ot); - -int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op); - /* convenience since UI callbacks use this mostly*/ -void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused); -void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused); - -int ED_undo_valid (const struct bContext *C, const char *undoname); +void ED_undo_push(struct bContext *C, const char *str); +void ED_undo_push_op(struct bContext *C, struct wmOperator *op); +void ED_undo_pop_op(struct bContext *C, struct wmOperator *op); +void ED_undo_pop(struct bContext *C); +void ED_undo_redo(struct bContext *C); +void ED_OT_undo(struct wmOperatorType *ot); +void ED_OT_undo_push(struct wmOperatorType *ot); +void ED_OT_redo(struct wmOperatorType *ot); +void ED_OT_undo_history(struct wmOperatorType *ot); + +int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op); +/* convenience since UI callbacks use this mostly*/ +void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused); +void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused); + +int ED_undo_valid(const struct bContext *C, const char *undoname); /* undo_editmode.c */ void undo_editmode_push(struct bContext *C, const char *name, - void * (*getdata)(struct bContext *C), - void (*freedata)(void *), - void (*to_editmode)(void *, void *, void *), - void *(*from_editmode)(void *, void *), - int (*validate_undo)(void *, void *)); - - -void undo_editmode_clear (void); + void * (*getdata)(struct bContext *C), + void (*freedata)(void *), + void (*to_editmode)(void *, void *, void *), + void *(*from_editmode)(void *, void *), + int (*validate_undo)(void *, void *)); + + +void undo_editmode_clear(void); /* crazyspace.c */ float *crazyspace_get_mapped_editverts(struct Scene *scene, struct Object *obedit); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index e3759ef5fde..f9f59c9bdd9 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -245,7 +245,7 @@ void drawcircball(int mode, const float cent[3], float rad, float tmat[][4]); void view3d_validate_backbuf(struct ViewContext *vc); struct ImBuf *view3d_read_backbuf(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); unsigned int view3d_sample_backbuf_rect(struct ViewContext *vc, const int mval[2], int size, unsigned int min, unsigned int max, int *dist, short strict, - void *handle, unsigned int (*indextest)(void *handle, unsigned int index)); + void *handle, unsigned int (*indextest)(void *handle, unsigned int index)); unsigned int view3d_sample_backbuf(struct ViewContext *vc, int x, int y); /* draws and does a 4x4 sample */ @@ -282,7 +282,7 @@ int ED_view3d_scene_layer_set(int lay, const int *values, int *active); int ED_view3d_context_activate(struct bContext *C); void ED_view3d_draw_offscreen(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, - int winx, int winy, float viewmat[][4], float winmat[][4], int draw_background); + int winx, int winy, float viewmat[][4], float winmat[][4], int draw_background); struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, unsigned int flag, int draw_background, char err_out[256]); struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(struct Scene *scene, struct Object *camera, int width, int height, unsigned int flag, int drawtype, int draw_background, char err_out[256]); diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index d262c650e1c..c0f9d6dd5cd 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -80,96 +80,96 @@ typedef struct uiLayout uiLayout; /* Defines */ /* names */ -#define UI_MAX_DRAW_STR 400 -#define UI_MAX_NAME_STR 128 +#define UI_MAX_DRAW_STR 400 +#define UI_MAX_NAME_STR 128 /* uiBlock->dt */ -#define UI_EMBOSS 0 /* use widget style for drawing */ -#define UI_EMBOSSN 1 /* Nothing, only icon and/or text */ -#define UI_EMBOSSP 2 /* Pulldown menu style */ -#define UI_EMBOSST 3 /* Table */ +#define UI_EMBOSS 0 /* use widget style for drawing */ +#define UI_EMBOSSN 1 /* Nothing, only icon and/or text */ +#define UI_EMBOSSP 2 /* Pulldown menu style */ +#define UI_EMBOSST 3 /* Table */ /* uiBlock->direction */ -#define UI_DIRECTION (UI_TOP|UI_DOWN|UI_LEFT|UI_RIGHT) -#define UI_TOP 1 -#define UI_DOWN 2 -#define UI_LEFT 4 -#define UI_RIGHT 8 +#define UI_DIRECTION (UI_TOP | UI_DOWN | UI_LEFT | UI_RIGHT) +#define UI_TOP 1 +#define UI_DOWN 2 +#define UI_LEFT 4 +#define UI_RIGHT 8 -#define UI_CENTER 16 -#define UI_SHIFT_FLIPPED 32 +#define UI_CENTER 16 +#define UI_SHIFT_FLIPPED 32 /* uiBlock->autofill (not yet used) */ // #define UI_BLOCK_COLLUMNS 1 // #define UI_BLOCK_ROWS 2 /* uiBlock->flag (controls) */ -#define UI_BLOCK_LOOP 1 -#define UI_BLOCK_REDRAW 2 -#define UI_BLOCK_RET_1 4 /* XXX 2.5 not implemented */ -#define UI_BLOCK_NUMSELECT 8 +#define UI_BLOCK_LOOP 1 +#define UI_BLOCK_REDRAW 2 +#define UI_BLOCK_RET_1 4 /* XXX 2.5 not implemented */ +#define UI_BLOCK_NUMSELECT 8 /*#define UI_BLOCK_ENTER_OK 16*/ /*UNUSED*/ -#define UI_BLOCK_CLIPBOTTOM 32 -#define UI_BLOCK_CLIPTOP 64 -#define UI_BLOCK_MOVEMOUSE_QUIT 128 -#define UI_BLOCK_KEEP_OPEN 256 -#define UI_BLOCK_POPUP 512 -#define UI_BLOCK_OUT_1 1024 -#define UI_BLOCK_NO_FLIP 2048 -#define UI_BLOCK_POPUP_MEMORY 4096 -#define UI_BLOCK_CLIP_EVENTS 8192 /* stop handling mouse events */ +#define UI_BLOCK_CLIPBOTTOM 32 +#define UI_BLOCK_CLIPTOP 64 +#define UI_BLOCK_MOVEMOUSE_QUIT 128 +#define UI_BLOCK_KEEP_OPEN 256 +#define UI_BLOCK_POPUP 512 +#define UI_BLOCK_OUT_1 1024 +#define UI_BLOCK_NO_FLIP 2048 +#define UI_BLOCK_POPUP_MEMORY 4096 +#define UI_BLOCK_CLIP_EVENTS 8192 /* stop handling mouse events */ /* uiPopupBlockHandle->menuretval */ -#define UI_RETURN_CANCEL 1 /* cancel all menus cascading */ +#define UI_RETURN_CANCEL 1 /* cancel all menus cascading */ #define UI_RETURN_OK 2 /* choice made */ #define UI_RETURN_OUT 4 /* left the menu */ #define UI_RETURN_UPDATE 8 /* update the button that opened */ #define UI_RETURN_POPUP_OK 16 /* popup is ok to be handled */ - /* block->flag bits 12-15 are identical to but->flag bits */ +/* block->flag bits 12-15 are identical to but->flag bits */ /* panel controls */ -#define UI_PNL_SOLID 2 -#define UI_PNL_CLOSE 32 -#define UI_PNL_SCALE 512 +#define UI_PNL_SOLID 2 +#define UI_PNL_CLOSE 32 +#define UI_PNL_SCALE 512 /* warning the first 6 flags are internal */ /* but->flag */ -#define UI_TEXT_LEFT 64 -#define UI_ICON_LEFT 128 -#define UI_ICON_SUBMENU 256 -#define UI_ICON_PREVIEW 512 - -#define UI_TEXT_RIGHT 1024 -#define UI_BUT_NODE_LINK 2048 -#define UI_BUT_NODE_ACTIVE 4096 -#define UI_FLAG_UNUSED 8192 - - /* button align flag, for drawing groups together */ -#define UI_BUT_ALIGN (UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT|UI_BUT_ALIGN_RIGHT|UI_BUT_ALIGN_DOWN) -#define UI_BUT_ALIGN_TOP (1<<14) -#define UI_BUT_ALIGN_LEFT (1<<15) -#define UI_BUT_ALIGN_RIGHT (1<<16) -#define UI_BUT_ALIGN_DOWN (1<<17) - -#define UI_BUT_DISABLED (1<<18) -#define UI_BUT_COLOR_LOCK (1<<19) -#define UI_BUT_ANIMATED (1<<20) -#define UI_BUT_ANIMATED_KEY (1<<21) -#define UI_BUT_DRIVEN (1<<22) -#define UI_BUT_REDALERT (1<<23) -#define UI_BUT_INACTIVE (1<<24) -#define UI_BUT_LAST_ACTIVE (1<<25) -#define UI_BUT_UNDO (1<<26) -#define UI_BUT_IMMEDIATE (1<<27) -#define UI_BUT_NO_TOOLTIP (1<<28) -#define UI_BUT_NO_UTF8 (1<<29) - -#define UI_BUT_VEC_SIZE_LOCK (1<<30) /* used to flag if color hsv-circle should keep luminance */ -#define UI_BUT_COLOR_CUBIC (1<<31) /* cubic saturation for the color wheel */ - -#define UI_PANEL_WIDTH 340 -#define UI_COMPACT_PANEL_WIDTH 160 +#define UI_TEXT_LEFT 64 +#define UI_ICON_LEFT 128 +#define UI_ICON_SUBMENU 256 +#define UI_ICON_PREVIEW 512 + +#define UI_TEXT_RIGHT 1024 +#define UI_BUT_NODE_LINK 2048 +#define UI_BUT_NODE_ACTIVE 4096 +#define UI_FLAG_UNUSED 8192 + +/* button align flag, for drawing groups together */ +#define UI_BUT_ALIGN (UI_BUT_ALIGN_TOP | UI_BUT_ALIGN_LEFT | UI_BUT_ALIGN_RIGHT | UI_BUT_ALIGN_DOWN) +#define UI_BUT_ALIGN_TOP (1 << 14) +#define UI_BUT_ALIGN_LEFT (1 << 15) +#define UI_BUT_ALIGN_RIGHT (1 << 16) +#define UI_BUT_ALIGN_DOWN (1 << 17) + +#define UI_BUT_DISABLED (1 << 18) +#define UI_BUT_COLOR_LOCK (1 << 19) +#define UI_BUT_ANIMATED (1 << 20) +#define UI_BUT_ANIMATED_KEY (1 << 21) +#define UI_BUT_DRIVEN (1 << 22) +#define UI_BUT_REDALERT (1 << 23) +#define UI_BUT_INACTIVE (1 << 24) +#define UI_BUT_LAST_ACTIVE (1 << 25) +#define UI_BUT_UNDO (1 << 26) +#define UI_BUT_IMMEDIATE (1 << 27) +#define UI_BUT_NO_TOOLTIP (1 << 28) +#define UI_BUT_NO_UTF8 (1 << 29) + +#define UI_BUT_VEC_SIZE_LOCK (1 << 30) /* used to flag if color hsv-circle should keep luminance */ +#define UI_BUT_COLOR_CUBIC (1 << 31) /* cubic saturation for the color wheel */ + +#define UI_PANEL_WIDTH 340 +#define UI_COMPACT_PANEL_WIDTH 160 /* scale fixed button widths by this to account for DPI * 8.4852 == sqrtf(72.0f)) */ @@ -185,79 +185,79 @@ typedef struct uiLayout uiLayout; * - bit 9-15: button type (now 6 bits, 64 types) * */ -#define CHA 32 -#define SHO 64 -#define INT 96 -#define FLO 128 +#define CHA 32 +#define SHO 64 +#define INT 96 +#define FLO 128 /*#define FUN 192*/ /*UNUSED*/ -#define BIT 256 - -#define BUTPOIN (128+64+32) - -#define BUT (1<<9) -#define ROW (2<<9) -#define TOG (3<<9) -#define SLI (4<<9) -#define NUM (5<<9) -#define TEX (6<<9) -#define TOG3 (7<<9) -#define TOGR (8<<9) -#define TOGN (9<<9) -#define LABEL (10<<9) -#define MENU (11<<9) -#define ICONROW (12<<9) -#define ICONTOG (13<<9) -#define NUMSLI (14<<9) -#define COL (15<<9) -#define IDPOIN (16<<9) -#define HSVSLI (17<<9) -#define SCROLL (18<<9) -#define BLOCK (19<<9) -#define BUTM (20<<9) -#define SEPR (21<<9) -#define LINK (22<<9) -#define INLINK (23<<9) -#define KEYEVT (24<<9) -#define ICONTEXTROW (25<<9) -#define HSVCUBE (26<<9) -#define PULLDOWN (27<<9) -#define ROUNDBOX (28<<9) -#define CHARTAB (29<<9) -#define BUT_COLORBAND (30<<9) -#define BUT_NORMAL (31<<9) -#define BUT_CURVE (32<<9) -#define BUT_TOGDUAL (33<<9) -#define ICONTOGN (34<<9) -#define FTPREVIEW (35<<9) -#define NUMABS (36<<9) -#define TOGBUT (37<<9) -#define OPTION (38<<9) -#define OPTIONN (39<<9) -#define TRACKPREVIEW (40<<9) - /* buttons with value >= SEARCH_MENU don't get undo pushes */ -#define SEARCH_MENU (41<<9) -#define BUT_EXTRA (42<<9) -#define HSVCIRCLE (43<<9) -#define LISTBOX (44<<9) -#define LISTROW (45<<9) -#define HOTKEYEVT (46<<9) -#define BUT_IMAGE (47<<9) -#define HISTOGRAM (48<<9) -#define WAVEFORM (49<<9) -#define VECTORSCOPE (50<<9) -#define PROGRESSBAR (51<<9) - -#define BUTTYPE (63<<9) +#define BIT 256 + +#define BUTPOIN (128 + 64 + 32) + +#define BUT (1 << 9) +#define ROW (2 << 9) +#define TOG (3 << 9) +#define SLI (4 << 9) +#define NUM (5 << 9) +#define TEX (6 << 9) +#define TOG3 (7 << 9) +#define TOGR (8 << 9) +#define TOGN (9 << 9) +#define LABEL (10 << 9) +#define MENU (11 << 9) +#define ICONROW (12 << 9) +#define ICONTOG (13 << 9) +#define NUMSLI (14 << 9) +#define COL (15 << 9) +#define IDPOIN (16 << 9) +#define HSVSLI (17 << 9) +#define SCROLL (18 << 9) +#define BLOCK (19 << 9) +#define BUTM (20 << 9) +#define SEPR (21 << 9) +#define LINK (22 << 9) +#define INLINK (23 << 9) +#define KEYEVT (24 << 9) +#define ICONTEXTROW (25 << 9) +#define HSVCUBE (26 << 9) +#define PULLDOWN (27 << 9) +#define ROUNDBOX (28 << 9) +#define CHARTAB (29 << 9) +#define BUT_COLORBAND (30 << 9) +#define BUT_NORMAL (31 << 9) +#define BUT_CURVE (32 << 9) +#define BUT_TOGDUAL (33 << 9) +#define ICONTOGN (34 << 9) +#define FTPREVIEW (35 << 9) +#define NUMABS (36 << 9) +#define TOGBUT (37 << 9) +#define OPTION (38 << 9) +#define OPTIONN (39 << 9) +#define TRACKPREVIEW (40 << 9) +/* buttons with value >= SEARCH_MENU don't get undo pushes */ +#define SEARCH_MENU (41 << 9) +#define BUT_EXTRA (42 << 9) +#define HSVCIRCLE (43 << 9) +#define LISTBOX (44 << 9) +#define LISTROW (45 << 9) +#define HOTKEYEVT (46 << 9) +#define BUT_IMAGE (47 << 9) +#define HISTOGRAM (48 << 9) +#define WAVEFORM (49 << 9) +#define VECTORSCOPE (50 << 9) +#define PROGRESSBAR (51 << 9) + +#define BUTTYPE (63 << 9) /* gradient types, for color picker HSVCUBE etc */ -#define UI_GRAD_SV 0 -#define UI_GRAD_HV 1 -#define UI_GRAD_HS 2 -#define UI_GRAD_H 3 -#define UI_GRAD_S 4 -#define UI_GRAD_V 5 +#define UI_GRAD_SV 0 +#define UI_GRAD_HV 1 +#define UI_GRAD_HS 2 +#define UI_GRAD_H 3 +#define UI_GRAD_S 4 +#define UI_GRAD_V 5 -#define UI_GRAD_V_ALT 9 +#define UI_GRAD_V_ALT 9 /* Drawing * @@ -275,9 +275,9 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadeLeft, float shadeRight); /* state for scrolldrawing */ -#define UI_SCROLL_PRESSED 1 -#define UI_SCROLL_ARROWS 2 -#define UI_SCROLL_NO_OUTLINE 4 +#define UI_SCROLL_PRESSED 1 +#define UI_SCROLL_ARROWS 2 +#define UI_SCROLL_NO_OUTLINE 4 void uiWidgetScrollDraw(struct uiWidgetColors *wcol, struct rcti *rect, struct rcti *slider, int state); /* Callbacks @@ -324,18 +324,18 @@ struct uiLayout *uiPupMenuLayout(uiPopupMenu *head); void uiPupMenuOkee(struct bContext *C, const char *opname, const char *str, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 3, 4))) +__attribute__ ((format(printf, 3, 4))) #endif ; void uiPupMenuSaveOver(struct bContext *C, struct wmOperator *op, const char *filename); void uiPupMenuNotice(struct bContext *C, const char *str, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 2, 3))) +__attribute__ ((format(printf, 2, 3))) #endif ; void uiPupMenuError(struct bContext *C, const char *str, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 2, 3))) +__attribute__ ((format(printf, 2, 3))) #endif ; void uiPupMenuReports(struct bContext *C, struct ReportList *reports); @@ -346,7 +346,7 @@ void uiPupMenuInvoke(struct bContext *C, const char *idname); /* popup registere * Functions used to create popup blocks. These are like popup menus * but allow using all button types and creating an own layout. */ -typedef uiBlock* (*uiBlockCreateFunc)(struct bContext *C, struct ARegion *ar, void *arg1); +typedef uiBlock * (*uiBlockCreateFunc)(struct bContext *C, struct ARegion *ar, void *arg1); typedef void (*uiBlockCancelFunc)(void *arg1); void uiPupBlock(struct bContext *C, uiBlockCreateFunc func, void *arg); @@ -391,7 +391,7 @@ void uiBlockEndAlign(uiBlock *block); /* block bounds/position calculation */ enum { - UI_BLOCK_BOUNDS=1, + UI_BLOCK_BOUNDS = 1, UI_BLOCK_BOUNDS_TEXT, UI_BLOCK_BOUNDS_POPUP_MOUSE, UI_BLOCK_BOUNDS_POPUP_MENU, @@ -405,30 +405,30 @@ void uiMenuPopupBoundsBlock(uiBlock *block, int addvall, int mx, int my); void uiCenteredBoundsBlock(uiBlock *block, int addval); void uiExplicitBoundsBlock(uiBlock *block, int minx, int miny, int maxx, int maxy); -int uiBlocksGetYMin (struct ListBase *lb); +int uiBlocksGetYMin(struct ListBase *lb); -void uiBlockSetDirection (uiBlock *block, int direction); -void uiBlockFlipOrder (uiBlock *block); -void uiBlockSetFlag (uiBlock *block, int flag); -void uiBlockClearFlag (uiBlock *block, int flag); -void uiBlockSetXOfs (uiBlock *block, int xofs); +void uiBlockSetDirection(uiBlock *block, int direction); +void uiBlockFlipOrder(uiBlock *block); +void uiBlockSetFlag(uiBlock *block, int flag); +void uiBlockClearFlag(uiBlock *block, int flag); +void uiBlockSetXOfs(uiBlock *block, int xofs); -int uiButGetRetVal (uiBut *but); +int uiButGetRetVal(uiBut *but); -void uiButSetDragID(uiBut *but, struct ID *id); -void uiButSetDragRNA(uiBut *but, struct PointerRNA *ptr); -void uiButSetDragPath(uiBut *but, const char *path); -void uiButSetDragName(uiBut *but, const char *name); -void uiButSetDragValue(uiBut *but); -void uiButSetDragImage(uiBut *but, const char *path, int icon, struct ImBuf *ima, float scale); +void uiButSetDragID(uiBut *but, struct ID *id); +void uiButSetDragRNA(uiBut *but, struct PointerRNA *ptr); +void uiButSetDragPath(uiBut *but, const char *path); +void uiButSetDragName(uiBut *but, const char *name); +void uiButSetDragValue(uiBut *but); +void uiButSetDragImage(uiBut *but, const char *path, int icon, struct ImBuf *ima, float scale); -int UI_but_active_drop_name(struct bContext *C); +int UI_but_active_drop_name(struct bContext *C); -void uiButSetFlag (uiBut *but, int flag); -void uiButClearFlag (uiBut *but, int flag); +void uiButSetFlag(uiBut *but, int flag); +void uiButClearFlag(uiBut *but, int flag); /* special button case, only draw it when used actively, for outliner etc */ -int uiButActiveOnly (const struct bContext *C, uiBlock *block, uiBut *but); +int uiButActiveOnly(const struct bContext *C, uiBlock *block, uiBut *but); /* Buttons @@ -442,12 +442,12 @@ int uiButActiveOnly (const struct bContext *C, uiBlock *block, uiBut *but); * - O: operator */ uiBut *uiDefBut(uiBlock *block, - int type, int retval, const char *str, - int x1, int y1, - short x2, short y2, - void *poin, - float min, float max, - float a1, float a2, const char *tip); + int type, int retval, const char *str, + int x1, int y1, + short x2, short y2, + void *poin, + float min, float max, + float a1, float a2, const char *tip); uiBut *uiDefButF(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefButI(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); @@ -463,12 +463,12 @@ uiBut *uiDefButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int op uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconBut(uiBlock *block, - int type, int retval, int icon, - int x1, int y1, - short x2, short y2, - void *poin, - float min, float max, - float a1, float a2, const char *tip); + int type, int retval, int icon, + int x1, int y1, + short x2, short y2, + void *poin, + float min, float max, + float a1, float a2, const char *tip); uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); @@ -483,12 +483,12 @@ uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext uiBut *uiDefIconButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int opcontext, int icon, int x1, int y1, short x2, short y2, const char *tip); uiBut *uiDefIconTextBut(uiBlock *block, - int type, int retval, int icon, const char *str, - int x1, int y1, - short x2, short y2, - void *poin, - float min, float max, - float a1, float a2, const char *tip); + int type, int retval, int icon, const char *str, + int x1, int y1, + short x2, short y2, + void *poin, + float min, float max, + float a1, float a2, const char *tip); uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); @@ -519,25 +519,25 @@ int uiButGetUnitType(uiBut *but); * - PickerButtons: buttons like the color picker (for code sharing). * - AutoButR: RNA property button with type automatically defined. */ -#define UI_ID_RENAME 1 -#define UI_ID_BROWSE 2 -#define UI_ID_ADD_NEW 4 -#define UI_ID_OPEN 8 -#define UI_ID_ALONE 16 -#define UI_ID_DELETE 32 -#define UI_ID_LOCAL 64 -#define UI_ID_AUTO_NAME 128 -#define UI_ID_FAKE_USER 256 -#define UI_ID_PIN 512 -#define UI_ID_BROWSE_RENDER 1024 -#define UI_ID_PREVIEWS 2048 -#define UI_ID_FULL (UI_ID_RENAME|UI_ID_BROWSE|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_ALONE|UI_ID_DELETE|UI_ID_LOCAL) +#define UI_ID_RENAME 1 +#define UI_ID_BROWSE 2 +#define UI_ID_ADD_NEW 4 +#define UI_ID_OPEN 8 +#define UI_ID_ALONE 16 +#define UI_ID_DELETE 32 +#define UI_ID_LOCAL 64 +#define UI_ID_AUTO_NAME 128 +#define UI_ID_FAKE_USER 256 +#define UI_ID_PIN 512 +#define UI_ID_BROWSE_RENDER 1024 +#define UI_ID_PREVIEWS 2048 +#define UI_ID_FULL (UI_ID_RENAME | UI_ID_BROWSE | UI_ID_ADD_NEW | UI_ID_OPEN | UI_ID_ALONE | UI_ID_DELETE | UI_ID_LOCAL) typedef void (*uiIDPoinFuncFP)(struct bContext *C, const char *str, struct ID **idpp); typedef void (*uiIDPoinFunc)(struct bContext *C, struct ID *id, int event); uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, const char *str, - int x1, int y1, short x2, short y2, void *idpp, const char *tip); + int x1, int y1, short x2, short y2, void *idpp, const char *tip); int uiIconFromID(struct ID *id); @@ -570,27 +570,27 @@ void uiSetButLink(struct uiBut *but, void **poin, void ***ppoin, short *tot, void uiComposeLinks(uiBlock *block); uiBut *uiFindInlink(uiBlock *block, void *poin); - /* use inside searchfunc to add items */ -int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int iconid); - /* bfunc gets search item *poin as arg2, or if NULL the old string */ -void uiButSetSearchFunc (uiBut *but, uiButSearchFunc sfunc, void *arg1, uiButHandleFunc bfunc, void *active); - /* height in pixels, it's using hardcoded values still */ -int uiSearchBoxhHeight(void); +/* use inside searchfunc to add items */ +int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int iconid); +/* bfunc gets search item *poin as arg2, or if NULL the old string */ +void uiButSetSearchFunc(uiBut *but, uiButSearchFunc sfunc, void *arg1, uiButHandleFunc bfunc, void *active); +/* height in pixels, it's using hardcoded values still */ +int uiSearchBoxhHeight(void); -void uiBlockSetHandleFunc(uiBlock *block, uiBlockHandleFunc func, void *arg); -void uiBlockSetButmFunc (uiBlock *block, uiMenuHandleFunc func, void *arg); -void uiBlockSetFunc (uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2); -void uiBlockSetNFunc (uiBlock *block, uiButHandleFunc func, void *argN, void *arg2); +void uiBlockSetHandleFunc(uiBlock *block, uiBlockHandleFunc func, void *arg); +void uiBlockSetButmFunc(uiBlock *block, uiMenuHandleFunc func, void *arg); +void uiBlockSetFunc(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2); +void uiBlockSetNFunc(uiBlock *block, uiButHandleFunc func, void *argN, void *arg2); -void uiButSetRenameFunc (uiBut *but, uiButHandleRenameFunc func, void *arg1); -void uiButSetFunc (uiBut *but, uiButHandleFunc func, void *arg1, void *arg2); -void uiButSetNFunc (uiBut *but, uiButHandleNFunc func, void *argN, void *arg2); +void uiButSetRenameFunc(uiBut *but, uiButHandleRenameFunc func, void *arg1); +void uiButSetFunc(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2); +void uiButSetNFunc(uiBut *but, uiButHandleNFunc func, void *argN, void *arg2); -void uiButSetCompleteFunc(uiBut *but, uiButCompleteFunc func, void *arg); +void uiButSetCompleteFunc(uiBut *but, uiButCompleteFunc func, void *arg); -void uiBlockSetDrawExtraFunc(uiBlock *block, void (*func)(const struct bContext *C, void *, void *, void *, struct rcti *rect), void *arg1, void *arg2); +void uiBlockSetDrawExtraFunc(uiBlock *block, void (*func)(const struct bContext *C, void *, void *, void *, struct rcti *rect), void *arg1, void *arg2); -void uiButSetFocusOnEnter (struct wmWindow *win, uiBut *but); +void uiButSetFocusOnEnter(struct wmWindow *win, uiBut *but); /* Autocomplete * @@ -648,31 +648,31 @@ void UI_exit(void); * uiBlockCurLayout. */ /* layout */ -#define UI_LAYOUT_HORIZONTAL 0 -#define UI_LAYOUT_VERTICAL 1 - -#define UI_LAYOUT_PANEL 0 -#define UI_LAYOUT_HEADER 1 -#define UI_LAYOUT_MENU 2 -#define UI_LAYOUT_TOOLBAR 3 - -#define UI_UNIT_X U.widget_unit -#define UI_UNIT_Y U.widget_unit - -#define UI_LAYOUT_ALIGN_EXPAND 0 -#define UI_LAYOUT_ALIGN_LEFT 1 -#define UI_LAYOUT_ALIGN_CENTER 2 -#define UI_LAYOUT_ALIGN_RIGHT 3 - -#define UI_ITEM_O_RETURN_PROPS 1 -#define UI_ITEM_R_EXPAND 2 -#define UI_ITEM_R_SLIDER 4 -#define UI_ITEM_R_TOGGLE 8 -#define UI_ITEM_R_ICON_ONLY 16 -#define UI_ITEM_R_EVENT 32 -#define UI_ITEM_R_FULL_EVENT 64 -#define UI_ITEM_R_NO_BG 128 -#define UI_ITEM_R_IMMEDIATE 256 +#define UI_LAYOUT_HORIZONTAL 0 +#define UI_LAYOUT_VERTICAL 1 + +#define UI_LAYOUT_PANEL 0 +#define UI_LAYOUT_HEADER 1 +#define UI_LAYOUT_MENU 2 +#define UI_LAYOUT_TOOLBAR 3 + +#define UI_UNIT_X U.widget_unit +#define UI_UNIT_Y U.widget_unit + +#define UI_LAYOUT_ALIGN_EXPAND 0 +#define UI_LAYOUT_ALIGN_LEFT 1 +#define UI_LAYOUT_ALIGN_CENTER 2 +#define UI_LAYOUT_ALIGN_RIGHT 3 + +#define UI_ITEM_O_RETURN_PROPS 1 +#define UI_ITEM_R_EXPAND 2 +#define UI_ITEM_R_SLIDER 4 +#define UI_ITEM_R_TOGGLE 8 +#define UI_ITEM_R_ICON_ONLY 16 +#define UI_ITEM_R_EVENT 32 +#define UI_ITEM_R_FULL_EVENT 64 +#define UI_ITEM_R_NO_BG 128 +#define UI_ITEM_R_IMMEDIATE 256 /* uiLayoutOperatorButs flags */ #define UI_LAYOUT_OP_SHOW_TITLE 1 @@ -685,13 +685,13 @@ void UI_exit(void); * 8------4 */ enum { - UI_CNR_TOP_LEFT= 1, - UI_CNR_TOP_RIGHT= 2, - UI_CNR_BOTTOM_RIGHT= 4, - UI_CNR_BOTTOM_LEFT= 8, + UI_CNR_TOP_LEFT = 1, + UI_CNR_TOP_RIGHT = 2, + UI_CNR_BOTTOM_RIGHT = 4, + UI_CNR_BOTTOM_LEFT = 8, /* just for convenience */ - UI_CNR_NONE= 0, - UI_CNR_ALL= (UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT) + UI_CNR_NONE = 0, + UI_CNR_ALL = (UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT) }; /* not apart of the corner flags but mixed in some functions */ @@ -735,7 +735,7 @@ uiLayout *uiLayoutColumn(uiLayout *layout, int align); uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, int align); uiLayout *uiLayoutBox(uiLayout *layout); uiLayout *uiLayoutListBox(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, - struct PointerRNA *actptr, struct PropertyRNA *actprop); + struct PointerRNA *actptr, struct PropertyRNA *actprop); uiLayout *uiLayoutAbsolute(uiLayout *layout, int align); uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, int align); uiLayout *uiLayoutOverlap(uiLayout *layout); @@ -746,15 +746,15 @@ uiBlock *uiLayoutAbsoluteBlock(uiLayout *layout); void uiTemplateHeader(uiLayout *layout, struct bContext *C, int menus); void uiTemplateDopeSheetFilter(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr); void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, - const char *newop, const char *openop, const char *unlinkop); + const char *newop, const char *openop, const char *unlinkop); void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop); void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, - const char *newop, const char *openop, const char *unlinkop, int rows, int cols); + const char *newop, const char *openop, const char *unlinkop, int rows, int cols); void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, const char *propname, - const char *proptypename, const char *text); + const char *proptypename, const char *text); void uiTemplatePathBuilder(uiLayout *layout, struct PointerRNA *ptr, const char *propname, - struct PointerRNA *root_ptr, const char *text); + struct PointerRNA *root_ptr, const char *text); uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr); uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr); void uiTemplatePreview(uiLayout *layout, struct ID *id, int show_buttons, struct ID *parent, struct MTex *slot); @@ -835,14 +835,14 @@ void uiIDContextProperty(struct bContext *C, struct PointerRNA *ptr, struct Prop /* Styled text draw */ void uiStyleFontSet(struct uiFontStyle *fs); void uiStyleFontDrawExt(struct uiFontStyle *fs, struct rcti *rect, const char *str, - float *r_xofs, float *r_yofs); + float *r_xofs, float *r_yofs); void uiStyleFontDraw(struct uiFontStyle *fs, struct rcti *rect, const char *str); void uiStyleFontDrawRotated(struct uiFontStyle *fs, struct rcti *rect, const char *str); int UI_GetStringWidth(const char *str); // XXX temp void UI_DrawString(float x, float y, const char *str); // XXX temp void UI_DrawTriIcon(float x, float y, char dir); -uiStyle* UI_GetStyle(void); +uiStyle *UI_GetStyle(void); /* linker workaround ack! */ void UI_template_fix_linking(void); diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index 2f4c2549cf3..aa94bdec724 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -41,12 +41,12 @@ struct Material; typedef struct IconFile { struct IconFile *next, *prev; - char filename[256]; // FILE_MAXFILE size + char filename[256]; /* FILE_MAXFILE size */ int index; } IconFile; #define ICON_DEFAULT_HEIGHT 16 -#define ICON_DEFAULT_WIDTH 16 +#define ICON_DEFAULT_WIDTH 16 #define ICON_DEFAULT_HEIGHT_SCALE ((int)(UI_UNIT_Y * 0.8f)) #define ICON_DEFAULT_WIDTH_SCALE ((int)(UI_UNIT_X * 0.8f)) diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 82c323a3daa..d157db9e993 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -43,7 +43,7 @@ typedef enum { BIFICONID_LAST } BIFIconID; -#define BIFICONID_FIRST (ICON_NONE) +#define BIFICONID_FIRST (ICON_NONE) #undef DEF_ICON #undef DEF_VICO @@ -197,8 +197,8 @@ enum { TH_STITCH_PREVIEW_UNSTITCHABLE, TH_STITCH_PREVIEW_ACTIVE, - TH_MATCH, /* highlight color for search matches */ - TH_SELECT_HIGHLIGHT /* highlight color for selected outliner item */ + TH_MATCH, /* highlight color for search matches */ + TH_SELECT_HIGHLIGHT /* highlight color for selected outliner item */ }; /* XXX WARNING: previous is saved in file, so do not change order! */ @@ -210,59 +210,59 @@ struct PointerRNA; // THE CODERS API FOR THEMES: // sets the color -void UI_ThemeColor(int colorid); +void UI_ThemeColor(int colorid); // sets the color plus alpha -void UI_ThemeColor4(int colorid); +void UI_ThemeColor4(int colorid); // sets color plus offset for shade -void UI_ThemeColorShade(int colorid, int offset); +void UI_ThemeColorShade(int colorid, int offset); // sets color plus offset for alpha -void UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset); +void UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset); // sets color, which is blend between two theme colors -void UI_ThemeColorBlend(int colorid1, int colorid2, float fac); +void UI_ThemeColorBlend(int colorid1, int colorid2, float fac); // same, with shade offset void UI_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset); -void UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int offset, int alphaoffset); +void UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int offset, int alphaoffset); // returns one value, not scaled -float UI_GetThemeValuef(int colorid); -int UI_GetThemeValue(int colorid); +float UI_GetThemeValuef(int colorid); +int UI_GetThemeValue(int colorid); // get three color values, scaled to 0.0-1.0 range -void UI_GetThemeColor3fv(int colorid, float *col); +void UI_GetThemeColor3fv(int colorid, float *col); // get the color, range 0.0-1.0, complete with shading offset -void UI_GetThemeColorShade3fv(int colorid, int offset, float *col); +void UI_GetThemeColorShade3fv(int colorid, int offset, float *col); // get the 3 or 4 byte values -void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]); -void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]); +void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]); +void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]); // get a theme color from specified space type -void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]); +void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]); // blends and shades between two color pointers -void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], float fac, int offset); +void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], float fac, int offset); // shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor) -void UI_GetColorPtrShade3ubv(const unsigned char cp1[3], unsigned char col[3], int offset); +void UI_GetColorPtrShade3ubv(const unsigned char cp1[3], unsigned char col[3], int offset); // get a 3 byte color, blended and shaded between two other char color pointers -void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3], float fac, int offset); +void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3], float fac, int offset); // clear the openGL ClearColor using the input colorid -void UI_ThemeClearColor(int colorid); +void UI_ThemeClearColor(int colorid); // internal (blender) usage only, for init and set active -void UI_SetTheme(int spacetype, int regionid); +void UI_SetTheme(int spacetype, int regionid); // get current theme struct bTheme *UI_GetTheme(void); /* only for buttons in theme editor! */ -const unsigned char *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid); +const unsigned char *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid); void UI_make_axis_color(const unsigned char *src_col, unsigned char *dst_col, const char axis); diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 436f268d1bf..469388219d6 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -35,12 +35,12 @@ #define __UI_VIEW2D_H__ /* ------------------------------------------ */ -/* Settings and Defines: */ +/* Settings and Defines: */ /* ---- General Defines ---- */ /* generic value to use when coordinate lies out of view when converting */ -#define V2D_IS_CLIPPED 12000 +#define V2D_IS_CLIPPED 12000 /* Common View2D view types * NOTE: only define a type here if it completely sets all (+/- a few) of the relevant flags @@ -48,24 +48,24 @@ * than one specific place */ enum { - /* custom view type (region has defined all necessary flags already) */ + /* custom view type (region has defined all necessary flags already) */ V2D_COMMONVIEW_CUSTOM = -1, - /* standard (only use this when setting up a new view, as a sensible base for most settings) */ + /* standard (only use this when setting up a new view, as a sensible base for most settings) */ V2D_COMMONVIEW_STANDARD, - /* listview (i.e. Outliner) */ + /* listview (i.e. Outliner) */ V2D_COMMONVIEW_LIST, - /* stackview (this is basically a list where new items are added at the top) */ + /* stackview (this is basically a list where new items are added at the top) */ V2D_COMMONVIEW_STACK, - /* headers (this is basically the same as listview, but no y-panning) */ + /* headers (this is basically the same as listview, but no y-panning) */ V2D_COMMONVIEW_HEADER, - /* ui region containing panels */ + /* ui region containing panels */ V2D_COMMONVIEW_PANELS_UI } eView2D_CommonViewTypes; /* ---- Defines for Scroller/Grid Arguments ----- */ /* 'dummy' argument to pass when argument is irrelevant */ -#define V2D_ARG_DUMMY -1 +#define V2D_ARG_DUMMY -1 /* Grid units */ enum { @@ -89,31 +89,31 @@ enum { /* flags for grid-lines to draw */ enum { - V2D_HORIZONTAL_LINES = (1<<0), - V2D_VERTICAL_LINES = (1<<1), - V2D_HORIZONTAL_AXIS = (1<<2), - V2D_VERTICAL_AXIS = (1<<3), - V2D_HORIZONTAL_FINELINES = (1<<4), + V2D_HORIZONTAL_LINES = (1 << 0), + V2D_VERTICAL_LINES = (1 << 1), + V2D_HORIZONTAL_AXIS = (1 << 2), + V2D_VERTICAL_AXIS = (1 << 3), + V2D_HORIZONTAL_FINELINES = (1 << 4), - V2D_GRIDLINES_MAJOR = (V2D_VERTICAL_LINES|V2D_VERTICAL_AXIS|V2D_HORIZONTAL_LINES|V2D_HORIZONTAL_AXIS), - V2D_GRIDLINES_ALL = (V2D_GRIDLINES_MAJOR|V2D_HORIZONTAL_FINELINES), + V2D_GRIDLINES_MAJOR = (V2D_VERTICAL_LINES | V2D_VERTICAL_AXIS | V2D_HORIZONTAL_LINES | V2D_HORIZONTAL_AXIS), + V2D_GRIDLINES_ALL = (V2D_GRIDLINES_MAJOR | V2D_HORIZONTAL_FINELINES), } eView2D_Gridlines; /* ------ Defines for Scrollers ----- */ /* scroller area */ -#define V2D_SCROLL_HEIGHT 17 -#define V2D_SCROLL_WIDTH 17 +#define V2D_SCROLL_HEIGHT 17 +#define V2D_SCROLL_WIDTH 17 /* scroller 'handles' hotspot radius for mouse */ -#define V2D_SCROLLER_HANDLE_SIZE 12 +#define V2D_SCROLLER_HANDLE_SIZE 12 /* ------ Define for UI_view2d_sync ----- */ /* means copy it from another v2d */ -#define V2D_LOCK_SET 0 +#define V2D_LOCK_SET 0 /* means copy it to the other v2ds */ -#define V2D_LOCK_COPY 1 +#define V2D_LOCK_COPY 1 /* ------------------------------------------ */ @@ -124,7 +124,7 @@ enum { #define IN_2D_HORIZ_SCROLL(v2d, co) (BLI_in_rcti(&v2d->hor, co[0], co[1])) /* ------------------------------------------ */ -/* Type definitions: */ +/* Type definitions: */ struct View2D; struct View2DGrid; @@ -141,7 +141,7 @@ typedef struct View2DGrid View2DGrid; typedef struct View2DScrollers View2DScrollers; /* ----------------------------------------- */ -/* Prototypes: */ +/* Prototypes: */ /* refresh and validation (of view rects) */ void UI_view2d_region_reinit(struct View2D *v2d, short type, int winx, int winy); |