[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30866] branches/soc-2010-jwilkins/source/ blender: * Fix crash when hitting f-key
Jason Wilkins
Jason.A.Wilkins at gmail.com
Thu Jul 29 08:19:47 CEST 2010
Revision: 30866
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30866
Author: jwilkins
Date: 2010-07-29 08:19:46 +0200 (Thu, 29 Jul 2010)
Log Message:
-----------
* Fix crash when hitting f-key
* quieted lots of warnings in wm_operators.c
Modified Paths:
--------------
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_operators.c
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-29 05:16:42 UTC (rev 30865)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-29 06:19:46 UTC (rev 30866)
@@ -871,7 +871,7 @@
glPopAttrib();
}
-static void stencil_surface(float modelview[16], float projection[16], float col[3], float alpha, float size[3], int viewport[4], float location[3], float inner_radius, float outer_radius, int brush_size, Sculpt *sd, Brush *brush, ViewContext *vc, float x, float y)
+static void stencil_surface(float modelview[16], float projection[16], float size[3], int viewport[4], float location[3], float outer_radius, Sculpt *sd, Brush *brush, ViewContext *vc, float x, float y)
{
GLUquadric* sphere;
@@ -1064,7 +1064,7 @@
if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED &&
brush->flag & BRUSH_TEXTURE_OVERLAY)
{
- stencil_surface(modelview, projection, col, alpha, ob->size, viewport, location, inner_radius, outer_radius, brush_size(brush), sd, brush, &vc, x, y);
+ stencil_surface(modelview, projection, ob->size, viewport, location, outer_radius, sd, brush, &vc, x, y);
}
ED_draw_on_surface_cursor(modelview, projection, col, alpha, ob->size, viewport, location, inner_radius, outer_radius, brush_size(brush));
Modified: branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_operators.c 2010-07-29 05:16:42 UTC (rev 30865)
+++ branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_operators.c 2010-07-29 06:19:46 UTC (rev 30866)
@@ -71,6 +71,7 @@
#include "ED_screen.h"
#include "ED_util.h"
#include "ED_view3d.h" // JW
+#include "ED_sculpt.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -642,6 +643,8 @@
uiPopupMenu *pup;
uiLayout *layout;
+ (void)event;
+
if(prop==NULL) {
printf("WM_menu_invoke: %s has no enum property set\n", op->type->idname);
}
@@ -743,6 +746,8 @@
int WM_enum_search_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
+ (void)event;
+
uiPupBlock(C, wm_enum_search_menu, op);
return OPERATOR_CANCELLED;
}
@@ -770,12 +775,16 @@
int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *event)
{
+ (void)event;
+
return WM_operator_confirm_message(C, op, NULL);
}
/* op->invoke, opens fileselect if path property not set, otherwise executes */
int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event)
{
+ (void)event;
+
if (RNA_property_is_set(op->ptr, "filepath")) {
return WM_operator_call(C, op);
}
@@ -883,6 +892,8 @@
{
wmOperator *lastop= arg_op;
+ (void)event;
+
if(lastop) {
ED_undo_pop_op(C, lastop);
WM_operator_repeat(C, lastop);
@@ -1027,6 +1038,8 @@
{
int retval= OPERATOR_CANCELLED;
+ (void)event;
+
if(op->type->exec) {
retval= op->type->exec(C, op);
@@ -1111,12 +1124,13 @@
static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
-
+ (void)event;
+
RNA_int_set(op->ptr, "debugval", G.rt);
-
+
/* pass on operator, so return modal */
uiPupBlockOperator(C, wm_block_create_menu, op, WM_OP_EXEC_DEFAULT);
-
+
return OPERATOR_RUNNING_MODAL;
}
@@ -1138,6 +1152,8 @@
static void wm_block_splash_close(bContext *C, void *arg_block, void *arg_unused)
{
+ (void)arg_unused;
+
uiPupBlockClose(C, arg_block);
}
@@ -1147,6 +1163,10 @@
* since popup blocks don't get regenerated like panels do */
void wm_block_splash_refreshmenu (bContext *C, void *arg_block, void *unused)
{
+ (void)C;
+ (void)unused;
+ (void)arg_block;
+
/* ugh, causes crashes in other buttons, disabling for now until
* a better fix
uiPupBlockClose(C, arg_block);
@@ -1165,6 +1185,7 @@
Menu menu= {0};
MenuType *mt= WM_menutype_find("USERPREF_MT_splash", TRUE);
+
#ifdef NAN_BUILDINFO
int ver_width, rev_width;
char *version_str = NULL;
@@ -1184,6 +1205,8 @@
rev_width = BLF_width(style->widgetlabel.uifont_id, revision_str)+5;
#endif //NAN_BUILDINFO
+ (void)arg_unused;
+
block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
@@ -1237,6 +1260,9 @@
static int wm_splash_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
+ (void)op;
+ (void)event;
+
uiPupBlock(C, wm_block_create_splash, NULL);
return OPERATOR_FINISHED;
@@ -1258,6 +1284,8 @@
{
wmOperatorType *ot= arg2;
+ (void)arg1;
+
if(ot)
WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL);
}
@@ -1266,6 +1294,8 @@
{
wmOperatorType *ot = WM_operatortype_first();
+ (void)arg;
+
for(; ot; ot= ot->next) {
if(BLI_strcasestr(ot->name, str)) {
@@ -1297,6 +1327,8 @@
uiBlock *block;
uiBut *but;
+ (void)arg_op;
+
block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT);
@@ -1321,15 +1353,18 @@
static int wm_search_menu_exec(bContext *C, wmOperator *op)
{
-
+ (void)C;
+ (void)op;
+
return OPERATOR_FINISHED;
}
static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
-
+ (void)event;
+
uiPupBlock(C, wm_block_search_menu, op);
-
+
return OPERATOR_CANCELLED;
}
@@ -1437,6 +1472,8 @@
static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
+ (void)event;
+
RNA_string_set(op->ptr, "filepath", G.sce);
open_set_load_ui(op);
open_set_use_scripts(op);
@@ -1493,6 +1530,8 @@
static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
+ (void)event;
+
if(!RNA_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
@@ -1720,6 +1759,8 @@
{
char filename[FILE_MAX];
+ (void)event;
+
wm_autosave_location(filename);
RNA_string_set(op->ptr, "filepath", filename);
WM_event_add_fileselect(C, op);
@@ -1768,6 +1809,8 @@
{
char name[FILE_MAX];
+ (void)event;
+
save_set_compress(op);
BLI_strncpy(name, G.sce, FILE_MAX);
@@ -1837,6 +1880,8 @@
char name[FILE_MAX];
int check_existing=1;
+ (void)event;
+
/* cancel if no active window */
if (CTX_wm_window(C) == NULL)
return OPERATOR_CANCELLED;
@@ -2277,11 +2322,13 @@
case INBETWEEN_MOUSEMOVE:
wm_subwindow_getorigin(window, gesture->swinid, &sx, &sy);
-
+
rect->xmax= event->x - sx;
rect->ymax= event->y - sy;
-
- if((val= wm_gesture_evaluate(C, gesture))) {
+
+ val= wm_gesture_evaluate(C, gesture);
+
+ if (val) {
wmEvent event;
event= *(window->eventstate);
@@ -2381,7 +2428,9 @@
float loc[2];
int i;
short *lasso= gesture->customdata;
-
+
+ (void)event_type;
+
/* operator storage as path. */
for(i=0; i<gesture->points; i++, lasso+=2) {
@@ -2660,7 +2709,6 @@
#ifdef WITH_ONSURFACEBRUSH
if ((paint->flags & PAINT_SHOW_BRUSH_ON_SURFACE) && vc.obact->sculpt) {
float alpha;
- Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
int pixel_radius, viewport[4];
float location[3], modelview[16], projection[16];
@@ -2881,7 +2929,10 @@
int mode = RNA_int_get(op->ptr, "mode");
float initial_value = RNA_float_get(op->ptr, "initial_value");
//float initial_size = RNA_float_get(op->ptr, "initial_size");
- int mouse[2] = {event->x, event->y};
+ int mouse[2];
+
+ mouse[0]= event->x;
+ mouse[1]= event->y;
//if (initial_size == 0)
// initial_size = WM_RADIAL_CONTROL_DISPLAY_SIZE;
@@ -2938,6 +2989,8 @@
int mode = RNA_int_get(op->ptr, "mode");
float v = RNA_float_get(op->ptr, "new_value");
+ (void)maxlen;
+
if(mode == WM_RADIALCONTROL_SIZE)
sprintf(str, "Size: %d", (int)v);
else if(mode == WM_RADIALCONTROL_STRENGTH)
@@ -3105,6 +3158,9 @@
static int memory_statistics_exec(bContext *C, wmOperator *op)
{
+ (void)C;
+ (void)op;
+
MEM_printmemlist_stats();
return OPERATOR_FINISHED;
}
@@ -3432,6 +3488,9 @@
int totitem= 0;
int i= 0;
+ (void)C;
+ (void)ptr;
+
memset(&item_tmp, 0, sizeof(item_tmp));
for( ; id; id= id->next) {
More information about the Bf-blender-cvs
mailing list