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>2012-08-12 01:35:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-12 01:35:24 +0400
commitc567cf3fab5b962a4166ef44f45c80941021b60d (patch)
treef3b257cdd6ec3c6241395ca2bb815cc82a428506 /source/blender/editors
parentf2d06dc257ec9c4667fd9964243b032fed2d21c3 (diff)
code cleanup: WM naming conventions
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
-rw-r--r--source/blender/editors/mesh/editface.c2
-rw-r--r--source/blender/editors/object/object_bake.c4
-rw-r--r--source/blender/editors/object/object_modifier.c2
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c2
-rw-r--r--source/blender/editors/physics/physics_fluid.c2
-rw-r--r--source/blender/editors/physics/physics_pointcache.c4
-rw-r--r--source/blender/editors/render/render_internal.c2
-rw-r--r--source/blender/editors/render/render_preview.c6
-rw-r--r--source/blender/editors/screen/screendump.c2
-rw-r--r--source/blender/editors/space_clip/clip_ops.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c4
-rw-r--r--source/blender/editors/space_file/filelist.c2
-rw-r--r--source/blender/editors/space_image/image_ops.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c4
-rw-r--r--source/blender/editors/space_view3d/drawobject.c16
17 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index ce9e63076fb..76445bc5085 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -5222,13 +5222,13 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
/* number editing */
if (state == BUTTON_STATE_NUM_EDITING) {
if (ui_is_a_warp_but(but))
- WM_cursor_grab(CTX_wm_window(C), TRUE, TRUE, NULL);
+ WM_cursor_grab_enable(CTX_wm_window(C), TRUE, TRUE, NULL);
ui_numedit_begin(but, data);
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
ui_numedit_end(but, data);
if (ui_is_a_warp_but(but))
- WM_cursor_ungrab(CTX_wm_window(C));
+ WM_cursor_grab_disable(CTX_wm_window(C));
}
/* menu open */
if (state == BUTTON_STATE_MENU_OPEN)
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index bce69cb7d1d..62600c7fe6b 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -521,7 +521,7 @@ int paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], in
if (!facesel_face_pick(C, me, ob, mval, &index, 1))
return 0;
- if (index >= me->totpoly || index < 0)
+ if (index >= me->totpoly)
return 0;
mpoly_sel = me->mpoly + index;
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 2e28db8ad8e..c3093259fd8 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -1256,7 +1256,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op)
/* setup job */
steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Multires Bake", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS);
- WM_jobs_customdata(steve, bkr, multiresbake_freejob);
+ WM_jobs_customdata_set(steve, bkr, multiresbake_freejob);
WM_jobs_timer(steve, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
WM_jobs_callbacks(steve, multiresbake_startjob, NULL, NULL, NULL);
@@ -1483,7 +1483,7 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
/* setup job */
steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Texture Bake", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS);
- WM_jobs_customdata(steve, bkr, bake_freejob);
+ WM_jobs_customdata_set(steve, bkr, bake_freejob);
WM_jobs_timer(steve, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
WM_jobs_callbacks(steve, bake_startjob, NULL, bake_update, NULL);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index b47269097fb..2bace9c30d4 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -2187,7 +2187,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
oj->och = och;
oj->omd = omd;
- WM_jobs_customdata(steve, oj, oceanbake_free);
+ WM_jobs_customdata_set(steve, oj, oceanbake_free);
WM_jobs_timer(steve, 0.1, NC_OBJECT | ND_MODIFIER, NC_OBJECT | ND_MODIFIER);
WM_jobs_callbacks(steve, oceanbake_startjob, NULL, NULL, oceanbake_endjob);
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index bc09df734a6..70fe87e5c01 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -299,7 +299,7 @@ static int dynamicPaint_bakeImageSequence(bContext *C, DynamicPaintSurface *surf
if (blender_test_break()) return 0;
/* Update progress bar cursor */
- WM_timecursor(win, (int)progress);
+ WM_cursor_time(win, (int)progress);
/* calculate a frame */
scene->r.cfra = (int)frame;
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 1c4a4314d45..10a76825984 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -1071,7 +1071,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Fluid Simulation", WM_JOB_PROGRESS);
/* setup job */
- WM_jobs_customdata(steve, fb, fluidbake_free);
+ WM_jobs_customdata_set(steve, fb, fluidbake_free);
WM_jobs_timer(steve, 0.1, NC_SCENE|ND_FRAME, NC_SCENE|ND_FRAME);
WM_jobs_callbacks(steve, fluidbake_startjob, NULL, NULL, fluidbake_endjob);
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 6e772f66a6a..218ae628d3f 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -111,7 +111,7 @@ static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
* and pointcache baking will be reimplemented with
* the job system soon anyways. */
if (win) {
- baker.progressbar = (void (*)(void *, int))WM_timecursor;
+ baker.progressbar = (void (*)(void *, int))WM_cursor_time;
baker.progressend = (void (*)(void *))WM_cursor_restore;
baker.progresscontext = win;
}
@@ -215,7 +215,7 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
* and pointcache baking will be reimplemented with
* the job system soon anyways. */
if (win) {
- baker.progressbar = (void (*)(void *, int))WM_timecursor;
+ baker.progressbar = (void (*)(void *, int))WM_cursor_time;
baker.progressend = (void (*)(void *))WM_cursor_restore;
baker.progresscontext = win;
}
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 8a61af61239..ae1b82c6690 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -565,7 +565,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
else name = "Render";
steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, name, jobflag);
- WM_jobs_customdata(steve, rj, render_freejob);
+ WM_jobs_customdata_set(steve, rj, render_freejob);
WM_jobs_timer(steve, 0.2, NC_SCENE | ND_RENDER_RESULT, 0);
WM_jobs_callbacks(steve, render_startjob, NULL, NULL, render_endjob);
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index c7f48154970..03906c99c74 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -1031,7 +1031,7 @@ void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *r
ip = MEM_callocN(sizeof(IconPreview), "icon preview");
/* render all resolutions from suspended job too */
- old_ip = WM_jobs_get_customdata(steve);
+ old_ip = WM_jobs_customdata_get(steve);
if (old_ip)
BLI_movelisttolist(&ip->sizes, &old_ip->sizes);
@@ -1043,7 +1043,7 @@ void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *r
icon_preview_add_size(ip, rect, sizex, sizey);
/* setup job */
- WM_jobs_customdata(steve, ip, icon_preview_free);
+ WM_jobs_customdata_set(steve, ip, icon_preview_free);
WM_jobs_timer(steve, 0.25, NC_MATERIAL, NC_MATERIAL);
WM_jobs_callbacks(steve, icon_preview_startjob_all_sizes, NULL, NULL, icon_preview_endjob);
@@ -1072,7 +1072,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M
else sp->col[0] = sp->col[1] = sp->col[2] = sp->col[3] = 1.0f;
/* setup job */
- WM_jobs_customdata(steve, sp, shader_preview_free);
+ WM_jobs_customdata_set(steve, sp, shader_preview_free);
WM_jobs_timer(steve, 0.1, NC_MATERIAL, NC_MATERIAL);
WM_jobs_callbacks(steve, common_preview_startjob, NULL, shader_preview_updatejob, NULL);
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 79ff516b362..166a4943db0 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -420,7 +420,7 @@ static int screencast_exec(bContext *C, wmOperator *op)
BKE_reports_init(&sj->reports, RPT_PRINT);
/* setup job */
- WM_jobs_customdata(steve, sj, screenshot_freejob);
+ WM_jobs_customdata_set(steve, sj, screenshot_freejob);
WM_jobs_timer(steve, 0.1, 0, NC_SCREEN | ND_SCREENCAST);
WM_jobs_callbacks(steve, screenshot_startjob, NULL, screenshot_updatejob, NULL);
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 2313b176073..b8657f9e688 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -1054,7 +1054,7 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
clip->proxy.build_size_flag, clip->proxy.quality);
}
- WM_jobs_customdata(steve, pj, proxy_freejob);
+ WM_jobs_customdata_set(steve, pj, proxy_freejob);
WM_jobs_timer(steve, 0.2, NC_MOVIECLIP | ND_DISPLAY, 0);
WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob);
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 4283c6f77c7..bf0a6617e2b 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -1262,7 +1262,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
/* setup job */
steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Track Markers", WM_JOB_PROGRESS);
- WM_jobs_customdata(steve, tmj, track_markers_freejob);
+ WM_jobs_customdata_set(steve, tmj, track_markers_freejob);
/* if there's delay set in tracking job, tracking should happen
* with fixed FPS. To deal with editor refresh we have to synchronize
@@ -1493,7 +1493,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
/* setup job */
steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Solve Camera", WM_JOB_PROGRESS);
- WM_jobs_customdata(steve, scj, solve_camera_freejob);
+ WM_jobs_customdata_set(steve, scj, solve_camera_freejob);
WM_jobs_timer(steve, 0.1, NC_MOVIECLIP | NA_EVALUATED, 0);
WM_jobs_callbacks(steve, solve_camera_startjob, NULL, solve_camera_updatejob, NULL);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 2a99e479a46..27db7907e30 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1369,7 +1369,7 @@ void thumbnails_start(struct FileList *filelist, const struct bContext *C)
/* setup job */
steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), filelist, "Thumbnails", 0);
- WM_jobs_customdata(steve, tj, thumbnails_free);
+ WM_jobs_customdata_set(steve, tj, thumbnails_free);
WM_jobs_timer(steve, 0.5, NC_WINDOW, NC_WINDOW);
WM_jobs_callbacks(steve, thumbnails_startjob, NULL, thumbnails_update, NULL);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 38a2e9725ff..1f9a60898f6 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -2252,7 +2252,7 @@ static int image_record_composite_apply(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
ImBuf *ibuf;
- WM_timecursor(CTX_wm_window(C), scene->r.cfra);
+ WM_cursor_time(CTX_wm_window(C), scene->r.cfra);
// XXX scene->nodetree->test_break= blender_test_break;
// XXX scene->nodetree->test_break= NULL;
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 11f070b483d..60375e9ab02 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -189,7 +189,7 @@ void ED_node_composite_job(const bContext *C, struct bNodeTree *nodetree, Scene
cj->ntree = nodetree;
/* setup job */
- WM_jobs_customdata(steve, cj, compo_freejob);
+ WM_jobs_customdata_set(steve, cj, compo_freejob);
WM_jobs_timer(steve, 0.1, NC_SCENE, NC_SCENE | ND_COMPO_RESULT);
WM_jobs_callbacks(steve, compo_startjob, compo_initjob, compo_updatejob, NULL);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 7cc6e279ff2..b4832306daf 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -188,7 +188,7 @@ static void seq_proxy_build_job(const bContext *C)
steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Building Proxies", WM_JOB_PROGRESS);
- pj = WM_jobs_get_customdata(steve);
+ pj = WM_jobs_customdata_get(steve);
if (!pj) {
pj = MEM_callocN(sizeof(ProxyJob), "proxy rebuild job");
@@ -196,7 +196,7 @@ static void seq_proxy_build_job(const bContext *C)
pj->scene = scene;
pj->main = CTX_data_main(C);
- WM_jobs_customdata(steve, pj, proxy_freejob);
+ WM_jobs_customdata_set(steve, pj, proxy_freejob);
WM_jobs_timer(steve, 0.1, NC_SCENE | ND_SEQUENCER, NC_SCENE | ND_SEQUENCER);
WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob);
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 3803ac6593a..173bff61be6 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -7277,7 +7277,7 @@ static void bbs_obmode_mesh_verts__mapFunc(void *userData, int index, const floa
int offset = (intptr_t) data->offset;
if (!(mv->flag & ME_HIDE)) {
- WM_set_framebuffer_index_color(offset + index);
+ WM_framebuffer_index_set(offset + index);
bglVertex3fv(co);
}
}
@@ -7304,7 +7304,7 @@ static void bbs_mesh_verts__mapFunc(void *userData, int index, const float co[3]
BMVert *eve = EDBM_vert_at_index(ptrs[1], index);
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
- WM_set_framebuffer_index_color(offset + index);
+ WM_framebuffer_index_set(offset + index);
bglVertex3fv(co);
}
}
@@ -7326,7 +7326,7 @@ static DMDrawOption bbs_mesh_wire__setDrawOptions(void *userData, int index)
BMEdge *eed = EDBM_edge_at_index(ptrs[1], index);
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
- WM_set_framebuffer_index_color(offset + index);
+ WM_framebuffer_index_set(offset + index);
return DM_DRAW_OPTION_NORMAL;
}
else {
@@ -7345,7 +7345,7 @@ static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int inde
if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
if (((void **)userData)[1]) {
- WM_set_framebuffer_index_color(index + 1);
+ WM_framebuffer_index_set(index + 1);
}
return DM_DRAW_OPTION_NORMAL;
}
@@ -7359,7 +7359,7 @@ static void bbs_mesh_solid__drawCenter(void *userData, int index, const float ce
BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index);
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
- WM_set_framebuffer_index_color(index + 1);
+ WM_framebuffer_index_set(index + 1);
bglVertex3fv(cent);
}
@@ -7392,7 +7392,7 @@ static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d,
static DMDrawOption bbs_mesh_solid__setDrawOpts(void *UNUSED(userData), int index)
{
- WM_set_framebuffer_index_color(index + 1);
+ WM_framebuffer_index_set(index + 1);
return DM_DRAW_OPTION_NORMAL;
}
@@ -7401,7 +7401,7 @@ static DMDrawOption bbs_mesh_solid_hide__setDrawOpts(void *userData, int index)
Mesh *me = userData;
if (!(me->mpoly[index].flag & ME_HIDE)) {
- WM_set_framebuffer_index_color(index + 1);
+ WM_framebuffer_index_set(index + 1);
return DM_DRAW_OPTION_NORMAL;
}
else {
@@ -7409,7 +7409,7 @@ static DMDrawOption bbs_mesh_solid_hide__setDrawOpts(void *userData, int index)
}
}
-/* must have called WM_set_framebuffer_index_color beforehand */
+/* must have called WM_framebuffer_index_set beforehand */
static DMDrawOption bbs_mesh_solid_hide2__setDrawOpts(void *userData, int index)
{
Mesh *me = userData;