Clear some compiler warnings by commenting some functions, adding others to headers.

left in warnings where functions obviously need to get ported to 2.5x still.

Also, render stamp seq strip works again.
This commit is contained in:
Campbell Barton 2011-02-17 22:34:41 +00:00
parent 456ca98564
commit 27e812d697
34 changed files with 98 additions and 94 deletions

@ -254,6 +254,7 @@ int seq_single_check(struct Sequence *seq);
void seq_single_fix(struct Sequence *seq);
int seq_test_overlap(struct ListBase * seqbasep, struct Sequence *test);
void seq_translate(struct Scene *scene, struct Sequence *seq, int delta);
struct Sequence *seq_foreground_frame_get(struct Scene *scene, int frame);
struct ListBase *seq_seqbase(struct ListBase *seqbase, struct Sequence *seq);
void seq_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs);
void seq_dupe_animdata(struct Scene *scene, char *name_from, char *name_to);

@ -72,10 +72,9 @@
#include "BKE_packedFile.h"
#include "BKE_scene.h"
#include "BKE_node.h"
#include "BKE_sequencer.h" /* seq_foreground_frame_get() */
#include "BKE_utildefines.h"
//XXX #include "BIF_editseq.h"
#include "BLF_api.h"
#include "PIL_time.h"
@ -968,7 +967,7 @@ static void stampdata(Scene *scene, StampData *stamp_data, int do_prefix)
}
if (scene->r.stamp & R_STAMP_SEQSTRIP) {
Sequence *seq= NULL; //XXX = get_foreground_frame_seq(scene->r.cfra);
Sequence *seq= seq_foreground_frame_get(scene, scene->r.cfra);
if (seq) strcpy(text, seq->name+2);
else strcpy(text, "<none>");

@ -2965,6 +2965,28 @@ void seq_translate(Scene *evil_scene, Sequence *seq, int delta)
calc_sequence_disp(evil_scene, seq);
}
Sequence *seq_foreground_frame_get(Scene *scene, int frame)
{
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq, *best_seq=NULL;
int best_machine = -1;
if(!ed) return NULL;
for (seq=ed->seqbasep->first; seq; seq= seq->next) {
if(seq->flag & SEQ_MUTE || seq->startdisp > frame || seq->enddisp <= frame)
continue;
/* only use elements you can see - not */
if (ELEM5(seq->type, SEQ_IMAGE, SEQ_META, SEQ_SCENE, SEQ_MOVIE, SEQ_COLOR)) {
if (seq->machine > best_machine) {
best_seq = seq;
best_machine = seq->machine;
}
}
}
return best_seq;
}
/* return 0 if there werent enough space */
int shuffle_seq(ListBase * seqbasep, Sequence *test, Scene *evil_scene)
{

@ -349,12 +349,12 @@ int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
/* -------------- 'Smarter' Keyframing Functions -------------------- */
/* return codes for new_key_needed */
static enum {
enum {
KEYNEEDED_DONTADD = 0,
KEYNEEDED_JUSTADD,
KEYNEEDED_DELPREV,
KEYNEEDED_DELNEXT
} eKeyNeededStatus;
} /*eKeyNeededStatus*/;
/* This helper function determines whether a new keyframe is needed */
/* Cases where keyframes should not be added:
@ -1034,10 +1034,10 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
/* KEYFRAME MODIFICATION */
/* mode for commonkey_modifykey */
static enum {
enum {
COMMONKEY_MODE_INSERT = 0,
COMMONKEY_MODE_DELETE,
} eCommonModifyKey_Modes;
} /*eCommonModifyKey_Modes*/;
/* Polling callback for use with ANIM_*_keyframe() operators
* This is based on the standard ED_operator_areaactive callback,

@ -157,4 +157,8 @@ int RIG_nbJoints(RigGraph *rg);
const char *RIG_nameBone(RigGraph *rg, int arc_index, int bone_index);
void RIG_freeRigGraph(BGraph *rg);
/* UNUSED */
void BIF_retargetArmature(bContext *C);
void BIF_adjustRetarget(bContext *C);
#endif /* BIF_RETARGET_H */

@ -3392,8 +3392,9 @@ void ARMATURE_OT_reveal(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
}
#if 0 // remove this?
static void hide_selected_armature_bones(Scene *scene)
{
Object *obedit= scene->obedit; // XXX get from context
@ -3412,8 +3413,6 @@ static void hide_selected_armature_bones(Scene *scene)
ED_armature_sync_selection(arm->edbo);
}
#if 0 // remove this?
static void hide_unselected_armature_bones(Scene *scene)
{
Object *obedit= scene->obedit; // XXX get from context
@ -3433,9 +3432,7 @@ static void hide_unselected_armature_bones(Scene *scene)
ED_armature_validate_active(arm);
ED_armature_sync_selection(arm->edbo);
}
#endif
#if 0 // remove this?
void show_all_armature_bones(Scene *scene)
{
Object *obedit= scene->obedit; // XXX get from context

@ -1656,6 +1656,7 @@ static EditBone *add_editbonetolist(char *name, ListBase *list)
}
#endif
#if 0 /* UNUSED */
static void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level_limit)
{
while (node->multi_level > multi_level_limit && node->link_up)
@ -1708,6 +1709,7 @@ static void generateMissingArcs(RigGraph *rigg)
}
}
}
#endif
/************************************ RETARGETTING *****************************************************/
@ -2799,7 +2801,7 @@ static void BIF_freeRetarget(void)
}
}
static void BIF_retargetArmature(bContext *C)
void BIF_retargetArmature(bContext *C)
{
ReebGraph *reebg;
double start_time, end_time;
@ -2932,7 +2934,7 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg)
// allqueue(REDRAWVIEW3D, 0);
}
static void BIF_adjustRetarget(bContext *C)
void BIF_adjustRetarget(bContext *C)
{
if (GLOBAL_RIGG)
{

@ -76,7 +76,10 @@ typedef struct SK_GestureAction {
GestureApplyFct apply;
} SK_GestureAction;
#if 0 /* UNUSED 2.5 */
static SK_Point boneSnap;
#endif
static int LAST_SNAP_POINT_VALID = 0;
static float LAST_SNAP_POINT[3];
@ -727,6 +730,7 @@ static SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2],
return pt;
}
#if 0 /* UNUSED 2.5 */
static SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones, short mval[2], int *dist)
{
ARegion *ar = CTX_wm_region(C);
@ -774,6 +778,7 @@ static SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones,
return pt;
}
#endif
void sk_resetOverdraw(SK_Sketch *sketch)
{
@ -2198,6 +2203,7 @@ static int sk_selectStroke(bContext *C, SK_Sketch *sketch, short mval[2], int ex
return 0;
}
#if 0 /* UNUSED 2.5 */
static void sk_queueRedrawSketch(SK_Sketch *sketch)
{
if (sketch->active_stroke != NULL)
@ -2211,6 +2217,7 @@ static void sk_queueRedrawSketch(SK_Sketch *sketch)
}
}
}
#endif
static void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch, int with_names)
{

@ -71,13 +71,6 @@
#include "armature_intern.h"
/* ************* XXX *************** */
static int pupmenu(const char *UNUSED(dummy)) {return 0;}
static void error(const char *UNUSED(dummy)) {}
static void BIF_undo_push(const char *UNUSED(dummy)) {}
/* ************* XXX *************** */
static int object_pose_context(Object *ob)
{
if( (ob) &&
@ -167,6 +160,7 @@ void ED_armature_exit_posemode(bContext *C, Base *base)
/* if a selected or active bone is protected, throw error (oonly if warn==1) and return 1 */
/* only_selected==1 : the active bone is allowed to be protected */
#if 0 /* UNUSED 2.5 */
static short pose_has_protected_selected(Object *ob, short warn)
{
/* check protection */
@ -189,6 +183,7 @@ static short pose_has_protected_selected(Object *ob, short warn)
}
return 0;
}
#endif
/* only for real IK, not for auto-IK */
static int pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan, int level)
@ -662,7 +657,7 @@ void POSE_OT_select_grouped (wmOperatorType *ot)
}
/* ********************************************** */
#if 0 /* UNUSED 2.5 */
static void pose_copy_menu(Scene *scene)
{
Object *obedit= scene->obedit; // XXX context
@ -860,6 +855,7 @@ static void pose_copy_menu(Scene *scene)
BIF_undo_push("Copy Pose Attributes");
}
#endif
/* ******************** copy/paste pose ********************** */

@ -59,9 +59,10 @@
#include "reeb.h"
#if 0 /* UNUSED 2.5 */
static ReebGraph *GLOBAL_RG = NULL;
static ReebGraph *FILTERED_RG = NULL;
#endif
/*
* Skeleton generation algorithm based on:
@ -496,7 +497,7 @@ void repositionNodes(ReebGraph *rg)
}
}
static void verifyNodeDegree(ReebGraph *rg)
void verifyNodeDegree(ReebGraph *rg)
{
#ifdef DEBUG_REEB
ReebNode *node = NULL;
@ -578,7 +579,7 @@ void verifyFaces(ReebGraph *rg)
#endif
}
static void verifyArcs(ReebGraph *rg)
void verifyArcs(ReebGraph *rg)
{
ReebArc *arc;
@ -625,6 +626,7 @@ static void addVertToBucket(EmbedBucket *b, float co[3])
interp_v3_v3v3(b->p, b->p, co, 1.0f / b->nv);
}
#if 0 /* UNUSED 2.5 */
static void removeVertFromBucket(EmbedBucket *b, float co[3])
{
mul_v3_fl(b->p, (float)b->nv);
@ -632,6 +634,7 @@ static void removeVertFromBucket(EmbedBucket *b, float co[3])
b->nv--;
mul_v3_fl(b->p, 1.0f / (float)b->nv);
}
#endif
static void mergeBuckets(EmbedBucket *bDst, EmbedBucket *bSrc)
{

@ -172,6 +172,8 @@ void sortArcs(ReebGraph *rg);
/*------------ Sanity check ------------*/
void verifyBuckets(ReebGraph *rg);
void verifyFaces(ReebGraph *rg);
void verifyArcs(ReebGraph *rg);
void verifyNodeDegree(ReebGraph *rg);
/*********************** PUBLIC *********************************/

@ -59,7 +59,7 @@
/* Generics - Loopers */
/* Loops over the gp-frames for a gp-layer, and applies the given callback */
static short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
{
bGPDframe *gpf;

@ -82,7 +82,7 @@ void draw_gpencil_view3d_ext(struct Scene *scene, struct View3D *v3d, struct ARe
void gpencil_panel_standard(const struct bContext *C, struct Panel *pa);
/* ----------- Grease-Pencil AnimEdit API ------------------ */
short gplayer_frames_looper(struct bGPDlayer *gpl, struct Scene *scene, short (*gpf_cb)(struct bGPDframe *, struct Scene *));
void gplayer_make_cfra_list(struct bGPDlayer *gpl, ListBase *elems, short onlysel);
void deselect_gpencil_layers(void *data, short select_mode);

@ -188,6 +188,11 @@ void paintface_deselect_all_visible(struct Object *ob, int action, short flush_f
void paintface_select_linked(struct bContext *C, struct Object *ob, short mval[2], int mode);
int paintface_minmax(struct Object *ob, float *min, float *max);
/* TODO, 2.5x */
void paintface_unhide(struct Scene *scene);
void paintface_hide(struct Scene *scene);
void paintface_select_swap(struct Scene *scene);
/* object_vgroup.c */
#define WEIGHT_REPLACE 1

@ -381,6 +381,7 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad)
}
/* plain fake antialiased unfilled round rectangle */
#if 0 /* UNUSED 2.5 */
static void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad, float asp)
{
float color[4], alpha;
@ -408,6 +409,7 @@ static void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, fl
color[3] = alpha;
glColor4fv(color);
}
#endif
/* (old, used in outliner) plain antialiased filled box */
void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad)

@ -309,6 +309,7 @@ static void ui_offset_panel_block(uiBlock *block)
/**************************** drawing *******************************/
/* extern used by previewrender */
#if 0 /*UNUSED 2.5*/
static void uiPanelPush(uiBlock *block)
{
glPushMatrix();
@ -321,6 +322,7 @@ static void uiPanelPop(uiBlock *UNUSED(block))
{
glPopMatrix();
}
#endif
/* triangle 'icon' for panel header */
/* NOTE - this seems to be only used for hiding nodes now */

@ -1203,13 +1203,13 @@ struct View2DScrollers {
};
/* quick enum for vsm->zone (scroller handles) */
static enum {
enum {
SCROLLHANDLE_MIN= -1,
SCROLLHANDLE_BAR,
SCROLLHANDLE_MAX,
SCROLLHANDLE_MIN_OUTSIDE,
SCROLLHANDLE_MAX_OUTSIDE
} eV2DScrollerHandle_Zone;
} /*eV2DScrollerHandle_Zone*/;
/* ------------------------ */

@ -152,7 +152,7 @@ MTFace *EM_get_active_mtface(EditMesh *em, EditFace **act_efa, MCol **mcol, int
return NULL;
}
static void paintface_unhide(Scene *scene)
void paintface_unhide(Scene *scene)
{
Mesh *me;
MFace *mface;
@ -174,7 +174,7 @@ static void paintface_unhide(Scene *scene)
paintface_flush_flags(OBACT);
}
static void paintface_hide(Scene *scene)
void paintface_hide(Scene *scene)
{
Mesh *me;
MFace *mface;
@ -397,7 +397,7 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags)
}
}
static void paintface_select_swap(Scene *scene)
void paintface_select_swap(Scene *scene)
{
Mesh *me;
MFace *mface;

@ -71,14 +71,10 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv
#include "mesh_intern.h"
/* **** XXX ******** */
static void BIF_undo_push(const char *UNUSED(arg)) {}
static void BIF_undo(void) {}
static void error(const char *UNUSED(arg)) {}
static int qtest(void) {return 0;}
/* **** XXX ******** */
/* New LoopCut */
#if 0 /* UNUSED 2.5 */
static void edgering_sel(EditMesh *em, EditEdge *startedge, int select, int previewlines)
{
EditEdge *eed;
@ -380,7 +376,7 @@ static void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcut
// DAG_id_tag_update(obedit->data, 0);
return;
}
#endif
/* *************** LOOP SELECT ************* */
#if 0

@ -1561,7 +1561,7 @@ static void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
}
static void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type)
void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type)
{
short change=0;
@ -1731,7 +1731,6 @@ static void mesh_copy_menu(EditMesh *em, wmOperator *op)
}
}
/* **************** LOOP SELECTS *************** */
/* selects quads in loop direction of indicated edge */
@ -4067,7 +4066,6 @@ void MESH_OT_normals_make_consistent(wmOperatorType *ot)
/* ********** ALIGN WITH VIEW **************** */
static void editmesh_calc_selvert_center(EditMesh *em, float cent_r[3])
{
EditVert *eve;

@ -592,15 +592,6 @@ void OBJECT_OT_posemode_toggle(wmOperatorType *ot)
/* *********************** */
static void check_editmode(int type)
{
Object *obedit= NULL; // XXX
if (obedit==NULL || obedit->type==type) return;
// XXX ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO); /* freedata, and undo */
}
#if 0
// XXX should be in view3d?

@ -1156,9 +1156,9 @@ void OBJECT_OT_move_to_layer(wmOperatorType *ot)
/************************** Link to Scene Operator *****************************/
#if 0
static void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr))
{
#if 0
Scene *sce= (Scene*) BLI_findlink(&bmain->scene, G.curscreen->scenenr-1);
Base *base, *nbase;
@ -1174,8 +1174,8 @@ static void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr))
id_us_plus((ID *)base->object);
}
}
#endif
}
#endif
static int make_links_scene_exec(bContext *C, wmOperator *op)
{

@ -78,8 +78,8 @@
#include "LBM_fluidsim.h"
#include "ED_screen.h"
#include "ED_fluidsim.h"
#include "WM_types.h"
@ -1050,16 +1050,16 @@ void fluidsimFreeBake(Object *UNUSED(ob))
/* compile dummy functions for disabled fluid sim */
static FluidsimSettings *fluidsimSettingsNew(Object *UNUSED(srcob))
FluidsimSettings *fluidsimSettingsNew(Object *UNUSED(srcob))
{
return NULL;
}
static void fluidsimSettingsFree(FluidsimSettings *UNUSED(fss))
void fluidsimSettingsFree(FluidsimSettings *UNUSED(fss))
{
}
static FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *UNUSED(fss))
FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *UNUSED(fss))
{
return NULL;
}

@ -182,11 +182,11 @@ void ACTION_OT_select_all_toggle (wmOperatorType *ot)
*/
/* defines for borderselect mode */
static enum {
enum {
ACTKEYS_BORDERSEL_ALLKEYS = 0,
ACTKEYS_BORDERSEL_FRAMERANGE,
ACTKEYS_BORDERSEL_CHANNELS,
} eActKeys_BorderSelect_Mode;
} /*eActKeys_BorderSelect_Mode*/;
static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short selectmode)

@ -76,7 +76,7 @@
#define TILE_BORDER_Y 8
/* button events */
static enum {
enum {
B_FS_DIRNAME,
B_FS_FILENAME
} /*eFile_ButEvents*/;

@ -562,7 +562,7 @@ void filelist_freelib(struct FileList* filelist)
filelist->libfiledata= 0;
}
static struct BlendHandle *filelist_lib(struct FileList* filelist)
struct BlendHandle *filelist_lib(struct FileList* filelist)
{
return filelist->libfiledata;
}

@ -70,7 +70,7 @@ void filelist_readdir(struct FileList* filelist);
int filelist_empty(struct FileList* filelist);
void filelist_parent(struct FileList* filelist);
struct BlendHandle *filelist_lib(struct FileList* filelist);
int filelist_islibrary (struct FileList* filelist, char* dir, char* group);
void filelist_from_main(struct FileList* filelist);
void filelist_from_library(struct FileList* filelist);

@ -86,11 +86,11 @@ static short selmodes_to_flagmodes (short sel)
* 3) (de)select all - no testing is done; only for use internal tools as normal function...
*/
static enum {
enum {
DESELECT_STRIPS_NOTEST = 0,
DESELECT_STRIPS_TEST,
DESELECT_STRIPS_CLEARACTIVE,
} eDeselectNlaStrips;
} /*eDeselectNlaStrips*/;
/* Deselects strips in the NLA Editor
* - This is called by the deselect all operator, as well as other ones!

@ -3962,10 +3962,10 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
/* These operators are only available in databrowser mode for now, as
* they depend on having RNA paths and/or hierarchies available.
*/
static enum {
enum {
DRIVERS_EDITMODE_ADD = 0,
DRIVERS_EDITMODE_REMOVE,
} eDrivers_EditModes;
} /*eDrivers_EditModes*/;
/* Utilities ---------------------------------- */
@ -4116,10 +4116,10 @@ void OUTLINER_OT_drivers_delete_selected(wmOperatorType *ot)
/* These operators are only available in databrowser mode for now, as
* they depend on having RNA paths and/or hierarchies available.
*/
static enum {
enum {
KEYINGSET_EDITMODE_ADD = 0,
KEYINGSET_EDITMODE_REMOVE,
} eKeyingSet_EditModes;
} /*eKeyingSet_EditModes*/;
/* Utilities ---------------------------------- */

@ -70,8 +70,6 @@
/* Note, Dont use WHILE_SEQ while drawing! - it messes up transform, - Campbell */
static int no_rightbox=0, no_leftbox= 0;
static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, float y1, float x2, float y2);
static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[3])

@ -121,28 +121,6 @@ typedef struct TransSeq {
int len;
} TransSeq;
static Sequence *get_foreground_frame_seq(Scene *scene, int frame)
{
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq, *best_seq=NULL;
int best_machine = -1;
if(!ed) return NULL;
for (seq=ed->seqbasep->first; seq; seq= seq->next) {
if(seq->flag & SEQ_MUTE || seq->startdisp > frame || seq->enddisp <= frame)
continue;
/* only use elements you can see - not */
if (ELEM5(seq->type, SEQ_IMAGE, SEQ_META, SEQ_SCENE, SEQ_MOVIE, SEQ_COLOR)) {
if (seq->machine > best_machine) {
best_seq = seq;
best_machine = seq->machine;
}
}
}
return best_seq;
}
void seq_rectf(Sequence *seq, rctf *rectf)
{
if(seq->startstill) rectf->xmin= seq->start;

@ -176,7 +176,7 @@ static void select_single_seq(Scene *scene, Sequence *seq, int deselect_all) /*
// remove this function, replace with invert operator
//void swap_select_seq(Scene *scene)
#if 0
static void select_neighbor_from_last(Scene *scene, int lr)
{
Sequence *seq= seq_active_get(scene);
@ -206,7 +206,7 @@ static void select_neighbor_from_last(Scene *scene, int lr)
if (change) {
}
}
#endif
/* (de)select operator */
static int sequencer_deselect_exec(bContext *C, wmOperator *UNUSED(op))

@ -917,6 +917,7 @@ void view3d_calc_camera_border(Scene *scene, ARegion *ar, RegionView3D *rv3d, Vi
}
}
/* sets the view to 1:1 camera/render-pixel */
static void view3d_set_1_to_1_viewborder(Scene *scene, ARegion *ar)
{
RegionView3D *rv3d= ar->regiondata;

@ -886,7 +886,7 @@ static void do_material_tex(GPUShadeInput *shi)
MTex *mtex;
Tex *tex;
GPUNodeLink *texco, *tin, *trgb, *tnor, *tcol, *stencil, *tnorfac;
GPUNodeLink *texco_norm, *texco_orco, *texco_object, *texco_tangent;
GPUNodeLink *texco_norm, *texco_orco, *texco_object;
GPUNodeLink *texco_global, *texco_uv = NULL;
GPUNodeLink *newnor, *orn;
char *lastuvname = NULL;