- UNUSED macro wasn't throwing an error with GCC if a var become used.

- made interface, windowmanager, readfile build without unused warnings.
- re-arranged CMake's source/blender build order so less changed libs are build later, eg: IK, avi
This commit is contained in:
2010-10-16 02:40:31 +00:00
parent 17085e967e
commit 1807beabf5
50 changed files with 273 additions and 281 deletions

View File

@@ -29,23 +29,23 @@ IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-parameter") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-parameter")
ENDIF(CMAKE_COMPILER_IS_GNUCC) ENDIF(CMAKE_COMPILER_IS_GNUCC)
ADD_SUBDIRECTORY(windowmanager)
ADD_SUBDIRECTORY(editors) ADD_SUBDIRECTORY(editors)
ADD_SUBDIRECTORY(avi) ADD_SUBDIRECTORY(windowmanager)
ADD_SUBDIRECTORY(nodes)
ADD_SUBDIRECTORY(blenkernel) ADD_SUBDIRECTORY(blenkernel)
ADD_SUBDIRECTORY(modifiers)
ADD_SUBDIRECTORY(blenlib) ADD_SUBDIRECTORY(blenlib)
ADD_SUBDIRECTORY(blenloader)
ADD_SUBDIRECTORY(blenpluginapi)
ADD_SUBDIRECTORY(imbuf)
ADD_SUBDIRECTORY(gpu)
ADD_SUBDIRECTORY(makesdna)
ADD_SUBDIRECTORY(makesrna)
ADD_SUBDIRECTORY(readblenfile)
ADD_SUBDIRECTORY(render) ADD_SUBDIRECTORY(render)
ADD_SUBDIRECTORY(blenfont) ADD_SUBDIRECTORY(blenfont)
ADD_SUBDIRECTORY(blenloader)
ADD_SUBDIRECTORY(readblenfile)
ADD_SUBDIRECTORY(blenpluginapi)
ADD_SUBDIRECTORY(ikplugin) ADD_SUBDIRECTORY(ikplugin)
ADD_SUBDIRECTORY(gpu)
ADD_SUBDIRECTORY(imbuf)
ADD_SUBDIRECTORY(avi)
ADD_SUBDIRECTORY(nodes)
ADD_SUBDIRECTORY(modifiers)
ADD_SUBDIRECTORY(makesdna)
ADD_SUBDIRECTORY(makesrna)
IF(WITH_IMAGE_OPENEXR) IF(WITH_IMAGE_OPENEXR)
ADD_SUBDIRECTORY(imbuf/intern/openexr) ADD_SUBDIRECTORY(imbuf/intern/openexr)

View File

@@ -50,8 +50,8 @@ struct Main;
#define BLENDER_MINVERSION 250 #define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0 #define BLENDER_MINSUBVERSION 0
int BKE_read_file(struct bContext *C, char *dir, void *type_r, struct ReportList *reports); int BKE_read_file(struct bContext *C, char *dir, struct ReportList *reports);
int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, void *type_r, struct ReportList *reports); int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, struct ReportList *reports);
int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports); int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports);
void free_blender(void); void free_blender(void);

View File

@@ -44,8 +44,10 @@
#define STRINGIFY_ARG(x) #x #define STRINGIFY_ARG(x) #x
#define STRINGIFY(x) STRINGIFY_ARG(x) #define STRINGIFY(x) STRINGIFY_ARG(x)
#ifdef __GNUC__ #ifdef __GNUC__
# define UNUSED(x) x __attribute__((__unused__)) # define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
#else #else
# define UNUSED(x) x # define UNUSED(x) x
#endif #endif

View File

@@ -365,7 +365,7 @@ void BKE_userdef_free(void)
2: OK, and with new user settings 2: OK, and with new user settings
*/ */
int BKE_read_file(bContext *C, char *dir, void *unused, ReportList *reports) int BKE_read_file(bContext *C, char *dir, ReportList *reports)
{ {
BlendFileData *bfd; BlendFileData *bfd;
int retval= 1; int retval= 1;
@@ -392,7 +392,7 @@ int BKE_read_file(bContext *C, char *dir, void *unused, ReportList *reports)
return (bfd?retval:0); return (bfd?retval:0);
} }
int BKE_read_file_from_memory(bContext *C, char* filebuf, int filelength, void *unused, ReportList *reports) int BKE_read_file_from_memory(bContext *C, char* filebuf, int filelength, ReportList *reports)
{ {
BlendFileData *bfd; BlendFileData *bfd;
@@ -474,7 +474,7 @@ static int read_undosave(bContext *C, UndoElem *uel)
G.fileflags |= G_FILE_NO_UI; G.fileflags |= G_FILE_NO_UI;
if(UNDO_DISK) if(UNDO_DISK)
success= BKE_read_file(C, uel->str, NULL, NULL); success= BKE_read_file(C, uel->str, NULL);
else else
success= BKE_read_file_from_memfile(C, &uel->memfile, NULL); success= BKE_read_file_from_memfile(C, &uel->memfile, NULL);
@@ -554,7 +554,7 @@ void BKE_write_undo(bContext *C, char *name)
if(curundo->prev) prevfile= &(curundo->prev->memfile); if(curundo->prev) prevfile= &(curundo->prev->memfile);
memused= MEM_get_memory_in_use(); memused= MEM_get_memory_in_use();
success= BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags, NULL); success= BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags);
curundo->undosize= MEM_get_memory_in_use() - memused; curundo->undosize= MEM_get_memory_in_use() - memused;
} }

View File

@@ -1399,7 +1399,7 @@ int BLI_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3],
//#include <GL/glew.h> //#include <GL/glew.h>
void BLI_pbvh_node_draw(PBVHNode *node, void *data) void BLI_pbvh_node_draw(PBVHNode *node, void *UNUSED(data))
{ {
#if 0 #if 0
/* XXX: Just some quick code to show leaf nodes in different colors */ /* XXX: Just some quick code to show leaf nodes in different colors */

View File

@@ -36,8 +36,7 @@ struct Main;
struct ReportList; struct ReportList;
extern int BLO_write_file(struct Main *mainvar, char *dir, int write_flags, struct ReportList *reports, int *thumb); extern int BLO_write_file(struct Main *mainvar, char *dir, int write_flags, struct ReportList *reports, int *thumb);
extern int BLO_write_file_mem(struct Main *mainvar, struct MemFile *compare, struct MemFile *current, extern int BLO_write_file_mem(struct Main *mainvar, struct MemFile *compare, struct MemFile *current, int write_flags);
int write_flags, struct ReportList *reports);
extern int BLO_write_runtime(struct Main *mainvar, char *file, char *exename, struct ReportList *reports); extern int BLO_write_runtime(struct Main *mainvar, char *file, char *exename, struct ReportList *reports);
#define BLEN_THUMB_SIZE 128 #define BLEN_THUMB_SIZE 128

View File

@@ -284,7 +284,7 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFil
strcpy(fd->relabase, filename); strcpy(fd->relabase, filename);
/* clear ob->proxy_from pointers in old main */ /* clear ob->proxy_from pointers in old main */
blo_clear_proxy_pointers_from_lib(fd, oldmain); blo_clear_proxy_pointers_from_lib(oldmain);
/* separate libraries from old main */ /* separate libraries from old main */
blo_split_main(&mainlist, oldmain); blo_split_main(&mainlist, oldmain);

View File

@@ -704,7 +704,7 @@ BHead *blo_firstbhead(FileData *fd)
return(bhead); return(bhead);
} }
BHead *blo_prevbhead(FileData *fd, BHead *thisblock) BHead *blo_prevbhead(FileData *UNUSED(fd), BHead *thisblock)
{ {
BHeadN *bheadn= (BHeadN *) (((char *) thisblock) - GET_INT_FROM_POINTER( &((BHeadN*)0)->bhead) ); BHeadN *bheadn= (BHeadN *) (((char *) thisblock) - GET_INT_FROM_POINTER( &((BHeadN*)0)->bhead) );
BHeadN *prev= bheadn->prev; BHeadN *prev= bheadn->prev;
@@ -1155,7 +1155,7 @@ static void change_idid_adr(ListBase *mainlist, FileData *basefd, void *old, voi
* to clear that pointer before reading the undo memfile since * to clear that pointer before reading the undo memfile since
* the object might be removed, it is set again in reading * the object might be removed, it is set again in reading
* if the local object still exists */ * if the local object still exists */
void blo_clear_proxy_pointers_from_lib(FileData *fd, Main *oldmain) void blo_clear_proxy_pointers_from_lib(Main *oldmain)
{ {
Object *ob= oldmain->object.first; Object *ob= oldmain->object.first;
@@ -1442,7 +1442,7 @@ static void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, FileData *f
} }
} }
static void IDP_DirectLinkString(IDProperty *prop, int switch_endian, FileData *fd) static void IDP_DirectLinkString(IDProperty *prop, FileData *fd)
{ {
/*since we didn't save the extra string buffer, set totallen to len.*/ /*since we didn't save the extra string buffer, set totallen to len.*/
prop->totallen = prop->len; prop->totallen = prop->len;
@@ -1469,7 +1469,7 @@ void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd)
IDP_DirectLinkGroup(prop, switch_endian, fd); IDP_DirectLinkGroup(prop, switch_endian, fd);
break; break;
case IDP_STRING: case IDP_STRING:
IDP_DirectLinkString(prop, switch_endian, fd); IDP_DirectLinkString(prop, fd);
break; break;
case IDP_ARRAY: case IDP_ARRAY:
IDP_DirectLinkArray(prop, switch_endian, fd); IDP_DirectLinkArray(prop, switch_endian, fd);
@@ -1499,7 +1499,7 @@ void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd)
} }
/*stub function*/ /*stub function*/
void IDP_LibLinkProperty(IDProperty *prop, int switch_endian, FileData *fd) void IDP_LibLinkProperty(IDProperty *UNUSED(prop), int UNUSED(switch_endian), FileData *UNUSED(fd))
{ {
} }
@@ -1552,7 +1552,7 @@ static void direct_link_brush(FileData *fd, Brush *brush)
brush->icon_imbuf= NULL; brush->icon_imbuf= NULL;
} }
static void direct_link_script(FileData *fd, Script *script) static void direct_link_script(FileData *UNUSED(fd), Script *script)
{ {
script->id.us = 1; script->id.us = 1;
SCRIPT_SET_NULL(script) SCRIPT_SET_NULL(script)
@@ -2030,7 +2030,7 @@ static void lib_link_nodetree(FileData *fd, Main *main)
/* verify types for nodes and groups, all data has to be read */ /* verify types for nodes and groups, all data has to be read */
/* open = 0: appending/linking, open = 1: open new file (need to clean out dynamic /* open = 0: appending/linking, open = 1: open new file (need to clean out dynamic
* typedefs*/ * typedefs*/
static void lib_verify_nodetree(Main *main, int open) static void lib_verify_nodetree(Main *main, int UNUSED(open))
{ {
Scene *sce; Scene *sce;
Material *ma; Material *ma;
@@ -2139,7 +2139,7 @@ typedef struct tConstraintLinkData {
ID *id; ID *id;
} tConstraintLinkData; } tConstraintLinkData;
/* callback function used to relink constraint ID-links */ /* callback function used to relink constraint ID-links */
static void lib_link_constraint_cb(bConstraint *con, ID **idpoin, void *userdata) static void lib_link_constraint_cb(bConstraint *UNUSED(con), ID **idpoin, void *userdata)
{ {
tConstraintLinkData *cld= (tConstraintLinkData *)userdata; tConstraintLinkData *cld= (tConstraintLinkData *)userdata;
*idpoin = newlibadr(cld->fd, cld->id->lib, *idpoin); *idpoin = newlibadr(cld->fd, cld->id->lib, *idpoin);
@@ -2534,7 +2534,7 @@ static void direct_link_world(FileData *fd, World *wrld)
/* ************ READ VFONT ***************** */ /* ************ READ VFONT ***************** */
static void lib_link_vfont(FileData *fd, Main *main) static void lib_link_vfont(FileData *UNUSED(fd), Main *main)
{ {
VFont *vf; VFont *vf;
@@ -2555,7 +2555,7 @@ static void direct_link_vfont(FileData *fd, VFont *vf)
/* ************ READ TEXT ****************** */ /* ************ READ TEXT ****************** */
static void lib_link_text(FileData *fd, Main *main) static void lib_link_text(FileData *UNUSED(fd), Main *main)
{ {
Text *text; Text *text;
@@ -5261,7 +5261,7 @@ static void direct_link_library(FileData *fd, Library *lib, Main *main)
lib->parent= NULL; lib->parent= NULL;
} }
static void lib_link_library(FileData *fd, Main *main) static void lib_link_library(FileData *UNUSED(fd), Main *main)
{ {
Library *lib; Library *lib;
for(lib= main->library.first; lib; lib= lib->id.next) { for(lib= main->library.first; lib; lib= lib->id.next) {
@@ -6473,7 +6473,7 @@ static void do_version_mtex_factor_2_50(MTex **mtex_array, short idtype)
} }
} }
static void do_version_mdef_250(FileData *fd, Library *lib, Main *main) static void do_version_mdef_250(Main *main)
{ {
Object *ob; Object *ob;
ModifierData *md; ModifierData *md;
@@ -10899,7 +10899,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
} }
} }
do_version_mdef_250(fd, lib, main); do_version_mdef_250(main);
/* parent type to modifier */ /* parent type to modifier */
for(ob = main->object.first; ob; ob = ob->id.next) { for(ob = main->object.first; ob; ob = ob->id.next) {
@@ -11291,7 +11291,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filename)
lib_link_all(fd, bfd->main); lib_link_all(fd, bfd->main);
//do_versions_after_linking(fd, NULL, bfd->main); // XXX: not here (or even in this function at all)! this causes crashes on many files - Aligorith (July 04, 2010) //do_versions_after_linking(fd, NULL, bfd->main); // XXX: not here (or even in this function at all)! this causes crashes on many files - Aligorith (July 04, 2010)
lib_verify_nodetree(bfd->main, 1); lib_verify_nodetree(bfd->main, TRUE);
fix_relpaths_library(fd->relabase, bfd->main); /* make all relative paths, relative to the open blend file */ fix_relpaths_library(fd->relabase, bfd->main); /* make all relative paths, relative to the open blend file */
link_global(fd, bfd); /* as last */ link_global(fd, bfd); /* as last */
@@ -11776,7 +11776,7 @@ typedef struct tConstraintExpandData {
Main *mainvar; Main *mainvar;
} tConstraintExpandData; } tConstraintExpandData;
/* callback function used to expand constraint ID-links */ /* callback function used to expand constraint ID-links */
static void expand_constraint_cb(bConstraint *con, ID **idpoin, void *userdata) static void expand_constraint_cb(bConstraint *UNUSED(con), ID **idpoin, void *userdata)
{ {
tConstraintExpandData *ced= (tConstraintExpandData *)userdata; tConstraintExpandData *ced= (tConstraintExpandData *)userdata;
expand_doit(ced->fd, ced->mainvar, *idpoin); expand_doit(ced->fd, ced->mainvar, *idpoin);
@@ -12461,7 +12461,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
mainl= NULL; /* blo_join_main free's mainl, cant use anymore */ mainl= NULL; /* blo_join_main free's mainl, cant use anymore */
lib_link_all(*fd, mainvar); lib_link_all(*fd, mainvar);
lib_verify_nodetree(mainvar, 0); lib_verify_nodetree(mainvar, FALSE);
fix_relpaths_library(G.sce, mainvar); /* make all relative paths, relative to the open blend file */ fix_relpaths_library(G.sce, mainvar); /* make all relative paths, relative to the open blend file */
/* give a base to loose objects. If group append, do it for objects too */ /* give a base to loose objects. If group append, do it for objects too */

View File

@@ -114,7 +114,7 @@ FileData *blo_openblenderfile(char *name, struct ReportList *reports);
FileData *blo_openblendermemory(void *buffer, int buffersize, struct ReportList *reports); FileData *blo_openblendermemory(void *buffer, int buffersize, struct ReportList *reports);
FileData *blo_openblendermemfile(struct MemFile *memfile, struct ReportList *reports); FileData *blo_openblendermemfile(struct MemFile *memfile, struct ReportList *reports);
void blo_clear_proxy_pointers_from_lib(FileData *fd, Main *oldmain); void blo_clear_proxy_pointers_from_lib(Main *oldmain);
void blo_make_image_pointer_map(FileData *fd, Main *oldmain); void blo_make_image_pointer_map(FileData *fd, Main *oldmain);
void blo_end_image_pointer_map(FileData *fd, Main *oldmain); void blo_end_image_pointer_map(FileData *fd, Main *oldmain);
void blo_add_library_pointer_map(ListBase *mainlist, FileData *fd); void blo_add_library_pointer_map(ListBase *mainlist, FileData *fd);

View File

@@ -2530,7 +2530,7 @@ int BLO_write_file(Main *mainvar, char *dir, int write_flags, ReportList *report
} }
/* return: success (1) */ /* return: success (1) */
int BLO_write_file_mem(Main *mainvar, MemFile *compare, MemFile *current, int write_flags, ReportList *reports) int BLO_write_file_mem(Main *mainvar, MemFile *compare, MemFile *current, int write_flags)
{ {
int err; int err;

View File

@@ -91,7 +91,7 @@
/* Get shapekey data being edited (for Action Editor -> ShapeKey mode) */ /* Get shapekey data being edited (for Action Editor -> ShapeKey mode) */
/* Note: there's a similar function in key.c (ob_get_key) */ /* Note: there's a similar function in key.c (ob_get_key) */
Key *actedit_get_shapekeys (bAnimContext *ac, SpaceAction *saction) static Key *actedit_get_shapekeys (bAnimContext *ac)
{ {
Scene *scene= ac->scene; Scene *scene= ac->scene;
Object *ob; Object *ob;
@@ -153,7 +153,7 @@ static short actedit_get_context (bAnimContext *ac, SpaceAction *saction)
case SACTCONT_SHAPEKEY: /* 'ShapeKey Editor' */ case SACTCONT_SHAPEKEY: /* 'ShapeKey Editor' */
ac->datatype= ANIMCONT_SHAPEKEY; ac->datatype= ANIMCONT_SHAPEKEY;
ac->data= actedit_get_shapekeys(ac, saction); ac->data= actedit_get_shapekeys(ac);
ac->mode= saction->mode; ac->mode= saction->mode;
return 1; return 1;

View File

@@ -157,7 +157,7 @@ static int pose_slide_init (bContext *C, wmOperator *op, short mode)
} }
/* exiting the operator - free data */ /* exiting the operator - free data */
static void pose_slide_exit (bContext *C, wmOperator *op) static void pose_slide_exit(wmOperator *op)
{ {
tPoseSlideOp *pso= op->customdata; tPoseSlideOp *pso= op->customdata;
@@ -376,7 +376,7 @@ static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
} }
/* apply() - perform the pose sliding based on weighting various poses */ /* apply() - perform the pose sliding based on weighting various poses */
static void pose_slide_apply (bContext *C, wmOperator *op, tPoseSlideOp *pso) static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
{ {
tPChanFCurveLink *pfl; tPChanFCurveLink *pfl;
@@ -434,7 +434,7 @@ static void pose_slide_autoKeyframe (bContext *C, tPoseSlideOp *pso)
} }
/* reset changes made to current pose */ /* reset changes made to current pose */
static void pose_slide_reset (bContext *C, tPoseSlideOp *pso) static void pose_slide_reset (tPoseSlideOp *pso)
{ {
/* wrapper around the generic call, so that custom stuff can be added later */ /* wrapper around the generic call, so that custom stuff can be added later */
poseAnim_mapping_reset(&pso->pfLinks); poseAnim_mapping_reset(&pso->pfLinks);
@@ -501,7 +501,7 @@ static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *
/* initial apply for operator... */ /* initial apply for operator... */
// TODO: need to calculate percentage for initial round too... // TODO: need to calculate percentage for initial round too...
pose_slide_apply(C, op, pso); pose_slide_apply(C, pso);
/* depsgraph updates + redraws */ /* depsgraph updates + redraws */
pose_slide_refresh(C, pso); pose_slide_refresh(C, pso);
@@ -528,7 +528,7 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
/* insert keyframes as required... */ /* insert keyframes as required... */
pose_slide_autoKeyframe(C, pso); pose_slide_autoKeyframe(C, pso);
pose_slide_exit(C, op); pose_slide_exit(op);
/* done! */ /* done! */
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
@@ -541,13 +541,13 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
WM_cursor_restore(win); WM_cursor_restore(win);
/* reset transforms back to original state */ /* reset transforms back to original state */
pose_slide_reset(C, pso); pose_slide_reset(pso);
/* depsgraph updates + redraws */ /* depsgraph updates + redraws */
pose_slide_refresh(C, pso); pose_slide_refresh(C, pso);
/* clean up temp data */ /* clean up temp data */
pose_slide_exit(C, op); pose_slide_exit(op);
/* cancelled! */ /* cancelled! */
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
@@ -562,10 +562,10 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
RNA_float_set(op->ptr, "percentage", pso->percentage); RNA_float_set(op->ptr, "percentage", pso->percentage);
/* reset transforms (to avoid accumulation errors) */ /* reset transforms (to avoid accumulation errors) */
pose_slide_reset(C, pso); pose_slide_reset(pso);
/* apply... */ /* apply... */
pose_slide_apply(C, op, pso); pose_slide_apply(C, pso);
} }
break; break;
@@ -579,10 +579,10 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
} }
/* common code for cancel() */ /* common code for cancel() */
static int pose_slide_cancel (bContext *C, wmOperator *op) static int pose_slide_cancel (bContext *UNUSED(C), wmOperator *op)
{ {
/* cleanup and done */ /* cleanup and done */
pose_slide_exit(C, op); pose_slide_exit(op);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
@@ -590,13 +590,13 @@ static int pose_slide_cancel (bContext *C, wmOperator *op)
static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *pso) static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *pso)
{ {
/* settings should have been set up ok for applying, so just apply! */ /* settings should have been set up ok for applying, so just apply! */
pose_slide_apply(C, op, pso); pose_slide_apply(C, pso);
/* insert keyframes if needed */ /* insert keyframes if needed */
pose_slide_autoKeyframe(C, pso); pose_slide_autoKeyframe(C, pso);
/* cleanup and done */ /* cleanup and done */
pose_slide_exit(C, op); pose_slide_exit(op);
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
} }
@@ -618,7 +618,7 @@ static int pose_slide_push_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(
/* initialise data */ /* initialise data */
if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) { if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) {
pose_slide_exit(C, op); pose_slide_exit(op);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
else else
@@ -635,7 +635,7 @@ static int pose_slide_push_exec (bContext *C, wmOperator *op)
/* initialise data (from RNA-props) */ /* initialise data (from RNA-props) */
if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) { if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) {
pose_slide_exit(C, op); pose_slide_exit(op);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
else else
@@ -675,7 +675,7 @@ static int pose_slide_relax_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
/* initialise data */ /* initialise data */
if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) { if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) {
pose_slide_exit(C, op); pose_slide_exit(op);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
else else
@@ -692,7 +692,7 @@ static int pose_slide_relax_exec (bContext *C, wmOperator *op)
/* initialise data (from RNA-props) */ /* initialise data (from RNA-props) */
if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) { if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) {
pose_slide_exit(C, op); pose_slide_exit(op);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
else else
@@ -732,7 +732,7 @@ static int pose_slide_breakdown_invoke (bContext *C, wmOperator *op, wmEvent *UN
/* initialise data */ /* initialise data */
if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) { if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) {
pose_slide_exit(C, op); pose_slide_exit(op);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
else else
@@ -749,7 +749,7 @@ static int pose_slide_breakdown_exec (bContext *C, wmOperator *op)
/* initialise data (from RNA-props) */ /* initialise data (from RNA-props) */
if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) { if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) {
pose_slide_exit(C, op); pose_slide_exit(op);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
else else

View File

@@ -492,7 +492,7 @@ uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxle
void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval); void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval);
uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, char *name, int icon, int x1, int y1, int x2, int y2); uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, char *name, int icon, int x1, int y1, int x2, int y2);
void uiDefAutoButsRNA(const struct bContext *C, uiLayout *layout, struct PointerRNA *ptr, int columns); void uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int columns);
/* Links /* Links
* *
@@ -680,17 +680,17 @@ void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA
char *newop, char *openop, char *unlinkop); char *newop, char *openop, char *unlinkop);
void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
char *newop, char *openop, char *unlinkop, int rows, int cols); char *newop, char *openop, char *unlinkop, int rows, int cols);
void uiTemplateAnyID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, char *propname,
char *proptypename, char *text); char *proptypename, char *text);
void uiTemplatePathBuilder(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, void uiTemplatePathBuilder(uiLayout *layout, struct PointerRNA *ptr, char *propname,
struct PointerRNA *root_ptr, char *text); struct PointerRNA *root_ptr, char *text);
uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr); uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr);
uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr); uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr);
void uiTemplatePreview(uiLayout *layout, struct ID *id, struct ID *parent, struct MTex *slot); void uiTemplatePreview(uiLayout *layout, struct ID *id, struct ID *parent, struct MTex *slot);
void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand); void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand); void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, char *propname);
void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand); void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, char *propname);
void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand); void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, char *propname);
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, char *propname, int type, int levels, int brush); void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, char *propname, int type, int levels, int brush);
void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, char *propname, int value_slider, int lock, int lock_luminosity, int cubic); void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, char *propname, int value_slider, int lock, int lock_luminosity, int cubic);
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, char *propname, void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, char *propname,

View File

@@ -441,7 +441,7 @@ void uiCenteredBoundsBlock(uiBlock *block, int addval)
/* link line drawing is not part of buttons or theme.. so we stick with it here */ /* link line drawing is not part of buttons or theme.. so we stick with it here */
static void ui_draw_linkline(uiBut *but, uiLinkLine *line) static void ui_draw_linkline(uiLinkLine *line)
{ {
rcti rect; rcti rect;
@@ -470,7 +470,7 @@ static void ui_draw_links(uiBlock *block)
if(but->type==LINK && but->link) { if(but->type==LINK && but->link) {
line= but->link->lines.first; line= but->link->lines.first;
while(line) { while(line) {
ui_draw_linkline(but, line); ui_draw_linkline(line);
line= line->next; line= line->next;
} }
} }
@@ -748,7 +748,7 @@ void uiDrawBlock(const bContext *C, uiBlock *block)
if(block->flag & UI_BLOCK_LOOP) if(block->flag & UI_BLOCK_LOOP)
ui_draw_menu_back(&style, block, &rect); ui_draw_menu_back(&style, block, &rect);
else if(block->panel) else if(block->panel)
ui_draw_aligned_panel(ar, &style, block, &rect); ui_draw_aligned_panel(&style, block, &rect);
/* widgets */ /* widgets */
for(but= block->buttons.first; but; but= but->next) { for(but= block->buttons.first; but; but= but->next) {
@@ -835,7 +835,7 @@ static void ui_is_but_sel(uiBut *but)
/* XXX 2.50 no links supported yet */ /* XXX 2.50 no links supported yet */
static int uibut_contains_pt(uiBut *but, short *mval) static int uibut_contains_pt(uiBut *UNUSED(but), short *UNUSED(mval))
{ {
return 0; return 0;
@@ -1093,12 +1093,12 @@ static void ui_do_active_linklines(uiBlock *block, short *mval)
if(line==act) { if(line==act) {
if((line->flag & UI_SELECT)==0) { if((line->flag & UI_SELECT)==0) {
line->flag |= UI_SELECT; line->flag |= UI_SELECT;
ui_draw_linkline(but, line); ui_draw_linkline(line);
} }
} }
else if(line->flag & UI_SELECT) { else if(line->flag & UI_SELECT) {
line->flag &= ~UI_SELECT; line->flag &= ~UI_SELECT;
ui_draw_linkline(but, line); ui_draw_linkline(line);
} }
line= line->next; line= line->next;
} }
@@ -2182,7 +2182,7 @@ int ui_but_can_align(uiBut *but)
return !ELEM3(but->type, LABEL, OPTION, OPTIONN); return !ELEM3(but->type, LABEL, OPTION, OPTIONN);
} }
static void ui_block_do_align_but(uiBlock *block, uiBut *first, int nr) static void ui_block_do_align_but(uiBut *first, int nr)
{ {
uiBut *prev, *but=NULL, *next; uiBut *prev, *but=NULL, *next;
int flag= 0, cols=0, rows=0; int flag= 0, cols=0, rows=0;
@@ -2316,7 +2316,7 @@ void ui_block_do_align(uiBlock *block)
for(but=block->buttons.first; but;) { for(but=block->buttons.first; but;) {
if(but->alignnr) { if(but->alignnr) {
nr= but->alignnr; nr= but->alignnr;
ui_block_do_align_but(block, but, nr); ui_block_do_align_but(but, nr);
/* skip with same number */ /* skip with same number */
for(; but && but->alignnr == nr; but=but->next); for(; but && but->alignnr == nr; but=but->next);

View File

@@ -460,7 +460,7 @@ void uiEmboss(float x1, float y1, float x2, float y2, int sel)
/* ************** SPECIAL BUTTON DRAWING FUNCTIONS ************* */ /* ************** SPECIAL BUTTON DRAWING FUNCTIONS ************* */
void ui_draw_but_IMAGE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect) void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *UNUSED(but), uiWidgetColors *UNUSED(wcol), rcti *rect)
{ {
extern char datatoc_splash_png[]; extern char datatoc_splash_png[];
extern int datatoc_splash_png_size; extern int datatoc_splash_png_size;
@@ -747,7 +747,7 @@ void histogram_draw_one(float r, float g, float b, float alpha, float x, float y
glDisable(GL_LINE_SMOOTH); glDisable(GL_LINE_SMOOTH);
} }
void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *recti) void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
{ {
Histogram *hist = (Histogram *)but->poin; Histogram *hist = (Histogram *)but->poin;
int res = hist->x_resolution; int res = hist->x_resolution;
@@ -800,7 +800,7 @@ void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *
draw_scope_end(&rect, scissor); draw_scope_end(&rect, scissor);
} }
void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *recti) void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
{ {
Scopes *scopes = (Scopes *)but->poin; Scopes *scopes = (Scopes *)but->poin;
rctf rect; rctf rect;
@@ -1023,7 +1023,7 @@ void vectorscope_draw_target(float centerx, float centery, float diam, float r,
glEnd(); glEnd();
} }
void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *recti) void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
{ {
Scopes *scopes = (Scopes *)but->poin; Scopes *scopes = (Scopes *)but->poin;
rctf rect; rctf rect;
@@ -1105,7 +1105,7 @@ void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti
glDisable(GL_BLEND); glDisable(GL_BLEND);
} }
void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *wcol, rcti *rect) void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
{ {
ColorBand *coba; ColorBand *coba;
CBData *cbd; CBData *cbd;

View File

@@ -331,7 +331,7 @@ static void vicon_editmode_hlt_draw(int x, int y, int w, int h, float alpha)
viconutil_draw_points(pts, 3, 1); viconutil_draw_points(pts, 3, 1);
} }
static void vicon_editmode_dehlt_draw(int x, int y, int w, int h, float alpha) static void vicon_editmode_dehlt_draw(int x, int y, int w, int h, float UNUSED(alpha))
{ {
GLint pts[3][2]; GLint pts[3][2];
@@ -346,7 +346,7 @@ static void vicon_editmode_dehlt_draw(int x, int y, int w, int h, float alpha)
viconutil_draw_points(pts, 3, 1); viconutil_draw_points(pts, 3, 1);
} }
static void vicon_disclosure_tri_right_draw(int x, int y, int w, int h, float alpha) static void vicon_disclosure_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha)
{ {
GLint pts[3][2]; GLint pts[3][2];
int cx = x+w/2; int cx = x+w/2;
@@ -371,7 +371,7 @@ static void vicon_disclosure_tri_right_draw(int x, int y, int w, int h, float al
viconutil_draw_lineloop_smooth(pts, 3); viconutil_draw_lineloop_smooth(pts, 3);
} }
static void vicon_small_tri_right_draw(int x, int y, int w, int h, float alpha) static void vicon_small_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha)
{ {
GLint pts[3][2]; GLint pts[3][2];
int cx = x+w/2-4; int cx = x+w/2-4;
@@ -393,7 +393,7 @@ static void vicon_small_tri_right_draw(int x, int y, int w, int h, float alpha)
glShadeModel(GL_FLAT); glShadeModel(GL_FLAT);
} }
static void vicon_disclosure_tri_down_draw(int x, int y, int w, int h, float alpha) static void vicon_disclosure_tri_down_draw(int x, int y, int w, int UNUSED(h), float alpha)
{ {
GLint pts[3][2]; GLint pts[3][2];
int cx = x+w/2; int cx = x+w/2;
@@ -418,7 +418,7 @@ static void vicon_disclosure_tri_down_draw(int x, int y, int w, int h, float alp
viconutil_draw_lineloop_smooth(pts, 3); viconutil_draw_lineloop_smooth(pts, 3);
} }
static void vicon_move_up_draw(int x, int y, int w, int h, float alpha) static void vicon_move_up_draw(int x, int y, int w, int h, float UNUSED(alpha))
{ {
int d=-2; int d=-2;
@@ -436,7 +436,7 @@ static void vicon_move_up_draw(int x, int y, int w, int h, float alpha)
glDisable(GL_LINE_SMOOTH); glDisable(GL_LINE_SMOOTH);
} }
static void vicon_move_down_draw(int x, int y, int w, int h, float alpha) static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha))
{ {
int d=2; int d=2;
@@ -843,7 +843,7 @@ static void icon_set_image(bContext *C, ID *id, PreviewImage* prv_img, int miple
prv_img->w[miplevel], prv_img->h[miplevel]); prv_img->w[miplevel], prv_img->h[miplevel]);
} }
static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, int rh, unsigned int *rect, float alpha, float *rgb) static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), int rw, int rh, unsigned int *rect, float alpha, float *rgb)
{ {
/* modulate color */ /* modulate color */
if(alpha != 1.0f) if(alpha != 1.0f)
@@ -895,7 +895,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw,
} }
} }
static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int iw, int ih, float alpha, float *rgb) static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int UNUSED(iw), int ih, float alpha, float *rgb)
{ {
float x1, x2, y1, y2; float x1, x2, y1, y2;
@@ -938,7 +938,7 @@ static int preview_size(int miplevel)
return 0; return 0;
} }
static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, int miplevel, int draw_size, int nocreate) static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, int miplevel, int draw_size, int UNUSED(nocreate))
{ {
Icon *icon = NULL; Icon *icon = NULL;
DrawInfo *di = NULL; DrawInfo *di = NULL;

View File

@@ -441,7 +441,7 @@ void autocomplete_end(struct AutoComplete *autocpl, char *autoname);
/* interface_panel.c */ /* interface_panel.c */
extern int ui_handler_panel_region(struct bContext *C, struct wmEvent *event); extern int ui_handler_panel_region(struct bContext *C, struct wmEvent *event);
extern void ui_draw_aligned_panel(struct ARegion *ar, struct uiStyle *style, uiBlock *block, rcti *rect); extern void ui_draw_aligned_panel(struct uiStyle *style, uiBlock *block, rcti *rect);
/* interface_draw.c */ /* interface_draw.c */
extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select); extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);

View File

@@ -434,7 +434,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, char *name, int icon
uiBlockSetCurLayout(block, layout); uiBlockSetCurLayout(block, layout);
} }
static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, char *uiname, int x, int y, int w, int h, int icon_only) static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, char *uiname, int h, int icon_only)
{ {
uiBut *but; uiBut *but;
EnumPropertyItem *item; EnumPropertyItem *item;
@@ -956,7 +956,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
} }
/* expanded enum */ /* expanded enum */
else if(type == PROP_ENUM && (expand || RNA_property_flag(prop) & PROP_ENUM_FLAG)) else if(type == PROP_ENUM && (expand || RNA_property_flag(prop) & PROP_ENUM_FLAG))
ui_item_enum_expand(layout, block, ptr, prop, name, 0, 0, w, h, icon_only); ui_item_enum_expand(layout, block, ptr, prop, name, h, icon_only);
/* property with separate label */ /* property with separate label */
else if(type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) { else if(type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) {
but= ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag); but= ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag);

View File

@@ -316,7 +316,7 @@ void uiPanelPush(uiBlock *block)
glTranslatef((float)block->panel->ofsx, (float)block->panel->ofsy, 0.0); glTranslatef((float)block->panel->ofsx, (float)block->panel->ofsy, 0.0);
} }
void uiPanelPop(uiBlock *block) void uiPanelPop(uiBlock *UNUSED(block))
{ {
glPopMatrix(); glPopMatrix();
} }
@@ -425,7 +425,7 @@ static void ui_draw_panel_dragwidget(rctf *rect)
} }
static void ui_draw_aligned_panel_header(ARegion *ar, uiStyle *style, uiBlock *block, rcti *rect, char dir) static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *rect, char dir)
{ {
Panel *panel= block->panel; Panel *panel= block->panel;
rcti hrect; rcti hrect;
@@ -468,7 +468,7 @@ static void rectf_scale(rctf *rect, float scale)
} }
/* panel integrated in buttonswindow, tool/property lists etc */ /* panel integrated in buttonswindow, tool/property lists etc */
void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *rect) void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
{ {
Panel *panel= block->panel; Panel *panel= block->panel;
rcti headrect; rcti headrect;
@@ -499,7 +499,7 @@ void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *re
/* horizontal title */ /* horizontal title */
if(!(panel->flag & PNL_CLOSEDX)) { if(!(panel->flag & PNL_CLOSEDX)) {
ui_draw_aligned_panel_header(ar, style, block, &headrect, 'h'); ui_draw_aligned_panel_header(style, block, &headrect, 'h');
/* itemrect smaller */ /* itemrect smaller */
itemrect.xmax= headrect.xmax - 5.0f/block->aspect; itemrect.xmax= headrect.xmax - 5.0f/block->aspect;
@@ -518,7 +518,7 @@ void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *re
} }
else if(panel->flag & PNL_CLOSEDX) { else if(panel->flag & PNL_CLOSEDX) {
/* draw vertical title */ /* draw vertical title */
ui_draw_aligned_panel_header(ar, style, block, &headrect, 'v'); ui_draw_aligned_panel_header(style, block, &headrect, 'v');
} }
/* an open panel */ /* an open panel */
else { else {

View File

@@ -306,7 +306,7 @@ typedef struct uiTooltipData {
int toth, spaceh, lineh; int toth, spaceh, lineh;
} uiTooltipData; } uiTooltipData;
static void ui_tooltip_region_draw(const bContext *C, ARegion *ar) static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
{ {
uiTooltipData *data= ar->regiondata; uiTooltipData *data= ar->regiondata;
rcti bbox= data->bbox; rcti bbox= data->bbox;
@@ -328,7 +328,7 @@ static void ui_tooltip_region_draw(const bContext *C, ARegion *ar)
} }
} }
static void ui_tooltip_region_free(ARegion *ar) static void ui_tooltip_region_free_cb(ARegion *ar)
{ {
uiTooltipData *data; uiTooltipData *data;
@@ -455,8 +455,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
ar= ui_add_temporary_region(CTX_wm_screen(C)); ar= ui_add_temporary_region(CTX_wm_screen(C));
memset(&type, 0, sizeof(ARegionType)); memset(&type, 0, sizeof(ARegionType));
type.draw= ui_tooltip_region_draw; type.draw= ui_tooltip_region_draw_cb;
type.free= ui_tooltip_region_free; type.free= ui_tooltip_region_free_cb;
ar->type= &type; ar->type= &type;
/* set font, get bb */ /* set font, get bb */
@@ -832,7 +832,7 @@ void ui_searchbox_autocomplete(bContext *C, ARegion *ar, uiBut *but, char *str)
} }
} }
static void ui_searchbox_region_draw(const bContext *C, ARegion *ar) static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
{ {
uiSearchboxData *data= ar->regiondata; uiSearchboxData *data= ar->regiondata;
@@ -840,7 +840,7 @@ static void ui_searchbox_region_draw(const bContext *C, ARegion *ar)
wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f); wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f);
if(!data->noback) if(!data->noback)
ui_draw_search_back(U.uistyles.first, NULL, &data->bbox); ui_draw_search_back(NULL, NULL, &data->bbox); /* style not used yet */
/* draw text */ /* draw text */
if(data->items.totitem) { if(data->items.totitem) {
@@ -899,7 +899,7 @@ static void ui_searchbox_region_draw(const bContext *C, ARegion *ar)
} }
} }
static void ui_searchbox_region_free(ARegion *ar) static void ui_searchbox_region_free_cb(ARegion *ar)
{ {
uiSearchboxData *data= ar->regiondata; uiSearchboxData *data= ar->regiondata;
int a; int a;
@@ -931,8 +931,8 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
ar= ui_add_temporary_region(CTX_wm_screen(C)); ar= ui_add_temporary_region(CTX_wm_screen(C));
memset(&type, 0, sizeof(ARegionType)); memset(&type, 0, sizeof(ARegionType));
type.draw= ui_searchbox_region_draw; type.draw= ui_searchbox_region_draw_cb;
type.free= ui_searchbox_region_free; type.free= ui_searchbox_region_free_cb;
ar->type= &type; ar->type= &type;
/* create searchbox data */ /* create searchbox data */
@@ -1418,7 +1418,7 @@ void ui_popup_block_free(bContext *C, uiPopupBlockHandle *handle)
/***************************** Menu Button ***************************/ /***************************** Menu Button ***************************/
static void ui_block_func_MENUSTR(bContext *C, uiLayout *layout, void *arg_str) static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *arg_str)
{ {
uiBlock *block= uiLayoutGetBlock(layout); uiBlock *block= uiLayoutGetBlock(layout);
uiPopupBlockHandle *handle= block->handle; uiPopupBlockHandle *handle= block->handle;
@@ -1500,7 +1500,7 @@ static void ui_block_func_MENUSTR(bContext *C, uiLayout *layout, void *arg_str)
menudata_free(md); menudata_free(md);
} }
void ui_block_func_ICONROW(bContext *C, uiLayout *layout, void *arg_but) void ui_block_func_ICONROW(bContext *UNUSED(C), uiLayout *layout, void *arg_but)
{ {
uiBlock *block= uiLayoutGetBlock(layout); uiBlock *block= uiLayoutGetBlock(layout);
uiPopupBlockHandle *handle= block->handle; uiPopupBlockHandle *handle= block->handle;
@@ -1514,7 +1514,7 @@ void ui_block_func_ICONROW(bContext *C, uiLayout *layout, void *arg_but)
&handle->retvalue, (float)a, 0.0, 0, 0, ""); &handle->retvalue, (float)a, 0.0, 0, 0, "");
} }
void ui_block_func_ICONTEXTROW(bContext *C, uiLayout *layout, void *arg_but) void ui_block_func_ICONTEXTROW(bContext *UNUSED(C), uiLayout *layout, void *arg_but)
{ {
uiBlock *block= uiLayoutGetBlock(layout); uiBlock *block= uiLayoutGetBlock(layout);
uiPopupBlockHandle *handle= block->handle; uiPopupBlockHandle *handle= block->handle;
@@ -1642,7 +1642,7 @@ void ui_update_block_buts_rgb(uiBlock *block, float *rgb)
} }
} }
static void do_picker_rna_cb(bContext *C, void *bt1, void *unused) static void do_picker_rna_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
{ {
uiBut *but= (uiBut *)bt1; uiBut *but= (uiBut *)bt1;
uiPopupBlockHandle *popup= but->block->handle; uiPopupBlockHandle *popup= but->block->handle;
@@ -1659,7 +1659,7 @@ static void do_picker_rna_cb(bContext *C, void *bt1, void *unused)
popup->menuretval= UI_RETURN_UPDATE; popup->menuretval= UI_RETURN_UPDATE;
} }
static void do_hsv_rna_cb(bContext *C, void *bt1, void *arg_dummy) static void do_hsv_rna_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
{ {
uiBut *but= (uiBut *)bt1; uiBut *but= (uiBut *)bt1;
uiPopupBlockHandle *popup= but->block->handle; uiPopupBlockHandle *popup= but->block->handle;
@@ -1674,7 +1674,7 @@ static void do_hsv_rna_cb(bContext *C, void *bt1, void *arg_dummy)
popup->menuretval= UI_RETURN_UPDATE; popup->menuretval= UI_RETURN_UPDATE;
} }
static void do_hex_rna_cb(bContext *C, void *bt1, void *hexcl) static void do_hex_rna_cb(bContext *UNUSED(C), void *bt1, void *hexcl)
{ {
uiBut *but= (uiBut *)bt1; uiBut *but= (uiBut *)bt1;
uiPopupBlockHandle *popup= but->block->handle; uiPopupBlockHandle *popup= but->block->handle;
@@ -1695,7 +1695,7 @@ static void do_hex_rna_cb(bContext *C, void *bt1, void *hexcl)
popup->menuretval= UI_RETURN_UPDATE; popup->menuretval= UI_RETURN_UPDATE;
} }
static void close_popup_cb(bContext *C, void *bt1, void *arg) static void close_popup_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
{ {
uiBut *but= (uiBut *)bt1; uiBut *but= (uiBut *)bt1;
uiPopupBlockHandle *popup= but->block->handle; uiPopupBlockHandle *popup= but->block->handle;
@@ -1735,7 +1735,7 @@ static void picker_new_hide_reveal(uiBlock *block, short colormode)
} }
} }
static void do_picker_new_mode_cb(bContext *C, void *bt1, void *dummy) static void do_picker_new_mode_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
{ {
uiBut *bt= bt1; uiBut *bt= bt1;
short colormode= ui_get_but_val(bt); short colormode= ui_get_but_val(bt);
@@ -1886,7 +1886,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
} }
static int ui_picker_small_wheel(const bContext *C, uiBlock *block, wmEvent *event) static int ui_picker_small_wheel_cb(const bContext *UNUSED(C), uiBlock *block, wmEvent *event)
{ {
float add= 0.0f; float add= 0.0f;
@@ -1945,7 +1945,7 @@ uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_bu
block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_KEEP_OPEN; block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_KEEP_OPEN;
uiBoundsBlock(block, 10); uiBoundsBlock(block, 10);
block->block_event_func= ui_picker_small_wheel; block->block_event_func= ui_picker_small_wheel_cb;
/* and lets go */ /* and lets go */
block->direction= UI_TOP; block->direction= UI_TOP;

View File

@@ -491,7 +491,7 @@ void uiTemplateIDPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, char *p
* - propname: property identifier for property that ID-pointer gets stored to * - propname: property identifier for property that ID-pointer gets stored to
* - proptypename: property identifier for property used to determine the type of ID-pointer that can be used * - proptypename: property identifier for property used to determine the type of ID-pointer that can be used
*/ */
void uiTemplateAnyID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, char *proptypename, char *text) void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, char *propname, char *proptypename, char *text)
{ {
PropertyRNA *propID, *propType; PropertyRNA *propID, *propType;
uiLayout *row; uiLayout *row;
@@ -536,7 +536,7 @@ void uiTemplateAnyID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propn
* - propname: property identifier for property that path gets stored to * - propname: property identifier for property that path gets stored to
* - root_ptr: struct that path gets built from * - root_ptr: struct that path gets built from
*/ */
void uiTemplatePathBuilder(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, PointerRNA *root_ptr, char *text) void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, char *propname, PointerRNA *UNUSED(root_ptr), char *text)
{ {
PropertyRNA *propPath; PropertyRNA *propPath;
uiLayout *row; uiLayout *row;
@@ -817,7 +817,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
#define REMAKEIPO 8 #define REMAKEIPO 8
#define B_DIFF 9 #define B_DIFF 9
void do_constraint_panels(bContext *C, void *arg, int event) void do_constraint_panels(bContext *C, void *UNUSED(arg), int event)
{ {
Main *bmain= CTX_data_main(C); Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C); Scene *scene= CTX_data_scene(C);
@@ -853,7 +853,7 @@ void do_constraint_panels(bContext *C, void *arg, int event)
// XXX allqueue(REDRAWBUTSEDIT, 0); // XXX allqueue(REDRAWBUTSEDIT, 0);
} }
static void constraint_active_func(bContext *C, void *ob_v, void *con_v) static void constraint_active_func(bContext *UNUSED(C), void *ob_v, void *con_v)
{ {
ED_object_constraint_set_active(ob_v, con_v); ED_object_constraint_set_active(ob_v, con_v);
} }
@@ -1142,7 +1142,7 @@ typedef struct RNAUpdateCb {
PropertyRNA *prop; PropertyRNA *prop;
} RNAUpdateCb; } RNAUpdateCb;
static void rna_update_cb(bContext *C, void *arg_cb, void *arg_unused) static void rna_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg))
{ {
RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb; RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb;
@@ -1319,7 +1319,7 @@ void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, char *propname, int
/********************* Histogram Template ************************/ /********************* Histogram Template ************************/
void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, char *propname, int expand) void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, char *propname)
{ {
PropertyRNA *prop= RNA_struct_find_property(ptr, propname); PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
PointerRNA cptr; PointerRNA cptr;
@@ -1358,7 +1358,7 @@ void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, char *propname, int
/********************* Waveform Template ************************/ /********************* Waveform Template ************************/
void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, char *propname, int expand) void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, char *propname)
{ {
PropertyRNA *prop= RNA_struct_find_property(ptr, propname); PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
PointerRNA cptr; PointerRNA cptr;
@@ -1394,7 +1394,7 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, char *propname, int e
/********************* Vectorscope Template ************************/ /********************* Vectorscope Template ************************/
void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, char *propname, int expand) void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, char *propname)
{ {
PropertyRNA *prop= RNA_struct_find_property(ptr, propname); PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
PointerRNA cptr; PointerRNA cptr;
@@ -1432,7 +1432,7 @@ void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, char *propname, in
/********************* CurveMapping Template ************************/ /********************* CurveMapping Template ************************/
static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *unused) static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *UNUSED(arg))
{ {
CurveMapping *cumap = cumap_v; CurveMapping *cumap = cumap_v;
float d; float d;
@@ -1450,7 +1450,7 @@ static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *unused)
ED_region_tag_redraw(CTX_wm_region(C)); ED_region_tag_redraw(CTX_wm_region(C));
} }
static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *unused) static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *UNUSED(unused))
{ {
CurveMapping *cumap = cumap_v; CurveMapping *cumap = cumap_v;
float d, d1; float d, d1;
@@ -1487,7 +1487,7 @@ static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *unused)
ED_region_tag_redraw(CTX_wm_region(C)); ED_region_tag_redraw(CTX_wm_region(C));
} }
static void curvemap_buttons_setclip(bContext *C, void *cumap_v, void *unused) static void curvemap_buttons_setclip(bContext *UNUSED(C), void *cumap_v, void *UNUSED(arg))
{ {
CurveMapping *cumap = cumap_v; CurveMapping *cumap = cumap_v;
@@ -1607,7 +1607,7 @@ static uiBlock *curvemap_brush_tools_func(bContext *C, struct ARegion *ar, void
return block; return block;
} }
static void curvemap_buttons_redraw(bContext *C, void *arg1, void *arg2) static void curvemap_buttons_redraw(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
{ {
ED_region_tag_redraw(CTX_wm_region(C)); ED_region_tag_redraw(CTX_wm_region(C));
} }
@@ -2200,7 +2200,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propna
/************************* Operator Search Template **************************/ /************************* Operator Search Template **************************/
static void operator_call_cb(bContext *C, void *arg1, void *arg2) static void operator_call_cb(bContext *C, void *UNUSED(arg1), void *arg2)
{ {
wmOperatorType *ot= arg2; wmOperatorType *ot= arg2;
@@ -2208,7 +2208,7 @@ static void operator_call_cb(bContext *C, void *arg1, void *arg2)
WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL); WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL);
} }
static void operator_search_cb(const bContext *C, void *arg, char *str, uiSearchItems *items) static void operator_search_cb(const bContext *C, void *UNUSED(arg), char *str, uiSearchItems *items)
{ {
wmOperatorType *ot = WM_operatortype_first(); wmOperatorType *ot = WM_operatortype_first();
@@ -2255,7 +2255,7 @@ void uiTemplateOperatorSearch(uiLayout *layout)
#define B_STOPANIM 3 #define B_STOPANIM 3
#define B_STOPCOMPO 4 #define B_STOPCOMPO 4
static void do_running_jobs(bContext *C, void *arg, int event) static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
{ {
switch(event) { switch(event) {
case B_STOPRENDER: case B_STOPRENDER:

View File

@@ -131,7 +131,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
return but; return but;
} }
void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr, int columns) void uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int columns)
{ {
uiLayout *split, *col; uiLayout *split, *col;
int flag; int flag;

View File

@@ -744,7 +744,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
#define PREVIEW_PAD 4 #define PREVIEW_PAD 4
static void widget_draw_preview(BIFIconID icon, float aspect, float alpha, rcti *rect) static void widget_draw_preview(BIFIconID icon, float aspect, float UNUSED(alpha), rcti *rect)
{ {
int w, h, x, y, size; int w, h, x, y, size;
@@ -1492,7 +1492,7 @@ static void widget_state_label(uiWidgetType *wt, int state)
} }
static void widget_state_nothing(uiWidgetType *wt, int state) static void widget_state_nothing(uiWidgetType *wt, int UNUSED(state))
{ {
wt->wcol= *(wt->wcol_theme); wt->wcol= *(wt->wcol_theme);
} }
@@ -1949,7 +1949,7 @@ static void ui_draw_but_HSV_v(uiBut *but, rcti *rect)
/* ************ separator, for menus etc ***************** */ /* ************ separator, for menus etc ***************** */
static void ui_draw_separator(uiBut *but, rcti *rect, uiWidgetColors *wcol) static void ui_draw_separator(rcti *rect, uiWidgetColors *wcol)
{ {
int y = rect->ymin + (rect->ymax - rect->ymin)/2 - 1; int y = rect->ymin + (rect->ymax - rect->ymin)/2 - 1;
unsigned char col[4]; unsigned char col[4];
@@ -2121,7 +2121,7 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat
} }
} }
static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
{ {
rcti rect1; rcti rect1;
double value; double value;
@@ -2182,7 +2182,7 @@ static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
uiWidgetScrollDraw(wcol, rect, &rect1, state); uiWidgetScrollDraw(wcol, rect, &rect1, state);
} }
static void widget_progressbar(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_progressbar(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
{ {
rcti rect_prog = *rect, rect_bar = *rect; rcti rect_prog = *rect, rect_bar = *rect;
float value = but->a1; float value = but->a1;
@@ -2208,7 +2208,7 @@ static void widget_progressbar(uiBut *but, uiWidgetColors *wcol, rcti *rect, int
rect->xmin -= 6; rect->xmin -= 6;
} }
static void widget_link(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_link(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
{ {
if(but->flag & UI_SELECT) { if(but->flag & UI_SELECT) {
@@ -2362,7 +2362,7 @@ static void widget_textbut(uiWidgetColors *wcol, rcti *rect, int state, int roun
} }
static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{ {
uiWidgetBase wtb; uiWidgetBase wtb;
@@ -2380,7 +2380,7 @@ static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int state, int roun
rect->xmax -= (rect->ymax-rect->ymin); rect->xmax -= (rect->ymax-rect->ymin);
} }
static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{ {
uiWidgetBase wtb; uiWidgetBase wtb;
@@ -2393,7 +2393,7 @@ static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int state, int
widgetbase_draw(&wtb, wcol); widgetbase_draw(&wtb, wcol);
} }
static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
{ {
if(state & UI_ACTIVE) { if(state & UI_ACTIVE) {
uiWidgetBase wtb; uiWidgetBase wtb;
@@ -2408,7 +2408,7 @@ static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int
} }
} }
static void widget_menu_itembut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_menu_itembut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
{ {
uiWidgetBase wtb; uiWidgetBase wtb;
@@ -2421,7 +2421,7 @@ static void widget_menu_itembut(uiWidgetColors *wcol, rcti *rect, int state, int
widgetbase_draw(&wtb, wcol); widgetbase_draw(&wtb, wcol);
} }
static void widget_list_itembut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_list_itembut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
{ {
uiWidgetBase wtb; uiWidgetBase wtb;
@@ -2434,7 +2434,7 @@ static void widget_list_itembut(uiWidgetColors *wcol, rcti *rect, int state, int
widgetbase_draw(&wtb, wcol); widgetbase_draw(&wtb, wcol);
} }
static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
{ {
uiWidgetBase wtb; uiWidgetBase wtb;
rcti recttemp= *rect; rcti recttemp= *rect;
@@ -2467,7 +2467,7 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int ro
} }
static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{ {
uiWidgetBase wtb; uiWidgetBase wtb;
@@ -2480,7 +2480,7 @@ static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int state, int rou
} }
static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{ {
uiWidgetBase wtb; uiWidgetBase wtb;
char old_col[3]; char old_col[3];
@@ -2508,7 +2508,7 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state,
VECCOPY(wcol->inner, old_col); VECCOPY(wcol->inner, old_col);
} }
static void widget_but(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_but(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{ {
uiWidgetBase wtb; uiWidgetBase wtb;
@@ -2521,7 +2521,7 @@ static void widget_but(uiWidgetColors *wcol, rcti *rect, int state, int roundbox
} }
static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{ {
uiWidgetBase wtb; uiWidgetBase wtb;
float rad= 5.0f; //0.5f*(rect->ymax - rect->ymin); float rad= 5.0f; //0.5f*(rect->ymax - rect->ymin);
@@ -2786,7 +2786,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
widget_draw_text_icon(&style->widgetlabel, &tui->wcol_menu_back, but, rect); widget_draw_text_icon(&style->widgetlabel, &tui->wcol_menu_back, but, rect);
break; break;
case SEPR: case SEPR:
ui_draw_separator(but, rect, &tui->wcol_menu_item); ui_draw_separator(rect, &tui->wcol_menu_item);
break; break;
default: default:
@@ -2972,7 +2972,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
} }
} }
void ui_draw_menu_back(uiStyle *style, uiBlock *block, rcti *rect) void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
{ {
uiWidgetType *wt= widget_type(UI_WTYPE_MENU_BACK); uiWidgetType *wt= widget_type(UI_WTYPE_MENU_BACK);
@@ -2984,7 +2984,7 @@ void ui_draw_menu_back(uiStyle *style, uiBlock *block, rcti *rect)
} }
void ui_draw_search_back(uiStyle *style, uiBlock *block, rcti *rect) void ui_draw_search_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
{ {
uiWidgetType *wt= widget_type(UI_WTYPE_BOX); uiWidgetType *wt= widget_type(UI_WTYPE_BOX);

View File

@@ -1104,14 +1104,14 @@ static EditVert *editmesh_get_x_mirror_vert_topo(Object *ob, struct EditMesh *em
if(poinval != -1) if(poinval != -1)
return (EditVert *)(poinval); return (EditVert *)(poinval);
return NULL; return NULL;
} }
EditVert *editmesh_get_x_mirror_vert(Object *ob, struct EditMesh *em, EditVert *eve, float *co, int index) EditVert *editmesh_get_x_mirror_vert(Object *ob, struct EditMesh *em, EditVert *eve, float *co, int index)
{ {
if (((Mesh *)ob->data)->editflag & ME_EDIT_MIRROR_TOPO) { if (((Mesh *)ob->data)->editflag & ME_EDIT_MIRROR_TOPO) {
return editmesh_get_x_mirror_vert_topo(ob, em, eve, index); return editmesh_get_x_mirror_vert_topo(ob, em, eve, index);
} else { } else {
return editmesh_get_x_mirror_vert_spacial(ob, em, eve->co); return editmesh_get_x_mirror_vert_spacial(ob, em, co);
} }
} }

View File

@@ -282,7 +282,7 @@ void OBJECT_OT_material_slot_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
} }
static int material_slot_remove_exec(bContext *C, wmOperator *UNUSED(op)) static int material_slot_remove_exec(bContext *C, wmOperator *op)
{ {
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;

View File

@@ -2463,7 +2463,7 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
return 0; return 0;
} }
static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event)) static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{ {
bScreen *screen= CTX_wm_screen(C); bScreen *screen= CTX_wm_screen(C);

View File

@@ -4986,10 +4986,10 @@ static int paint_radial_control_exec(bContext *C, wmOperator *op)
Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint); Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint);
float zoom; float zoom;
int ret; int ret;
char str[256]; char str[64];
get_imapaint_zoom(C, &zoom, &zoom); get_imapaint_zoom(C, &zoom, &zoom);
ret = brush_radial_control_exec(op, brush, 1.0f / zoom); ret = brush_radial_control_exec(op, brush, 1.0f / zoom);
WM_radial_control_string(op, str, 256); WM_radial_control_string(op, str, sizeof(str));
WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush);
@@ -5333,8 +5333,8 @@ static int texture_paint_radial_control_exec(bContext *C, wmOperator *op)
{ {
Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint); Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint);
int ret = brush_radial_control_exec(op, brush, 1); int ret = brush_radial_control_exec(op, brush, 1);
char str[256]; char str[64];
WM_radial_control_string(op, str, 256); WM_radial_control_string(op, str, sizeof(str));
WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush);

View File

@@ -76,7 +76,7 @@
/* -------------- */ /* -------------- */
static void do_graph_region_buttons(bContext *C, void *arg, int event) static void do_graph_region_buttons(bContext *UNUSED(C), void *UNUSED(arg), int event)
{ {
//Scene *scene= CTX_data_scene(C); //Scene *scene= CTX_data_scene(C);
@@ -116,7 +116,7 @@ static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **
return 1; return 1;
} }
static int graph_panel_poll(const bContext *C, PanelType *pt) static int graph_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{ {
return graph_panel_context(C, NULL, NULL); return graph_panel_context(C, NULL, NULL);
} }
@@ -288,7 +288,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa)
#define B_IPO_DEPCHANGE 10 #define B_IPO_DEPCHANGE 10
static void do_graph_region_driver_buttons(bContext *C, void *arg, int event) static void do_graph_region_driver_buttons(bContext *C, void *UNUSED(arg), int event)
{ {
Main *bmain= CTX_data_main(C); Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C); Scene *scene= CTX_data_scene(C);
@@ -310,7 +310,7 @@ static void do_graph_region_driver_buttons(bContext *C, void *arg, int event)
} }
/* callback to remove the active driver */ /* callback to remove the active driver */
static void driver_remove_cb (bContext *C, void *ale_v, void *dummy_v) static void driver_remove_cb (bContext *UNUSED(C), void *ale_v, void *UNUSED(arg))
{ {
bAnimListElem *ale= (bAnimListElem *)ale_v; bAnimListElem *ale= (bAnimListElem *)ale_v;
ID *id= ale->id; ID *id= ale->id;
@@ -325,7 +325,7 @@ static void driver_remove_cb (bContext *C, void *ale_v, void *dummy_v)
} }
/* callback to add a target variable to the active driver */ /* callback to add a target variable to the active driver */
static void driver_add_var_cb (bContext *C, void *driver_v, void *dummy_v) static void driver_add_var_cb (bContext *UNUSED(C), void *driver_v, void *UNUSED(arg))
{ {
ChannelDriver *driver= (ChannelDriver *)driver_v; ChannelDriver *driver= (ChannelDriver *)driver_v;
@@ -334,7 +334,7 @@ static void driver_add_var_cb (bContext *C, void *driver_v, void *dummy_v)
} }
/* callback to remove target variable from active driver */ /* callback to remove target variable from active driver */
static void driver_delete_var_cb (bContext *C, void *driver_v, void *dvar_v) static void driver_delete_var_cb (bContext *UNUSED(C), void *driver_v, void *dvar_v)
{ {
ChannelDriver *driver= (ChannelDriver *)driver_v; ChannelDriver *driver= (ChannelDriver *)driver_v;
DriverVar *dvar= (DriverVar *)dvar_v; DriverVar *dvar= (DriverVar *)dvar_v;
@@ -344,7 +344,7 @@ static void driver_delete_var_cb (bContext *C, void *driver_v, void *dvar_v)
} }
/* callback to reset the driver's flags */ /* callback to reset the driver's flags */
static void driver_update_flags_cb (bContext *C, void *fcu_v, void *dummy_v) static void driver_update_flags_cb (bContext *UNUSED(C), void *fcu_v, void *UNUSED(arg))
{ {
FCurve *fcu= (FCurve *)fcu_v; FCurve *fcu= (FCurve *)fcu_v;
ChannelDriver *driver= fcu->driver; ChannelDriver *driver= fcu->driver;
@@ -355,7 +355,7 @@ static void driver_update_flags_cb (bContext *C, void *fcu_v, void *dummy_v)
} }
/* drivers panel poll */ /* drivers panel poll */
static int graph_panel_drivers_poll(const bContext *C, PanelType *pt) static int graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt))
{ {
SpaceIpo *sipo= CTX_wm_space_graph(C); SpaceIpo *sipo= CTX_wm_space_graph(C);
@@ -365,9 +365,8 @@ static int graph_panel_drivers_poll(const bContext *C, PanelType *pt)
return graph_panel_context(C, NULL, NULL); return graph_panel_context(C, NULL, NULL);
} }
/* settings for 'single property' driver variable type */ /* settings for 'single property' driver variable type */
static void graph_panel_driverVar__singleProp(const bContext *C, uiLayout *layout, ID *id, DriverVar *dvar) static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVar *dvar)
{ {
DriverTarget *dtar= &dvar->targets[0]; DriverTarget *dtar= &dvar->targets[0];
PointerRNA dtar_ptr; PointerRNA dtar_ptr;
@@ -379,7 +378,7 @@ static void graph_panel_driverVar__singleProp(const bContext *C, uiLayout *layou
/* Target ID */ /* Target ID */
row= uiLayoutRow(layout, 0); row= uiLayoutRow(layout, 0);
uiTemplateAnyID(row, (bContext *)C, &dtar_ptr, "id", "id_type", "Prop:"); uiTemplateAnyID(row, &dtar_ptr, "id", "id_type", "Prop:");
/* Target Property */ /* Target Property */
// TODO: make this less technical... // TODO: make this less technical...
@@ -392,12 +391,12 @@ static void graph_panel_driverVar__singleProp(const bContext *C, uiLayout *layou
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 1);
block= uiLayoutGetBlock(col); block= uiLayoutGetBlock(col);
/* rna path */ /* rna path */
uiTemplatePathBuilder(col, (bContext *)C, &dtar_ptr, "data_path", &root_ptr, "Path"); uiTemplatePathBuilder(col, &dtar_ptr, "data_path", &root_ptr, "Path");
} }
} }
/* settings for 'rotation difference' driver variable type */ /* settings for 'rotation difference' driver variable type */
static void graph_panel_driverVar__rotDiff(const bContext *C, uiLayout *layout, ID *id, DriverVar *dvar) static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar *dvar)
{ {
DriverTarget *dtar= &dvar->targets[0]; DriverTarget *dtar= &dvar->targets[0];
DriverTarget *dtar2= &dvar->targets[1]; DriverTarget *dtar2= &dvar->targets[1];
@@ -412,7 +411,7 @@ static void graph_panel_driverVar__rotDiff(const bContext *C, uiLayout *layout,
/* Bone 1 */ /* Bone 1 */
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar_ptr, "id", "id_type", "Bone 1:"); uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", "Bone 1:");
if (dtar->id && ob1->pose) { if (dtar->id && ob1->pose) {
PointerRNA tar_ptr; PointerRNA tar_ptr;
@@ -422,7 +421,7 @@ static void graph_panel_driverVar__rotDiff(const bContext *C, uiLayout *layout,
} }
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar2_ptr, "id", "id_type", "Bone 2:"); uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", "Bone 2:");
if (dtar2->id && ob2->pose) { if (dtar2->id && ob2->pose) {
PointerRNA tar_ptr; PointerRNA tar_ptr;
@@ -433,7 +432,7 @@ static void graph_panel_driverVar__rotDiff(const bContext *C, uiLayout *layout,
} }
/* settings for 'location difference' driver variable type */ /* settings for 'location difference' driver variable type */
static void graph_panel_driverVar__locDiff(const bContext *C, uiLayout *layout, ID *id, DriverVar *dvar) static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar *dvar)
{ {
DriverTarget *dtar= &dvar->targets[0]; DriverTarget *dtar= &dvar->targets[0];
DriverTarget *dtar2= &dvar->targets[1]; DriverTarget *dtar2= &dvar->targets[1];
@@ -448,7 +447,7 @@ static void graph_panel_driverVar__locDiff(const bContext *C, uiLayout *layout,
/* Bone 1 */ /* Bone 1 */
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar_ptr, "id", "id_type", "Ob/Bone 1:"); uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", "Ob/Bone 1:");
if (dtar->id && ob1->pose) { if (dtar->id && ob1->pose) {
PointerRNA tar_ptr; PointerRNA tar_ptr;
@@ -460,7 +459,7 @@ static void graph_panel_driverVar__locDiff(const bContext *C, uiLayout *layout,
uiItemR(col, &dtar_ptr, "use_local_space_transform", 0, NULL, 0); uiItemR(col, &dtar_ptr, "use_local_space_transform", 0, NULL, 0);
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar2_ptr, "id", "id_type", "Ob/Bone 2:"); uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", "Ob/Bone 2:");
if (dtar2->id && ob2->pose) { if (dtar2->id && ob2->pose) {
PointerRNA tar_ptr; PointerRNA tar_ptr;
@@ -473,7 +472,7 @@ static void graph_panel_driverVar__locDiff(const bContext *C, uiLayout *layout,
} }
/* settings for 'transform channel' driver variable type */ /* settings for 'transform channel' driver variable type */
static void graph_panel_driverVar__transChan(const bContext *C, uiLayout *layout, ID *id, DriverVar *dvar) static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar *dvar)
{ {
DriverTarget *dtar= &dvar->targets[0]; DriverTarget *dtar= &dvar->targets[0];
Object *ob = (Object *)dtar->id; Object *ob = (Object *)dtar->id;
@@ -485,7 +484,7 @@ static void graph_panel_driverVar__transChan(const bContext *C, uiLayout *layout
/* properties */ /* properties */
col= uiLayoutColumn(layout, 1); col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar_ptr, "id", "id_type", "Ob/Bone:"); uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", "Ob/Bone:");
if (dtar->id && ob->pose) { if (dtar->id && ob->pose) {
PointerRNA tar_ptr; PointerRNA tar_ptr;
@@ -606,16 +605,16 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* controls to draw depends on the type of variable */ /* controls to draw depends on the type of variable */
switch (dvar->type) { switch (dvar->type) {
case DVAR_TYPE_SINGLE_PROP: /* single property */ case DVAR_TYPE_SINGLE_PROP: /* single property */
graph_panel_driverVar__singleProp(C, box, ale->id, dvar); graph_panel_driverVar__singleProp(box, ale->id, dvar);
break; break;
case DVAR_TYPE_ROT_DIFF: /* rotational difference */ case DVAR_TYPE_ROT_DIFF: /* rotational difference */
graph_panel_driverVar__rotDiff(C, box, ale->id, dvar); graph_panel_driverVar__rotDiff(box, ale->id, dvar);
break; break;
case DVAR_TYPE_LOC_DIFF: /* location difference */ case DVAR_TYPE_LOC_DIFF: /* location difference */
graph_panel_driverVar__locDiff(C, box, ale->id, dvar); graph_panel_driverVar__locDiff(box, ale->id, dvar);
break; break;
case DVAR_TYPE_TRANSFORM_CHAN: /* transform channel */ case DVAR_TYPE_TRANSFORM_CHAN: /* transform channel */
graph_panel_driverVar__transChan(C, box, ale->id, dvar); graph_panel_driverVar__transChan(box, ale->id, dvar);
break; break;
} }
@@ -642,7 +641,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
#define B_FMODIFIER_REDRAW 20 #define B_FMODIFIER_REDRAW 20
static void do_graph_region_modifier_buttons(bContext *C, void *arg, int event) static void do_graph_region_modifier_buttons(bContext *C, void *UNUSED(arg), int event)
{ {
switch (event) { switch (event) {
case B_REDR: case B_REDR:

View File

@@ -179,7 +179,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn)
} }
static void recent_files_menu(const bContext *C, Menu *menu) static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
{ {
struct RecentFile *recent; struct RecentFile *recent;
uiLayout *layout= menu->layout; uiLayout *layout= menu->layout;
@@ -200,7 +200,7 @@ void recent_files_menu_register()
mt= MEM_callocN(sizeof(MenuType), "spacetype info menu recent files"); mt= MEM_callocN(sizeof(MenuType), "spacetype info menu recent files");
strcpy(mt->idname, "INFO_MT_file_open_recent"); strcpy(mt->idname, "INFO_MT_file_open_recent");
strcpy(mt->label, "Open Recent..."); strcpy(mt->label, "Open Recent...");
mt->draw= recent_files_menu; mt->draw= recent_files_menu_draw;
WM_menutype_add(mt); WM_menutype_add(mt);
} }

View File

@@ -72,7 +72,7 @@
/* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */ /* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */
void node_buts_group(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) void node_buts_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
{ {
uiTemplateIDBrowse(layout, C, ptr, "node_tree", NULL, NULL, ""); uiTemplateIDBrowse(layout, C, ptr, "node_tree", NULL, NULL, "");
} }
@@ -297,7 +297,7 @@ static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v)
node->menunr= 0; node->menunr= 0;
} }
static void node_shader_buts_material(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA *ptr)
{ {
bNode *node= ptr->data; bNode *node= ptr->data;
uiLayout *col; uiLayout *col;
@@ -343,7 +343,7 @@ static void node_shader_buts_vect_math(uiLayout *layout, bContext *UNUSED(C), Po
uiItemR(layout, ptr, "operation", 0, "", 0); uiItemR(layout, ptr, "operation", 0, "", 0);
} }
static void node_shader_buts_geometry(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA *ptr)
{ {
PointerRNA obptr= CTX_data_pointer_get(C, "active_object"); PointerRNA obptr= CTX_data_pointer_get(C, "active_object");
uiLayout *col; uiLayout *col;
@@ -362,7 +362,7 @@ static void node_shader_buts_geometry(uiLayout *layout, bContext *UNUSED(C), Poi
} }
} }
static void node_shader_buts_dynamic(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) static void node_shader_buts_dynamic(uiLayout *layout, bContext *C, PointerRNA *ptr)
{ {
Main *bmain= CTX_data_main(C); Main *bmain= CTX_data_main(C);
uiBlock *block= uiLayoutAbsoluteBlock(layout); uiBlock *block= uiLayoutAbsoluteBlock(layout);
@@ -457,7 +457,7 @@ static void node_shader_set_butfunc(bNodeType *ntype)
/* ****************** BUTTON CALLBACKS FOR COMPOSITE NODES ***************** */ /* ****************** BUTTON CALLBACKS FOR COMPOSITE NODES ***************** */
static void node_composit_buts_image(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
{ {
uiLayout *col; uiLayout *col;
bNode *node= ptr->data; bNode *node= ptr->data;
@@ -491,7 +491,7 @@ static void node_composit_buts_image(uiLayout *layout, bContext *UNUSED(C), Poin
uiItemR(col, ptr, "layer", 0, NULL, 0); uiItemR(col, ptr, "layer", 0, NULL, 0);
} }
static void node_composit_buts_renderlayers(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, PointerRNA *ptr)
{ {
bNode *node= ptr->data; bNode *node= ptr->data;
uiLayout *col, *row; uiLayout *col, *row;
@@ -1210,7 +1210,7 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
} }
} }
static void node_texture_buts_image(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) static void node_texture_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
{ {
uiTemplateID(layout, C, ptr, "image", NULL, "IMAGE_OT_open", NULL); uiTemplateID(layout, C, ptr, "image", NULL, "IMAGE_OT_open", NULL);
} }

View File

@@ -1421,7 +1421,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
} }
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
uiDefAutoButsRNA(C, pa->layout, &ptr, 2); uiDefAutoButsRNA(pa->layout, &ptr, 2);
} }
#endif // XXX not used #endif // XXX not used

View File

@@ -114,7 +114,7 @@ static void view3d_panel_operator_redo_buts(const bContext *C, Panel *pa, wmOper
op->layout= NULL; op->layout= NULL;
} }
else else
uiDefAutoButsRNA(C, pa->layout, &ptr, 1); uiDefAutoButsRNA(pa->layout, &ptr, 1);
} }
static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa) static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa)

View File

@@ -50,7 +50,7 @@
/* allocates PoseTree, and links that to root bone/channel */ /* allocates PoseTree, and links that to root bone/channel */
/* Note: detecting the IK chain is duplicate code... in drawarmature.c and in transform_conversions.c */ /* Note: detecting the IK chain is duplicate code... in drawarmature.c and in transform_conversions.c */
static void initialize_posetree(struct Object *ob, bPoseChannel *pchan_tip) static void initialize_posetree(struct Object *UNUSED(ob), bPoseChannel *pchan_tip)
{ {
bPoseChannel *curchan, *pchan_root=NULL, *chanlist[256], **oldchan; bPoseChannel *curchan, *pchan_root=NULL, *chanlist[256], **oldchan;
PoseTree *tree; PoseTree *tree;

View File

@@ -287,7 +287,6 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX); RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX);
func= RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID"); func= RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data."); parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
@@ -297,7 +296,6 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI."); parm= RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder"); func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data."); parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
@@ -343,17 +341,14 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "template_histogram", "uiTemplateHistogram"); func= RNA_def_function(srna, "template_histogram", "uiTemplateHistogram");
RNA_def_function_ui_description(func, "Item. A histogramm widget to analyze imaga data."); RNA_def_function_ui_description(func, "Item. A histogramm widget to analyze imaga data.");
api_ui_item_rna_common(func); api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
func= RNA_def_function(srna, "template_waveform", "uiTemplateWaveform"); func= RNA_def_function(srna, "template_waveform", "uiTemplateWaveform");
RNA_def_function_ui_description(func, "Item. A waveform widget to analyze imaga data."); RNA_def_function_ui_description(func, "Item. A waveform widget to analyze imaga data.");
api_ui_item_rna_common(func); api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
func= RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope"); func= RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope");
RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data."); RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data.");
api_ui_item_rna_common(func); api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
func= RNA_def_function(srna, "template_layers", "uiTemplateLayers"); func= RNA_def_function(srna, "template_layers", "uiTemplateLayers");
api_ui_item_rna_common(func); api_ui_item_rna_common(func);

View File

@@ -77,7 +77,7 @@ static void deformVertsEM(ModifierData *md, Object *ob,
static void deformMatricesEM(ModifierData *UNUSED(md), Object *ob, static void deformMatricesEM(ModifierData *UNUSED(md), Object *ob,
struct EditMesh *UNUSED(editData), struct EditMesh *UNUSED(editData),
DerivedMesh *UNUSED(derivedData), DerivedMesh *UNUSED(derivedData),
float UNUSED((*vertexCos)[3]), float (*vertexCos)[3],
float (*defMats)[3][3], float (*defMats)[3][3],
int numVerts) int numVerts)
{ {

View File

@@ -205,7 +205,7 @@ int _BaseMathObject_WriteIndexCallback(BaseMathObject *self, int index)
/* BaseMathObject generic functions for all mathutils types */ /* BaseMathObject generic functions for all mathutils types */
char BaseMathObject_Owner_doc[] = "The item this is wrapping or None (readonly)."; char BaseMathObject_Owner_doc[] = "The item this is wrapping or None (readonly).";
PyObject *BaseMathObject_getOwner(BaseMathObject *UNUSED(self), void *UNUSED(type)) PyObject *BaseMathObject_getOwner(BaseMathObject *self, void *UNUSED(closure))
{ {
PyObject *ret= self->cb_user ? self->cb_user : Py_None; PyObject *ret= self->cb_user ? self->cb_user : Py_None;
Py_INCREF(ret); Py_INCREF(ret);
@@ -213,7 +213,7 @@ PyObject *BaseMathObject_getOwner(BaseMathObject *UNUSED(self), void *UNUSED(typ
} }
char BaseMathObject_Wrapped_doc[] = "True when this object wraps external data (readonly).\n\n:type: boolean"; char BaseMathObject_Wrapped_doc[] = "True when this object wraps external data (readonly).\n\n:type: boolean";
PyObject *BaseMathObject_getWrapped(BaseMathObject *UNUSED(self), void *UNUSED(type)) PyObject *BaseMathObject_getWrapped(BaseMathObject *self, void *UNUSED(closure))
{ {
return PyBool_FromLong((self->wrapped == Py_WRAP) ? 1:0); return PyBool_FromLong((self->wrapped == Py_WRAP) ? 1:0);
} }

View File

@@ -31,7 +31,7 @@
//----------------------------------mathutils.Color() ------------------- //----------------------------------mathutils.Color() -------------------
//makes a new color for you to play with //makes a new color for you to play with
static PyObject *Color_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds) static PyObject *Color_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{ {
float col[3]= {0.0f, 0.0f, 0.0f}; float col[3]= {0.0f, 0.0f, 0.0f};

View File

@@ -107,7 +107,7 @@ wmKeyConfig *WM_keyconfig_new (struct wmWindowManager *wm, char *idname);
wmKeyConfig *WM_keyconfig_new_user(struct wmWindowManager *wm, char *idname); wmKeyConfig *WM_keyconfig_new_user(struct wmWindowManager *wm, char *idname);
void WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf); void WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf);
void WM_keyconfig_free (struct wmKeyConfig *keyconf); void WM_keyconfig_free (struct wmKeyConfig *keyconf);
void WM_keyconfig_userdef(struct wmWindowManager *wm); void WM_keyconfig_userdef(void);
void WM_keymap_init (struct bContext *C); void WM_keymap_init (struct bContext *C);
void WM_keymap_free (struct wmKeyMap *keymap); void WM_keymap_free (struct wmKeyMap *keymap);

View File

@@ -205,7 +205,7 @@ void WM_keymap_init(bContext *C)
/* create default key config */ /* create default key config */
wm_window_keymap(wm->defaultconf); wm_window_keymap(wm->defaultconf);
ED_spacetypes_keymap(wm->defaultconf); ED_spacetypes_keymap(wm->defaultconf);
WM_keyconfig_userdef(wm); WM_keyconfig_userdef();
wm->initialized |= WM_INIT_KEYMAP; wm->initialized |= WM_INIT_KEYMAP;
} }

View File

@@ -1894,7 +1894,7 @@ wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap
} }
/* priorities not implemented yet, for time being just insert in begin of list */ /* priorities not implemented yet, for time being just insert in begin of list */
wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int priority) wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int UNUSED(priority))
{ {
wmEventHandler *handler; wmEventHandler *handler;
@@ -2167,7 +2167,7 @@ static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *wi
/* windows store own event queues, no bContext here */ /* windows store own event queues, no bContext here */
/* time is in 1000s of seconds, from ghost */ /* time is in 1000s of seconds, from ghost */
void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int time, void *customdata) void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int UNUSED(time), void *customdata)
{ {
wmWindow *owin; wmWindow *owin;
wmEvent event, *evt= win->eventstate; wmEvent event, *evt= win->eventstate;

View File

@@ -283,7 +283,7 @@ void WM_read_file(bContext *C, char *name, ReportList *reports)
/* also exit screens and editors */ /* also exit screens and editors */
wm_window_match_init(C, &wmbase); wm_window_match_init(C, &wmbase);
retval= BKE_read_file(C, name, NULL, reports); retval= BKE_read_file(C, name, reports);
G.save_over = 1; G.save_over = 1;
/* this flag is initialized by the operator but overwritten on read. /* this flag is initialized by the operator but overwritten on read.
@@ -369,9 +369,9 @@ int WM_read_homefile(bContext *C, wmOperator *op)
wm_window_match_init(C, &wmbase); wm_window_match_init(C, &wmbase);
if (!from_memory && BLI_exists(tstr)) { if (!from_memory && BLI_exists(tstr)) {
success = BKE_read_file(C, tstr, NULL, NULL); success = BKE_read_file(C, tstr, NULL);
} else { } else {
success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL, NULL); success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL);
if (wmbase.first == NULL) wm_clear_default_size(C); if (wmbase.first == NULL) wm_clear_default_size(C);
} }
@@ -735,7 +735,7 @@ void WM_autosave_init(wmWindowManager *wm)
wm->autosavetimer= WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, U.savetime*60.0); wm->autosavetimer= WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, U.savetime*60.0);
} }
void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(wt))
{ {
wmWindow *win; wmWindow *win;
wmEventHandler *handler; wmEventHandler *handler;

View File

@@ -121,7 +121,7 @@ void WM_gestures_remove(bContext *C)
/* tweak and line gestures */ /* tweak and line gestures */
#define TWEAK_THRESHOLD 10 #define TWEAK_THRESHOLD 10
int wm_gesture_evaluate(bContext *C, wmGesture *gesture) int wm_gesture_evaluate(wmGesture *gesture)
{ {
if(gesture->type==WM_GESTURE_TWEAK) { if(gesture->type==WM_GESTURE_TWEAK) {
rcti *rect= gesture->customdata; rcti *rect= gesture->customdata;
@@ -159,7 +159,7 @@ int wm_gesture_evaluate(bContext *C, wmGesture *gesture)
/* ******************* gesture draw ******************* */ /* ******************* gesture draw ******************* */
static void wm_gesture_draw_rect(wmWindow *win, wmGesture *gt) static void wm_gesture_draw_rect(wmGesture *gt)
{ {
rcti *rect= (rcti *)gt->customdata; rcti *rect= (rcti *)gt->customdata;
@@ -183,7 +183,7 @@ static void wm_gesture_draw_rect(wmWindow *win, wmGesture *gt)
glDisable(GL_LINE_STIPPLE); glDisable(GL_LINE_STIPPLE);
} }
static void wm_gesture_draw_line(wmWindow *win, wmGesture *gt) static void wm_gesture_draw_line(wmGesture *gt)
{ {
rcti *rect= (rcti *)gt->customdata; rcti *rect= (rcti *)gt->customdata;
@@ -199,7 +199,7 @@ static void wm_gesture_draw_line(wmWindow *win, wmGesture *gt)
} }
static void wm_gesture_draw_circle(wmWindow *win, wmGesture *gt) static void wm_gesture_draw_circle(wmGesture *gt)
{ {
rcti *rect= (rcti *)gt->customdata; rcti *rect= (rcti *)gt->customdata;
@@ -261,7 +261,7 @@ static void draw_filled_lasso(wmGesture *gt)
} }
} }
static void wm_gesture_draw_lasso(wmWindow *win, wmGesture *gt) static void wm_gesture_draw_lasso(wmGesture *gt)
{ {
short *lasso= (short *)gt->customdata; short *lasso= (short *)gt->customdata;
int i; int i;
@@ -320,23 +320,23 @@ void wm_gesture_draw(wmWindow *win)
wmSubWindowSet(win, gt->swinid); wmSubWindowSet(win, gt->swinid);
if(gt->type==WM_GESTURE_RECT) if(gt->type==WM_GESTURE_RECT)
wm_gesture_draw_rect(win, gt); wm_gesture_draw_rect(gt);
else if(gt->type==WM_GESTURE_TWEAK) else if(gt->type==WM_GESTURE_TWEAK)
wm_gesture_draw_line(win, gt); wm_gesture_draw_line(gt);
else if(gt->type==WM_GESTURE_CIRCLE) else if(gt->type==WM_GESTURE_CIRCLE)
wm_gesture_draw_circle(win, gt); wm_gesture_draw_circle(gt);
else if(gt->type==WM_GESTURE_CROSS_RECT) { else if(gt->type==WM_GESTURE_CROSS_RECT) {
if(gt->mode==1) if(gt->mode==1)
wm_gesture_draw_rect(win, gt); wm_gesture_draw_rect(gt);
else else
wm_gesture_draw_cross(win, gt); wm_gesture_draw_cross(win, gt);
} }
else if(gt->type==WM_GESTURE_LINES) else if(gt->type==WM_GESTURE_LINES)
wm_gesture_draw_lasso(win, gt); wm_gesture_draw_lasso(gt);
else if(gt->type==WM_GESTURE_LASSO) else if(gt->type==WM_GESTURE_LASSO)
wm_gesture_draw_lasso(win, gt); wm_gesture_draw_lasso(gt);
else if(gt->type==WM_GESTURE_STRAIGHTLINE) else if(gt->type==WM_GESTURE_STRAIGHTLINE)
wm_gesture_draw_line(win, gt); wm_gesture_draw_line(gt);
} }
} }
@@ -351,5 +351,3 @@ void wm_gesture_tag_redraw(bContext *C)
wm_tag_redraw_overlay(win, ar); wm_tag_redraw_overlay(win, ar);
} }

View File

@@ -118,7 +118,7 @@ void WM_keyconfig_free(wmKeyConfig *keyconf)
MEM_freeN(keyconf); MEM_freeN(keyconf);
} }
void WM_keyconfig_userdef(wmWindowManager *wm) void WM_keyconfig_userdef(void)
{ {
wmKeyMap *km; wmKeyMap *km;
wmKeyMapItem *kmi; wmKeyMapItem *kmi;
@@ -419,7 +419,7 @@ char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len)
return str; return str;
} }
static wmKeyMapItem *wm_keymap_item_find_handlers(const bContext *C, ListBase *handlers, const char *opname, int opcontext, IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r) static wmKeyMapItem *wm_keymap_item_find_handlers(const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext), IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
{ {
wmWindowManager *wm= CTX_wm_manager(C); wmWindowManager *wm= CTX_wm_manager(C);
wmEventHandler *handler; wmEventHandler *handler;

View File

@@ -619,7 +619,7 @@ void WM_operator_properties_free(PointerRNA *ptr)
/* ************ default op callbacks, exported *********** */ /* ************ default op callbacks, exported *********** */
/* invoke callback, uses enum property named "type" */ /* invoke callback, uses enum property named "type" */
int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
PropertyRNA *prop= op->type->prop; PropertyRNA *prop= op->type->prop;
uiPopupMenu *pup; uiPopupMenu *pup;
@@ -724,7 +724,7 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op)
} }
int WM_enum_search_invoke(bContext *C, wmOperator *op, wmEvent *event) int WM_enum_search_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
uiPupBlock(C, wm_enum_search_menu, op); uiPupBlock(C, wm_enum_search_menu, op);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
@@ -751,13 +751,13 @@ int WM_operator_confirm_message(bContext *C, wmOperator *op, char *message)
} }
int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *event) int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
return WM_operator_confirm_message(C, op, NULL); return WM_operator_confirm_message(C, op, NULL);
} }
/* op->invoke, opens fileselect if path property not set, otherwise executes */ /* op->invoke, opens fileselect if path property not set, otherwise executes */
int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event) int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
if (RNA_property_is_set(op->ptr, "filepath")) { if (RNA_property_is_set(op->ptr, "filepath")) {
return WM_operator_call(C, op); return WM_operator_call(C, op);
@@ -862,7 +862,7 @@ int WM_operator_winactive(bContext *C)
} }
/* op->invoke */ /* op->invoke */
static void redo_cb(bContext *C, void *arg_op, int event) static void redo_cb(bContext *C, void *arg_op, int UNUSED(event))
{ {
wmOperator *lastop= arg_op; wmOperator *lastop= arg_op;
@@ -903,7 +903,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
op->layout= NULL; op->layout= NULL;
} }
else else
uiDefAutoButsRNA(C, layout, &ptr, columns); uiDefAutoButsRNA(layout, &ptr, columns);
uiPopupBoundsBlock(block, 4.0f, 0, 0); uiPopupBoundsBlock(block, 4.0f, 0, 0);
uiEndBlock(C, block); uiEndBlock(C, block);
@@ -922,7 +922,7 @@ static void dialog_exec_cb(bContext *C, void *arg1, void *arg2)
uiPupBlockClose(C, block); uiPupBlockClose(C, block);
} }
void dialog_check_cb(bContext *C, void *op_ptr, void *dummy2) void dialog_check_cb(bContext *C, void *op_ptr, void *UNUSED(arg))
{ {
wmOperator *op= op_ptr; wmOperator *op= op_ptr;
if(op->type->check) { if(op->type->check) {
@@ -966,7 +966,7 @@ static uiBlock *wm_block_create_dialog(bContext *C, ARegion *ar, void *userData)
op->layout= NULL; op->layout= NULL;
} }
else else
uiDefAutoButsRNA(C, layout, &ptr, columns); uiDefAutoButsRNA(layout, &ptr, columns);
uiBlockSetFunc(block, NULL, NULL, NULL); uiBlockSetFunc(block, NULL, NULL, NULL);
@@ -1014,7 +1014,7 @@ static uiBlock *wm_operator_create_ui(bContext *C, ARegion *ar, void *userData)
return block; return block;
} }
int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *event) int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
int retval= OPERATOR_CANCELLED; int retval= OPERATOR_CANCELLED;
@@ -1083,7 +1083,7 @@ static uiBlock *wm_block_create_menu(bContext *C, ARegion *ar, void *arg_op)
op->layout= NULL; op->layout= NULL;
} }
else else
uiDefAutoButsRNA(C, layout, op->ptr, 2); uiDefAutoButsRNA(layout, op->ptr, 2);
uiPopupBoundsBlock(block, 4.0f, 0, 0); uiPopupBoundsBlock(block, 4.0f, 0, 0);
uiEndBlock(C, block); uiEndBlock(C, block);
@@ -1100,7 +1100,7 @@ static int wm_debug_menu_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
} }
static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
RNA_int_set(op->ptr, "debugval", G.rt); RNA_int_set(op->ptr, "debugval", G.rt);
@@ -1127,7 +1127,7 @@ static void WM_OT_debug_menu(wmOperatorType *ot)
/* ***************** Splash Screen ************************* */ /* ***************** Splash Screen ************************* */
static void wm_block_splash_close(bContext *C, void *arg_block, void *arg_unused) static void wm_block_splash_close(bContext *C, void *arg_block, void *UNUSED(arg))
{ {
uiPupBlockClose(C, arg_block); uiPupBlockClose(C, arg_block);
} }
@@ -1136,7 +1136,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse
/* XXX: hack to refresh splash screen with updated prest menu name, /* XXX: hack to refresh splash screen with updated prest menu name,
* since popup blocks don't get regenerated like panels do */ * since popup blocks don't get regenerated like panels do */
void wm_block_splash_refreshmenu (bContext *C, void *arg_block, void *unused) void wm_block_splash_refreshmenu (bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg))
{ {
/* ugh, causes crashes in other buttons, disabling for now until /* ugh, causes crashes in other buttons, disabling for now until
* a better fix * a better fix
@@ -1145,7 +1145,7 @@ void wm_block_splash_refreshmenu (bContext *C, void *arg_block, void *unused)
*/ */
} }
static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unused) static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(arg))
{ {
uiBlock *block; uiBlock *block;
uiBut *but; uiBut *but;
@@ -1231,7 +1231,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse
return block; return block;
} }
static int wm_splash_invoke(bContext *C, wmOperator *op, wmEvent *event) static int wm_splash_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{ {
uiPupBlock(C, wm_block_create_splash, NULL); uiPupBlock(C, wm_block_create_splash, NULL);
@@ -1250,7 +1250,7 @@ static void WM_OT_splash(wmOperatorType *ot)
/* ***************** Search menu ************************* */ /* ***************** Search menu ************************* */
static void operator_call_cb(struct bContext *C, void *arg1, void *arg2) static void operator_call_cb(struct bContext *C, void *UNUSED(arg1), void *arg2)
{ {
wmOperatorType *ot= arg2; wmOperatorType *ot= arg2;
@@ -1258,7 +1258,7 @@ static void operator_call_cb(struct bContext *C, void *arg1, void *arg2)
WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL); WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL);
} }
static void operator_search_cb(const struct bContext *C, void *arg, char *str, uiSearchItems *items) static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), char *str, uiSearchItems *items)
{ {
wmOperatorType *ot = WM_operatortype_first(); wmOperatorType *ot = WM_operatortype_first();
@@ -1285,7 +1285,7 @@ static void operator_search_cb(const struct bContext *C, void *arg, char *str, u
} }
} }
static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *arg_op) static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *UNUSED(arg_op))
{ {
static char search[256]= ""; static char search[256]= "";
wmEvent event; wmEvent event;
@@ -1315,15 +1315,13 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *arg_op)
return block; return block;
} }
static int wm_search_menu_exec(bContext *C, wmOperator *op) static int wm_search_menu_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
{ {
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
} }
static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
uiPupBlock(C, wm_block_search_menu, op); uiPupBlock(C, wm_block_search_menu, op);
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
@@ -1389,7 +1387,7 @@ static void WM_OT_window_duplicate(wmOperatorType *ot)
ot->idname= "WM_OT_window_duplicate"; ot->idname= "WM_OT_window_duplicate";
ot->description="Duplicate the current Blender window"; ot->description="Duplicate the current Blender window";
ot->exec= wm_window_duplicate_op; ot->exec= wm_window_duplicate_exec;
ot->poll= wm_operator_winactive_normal; ot->poll= wm_operator_winactive_normal;
} }
@@ -1440,7 +1438,7 @@ static void open_set_use_scripts(wmOperator *op)
RNA_boolean_set(op->ptr, "use_scripts", !(U.flag & USER_SCRIPT_AUTOEXEC_DISABLE)); RNA_boolean_set(op->ptr, "use_scripts", !(U.flag & USER_SCRIPT_AUTOEXEC_DISABLE));
} }
static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
RNA_string_set(op->ptr, "filepath", G.sce); RNA_string_set(op->ptr, "filepath", G.sce);
open_set_load_ui(op); open_set_load_ui(op);
@@ -1496,7 +1494,7 @@ static void WM_OT_open_mainfile(wmOperatorType *ot)
/* **************** link/append *************** */ /* **************** link/append *************** */
static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *event) static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
if(!RNA_property_is_set(op->ptr, "relative_path")) if(!RNA_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
@@ -1721,7 +1719,7 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
} }
static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *event) static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
char filename[FILE_MAX]; char filename[FILE_MAX];
@@ -1769,7 +1767,7 @@ static void save_set_compress(wmOperator *op)
} }
} }
static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
char name[FILE_MAX]; char name[FILE_MAX];
@@ -1820,7 +1818,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
} }
/* function used for WM_OT_save_mainfile too */ /* function used for WM_OT_save_mainfile too */
static int blend_save_check(bContext *C, wmOperator *op) static int blend_save_check(bContext *UNUSED(C), wmOperator *op)
{ {
char filepath[FILE_MAX]; char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath); RNA_string_get(op->ptr, "filepath", filepath);
@@ -1850,7 +1848,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot)
/* *************** save file directly ******** */ /* *************** save file directly ******** */
static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{ {
char name[FILE_MAX]; char name[FILE_MAX];
int check_existing=1; int check_existing=1;
@@ -1985,7 +1983,7 @@ static void WM_OT_window_fullscreen_toggle(wmOperatorType *ot)
ot->idname= "WM_OT_window_fullscreen_toggle"; ot->idname= "WM_OT_window_fullscreen_toggle";
ot->description="Toggle the current window fullscreen"; ot->description="Toggle the current window fullscreen";
ot->exec= wm_window_fullscreen_toggle_op; ot->exec= wm_window_fullscreen_toggle_exec;
ot->poll= WM_operator_winactive; ot->poll= WM_operator_winactive;
} }
@@ -2301,7 +2299,7 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event)
rect->xmax= event->x - sx; rect->xmax= event->x - sx;
rect->ymax= event->y - sy; rect->ymax= event->y - sy;
if((val= wm_gesture_evaluate(C, gesture))) { if((val= wm_gesture_evaluate(gesture))) {
wmEvent event; wmEvent event;
event= *(window->eventstate); event= *(window->eventstate);
@@ -2394,7 +2392,7 @@ int WM_gesture_lines_invoke(bContext *C, wmOperator *op, wmEvent *event)
} }
static void gesture_lasso_apply(bContext *C, wmOperator *op, int event_type) static void gesture_lasso_apply(bContext *C, wmOperator *op)
{ {
wmGesture *gesture= op->customdata; wmGesture *gesture= op->customdata;
PointerRNA itemptr; PointerRNA itemptr;
@@ -2463,7 +2461,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event)
case MIDDLEMOUSE: case MIDDLEMOUSE:
case RIGHTMOUSE: case RIGHTMOUSE:
if(event->val==KM_RELEASE) { /* key release */ if(event->val==KM_RELEASE) { /* key release */
gesture_lasso_apply(C, op, event->type); gesture_lasso_apply(C, op);
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
} }
break; break;
@@ -2856,11 +2854,11 @@ void WM_radial_control_string(wmOperator *op, char str[], int maxlen)
float v = RNA_float_get(op->ptr, "new_value"); float v = RNA_float_get(op->ptr, "new_value");
if(mode == WM_RADIALCONTROL_SIZE) if(mode == WM_RADIALCONTROL_SIZE)
sprintf(str, "Size: %d", (int)v); BLI_snprintf(str, maxlen, "Size: %d", (int)v);
else if(mode == WM_RADIALCONTROL_STRENGTH) else if(mode == WM_RADIALCONTROL_STRENGTH)
sprintf(str, "Strength: %d", (int)v); BLI_snprintf(str, maxlen, "Strength: %d", (int)v);
else if(mode == WM_RADIALCONTROL_ANGLE) else if(mode == WM_RADIALCONTROL_ANGLE)
sprintf(str, "Angle: %d", (int)(v * 180.0f/M_PI)); BLI_snprintf(str, maxlen, "Angle: %d", (int)(v * 180.0f/M_PI));
} }
/** Important: this doesn't define an actual operator, it /** Important: this doesn't define an actual operator, it
@@ -3027,7 +3025,7 @@ static void WM_OT_redraw_timer(wmOperatorType *ot)
/* ************************** memory statistics for testing ***************** */ /* ************************** memory statistics for testing ***************** */
static int memory_statistics_exec(bContext *C, wmOperator *op) static int memory_statistics_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
{ {
MEM_printmemlist_stats(); MEM_printmemlist_stats();
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
@@ -3351,7 +3349,7 @@ void wm_window_keymap(wmKeyConfig *keyconf)
} }
/* Generic itemf's for operators that take library args */ /* Generic itemf's for operators that take library args */
static EnumPropertyItem *rna_id_itemf(bContext *C, PointerRNA *ptr, int *free, ID *id, int local) static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), int *free, ID *id, int local)
{ {
EnumPropertyItem *item= NULL, item_tmp; EnumPropertyItem *item= NULL, item_tmp;
int totitem= 0; int totitem= 0;

View File

@@ -40,6 +40,7 @@
#include "BLI_blenlib.h" #include "BLI_blenlib.h"
#include "BLI_math.h" #include "BLI_math.h"
#include "BKE_utildefines.h"
#include "BKE_context.h" #include "BKE_context.h"
#include "BKE_global.h" #include "BKE_global.h"
@@ -73,7 +74,7 @@ typedef struct wmSubWindow {
/* ******************* open, free, set, get data ******************** */ /* ******************* open, free, set, get data ******************** */
/* not subwindow itself */ /* not subwindow itself */
static void wm_subwindow_free(wmSubWindow *swin) static void wm_subwindow_free(wmSubWindow *UNUSED(swin))
{ {
/* future fancy stuff */ /* future fancy stuff */
} }

View File

@@ -290,7 +290,7 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win)
} }
/* belongs to below */ /* belongs to below */
static void wm_window_add_ghostwindow(bContext *C, wmWindowManager *wm, char *title, wmWindow *win) static void wm_window_add_ghostwindow(bContext *C, char *title, wmWindow *win)
{ {
GHOST_WindowHandle ghostwin; GHOST_WindowHandle ghostwin;
int scr_w, scr_h, posy; int scr_w, scr_h, posy;
@@ -384,7 +384,7 @@ void wm_window_add_ghostwindows(bContext* C, wmWindowManager *wm)
win->windowstate= initialstate; win->windowstate= initialstate;
useprefsize= 0; useprefsize= 0;
} }
wm_window_add_ghostwindow(C, wm, "Blender", win); wm_window_add_ghostwindow(C, "Blender", win);
} }
/* happens after fileread */ /* happens after fileread */
if(win->eventstate==NULL) if(win->eventstate==NULL)
@@ -493,7 +493,7 @@ void WM_window_open_temp(bContext *C, rcti *position, int type)
/* ****************** Operators ****************** */ /* ****************** Operators ****************** */
/* operator callback */ /* operator callback */
int wm_window_duplicate_op(bContext *C, wmOperator *op) int wm_window_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
{ {
wm_window_copy(C, CTX_wm_window(C)); wm_window_copy(C, CTX_wm_window(C));
WM_check(C); WM_check(C);
@@ -505,7 +505,7 @@ int wm_window_duplicate_op(bContext *C, wmOperator *op)
/* fullscreen operator callback */ /* fullscreen operator callback */
int wm_window_fullscreen_toggle_op(bContext *C, wmOperator *op) int wm_window_fullscreen_toggle_exec(bContext *C, wmOperator *UNUSED(op))
{ {
wmWindow *window= CTX_wm_window(C); wmWindow *window= CTX_wm_window(C);
GHOST_TWindowState state = GHOST_GetWindowState(window->ghostwin); GHOST_TWindowState state = GHOST_GetWindowState(window->ghostwin);
@@ -895,7 +895,7 @@ void wm_window_process_events(const bContext *C)
PIL_sleep_ms(5); PIL_sleep_ms(5);
} }
void wm_window_process_events_nosleep(const bContext *C) void wm_window_process_events_nosleep(void)
{ {
if(GHOST_ProcessEvents(g_system, 0)) if(GHOST_ProcessEvents(g_system, 0))
GHOST_DispatchEvents(g_system); GHOST_DispatchEvents(g_system);
@@ -943,7 +943,7 @@ void wm_ghost_exit(void)
/* **************** timer ********************** */ /* **************** timer ********************** */
/* to (de)activate running timers temporary */ /* to (de)activate running timers temporary */
void WM_event_timer_sleep(wmWindowManager *wm, wmWindow *win, wmTimer *timer, int dosleep) void WM_event_timer_sleep(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer, int dosleep)
{ {
wmTimer *wt; wmTimer *wt;
@@ -971,7 +971,7 @@ wmTimer *WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type,
return wt; return wt;
} }
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *win, wmTimer *timer) void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
{ {
wmTimer *wt; wmTimer *wt;

View File

@@ -61,7 +61,7 @@ void wm_tweakevent_test(bContext *C, wmEvent *event, int action);
/* wm_gesture.c */ /* wm_gesture.c */
#define WM_LASSO_MIN_POINTS 1024 #define WM_LASSO_MIN_POINTS 1024
void wm_gesture_draw(struct wmWindow *win); void wm_gesture_draw(struct wmWindow *win);
int wm_gesture_evaluate(bContext *C, wmGesture *gesture); int wm_gesture_evaluate(wmGesture *gesture);
void wm_gesture_tag_redraw(bContext *C); void wm_gesture_tag_redraw(bContext *C);
/* wm_jobs.c */ /* wm_jobs.c */

View File

@@ -45,7 +45,7 @@ void wm_window_close (bContext *C, wmWindowManager *wm, wmWindow *win);
void wm_window_title (wmWindowManager *wm, wmWindow *win); void wm_window_title (wmWindowManager *wm, wmWindow *win);
void wm_window_add_ghostwindows (bContext *C, wmWindowManager *wm); void wm_window_add_ghostwindows (bContext *C, wmWindowManager *wm);
void wm_window_process_events (const bContext *C); void wm_window_process_events (const bContext *C);
void wm_window_process_events_nosleep(const bContext *C); void wm_window_process_events_nosleep(void);
void wm_window_make_drawable(bContext *C, wmWindow *win); void wm_window_make_drawable(bContext *C, wmWindow *win);
@@ -65,8 +65,8 @@ wmWindow *wm_window_copy (bContext *C, wmWindow *winorig);
void wm_window_testbreak (void); void wm_window_testbreak (void);
/* *************** window operators ************** */ /* *************** window operators ************** */
int wm_window_duplicate_op (bContext *C, struct wmOperator *op); int wm_window_duplicate_exec(bContext *C, struct wmOperator *op);
int wm_window_fullscreen_toggle_op(bContext *C, struct wmOperator *op); int wm_window_fullscreen_toggle_exec(bContext *C, struct wmOperator *op);
#endif /* WM_WINDOW_H */ #endif /* WM_WINDOW_H */

View File

@@ -873,7 +873,7 @@ static int load_file(int argc, char **argv, void *data)
BLI_path_cwd(filename); BLI_path_cwd(filename);
if (G.background) { if (G.background) {
int retval = BKE_read_file(C, filename, NULL, NULL); int retval = BKE_read_file(C, filename, NULL);
/*we successfully loaded a blend file, get sure that /*we successfully loaded a blend file, get sure that
pointcache works */ pointcache works */

View File

@@ -440,7 +440,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
ketsjiengine->Render(); ketsjiengine->Render();
} }
wm_window_process_events_nosleep(C); wm_window_process_events_nosleep();
// test for the ESC key // test for the ESC key
//XXX while (qtest()) //XXX while (qtest())