Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-14 05:22:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-14 05:22:14 +0400
commita9197c3aa21a5b5368e03feffd5b8d27c156b8fb (patch)
tree700d36d8f3d54303b8c6defe9133462f78471900
parentf6a7205be50237c769933f070ad439ab283e5f8c (diff)
remove unused args in draw*.c and some in view*.c, tag some as UNUSED().
-rw-r--r--source/blender/editors/animation/anim_draw.c2
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c4
-rw-r--r--source/blender/editors/include/UI_view2d.h10
-rw-r--r--source/blender/editors/interface/view2d.c31
-rw-r--r--source/blender/editors/screen/area.c6
-rw-r--r--source/blender/editors/space_action/space_action.c12
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c2
-rw-r--r--source/blender/editors/space_console/space_console.c2
-rw-r--r--source/blender/editors/space_file/space_file.c4
-rw-r--r--source/blender/editors/space_graph/space_graph.c12
-rw-r--r--source/blender/editors/space_image/space_image.c2
-rw-r--r--source/blender/editors/space_logic/space_logic.c2
-rw-r--r--source/blender/editors/space_nla/space_nla.c14
-rw-r--r--source/blender/editors/space_node/drawnode.c112
-rw-r--r--source/blender/editors/space_node/node_draw.c4
-rw-r--r--source/blender/editors/space_outliner/outliner.c2
-rw-r--r--source/blender/editors/space_script/space_script.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c12
-rw-r--r--source/blender/editors/space_sound/space_sound.c4
-rw-r--r--source/blender/editors/space_text/space_text.c2
-rw-r--r--source/blender/editors/space_time/space_time.c8
-rw-r--r--source/blender/editors/space_view3d/drawanimviz.c6
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c54
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c4
-rw-r--r--source/blender/editors/space_view3d/drawobject.c79
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h10
28 files changed, 202 insertions, 204 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index b564780f6c0..373ad5472ab 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -256,7 +256,7 @@ void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag)
/* Draw current frame number in a little box */
if (flag & DRAWCFRA_SHOW_NUMBOX) {
- UI_view2d_view_orthoSpecial(C, v2d, 1);
+ UI_view2d_view_orthoSpecial(CTX_wm_region(C), v2d, 1);
draw_cfra_number(scene, v2d, vec[0], (flag & DRAWCFRA_UNIT_SECONDS));
}
}
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index e6a1f58096a..e19f774412b 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -199,7 +199,7 @@ static void gp_draw_stroke_point (bGPDspoint *points, short thickness, short sfl
}
/* draw a given stroke in 3d (i.e. in 3d-space), using simple ogl lines */
-static void gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thickness, short dflag, short sflag, short debug, int winx, int winy)
+static void gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thickness, short debug)
{
bGPDspoint *pt;
float oldpressure = 0.0f;
@@ -501,7 +501,7 @@ static void gp_draw_strokes (bGPDframe *gpf, int offsx, int offsy, int winx, int
if (gps->totpoints == 1)
gp_draw_stroke_point(gps->points, lthick, gps->flag, offsx, offsy, winx, winy);
else if (dflag & GP_DRAWDATA_ONLY3D)
- gp_draw_stroke_3d(gps->points, gps->totpoints, lthick, dflag, gps->flag, debug, winx, winy);
+ gp_draw_stroke_3d(gps->points, gps->totpoints, lthick, debug);
else if (gps->totpoints > 1)
gp_draw_stroke(gps->points, gps->totpoints, lthick, dflag, gps->flag, debug, offsx, offsy, winx, winy);
}
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index bf4a3de9cc6..9afa7dd012a 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -156,14 +156,14 @@ void UI_view2d_totRect_set_resize(struct View2D *v2d, int width, int height, int
int UI_view2d_tab_set(struct View2D *v2d, int tab);
/* view matrix operations */
-void UI_view2d_view_ortho(const struct bContext *C, struct View2D *v2d);
-void UI_view2d_view_orthoSpecial(const struct bContext *C, struct View2D *v2d, short xaxis);
+void UI_view2d_view_ortho(struct View2D *v2d);
+void UI_view2d_view_orthoSpecial(struct ARegion *ar, struct View2D *v2d, short xaxis);
void UI_view2d_view_restore(const struct bContext *C);
/* grid drawing */
-View2DGrid *UI_view2d_grid_calc(const struct bContext *C, struct View2D *v2d, short xunits, short xclamp, short yunits, short yclamp, int winx, int winy);
-void UI_view2d_grid_draw(const struct bContext *C, struct View2D *v2d, View2DGrid *grid, int flag);
-void UI_view2d_constant_grid_draw(const struct bContext *C, struct View2D *v2d);
+View2DGrid *UI_view2d_grid_calc(struct Scene *scene, struct View2D *v2d, short xunits, short xclamp, short yunits, short yclamp, int winx, int winy);
+void UI_view2d_grid_draw(struct View2D *v2d, View2DGrid *grid, int flag);
+void UI_view2d_constant_grid_draw(struct View2D *v2d);
void UI_view2d_grid_size(View2DGrid *grid, float *r_dx, float *r_dy);
void UI_view2d_grid_free(View2DGrid *grid);
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 14ec7c6d0d6..e0dc702bda0 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -967,7 +967,7 @@ static void view2d_map_cur_using_mask(View2D *v2d, rctf *curmasked)
}
/* Set view matrices to use 'cur' rect as viewing frame for View2D drawing */
-void UI_view2d_view_ortho(const bContext *C, View2D *v2d)
+void UI_view2d_view_ortho(View2D *v2d)
{
rctf curmasked;
float xofs, yofs;
@@ -997,9 +997,8 @@ void UI_view2d_view_ortho(const bContext *C, View2D *v2d)
/* Set view matrices to only use one axis of 'cur' only
* - xaxis = if non-zero, only use cur x-axis, otherwise use cur-yaxis (mostly this will be used for x)
*/
-void UI_view2d_view_orthoSpecial(const bContext *C, View2D *v2d, short xaxis)
+void UI_view2d_view_orthoSpecial(ARegion *ar, View2D *v2d, short xaxis)
{
- ARegion *ar= CTX_wm_region(C);
rctf curmasked;
float xofs, yofs;
@@ -1098,12 +1097,12 @@ static void step_to_grid(float *step, int *power, int unit)
*
* - xunits,yunits = V2D_UNIT_* grid steps in seconds or frames
* - xclamp,yclamp = V2D_CLAMP_* only show whole-number intervals
- * - winx = width of region we're drawing to
+ * - winx = width of region we're drawing to, note: not used but keeping for compleateness.
* - winy = height of region we're drawing into
*/
-View2DGrid *UI_view2d_grid_calc(const bContext *C, View2D *v2d, short xunits, short xclamp, short yunits, short yclamp, int winx, int winy)
+View2DGrid *UI_view2d_grid_calc(Scene *scene, View2D *v2d, short xunits, short xclamp, short yunits, short yclamp, int UNUSED(winx), int winy)
{
- Scene *scene= CTX_data_scene(C);
+
View2DGrid *grid;
float space, pixels, seconddiv;
int secondgrid;
@@ -1174,7 +1173,7 @@ View2DGrid *UI_view2d_grid_calc(const bContext *C, View2D *v2d, short xunits, sh
}
/* Draw gridlines in the given 2d-region */
-void UI_view2d_grid_draw(const bContext *C, View2D *v2d, View2DGrid *grid, int flag)
+void UI_view2d_grid_draw(View2D *v2d, View2DGrid *grid, int flag)
{
float vec1[2], vec2[2];
int a, step;
@@ -1283,7 +1282,7 @@ void UI_view2d_grid_draw(const bContext *C, View2D *v2d, View2DGrid *grid, int f
}
/* Draw a constant grid in given 2d-region */
-void UI_view2d_constant_grid_draw(const bContext *C, View2D *v2d)
+void UI_view2d_constant_grid_draw(View2D *v2d)
{
float start, step= 25.0f;
@@ -1481,7 +1480,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
scrollers->yclamp= yclamp;
scrollers->yunits= yunits;
- scrollers->grid= UI_view2d_grid_calc(C, v2d, xunits, xclamp, yunits, yclamp, (hor.xmax - hor.xmin), (vert.ymax - vert.ymin));
+ scrollers->grid= UI_view2d_grid_calc(CTX_data_scene(C), v2d, xunits, xclamp, yunits, yclamp, (hor.xmax - hor.xmin), (vert.ymax - vert.ymin));
}
/* return scrollers */
@@ -1489,7 +1488,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
}
/* Print scale marking along a time scrollbar */
-static void scroll_printstr(View2DScrollers *scrollers, Scene *scene, float x, float y, float val, int power, short unit, char dir)
+static void scroll_printstr(Scene *scene, float x, float y, float val, int power, short unit, char dir)
{
int len;
char str[32];
@@ -1614,16 +1613,16 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
switch (vs->xunits) {
case V2D_UNIT_FRAMES: /* frames (as whole numbers)*/
- scroll_printstr(vs, scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMES, 'h');
+ scroll_printstr(scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMES, 'h');
break;
case V2D_UNIT_FRAMESCALE: /* frames (not always as whole numbers) */
- scroll_printstr(vs, scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMESCALE, 'h');
+ scroll_printstr(scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMESCALE, 'h');
break;
case V2D_UNIT_SECONDS: /* seconds */
fac2= val/(float)FPS;
- scroll_printstr(vs, scene, fac, h, fac2, grid->powerx, V2D_UNIT_SECONDS, 'h');
+ scroll_printstr(scene, fac, h, fac2, grid->powerx, V2D_UNIT_SECONDS, 'h');
break;
case V2D_UNIT_SECONDSSEQ: /* seconds with special calculations (only used for sequencer only) */
@@ -1634,13 +1633,13 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
time= (float)floor(fac2);
fac2= fac2-time;
- scroll_printstr(vs, scene, fac, h, time+(float)FPS*fac2/100.0f, grid->powerx, V2D_UNIT_SECONDSSEQ, 'h');
+ scroll_printstr(scene, fac, h, time+(float)FPS*fac2/100.0f, grid->powerx, V2D_UNIT_SECONDSSEQ, 'h');
}
break;
case V2D_UNIT_DEGREES: /* Graph Editor for rotation Drivers */
/* HACK: although we're drawing horizontal, we make this draw as 'vertical', just to get degree signs */
- scroll_printstr(vs, scene, fac, h, val, grid->powerx, V2D_UNIT_DEGREES, 'v');
+ scroll_printstr(scene, fac, h, val, grid->powerx, V2D_UNIT_DEGREES, 'v');
break;
}
}
@@ -1719,7 +1718,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
if(fac < vert.ymin+10)
continue;
- scroll_printstr(vs, scene, (float)(vert.xmax)-2.0f, fac, val, grid->powery, vs->yunits, 'v');
+ scroll_printstr(scene, (float)(vert.xmax)-2.0f, fac, val, grid->powery, vs->yunits, 'v');
}
BLF_disable_default(BLF_ROTATION);
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 7f5485ae8b6..e8fd2be324c 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1244,7 +1244,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
uiBeginPanels(C, ar);
/* set view2d view matrix for scrolling (without scrollers) */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
for(pt= ar->type->paneltypes.first; pt; pt= pt->next) {
/* verify context */
@@ -1365,7 +1365,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
UI_view2d_totRect_set(v2d, x+V2D_SCROLL_WIDTH, y+V2D_SCROLL_HEIGHT);
/* set the view */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* this does the actual drawing! */
uiEndPanels(C, ar);
@@ -1414,7 +1414,7 @@ void ED_region_header(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
/* set view2d view matrix for scrolling (without scrollers) */
- UI_view2d_view_ortho(C, &ar->v2d);
+ UI_view2d_view_ortho(&ar->v2d);
xco= maxco= 8;
yco= HEADERY-3;
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 7b96618d923..01ae28a20d6 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -169,12 +169,12 @@ static void action_main_area_draw(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* time grid */
unit= (saction->flag & SACTION_DRAWTIME)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES;
- grid= UI_view2d_grid_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
- UI_view2d_grid_draw(C, v2d, grid, V2D_GRIDLINES_ALL);
+ grid= UI_view2d_grid_calc(CTX_data_scene(C), v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
+ UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL);
UI_view2d_grid_free(grid);
/* data */
@@ -188,11 +188,11 @@ static void action_main_area_draw(const bContext *C, ARegion *ar)
ANIM_draw_cfra(C, v2d, flag);
/* markers */
- UI_view2d_view_orthoSpecial(C, v2d, 1);
+ UI_view2d_view_orthoSpecial(ar, v2d, 1);
draw_markers_time(C, 0);
/* preview range */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
ANIM_draw_previewrange(C, v2d);
/* reset view matrix */
@@ -228,7 +228,7 @@ static void action_channel_area_draw(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* data */
if (ANIM_animdata_get_context(C, &ac)) {
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index fcd66c43321..5927a7473e2 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -203,7 +203,7 @@ static void buttons_header_area_draw(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
/* set view2d view matrix for scrolling (without scrollers) */
- UI_view2d_view_ortho(C, &ar->v2d);
+ UI_view2d_view_ortho(&ar->v2d);
buttons_header_buttons(C, ar);
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 7a913fc28c0..70263788b13 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -227,7 +227,7 @@ static void console_main_area_draw(const bContext *C, ARegion *ar)
console_update_rect(C, ar);
/* worlks best with no view2d matrix set */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* data... */
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 0cd721964bd..52805c39816 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -335,7 +335,7 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
file_calc_previews(C, ar);
/* set view */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* on first read, find active file */
if (params->active_file == -1) {
@@ -505,7 +505,7 @@ static void file_ui_area_draw(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
/* set view2d view matrix for scrolling (without scrollers) */
- UI_view2d_view_ortho(C, &ar->v2d);
+ UI_view2d_view_ortho(&ar->v2d);
file_draw_buttons(C, ar);
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index ca372d74da6..994d9725762 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -229,12 +229,12 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar)
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* grid */
unitx= (sipo->flag & SIPO_DRAWTIME)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMESCALE;
- grid= UI_view2d_grid_calc(C, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP, ar->winx, ar->winy);
- UI_view2d_grid_draw(C, v2d, grid, V2D_GRIDLINES_ALL);
+ grid= UI_view2d_grid_calc(CTX_data_scene(C), v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP, ar->winx, ar->winy);
+ UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL);
/* draw data */
if (ANIM_animdata_get_context(C, &ac)) {
@@ -282,11 +282,11 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar)
ANIM_draw_cfra(C, v2d, flag);
/* markers */
- UI_view2d_view_orthoSpecial(C, v2d, 1);
+ UI_view2d_view_orthoSpecial(ar, v2d, 1);
draw_markers_time(C, 0);
/* preview range */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
ANIM_draw_previewrange(C, v2d);
/* reset view matrix */
@@ -325,7 +325,7 @@ static void graph_channel_area_draw(const bContext *C, ARegion *ar)
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* draw channels */
if (ANIM_animdata_get_context(C, &ac)) {
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index a6deb73f2e7..250ece6d92a 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -768,7 +768,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
draw_image_main(sima, ar, scene);
/* and uvs in 0.0-1.0 space */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
draw_uvedit_main(sima, ar, scene, obedit);
ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_VIEW);
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index 01af324334b..5af5b5ee6c0 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -251,7 +251,7 @@ static void logic_main_area_draw(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
logic_buttons((bContext *)C, ar);
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 92c5ef6c410..2ae47ddbc7f 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -227,7 +227,7 @@ static void nla_channel_area_draw(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* data */
if (ANIM_animdata_get_context(C, &ac)) {
@@ -272,12 +272,12 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* time grid */
unit= (snla->flag & SNLA_DRAWTIME)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES;
- grid= UI_view2d_grid_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
- UI_view2d_grid_draw(C, v2d, grid, V2D_GRIDLINES_ALL);
+ grid= UI_view2d_grid_calc(CTX_data_scene(C), v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
+ UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL);
UI_view2d_grid_free(grid);
/* data */
@@ -289,7 +289,7 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_text_cache_draw(ar);
}
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* current frame */
if (snla->flag & SNLA_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS;
@@ -297,11 +297,11 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar)
ANIM_draw_cfra(C, v2d, flag);
/* markers */
- UI_view2d_view_orthoSpecial(C, v2d, 1);
+ UI_view2d_view_orthoSpecial(ar, v2d, 1);
draw_markers_time(C, 0);
/* preview range */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
ANIM_draw_previewrange(C, v2d);
/* reset view matrix */
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 5e0926da216..16a2ac3c52e 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -72,12 +72,12 @@
/* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */
-void node_buts_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
+void node_buts_group(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiTemplateIDBrowse(layout, C, ptr, "node_tree", NULL, NULL, "");
}
-static void node_buts_value(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
PointerRNA sockptr;
PropertyRNA *prop;
@@ -89,7 +89,7 @@ static void node_buts_value(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiItemR(layout, &sockptr, "default_value", 0, "", 0);
}
-static void node_buts_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
PointerRNA sockptr;
@@ -104,7 +104,7 @@ static void node_buts_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiItemR(col, &sockptr, "default_value", 0, "", 0);
}
-static void node_buts_mix_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_mix_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row;
@@ -116,7 +116,7 @@ static void node_buts_mix_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiItemR(row, ptr, "use_alpha", 0, "", ICON_IMAGE_RGB_ALPHA);
}
-static void node_buts_time(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_time(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row;
#if 0
@@ -138,12 +138,12 @@ static void node_buts_time(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiItemR(row, ptr, "frame_end", 0, "End", 0);
}
-static void node_buts_colorramp(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_colorramp(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiTemplateColorRamp(layout, ptr, "color_ramp", 0);
}
-static void node_buts_curvevec(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_curvevec(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiTemplateCurveMapping(layout, ptr, "mapping", 'v', 0, 0);
}
@@ -154,7 +154,7 @@ void node_curvemap_sample(float *col)
_sample_col= col;
}
-static void node_buts_curvecol(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
bNode *node= ptr->data;
CurveMapping *cumap= node->storage;
@@ -169,7 +169,7 @@ static void node_buts_curvecol(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiTemplateCurveMapping(layout, ptr, "mapping", 'c', 0, 0);
}
-static void node_buts_normal(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiBlock *block= uiLayoutAbsoluteBlock(layout);
bNode *node= ptr->data;
@@ -212,7 +212,7 @@ static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v)
node->menunr= 0;
}
#endif
-static void node_dynamic_update_cb(bContext *C, void *ntree_v, void *node_v)
+static void node_dynamic_update_cb(bContext *C, void *UNUSED(ntree_v), void *node_v)
{
Main *bmain= CTX_data_main(C);
Material *ma;
@@ -244,7 +244,7 @@ static void node_dynamic_update_cb(bContext *C, void *ntree_v, void *node_v)
// XXX BIF_preview_changed(ID_MA);
}
-static void node_buts_texture(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
bNode *node= ptr->data;
@@ -263,7 +263,7 @@ static void node_buts_texture(uiLayout *layout, bContext *C, PointerRNA *ptr)
}
}
-static void node_buts_math(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "operation", 0, "", 0);
}
@@ -297,7 +297,7 @@ static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v)
node->menunr= 0;
}
-static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_shader_buts_material(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
bNode *node= ptr->data;
uiLayout *col;
@@ -312,7 +312,7 @@ static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA
uiItemR(col, ptr, "invert_normal", 0, NULL, 0);
}
-static void node_shader_buts_mapping(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row;
@@ -338,12 +338,12 @@ static void node_shader_buts_mapping(uiLayout *layout, bContext *C, PointerRNA *
}
-static void node_shader_buts_vect_math(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_shader_buts_vect_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "operation", 0, "", 0);
}
-static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_shader_buts_geometry(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
PointerRNA obptr= CTX_data_pointer_get(C, "active_object");
uiLayout *col;
@@ -362,7 +362,7 @@ static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA
}
}
-static void node_shader_buts_dynamic(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_shader_buts_dynamic(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
uiBlock *block= uiLayoutAbsoluteBlock(layout);
@@ -457,7 +457,7 @@ static void node_shader_set_butfunc(bNodeType *ntype)
/* ****************** BUTTON CALLBACKS FOR COMPOSITE NODES ***************** */
-static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_image(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
bNode *node= ptr->data;
@@ -491,7 +491,7 @@ static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *
uiItemR(col, ptr, "layer", 0, NULL, 0);
}
-static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_renderlayers(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
bNode *node= ptr->data;
uiLayout *col, *row;
@@ -524,7 +524,7 @@ static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, Point
}
-static void node_composit_buts_blur(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -548,7 +548,7 @@ static void node_composit_buts_blur(uiLayout *layout, bContext *C, PointerRNA *p
}
}
-static void node_composit_buts_dblur(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_dblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -572,7 +572,7 @@ static void node_composit_buts_dblur(uiLayout *layout, bContext *C, PointerRNA *
uiItemR(layout, ptr, "zoom", 0, NULL, 0);
}
-static void node_composit_buts_bilateralblur(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_bilateralblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -582,7 +582,7 @@ static void node_composit_buts_bilateralblur(uiLayout *layout, bContext *C, Poin
uiItemR(col, ptr, "sigma_space", 0, NULL, 0);
}
-static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_defocus(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *sub, *col;
@@ -614,7 +614,7 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA
}
/* qdn: glare node */
-static void node_composit_buts_glare(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_glare(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "glare_type", 0, "", 0);
uiItemR(layout, ptr, "quality", 0, "", 0);
@@ -644,7 +644,7 @@ static void node_composit_buts_glare(uiLayout *layout, bContext *C, PointerRNA *
}
}
-static void node_composit_buts_tonemap(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_tonemap(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -663,7 +663,7 @@ static void node_composit_buts_tonemap(uiLayout *layout, bContext *C, PointerRNA
}
}
-static void node_composit_buts_lensdist(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_lensdist(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -676,7 +676,7 @@ static void node_composit_buts_lensdist(uiLayout *layout, bContext *C, PointerRN
uiItemR(col, ptr, "use_fit", 0, NULL, 0);
}
-static void node_composit_buts_vecblur(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_vecblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -692,17 +692,17 @@ static void node_composit_buts_vecblur(uiLayout *layout, bContext *C, PointerRNA
uiItemR(layout, ptr, "use_curved", 0, NULL, 0);
}
-static void node_composit_buts_filter(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_filter(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "filter_type", 0, "", 0);
}
-static void node_composit_buts_flip(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_flip(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "axis", 0, "", 0);
}
-static void node_composit_buts_crop(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_crop(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -723,7 +723,7 @@ static void node_composit_buts_crop(uiLayout *layout, bContext *C, PointerRNA *p
}
}
-static void node_composit_buts_splitviewer(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_splitviewer(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row, *col;
@@ -733,7 +733,7 @@ static void node_composit_buts_splitviewer(uiLayout *layout, bContext *C, Pointe
uiItemR(col, ptr, "factor", 0, NULL, 0);
}
-static void node_composit_buts_map_value(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_map_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *sub, *col;
@@ -754,7 +754,7 @@ static void node_composit_buts_map_value(uiLayout *layout, bContext *C, PointerR
uiItemR(sub, ptr, "max", 0, "", 0);
}
-static void node_composit_buts_alphaover(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_alphaover(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -763,7 +763,7 @@ static void node_composit_buts_alphaover(uiLayout *layout, bContext *C, PointerR
uiItemR(col, ptr, "premul", 0, NULL, 0);
}
-static void node_composit_buts_hue_sat(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_hue_sat(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -773,12 +773,12 @@ static void node_composit_buts_hue_sat(uiLayout *layout, bContext *C, PointerRNA
uiItemR(col, ptr, "color_value", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_dilateerode(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_dilateerode(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "distance", 0, NULL, 0);
}
-static void node_composit_buts_diff_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_diff_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -787,7 +787,7 @@ static void node_composit_buts_diff_matte(uiLayout *layout, bContext *C, Pointer
uiItemR(col, ptr, "falloff", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_distance_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_distance_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -796,7 +796,7 @@ static void node_composit_buts_distance_matte(uiLayout *layout, bContext *C, Poi
uiItemR(col, ptr, "falloff", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_color_spill(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row, *col;
@@ -822,7 +822,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *C, Pointe
}
}
-static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -836,7 +836,7 @@ static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *C, Point
/*uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, NULL, 0); Removed for now*/
}
-static void node_composit_buts_color_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_color_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -846,7 +846,7 @@ static void node_composit_buts_color_matte(uiLayout *layout, bContext *C, Pointe
uiItemR(col, ptr, "color_value", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_channel_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col, *row;
@@ -872,7 +872,7 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext *C, Poin
uiItemR(col, ptr, "limit_min", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_luma_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_luma_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -881,17 +881,17 @@ static void node_composit_buts_luma_matte(uiLayout *layout, bContext *C, Pointer
uiItemR(col, ptr, "limit_min", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_map_uv(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_map_uv(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "alpha", 0, NULL, 0);
}
-static void node_composit_buts_id_mask(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "index", 0, NULL, 0);
}
-static void node_composit_buts_file_output(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col, *row;
@@ -916,17 +916,17 @@ static void node_composit_buts_file_output(uiLayout *layout, bContext *C, Pointe
uiItemR(row, ptr, "frame_end", 0, "End", 0);
}
-static void node_composit_buts_scale(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_scale(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "space", 0, "", 0);
}
-static void node_composit_buts_rotate(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_rotate(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "filter_type", 0, "", 0);
}
-static void node_composit_buts_invert(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_invert(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -935,17 +935,17 @@ static void node_composit_buts_invert(uiLayout *layout, bContext *C, PointerRNA
uiItemR(col, ptr, "invert_alpha", 0, NULL, 0);
}
-static void node_composit_buts_premulkey(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_premulkey(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "mapping", 0, "", 0);
}
-static void node_composit_buts_view_levels(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_view_levels(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "channel", UI_ITEM_R_EXPAND, NULL, 0);
}
-static void node_composit_buts_colorbalance(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *split, *col, *row;
@@ -990,7 +990,7 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *C, Point
}
-static void node_composit_buts_huecorrect(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_huecorrect(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiTemplateCurveMapping(layout, ptr, "mapping", 'h', 0, 0);
}
@@ -1143,7 +1143,7 @@ static void node_composit_set_butfunc(bNodeType *ntype)
/* ****************** BUTTON CALLBACKS FOR TEXTURE NODES ***************** */
-static void node_texture_buts_bricks(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_texture_buts_bricks(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -1156,7 +1156,7 @@ static void node_texture_buts_bricks(uiLayout *layout, bContext *C, PointerRNA *
uiItemR(col, ptr, "squash_frequency", 0, "Frequency", 0);
}
-static void node_texture_buts_proc(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
PointerRNA tex_ptr;
bNode *node= ptr->data;
@@ -1210,12 +1210,12 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *C, PointerRNA *pt
}
}
-static void node_texture_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_texture_buts_image(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiTemplateID(layout, C, ptr, "image", NULL, "IMAGE_OT_open", NULL);
}
-static void node_texture_buts_output(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_texture_buts_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "filepath", 0, "", 0);
}
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index dfc63e032d9..8316d79c9f0 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1066,7 +1066,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
//uiFreeBlocksWin(&sa->uiblocks, sa->win);
@@ -1078,7 +1078,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
snode->aspect= (v2d->cur.xmax - v2d->cur.xmin)/((float)ar->winx);
// XXX snode->curfont= uiSetCurFont_ext(snode->aspect);
- UI_view2d_constant_grid_draw(C, v2d);
+ UI_view2d_constant_grid_draw(v2d);
/* backdrop */
draw_nodespace_back_pix(ar, snode, color_manage);
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 20b5ad7a34f..dc6b9f342b3 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -5659,7 +5659,7 @@ void draw_outliner(const bContext *C)
UI_view2d_totRect_set(v2d, sizex, sizey);
/* set matrix for 2d-view controls */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* draw outliner stuff (background, hierachy lines and names) */
outliner_back(ar, soops);
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index f93ddc6efbe..ce6edc3a565 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -145,7 +145,7 @@ static void script_main_area_draw(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* data... */
// BPY_run_python_script(C, "/root/blender-svn/blender25/test.py", NULL);
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 7c6fd83c6aa..eb61633d44c 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -772,7 +772,7 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
}
/* setting up the view - actual drawing starts here */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
last_texid= glaGetOneInteger(GL_TEXTURE_2D);
glEnable(GL_TEXTURE_2D);
@@ -1016,7 +1016,7 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* calculate extents of sequencer strips/data
@@ -1029,7 +1029,7 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
draw_seq_backdrop(v2d);
/* regular grid-pattern over the rest of the view (i.e. frame grid lines) */
- UI_view2d_constant_grid_draw(C, v2d);
+ UI_view2d_constant_grid_draw(v2d);
seq_draw_sfra_efra(C, sseq, ar);
@@ -1043,17 +1043,17 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
}
/* current frame */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
if ((sseq->flag & SEQ_DRAWFRAMES)==0) flag |= DRAWCFRA_UNIT_SECONDS;
if ((sseq->flag & SEQ_NO_DRAW_CFRANUM)==0) flag |= DRAWCFRA_SHOW_NUMBOX;
ANIM_draw_cfra(C, v2d, flag);
/* markers */
- UI_view2d_view_orthoSpecial(C, v2d, 1);
+ UI_view2d_view_orthoSpecial(ar, v2d, 1);
draw_markers_time(C, DRAW_MARKERS_LINES);
/* preview range */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
ANIM_draw_previewrange(C, v2d);
/* overlap playhead */
diff --git a/source/blender/editors/space_sound/space_sound.c b/source/blender/editors/space_sound/space_sound.c
index 905e1d6cdd9..919395f3bff 100644
--- a/source/blender/editors/space_sound/space_sound.c
+++ b/source/blender/editors/space_sound/space_sound.c
@@ -153,7 +153,7 @@ static void sound_main_area_draw(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* data... */
@@ -194,7 +194,7 @@ static void sound_header_area_draw(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
/* set view2d view matrix for scrolling (without scrollers) */
- UI_view2d_view_ortho(C, &ar->v2d);
+ UI_view2d_view_ortho(&ar->v2d);
sound_header_buttons(C, ar);
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 5ee7ca3c3ef..4e1bc818ce4 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -384,7 +384,7 @@ static void text_main_area_draw(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- // UI_view2d_view_ortho(C, v2d);
+ // UI_view2d_view_ortho(v2d);
/* data... */
draw_text_main(st, ar);
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 0d3b0514122..37867890c15 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -467,15 +467,15 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* start and end frame */
time_draw_sfra_efra(C, stime, ar);
/* grid */
unit= (stime->flag & TIME_DRAWFRAMES)? V2D_UNIT_FRAMES: V2D_UNIT_SECONDS;
- grid= UI_view2d_grid_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
- UI_view2d_grid_draw(C, v2d, grid, (V2D_VERTICAL_LINES|V2D_VERTICAL_AXIS));
+ grid= UI_view2d_grid_calc(CTX_data_scene(C), v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy);
+ UI_view2d_grid_draw(v2d, grid, (V2D_VERTICAL_LINES|V2D_VERTICAL_AXIS));
UI_view2d_grid_free(grid);
/* keyframes */
@@ -488,7 +488,7 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
ANIM_draw_cfra(C, v2d, flag);
/* markers */
- UI_view2d_view_orthoSpecial(C, v2d, 1);
+ UI_view2d_view_orthoSpecial(ar, v2d, 1);
draw_markers_time(C, 0);
/* caches */
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index fb271556a9c..4cce166b36b 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -64,7 +64,7 @@
// - include support for editing the path verts
/* Set up drawing environment for drawing motion paths */
-void draw_motion_paths_init(Scene *scene, View3D *v3d, ARegion *ar)
+void draw_motion_paths_init(View3D *v3d, ARegion *ar)
{
RegionView3D *rv3d= ar->regiondata;
@@ -79,7 +79,7 @@ void draw_motion_paths_init(Scene *scene, View3D *v3d, ARegion *ar)
* i.e. draw_motion_paths_init() has been called
*/
// FIXME: the text is still drawn in the wrong space - it includes the current transforms of the object still...
-void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar,
+void draw_motion_path_instance(Scene *scene,
Object *ob, bPoseChannel *pchan, bAnimVizSettings *avs, bMotionPath *mpath)
{
//RegionView3D *rv3d= ar->regiondata;
@@ -283,7 +283,7 @@ void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar,
}
/* Clean up drawing environment after drawing motion paths */
-void draw_motion_paths_cleanup(Scene *scene, View3D *v3d, ARegion *ar)
+void draw_motion_paths_cleanup(View3D *v3d)
{
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
glPopMatrix();
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 71e52e723c5..6cbfc2cffe4 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -140,7 +140,7 @@ static void cp_shade_color3ub (char cp[], int offset)
}
/* This function sets the gl-color for coloring a certain bone (based on bcolor) */
-static short set_pchan_glColor (short colCode, int armflag, int boneflag, int constflag)
+static short set_pchan_glColor (short colCode, int boneflag, int constflag)
{
switch (colCode) {
case PCHAN_COLOR_NORMAL:
@@ -551,7 +551,7 @@ static void draw_bone_points(int dt, int armflag, unsigned int boneflag, int id)
}
else {
if (armflag & ARM_POSEMODE)
- set_pchan_glColor(PCHAN_COLOR_SOLID, armflag, boneflag, 0);
+ set_pchan_glColor(PCHAN_COLOR_SOLID, boneflag, 0);
else
UI_ThemeColor(TH_BONE_SOLID);
}
@@ -574,7 +574,7 @@ static void draw_bone_points(int dt, int armflag, unsigned int boneflag, int id)
}
else {
if (armflag & ARM_POSEMODE)
- set_pchan_glColor(PCHAN_COLOR_SOLID, armflag, boneflag, 0);
+ set_pchan_glColor(PCHAN_COLOR_SOLID, boneflag, 0);
else
UI_ThemeColor(TH_BONE_SOLID);
}
@@ -616,7 +616,7 @@ static float co[16] ={
/* smat, imat = mat & imat to draw screenaligned */
-static void draw_sphere_bone_dist(float smat[][4], float imat[][4], int boneflag, bPoseChannel *pchan, EditBone *ebone)
+static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel *pchan, EditBone *ebone)
{
float head, tail, length, dist;
float *headvec, *tailvec, dirvec[3];
@@ -782,7 +782,7 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], int armflag,
else UI_ThemeColor(TH_VERTEX);
}
else if (armflag & ARM_POSEMODE)
- set_pchan_glColor(PCHAN_COLOR_NORMAL, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag);
/* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED)==0) {
@@ -903,7 +903,7 @@ static void draw_sphere_bone(int dt, int armflag, int boneflag, int constflag, u
else UI_ThemeColorShade(TH_BONE_SOLID, -30);
}
else if (armflag & ARM_POSEMODE)
- set_pchan_glColor(PCHAN_COLOR_SPHEREBONE_END, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_SPHEREBONE_END, boneflag, constflag);
else if (dt==OB_SOLID)
UI_ThemeColorShade(TH_BONE_SOLID, -30);
@@ -933,7 +933,7 @@ static void draw_sphere_bone(int dt, int armflag, int boneflag, int constflag, u
else UI_ThemeColor(TH_BONE_SOLID);
}
else if (armflag & ARM_POSEMODE)
- set_pchan_glColor(PCHAN_COLOR_SPHEREBONE_BASE, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_SPHEREBONE_BASE, boneflag, constflag);
else if (dt == OB_SOLID)
UI_ThemeColor(TH_BONE_SOLID);
@@ -1003,7 +1003,7 @@ static void draw_line_bone(int armflag, int boneflag, int constflag, unsigned in
if (armflag & (ARM_EDITMODE|ARM_POSEMODE)) {
glLineWidth(4.0f);
if (armflag & ARM_POSEMODE)
- set_pchan_glColor(PCHAN_COLOR_NORMAL, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag);
else if (armflag & ARM_EDITMODE) {
UI_ThemeColor(TH_WIRE);
}
@@ -1048,7 +1048,7 @@ static void draw_line_bone(int armflag, int boneflag, int constflag, unsigned in
glLoadName(id & 0xFFFF); /* object tag, for bordersel optim */
if (armflag & ARM_POSEMODE)
- set_pchan_glColor(PCHAN_COLOR_LINEBONE, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_LINEBONE, boneflag, constflag);
}
glLineWidth(2.0);
@@ -1147,9 +1147,9 @@ static void draw_b_bone(int dt, int armflag, int boneflag, int constflag, unsign
/* colors for modes */
if (armflag & ARM_POSEMODE) {
if (dt <= OB_WIRE)
- set_pchan_glColor(PCHAN_COLOR_NORMAL, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag);
else
- set_pchan_glColor(PCHAN_COLOR_SOLID, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_SOLID, boneflag, constflag);
}
else if (armflag & ARM_EDITMODE) {
if (dt==OB_WIRE) {
@@ -1171,7 +1171,7 @@ static void draw_b_bone(int dt, int armflag, int boneflag, int constflag, unsign
glEnable(GL_LIGHTING);
if (armflag & ARM_POSEMODE)
- set_pchan_glColor(PCHAN_COLOR_SOLID, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_SOLID, boneflag, constflag);
else
UI_ThemeColor(TH_BONE_SOLID);
@@ -1186,7 +1186,7 @@ static void draw_b_bone(int dt, int armflag, int boneflag, int constflag, unsign
if (armflag & ARM_POSEMODE) {
if (constflag) {
/* set constraint colors */
- if (set_pchan_glColor(PCHAN_COLOR_CONSTS, armflag, boneflag, constflag)) {
+ if (set_pchan_glColor(PCHAN_COLOR_CONSTS, boneflag, constflag)) {
glEnable(GL_BLEND);
draw_b_bone_boxes(OB_SOLID, pchan, xwidth, length, zwidth);
@@ -1195,7 +1195,7 @@ static void draw_b_bone(int dt, int armflag, int boneflag, int constflag, unsign
}
/* restore colors */
- set_pchan_glColor(PCHAN_COLOR_NORMAL, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag);
}
}
@@ -1221,9 +1221,9 @@ static void draw_bone(int dt, int armflag, int boneflag, int constflag, unsigned
/* colors for posemode */
if (armflag & ARM_POSEMODE) {
if (dt <= OB_WIRE)
- set_pchan_glColor(PCHAN_COLOR_NORMAL, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag);
else
- set_pchan_glColor(PCHAN_COLOR_SOLID, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_SOLID, boneflag, constflag);
}
@@ -1245,7 +1245,7 @@ static void draw_bone(int dt, int armflag, int boneflag, int constflag, unsigned
else if (armflag & ARM_POSEMODE) {
if (constflag) {
/* draw constraint colors */
- if (set_pchan_glColor(PCHAN_COLOR_CONSTS, armflag, boneflag, constflag)) {
+ if (set_pchan_glColor(PCHAN_COLOR_CONSTS, boneflag, constflag)) {
glEnable(GL_BLEND);
draw_bone_solid_octahedral();
@@ -1254,7 +1254,7 @@ static void draw_bone(int dt, int armflag, int boneflag, int constflag, unsigned
}
/* restore colors */
- set_pchan_glColor(PCHAN_COLOR_NORMAL, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag);
}
}
draw_bone_octahedral();
@@ -1262,7 +1262,7 @@ static void draw_bone(int dt, int armflag, int boneflag, int constflag, unsigned
else {
/* solid */
if (armflag & ARM_POSEMODE)
- set_pchan_glColor(PCHAN_COLOR_SOLID, armflag, boneflag, constflag);
+ set_pchan_glColor(PCHAN_COLOR_SOLID, boneflag, constflag);
else
UI_ThemeColor(TH_BONE_SOLID);
draw_bone_solid_octahedral();
@@ -1283,7 +1283,7 @@ static void draw_custom_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obje
/* colors for posemode */
if (armflag & ARM_POSEMODE) {
- set_pchan_glColor(PCHAN_COLOR_NORMAL, armflag, boneflag, 0);
+ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, 0);
}
if (id != -1) {
@@ -1602,7 +1602,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
if (bone && !(bone->flag & (BONE_HIDDEN_P|BONE_NO_DEFORM|BONE_HIDDEN_PG))) {
if (bone->flag & (BONE_SELECTED)) {
if (bone->layer & arm->layer)
- draw_sphere_bone_dist(smat, imat, bone->flag, pchan, NULL);
+ draw_sphere_bone_dist(smat, imat, pchan, NULL);
}
}
}
@@ -1902,7 +1902,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
bone_matrix_translate_y(bmat, pchan->bone->length);
glMultMatrixf(bmat);
- drawaxes(pchan->bone->length*0.25f, 0, OB_ARROWS);
+ drawaxes(pchan->bone->length*0.25f, OB_ARROWS);
glPopMatrix();
}
@@ -1958,7 +1958,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
if (eBone->layer & arm->layer) {
if ((eBone->flag & (BONE_HIDDEN_A|BONE_NO_DEFORM))==0) {
if (eBone->flag & (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL))
- draw_sphere_bone_dist(smat, imat, eBone->flag, NULL, eBone);
+ draw_sphere_bone_dist(smat, imat, NULL, eBone);
}
}
}
@@ -2095,7 +2095,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt)
bone_matrix_translate_y(bmat, eBone->length);
glMultMatrixf(bmat);
- drawaxes(eBone->length*0.25f, 0, OB_ARROWS);
+ drawaxes(eBone->length*0.25f, OB_ARROWS);
glPopMatrix();
}
@@ -2123,16 +2123,16 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, ARegion *ar, Object *ob)
bPoseChannel *pchan;
/* setup drawing environment for paths */
- draw_motion_paths_init(scene, v3d, ar);
+ draw_motion_paths_init(v3d, ar);
/* draw paths where they exist and they releated bone is visible */
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
if ((pchan->bone->layer & arm->layer) && (pchan->mpath))
- draw_motion_path_instance(scene, v3d, ar, ob, pchan, avs, pchan->mpath);
+ draw_motion_path_instance(scene, ob, pchan, avs, pchan->mpath);
}
/* cleanup after drawing */
- draw_motion_paths_cleanup(scene, v3d, ar);
+ draw_motion_paths_cleanup(v3d);
}
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index cf511a8ad9b..0df2888f4a0 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -192,7 +192,7 @@ static int draw_tfaces3D__drawFaceOpts(void *userData, int index)
return 0;
}
-static void draw_tfaces3D(RegionView3D *rv3d, Object *ob, Mesh *me, DerivedMesh *dm)
+static void draw_tfaces3D(RegionView3D *rv3d, Mesh *me, DerivedMesh *dm)
{
struct { Mesh *me; EdgeHash *eh; } data;
@@ -671,7 +671,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o
/* draw edges and selected faces over textured mesh */
if(!(ob == scene->obedit) && faceselect)
- draw_tfaces3D(rv3d, ob, me, dm);
+ draw_tfaces3D(rv3d, me, dm);
/* reset from negative scale correction */
glFrontFace(GL_CCW);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 2206d744dc6..c9b8a086d22 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -398,8 +398,7 @@ static void draw_xyz_wire(float *c, float size, int axis)
}
-/* flag is same as for draw_object */
-void drawaxes(float size, int flag, char drawtype)
+void drawaxes(float size, char drawtype)
{
int axis;
float v1[3]= {0.0, 0.0, 0.0};
@@ -1463,7 +1462,7 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
* if not, ED_view3d_init_mats_rv3d() can be used for selection tools
* but would not give correct results with dupli's for eg. which dont
* use the object matrix in the useual way */
-static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s)
+static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
{
struct { void (*func)(void *userData, EditVert *eve, int x, int y, int index); void *userData; ViewContext vc; int clipVerts; } *data = userData;
EditVert *eve = EM_get_vert_for_index(index);
@@ -1547,7 +1546,7 @@ void mesh_foreachScreenEdge(ViewContext *vc, void (*func)(void *userData, EditEd
dm->release(dm);
}
-static void mesh_foreachScreenFace__mapFunc(void *userData, int index, float *cent, float *no)
+static void mesh_foreachScreenFace__mapFunc(void *userData, int index, float *cent, float *UNUSED(no))
{
struct { void (*func)(void *userData, EditFace *efa, int x, int y, int index); void *userData; ViewContext vc; } *data = userData;
EditFace *efa = EM_get_face_for_index(index);
@@ -1658,7 +1657,7 @@ static void draw_dm_face_normals(Scene *scene, DerivedMesh *dm)
glEnd();
}
-static void draw_dm_face_centers__mapFunc(void *userData, int index, float *cent, float *no)
+static void draw_dm_face_centers__mapFunc(void *userData, int index, float *cent, float *UNUSED(no))
{
EditFace *efa = EM_get_face_for_index(index);
int sel = *((int*) userData);
@@ -1702,7 +1701,7 @@ static void draw_dm_vert_normals(Scene *scene, DerivedMesh *dm)
}
/* Draw verts with color set based on selection */
-static void draw_dm_verts__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s)
+static void draw_dm_verts__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
{
struct { int sel; EditVert *eve_act; } * data = userData;
EditVert *eve = EM_get_vert_for_index(index);
@@ -1779,7 +1778,7 @@ static void draw_dm_edges_sel(DerivedMesh *dm, unsigned char *baseCol, unsigned
}
/* Draw edges */
-static int draw_dm_edges__setDrawOptions(void *userData, int index)
+static int draw_dm_edges__setDrawOptions(void *UNUSED(userData), int index)
{
return EM_get_edge_for_index(index)->h==0;
}
@@ -1789,7 +1788,7 @@ static void draw_dm_edges(DerivedMesh *dm)
}
/* Draw edges with color interpolated based on selection */
-static int draw_dm_edges_sel_interp__setDrawOptions(void *userData, int index)
+static int draw_dm_edges_sel_interp__setDrawOptions(void *UNUSED(userData), int index)
{
return EM_get_edge_for_index(index)->h==0;
}
@@ -1814,7 +1813,7 @@ static void draw_dm_edges_sel_interp(DerivedMesh *dm, unsigned char *baseCol, un
}
/* Draw only seam edges */
-static int draw_dm_edges_seams__setDrawOptions(void *userData, int index)
+static int draw_dm_edges_seams__setDrawOptions(void *UNUSED(userData), int index)
{
EditEdge *eed = EM_get_edge_for_index(index);
@@ -1826,7 +1825,7 @@ static void draw_dm_edges_seams(DerivedMesh *dm)
}
/* Draw only sharp edges */
-static int draw_dm_edges_sharp__setDrawOptions(void *userData, int index)
+static int draw_dm_edges_sharp__setDrawOptions(void *UNUSED(userData), int index)
{
EditEdge *eed = EM_get_edge_for_index(index);
@@ -1840,7 +1839,7 @@ static void draw_dm_edges_sharp(DerivedMesh *dm)
/* Draw faces with color set based on selection
* return 2 for the active face so it renders with stipple enabled */
-static int draw_dm_faces_sel__setDrawOptions(void *userData, int index, int *drawSmooth_r)
+static int draw_dm_faces_sel__setDrawOptions(void *userData, int index, int *UNUSED(drawSmooth_r))
{
struct { unsigned char *cols[3]; EditFace *efa_act; } * data = userData;
EditFace *efa = EM_get_face_for_index(index);
@@ -1872,7 +1871,7 @@ static void draw_dm_faces_sel(DerivedMesh *dm, unsigned char *baseCol, unsigned
dm->drawMappedFaces(dm, draw_dm_faces_sel__setDrawOptions, &data, 0, GPU_enable_material);
}
-static int draw_dm_creases__setDrawOptions(void *userData, int index)
+static int draw_dm_creases__setDrawOptions(void *UNUSED(userData), int index)
{
EditEdge *eed = EM_get_edge_for_index(index);
@@ -1890,7 +1889,7 @@ static void draw_dm_creases(DerivedMesh *dm)
glLineWidth(1.0);
}
-static int draw_dm_bweights__setDrawOptions(void *userData, int index)
+static int draw_dm_bweights__setDrawOptions(void *UNUSED(userData), int index)
{
EditEdge *eed = EM_get_edge_for_index(index);
@@ -1901,7 +1900,7 @@ static int draw_dm_bweights__setDrawOptions(void *userData, int index)
return 0;
}
}
-static void draw_dm_bweights__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s)
+static void draw_dm_bweights__mapFunc(void *UNUSED(userData), int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
{
EditVert *eve = EM_get_vert_for_index(index);
@@ -1936,7 +1935,7 @@ static void draw_dm_bweights(Scene *scene, DerivedMesh *dm)
/* EditMesh drawing routines*/
-static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit, EditMesh *em, DerivedMesh *cageDM, EditVert *eve_act)
+static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit, DerivedMesh *cageDM, EditVert *eve_act)
{
ToolSettings *ts= scene->toolsettings;
int sel;
@@ -2227,7 +2226,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
}
}
-static int draw_em_fancy__setFaceOpts(void *userData, int index, int *drawSmooth_r)
+static int draw_em_fancy__setFaceOpts(void *UNUSED(userData), int index, int *UNUSED(drawSmooth_r))
{
EditFace *efa = EM_get_face_for_index(index);
@@ -2239,7 +2238,7 @@ static int draw_em_fancy__setFaceOpts(void *userData, int index, int *drawSmooth
return 0;
}
-static int draw_em_fancy__setGLSLFaceOpts(void *userData, int index)
+static int draw_em_fancy__setGLSLFaceOpts(void *UNUSED(userData), int index)
{
EditFace *efa = EM_get_face_for_index(index);
@@ -2385,7 +2384,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object
if(em) {
// XXX retopo_matrix_update(v3d);
- draw_em_fancy_verts(scene, v3d, ob, em, cageDM, eve_act);
+ draw_em_fancy_verts(scene, v3d, ob, cageDM, eve_act);
if(me->drawflag & ME_DRAWNORMALS) {
UI_ThemeColor(TH_NORMAL);
@@ -2435,7 +2434,7 @@ static void draw_mesh_object_outline(View3D *v3d, Object *ob, DerivedMesh *dm)
}
}
-static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmooth_r)
+static int wpaint__setSolidDrawOptions(void *UNUSED(userData), int UNUSED(index), int *drawSmooth_r)
{
*drawSmooth_r = 1;
return 1;
@@ -4030,7 +4029,7 @@ static void draw_update_ptcache_edit(Scene *scene, Object *ob, PTCacheEdit *edit
psys_cache_edit_paths(scene, ob, edit, CFRA);
}
-static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, PTCacheEdit *edit, int dt)
+static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit)
{
ParticleCacheKey **cache, *path, *pkey;
PTCacheEditPoint *point;
@@ -4824,9 +4823,9 @@ static void draw_empty_cone (float size)
}
/* draw points on curve speed handles */
+#if 0 // XXX old animation system stuff
static void curve_draw_speed(Scene *scene, Object *ob)
{
-#if 0 // XXX old animation system stuff
Curve *cu= ob->data;
IpoCurve *icu;
BezTriple *bezt;
@@ -4852,8 +4851,8 @@ static void curve_draw_speed(Scene *scene, Object *ob)
glPointSize(1.0);
bglEnd();
-#endif // XXX old animation system stuff
}
+#endif // XXX old animation system stuff
static void draw_textcurs(float textcurs[][2])
@@ -5649,13 +5648,13 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
bAnimVizSettings *avs= &ob->avs;
/* setup drawing environment for paths */
- draw_motion_paths_init(scene, v3d, ar);
+ draw_motion_paths_init(v3d, ar);
/* draw motion path for object */
- draw_motion_path_instance(scene, v3d, ar, ob, NULL, avs, ob->mpath);
+ draw_motion_path_instance(scene, ob, NULL, avs, ob->mpath);
/* cleanup after drawing */
- draw_motion_paths_cleanup(scene, v3d, ar);
+ draw_motion_paths_cleanup(v3d);
}
/* multiply view with object matrix.
@@ -5879,9 +5878,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
else if(boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
empty_object= drawDispList(scene, v3d, rv3d, base, dt);
-
- if(cu->path)
- curve_draw_speed(scene, ob);
+
+//XXX old animsys if(cu->path)
+// curve_draw_speed(scene, ob);
}
break;
case OB_MBALL:
@@ -5900,7 +5899,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
case OB_EMPTY:
if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0)
- drawaxes(ob->empty_drawsize, flag, ob->empty_drawtype);
+ drawaxes(ob->empty_drawsize, ob->empty_drawtype);
break;
case OB_LAMP:
if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
@@ -5926,7 +5925,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
break;
default:
if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
- drawaxes(1.0, flag, OB_ARROWS);
+ drawaxes(1.0, OB_ARROWS);
}
}
@@ -5998,7 +5997,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
PTCacheEdit *edit = PE_create_current(scene, ob);
if(edit) {
glLoadMatrixf(rv3d->viewmat);
- draw_ptcache_edit(scene, v3d, rv3d, ob, edit, dt);
+ draw_ptcache_edit(scene, v3d, edit);
glMultMatrixf(ob->obmat);
}
}
@@ -6052,7 +6051,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
// #if 0
smd->domain->tex = NULL;
GPU_create_smoke(smd, 0);
- draw_volume(scene, ar, v3d, base, smd->domain->tex, smd->domain->p0, smd->domain->p1, smd->domain->res, smd->domain->dx, smd->domain->tex_shadow);
+ draw_volume(ar, smd->domain->tex, smd->domain->p0, smd->domain->p1, smd->domain->res, smd->domain->dx, smd->domain->tex_shadow);
GPU_free_smoke(smd);
// #endif
#if 0
@@ -6103,7 +6102,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
{
smd->domain->tex = NULL;
GPU_create_smoke(smd, 1);
- draw_volume(scene, ar, v3d, base, smd->domain->tex, smd->domain->p0, smd->domain->p1, smd->domain->res_wt, smd->domain->dx_wt, smd->domain->tex_shadow);
+ draw_volume(ar, smd->domain->tex, smd->domain->p0, smd->domain->p1, smd->domain->res_wt, smd->domain->dx_wt, smd->domain->tex_shadow);
GPU_free_smoke(smd);
}
}
@@ -6126,7 +6125,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(dtx && (G.f & G_RENDER_OGL)==0) {
if(dtx & OB_AXIS) {
- drawaxes(1.0f, flag, OB_ARROWS);
+ drawaxes(1.0f, OB_ARROWS);
}
if(dtx & OB_BOUNDBOX) {
if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0)
@@ -6266,7 +6265,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* ***************** BACKBUF SEL (BBS) ********* */
-static void bbs_mesh_verts__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s)
+static void bbs_mesh_verts__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
{
int offset = (intptr_t) userData;
EditVert *eve = EM_get_vert_for_index(index);
@@ -6302,7 +6301,7 @@ static void bbs_mesh_wire(DerivedMesh *dm, int offset)
dm->drawMappedEdges(dm, bbs_mesh_wire__setDrawOptions, (void*)(intptr_t) offset);
}
-static int bbs_mesh_solid__setSolidDrawOptions(void *userData, int index, int *drawSmooth_r)
+static int bbs_mesh_solid__setSolidDrawOptions(void *userData, int index, int *UNUSED(drawSmooth_r))
{
if (EM_get_face_for_index(index)->h==0) {
if (userData) {
@@ -6314,7 +6313,7 @@ static int bbs_mesh_solid__setSolidDrawOptions(void *userData, int index, int *d
}
}
-static void bbs_mesh_solid__drawCenter(void *userData, int index, float *cent, float *no)
+static void bbs_mesh_solid__drawCenter(void *UNUSED(userData), int index, float *cent, float *UNUSED(no))
{
EditFace *efa = EM_get_face_for_index(index);
@@ -6346,13 +6345,13 @@ static void bbs_mesh_solid_EM(Scene *scene, View3D *v3d, Object *ob, DerivedMesh
}
}
-static int bbs_mesh_solid__setDrawOpts(void *userData, int index, int *drawSmooth_r)
+static int bbs_mesh_solid__setDrawOpts(void *UNUSED(userData), int index, int *UNUSED(drawSmooth_r))
{
WM_set_framebuffer_index_color(index+1);
return 1;
}
-static int bbs_mesh_solid_hide__setDrawOpts(void *userData, int index, int *drawSmooth_r)
+static int bbs_mesh_solid_hide__setDrawOpts(void *userData, int index, int *UNUSED(drawSmooth_r))
{
Mesh *me = userData;
@@ -6499,7 +6498,7 @@ void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object
draw_object_mesh_instance(scene, v3d, rv3d, ob, dt, outline);
break;
case OB_EMPTY:
- drawaxes(ob->empty_drawsize, 0, ob->empty_drawtype);
+ drawaxes(ob->empty_drawsize, ob->empty_drawtype);
break;
}
}
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index 678920f8173..611cf68d81c 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -175,7 +175,7 @@ static int larger_pow2(int n)
return n*2;
}
-void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture *tex, float *min, float *max, int res[3], float dx, GPUTexture *tex_shadow)
+void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3], float dx, GPUTexture *tex_shadow)
{
RegionView3D *rv3d= ar->regiondata;
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index d7ab8034286..5ca8843b658 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -304,7 +304,7 @@ static char *view3d_modeselect_pup(Scene *scene)
}
-static void do_view3d_header_buttons(bContext *C, void *arg, int event)
+static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event)
{
wmWindow *win= CTX_wm_window(C);
ToolSettings *ts= CTX_data_tool_settings(C);
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 4065b159ccf..49ef803b1af 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -93,11 +93,11 @@ void VIEW3D_OT_drawtype(struct wmOperatorType *ot);
void view3d_boxview_copy(ScrArea *sa, ARegion *ar);
/* drawanim.c */
-void draw_motion_paths_init(Scene *scene, View3D *v3d, struct ARegion *ar);
-void draw_motion_path_instance(Scene *scene, View3D *v3d, struct ARegion *ar,
+void draw_motion_paths_init(View3D *v3d, struct ARegion *ar);
+void draw_motion_path_instance(Scene *scene,
struct Object *ob, struct bPoseChannel *pchan,
struct bAnimVizSettings *avs, struct bMotionPath *mpath);
-void draw_motion_paths_cleanup(Scene *scene, View3D *v3d, struct ARegion *ar);
+void draw_motion_paths_cleanup(View3D *v3d);
@@ -106,7 +106,7 @@ void draw_object(Scene *scene, struct ARegion *ar, View3D *v3d, Base *base, int
int draw_glsl_material(Scene *scene, struct Object *ob, View3D *v3d, int dt);
void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, struct Object *ob, int dt, int outline);
void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, struct Object *ob);
-void drawaxes(float size, int flag, char drawtype);
+void drawaxes(float size, char drawtype);
void view3d_cached_text_draw_begin(void);
void view3d_cached_text_draw_add(float x, float y, float z, char *str, short xoffs, short flag);
@@ -189,7 +189,7 @@ ARegion *view3d_has_buttons_region(ScrArea *sa);
ARegion *view3d_has_tools_region(ScrArea *sa);
/* draw_volume.c */
-void draw_volume(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct Base *base, struct GPUTexture *tex, float *min, float *max, int res[3], float dx, struct GPUTexture *tex_shadow);
+void draw_volume(struct ARegion *ar, struct GPUTexture *tex, float *min, float *max, int res[3], float dx, struct GPUTexture *tex_shadow);
#endif /* ED_VIEW3D_INTERN_H */