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:
authorAntonio Vazquez <blendergit@gmail.com>2021-03-05 12:36:57 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-03-05 12:36:57 +0300
commit99e186671247b7dbcb01e9c95709a251fdbefc87 (patch)
tree51535b58ed654bfcf24d1806572cb6640f3fbe5c
parentb5d154f400e46ba322f0e08a231bb2557bf51a1e (diff)
Cleanup: Use boolean in WM_cursor_wait
-rw-r--r--source/blender/editors/armature/armature_relations.c4
-rw-r--r--source/blender/editors/curve/editcurve.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_mesh.c4
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c4
-rw-r--r--source/blender/editors/object/object_bake.c2
-rw-r--r--source/blender/editors/object/object_bake_api.c2
-rw-r--r--source/blender/editors/object/object_relations.c8
-rw-r--r--source/blender/editors/render/render_internal.c4
-rw-r--r--source/blender/editors/render/render_shading.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops_solve.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops_track.c2
-rw-r--r--source/blender/editors/space_image/image_ops.c4
-rw-r--r--source/blender/python/intern/bpy_rna.c2
-rw-r--r--source/blender/windowmanager/intern/wm_files.c8
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c4
15 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 4dbe448c4ec..66ca38ce218 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -624,7 +624,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
bool ok = false;
/* set wait cursor in case this takes a while */
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
uint bases_len = 0;
Base **bases = BKE_view_layer_array_from_bases_in_edit_mode_unique_data(
@@ -709,7 +709,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
MEM_freeN(bases);
/* Recalculate/redraw + cleanup */
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
if (ok) {
BKE_report(op->reports, RPT_INFO, "Separated bones");
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 0593cedb5a1..33ef6a5d026 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1359,7 +1359,7 @@ static int separate_exec(bContext *C, wmOperator *op)
int error_generic;
} status = {0};
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
uint bases_len = 0;
Base **bases = BKE_view_layer_array_from_bases_in_edit_mode_unique_data(
@@ -1426,7 +1426,7 @@ static int separate_exec(bContext *C, wmOperator *op)
status.changed++;
}
MEM_freeN(bases);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
if (status.unselected == bases_len) {
BKE_report(op->reports, RPT_ERROR, "No point was selected");
diff --git a/source/blender/editors/gpencil/gpencil_mesh.c b/source/blender/editors/gpencil/gpencil_mesh.c
index 7e6b42f284b..b7ed77801c0 100644
--- a/source/blender/editors/gpencil/gpencil_mesh.c
+++ b/source/blender/editors/gpencil/gpencil_mesh.c
@@ -251,7 +251,7 @@ static int gpencil_bake_mesh_animation_exec(bContext *C, wmOperator *op)
gpd->draw_mode = (project_type == GP_REPROJECT_KEEP) ? GP_DRAWMODE_3D : GP_DRAWMODE_2D;
/* Set cursor to indicate working. */
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
GP_SpaceConversion gsc = {NULL};
SnapObjectContext *sctx = NULL;
@@ -385,7 +385,7 @@ static int gpencil_bake_mesh_animation_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
/* Reset cursor. */
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
/* done */
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 7502b77ae02..68ac2842bab 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -1967,9 +1967,9 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op)
static int edbm_duplicate_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
edbm_duplicate_exec(C, op);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 9618774eea8..a5cad4e087c 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -572,7 +572,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op)
G.is_break = false;
WM_jobs_start(CTX_wm_manager(C), wm_job);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
/* add modal handler for ESC */
WM_event_add_modal_handler(C, op);
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 9ec0c625f71..610551e8539 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -1897,7 +1897,7 @@ static int bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)
WM_jobs_start(CTX_wm_manager(C), wm_job);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
/* add modal handler for ESC */
WM_event_add_modal_handler(C, op);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 5a2ef1c6556..e74d04ab17f 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -893,10 +893,10 @@ bool ED_object_parent_set(ReportList *reports,
reports, depsgraph, scene, ob, par, ARM_GROUPS_ENVELOPE, xmirror);
}
else if (partype == PAR_ARMATURE_AUTO) {
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
ED_object_vgroup_calc_from_armature(
reports, depsgraph, scene, ob, par, ARM_GROUPS_AUTO, xmirror);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
}
/* get corrected inverse */
ob->partype = PAROBJECT;
@@ -912,9 +912,9 @@ bool ED_object_parent_set(ReportList *reports,
ED_gpencil_add_armature_weights(C, reports, ob, par, GP_PAR_ARMATURE_NAME);
}
else if (ELEM(partype, PAR_ARMATURE_AUTO, PAR_ARMATURE_ENVELOPE)) {
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
ED_gpencil_add_armature_weights(C, reports, ob, par, GP_PAR_ARMATURE_AUTO);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
}
/* get corrected inverse */
ob->partype = PAROBJECT;
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index b525d8a373e..1f59e361526 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -938,7 +938,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
}
/* handle UI stuff */
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
/* flush sculpt and editmode changes */
ED_editors_flush_edits_ex(bmain, true, false);
@@ -1058,7 +1058,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
WM_jobs_start(CTX_wm_manager(C), wm_job);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, scene);
/* we set G.is_rendering here already instead of only in the job, this ensure
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 32d4abcabd4..bfad79a1da9 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -1224,7 +1224,7 @@ static int light_cache_bake_invoke(bContext *C, wmOperator *op, const wmEvent *U
WM_jobs_start(wm, wm_job);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
return OPERATOR_RUNNING_MODAL;
}
diff --git a/source/blender/editors/space_clip/tracking_ops_solve.c b/source/blender/editors/space_clip/tracking_ops_solve.c
index b65dc909d5f..96504651e44 100644
--- a/source/blender/editors/space_clip/tracking_ops_solve.c
+++ b/source/blender/editors/space_clip/tracking_ops_solve.c
@@ -244,7 +244,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
G.is_break = false;
WM_jobs_start(CTX_wm_manager(C), wm_job);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
/* add modal handler for ESC */
WM_event_add_modal_handler(C, op);
diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c
index e480ec2db05..9882304d97d 100644
--- a/source/blender/editors/space_clip/tracking_ops_track.c
+++ b/source/blender/editors/space_clip/tracking_ops_track.c
@@ -356,7 +356,7 @@ static int track_markers(bContext *C, wmOperator *op, bool use_job)
G.is_break = false;
WM_jobs_start(CTX_wm_manager(C), wm_job);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
/* Add modal handler for ESC. */
WM_event_add_modal_handler(C, op);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 4008ca228ac..fc3619f01b9 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1816,11 +1816,11 @@ static bool save_image_op(
opts->save_as_render = (RNA_struct_find_property(op->ptr, "save_as_render") &&
RNA_boolean_get(op->ptr, "save_as_render"));
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
bool ok = BKE_image_save(op->reports, bmain, ima, iuser, opts);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
/* Remember file path for next save. */
BLI_strncpy(G.ima, opts->filepath, sizeof(G.ima));
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index bad6c4b4b56..cdf121a6864 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -9007,7 +9007,7 @@ static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_cla
#if 0
if (PyDict_GetItem(((PyTypeObject *)py_class)->tp_dict, bpy_intern_str_bl_rna) == NULL) {
- PWM_cursor_wait(0);
+ PWM_cursor_wait(false);
PyErr_SetString(PyExc_ValueError, "unregister_class(): not a registered as a subclass");
return NULL;
}
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index d7b33d20c0f..13f3afdfc4c 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -711,7 +711,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
/* so we can get the error message */
errno = 0;
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
wm_file_read_pre(C, use_data, use_userdef);
@@ -809,7 +809,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
}
}
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
return success;
}
@@ -1498,7 +1498,7 @@ static bool wm_file_write(bContext *C,
}
/* don't forget not to return without! */
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
ED_editors_flush_edits(bmain);
@@ -1560,7 +1560,7 @@ static bool wm_file_write(bContext *C,
MEM_freeN(thumb);
}
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
return ok;
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index fa34c561147..660e502a3d7 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3234,7 +3234,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
*/
struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
- WM_cursor_wait(1);
+ WM_cursor_wait(true);
double time_start = PIL_check_seconds_timer();
@@ -3257,7 +3257,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
RNA_enum_description(redraw_timer_type_items, type, &infostr);
- WM_cursor_wait(0);
+ WM_cursor_wait(false);
BKE_reportf(op->reports,
RPT_WARNING,