diff --git a/source/blender/editors/armature/pose_edit.cc b/source/blender/editors/armature/pose_edit.cc index fe68ab16d07..a9846717192 100644 --- a/source/blender/editors/armature/pose_edit.cc +++ b/source/blender/editors/armature/pose_edit.cc @@ -424,9 +424,9 @@ static int pose_clear_paths_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static std::string pose_clear_paths_description(bContext * /*C*/, - wmOperatorType * /*ot*/, - PointerRNA *ptr) +static std::string pose_clear_paths_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { const bool only_selected = RNA_boolean_get(ptr, "only_selected"); if (only_selected) { @@ -444,7 +444,7 @@ void POSE_OT_paths_clear(wmOperatorType *ot) /* api callbacks */ ot->exec = pose_clear_paths_exec; ot->poll = ED_operator_posemode_exclusive; - ot->get_description = pose_clear_paths_description; + ot->get_description = pose_clear_paths_get_description; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc index 855ee376d4b..6253b76dd9e 100644 --- a/source/blender/editors/asset/intern/asset_ops.cc +++ b/source/blender/editors/asset/intern/asset_ops.cc @@ -361,9 +361,9 @@ static bool asset_clear_poll(bContext *C, const Span ids) static std::string asset_clear_get_description(bContext * /*C*/, wmOperatorType * /*ot*/, - PointerRNA *values) + PointerRNA *ptr) { - const bool set_fake_user = RNA_boolean_get(values, "set_fake_user"); + const bool set_fake_user = RNA_boolean_get(ptr, "set_fake_user"); if (!set_fake_user) { return ""; } diff --git a/source/blender/editors/mesh/editmesh_select.cc b/source/blender/editors/mesh/editmesh_select.cc index 09dc53c4219..35ab09032a0 100644 --- a/source/blender/editors/mesh/editmesh_select.cc +++ b/source/blender/editors/mesh/editmesh_select.cc @@ -1405,18 +1405,16 @@ static int edbm_select_mode_invoke(bContext *C, wmOperator *op, const wmEvent *e static std::string edbm_select_mode_get_description(bContext * /*C*/, wmOperatorType * /*ot*/, - PointerRNA *values) + PointerRNA *ptr) { - const int type = RNA_enum_get(values, "type"); + const int type = RNA_enum_get(ptr, "type"); /* Because the special behavior for shift and ctrl click depend on user input, they may be * incorrect if the operator is used from a script or from a special button. So only return the * specialized descriptions if only the "type" is set, which conveys that the operator is meant * to be used with the logic in the `invoke` method. */ - if (RNA_struct_property_is_set(values, "type") && - !RNA_struct_property_is_set(values, "use_extend") && - !RNA_struct_property_is_set(values, "use_expand") && - !RNA_struct_property_is_set(values, "action")) + if (RNA_struct_property_is_set(ptr, "type") && !RNA_struct_property_is_set(ptr, "use_extend") && + !RNA_struct_property_is_set(ptr, "use_expand") && !RNA_struct_property_is_set(ptr, "action")) { switch (type) { case SCE_SELECT_VERTEX: diff --git a/source/blender/editors/object/object_edit.cc b/source/blender/editors/object/object_edit.cc index 95d64084c9d..940390df88f 100644 --- a/source/blender/editors/object/object_edit.cc +++ b/source/blender/editors/object/object_edit.cc @@ -1520,9 +1520,9 @@ static int object_clear_paths_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static std::string object_clear_paths_description(bContext * /*C*/, - wmOperatorType * /*ot*/, - PointerRNA *ptr) +static std::string object_clear_paths_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { const bool only_selected = RNA_boolean_get(ptr, "only_selected"); if (only_selected) { @@ -1540,7 +1540,7 @@ void OBJECT_OT_paths_clear(wmOperatorType *ot) /* api callbacks */ ot->exec = object_clear_paths_exec; ot->poll = ED_operator_object_active_editable; - ot->get_description = object_clear_paths_description; + ot->get_description = object_clear_paths_get_description; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc index dcc709ad9c8..b0962248795 100644 --- a/source/blender/editors/object/object_modifier.cc +++ b/source/blender/editors/object/object_modifier.cc @@ -2039,9 +2039,9 @@ static int modifier_apply_as_shapekey_invoke(bContext *C, wmOperator *op, const static std::string modifier_apply_as_shapekey_get_description(bContext * /*C*/, wmOperatorType * /*ot*/, - PointerRNA *values) + PointerRNA *ptr) { - bool keep = RNA_boolean_get(values, "keep_modifier"); + bool keep = RNA_boolean_get(ptr, "keep_modifier"); if (keep) { return TIP_("Apply modifier as a new shapekey and keep it in the stack"); } diff --git a/source/blender/editors/object/object_shapekey.cc b/source/blender/editors/object/object_shapekey.cc index dfcb6a8d00b..e209ecb99b7 100644 --- a/source/blender/editors/object/object_shapekey.cc +++ b/source/blender/editors/object/object_shapekey.cc @@ -704,11 +704,11 @@ static int shape_key_lock_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static std::string shape_key_lock_description(bContext * /*C*/, - wmOperatorType * /*op*/, - PointerRNA *params) +static std::string shape_key_lock_get_description(bContext * /*C*/, + wmOperatorType * /*op*/, + PointerRNA *ptr) { - const int action = RNA_enum_get(params, "action"); + const int action = RNA_enum_get(ptr, "action"); switch (action) { case SHAPE_KEY_LOCK: @@ -738,7 +738,7 @@ void OBJECT_OT_shape_key_lock(wmOperatorType *ot) /* api callbacks */ ot->poll = shape_key_exists_poll; ot->exec = shape_key_lock_exec; - ot->get_description = shape_key_lock_description; + ot->get_description = shape_key_lock_get_description; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; diff --git a/source/blender/editors/object/object_vgroup.cc b/source/blender/editors/object/object_vgroup.cc index c38221ada19..9ea37eaed15 100644 --- a/source/blender/editors/object/object_vgroup.cc +++ b/source/blender/editors/object/object_vgroup.cc @@ -2984,12 +2984,12 @@ static int vertex_group_lock_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static std::string vertex_group_lock_description(bContext * /*C*/, - wmOperatorType * /*ot*/, - PointerRNA *params) +static std::string vertex_group_lock_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { - int action = RNA_enum_get(params, "action"); - int mask = RNA_enum_get(params, "mask"); + int action = RNA_enum_get(ptr, "action"); + int mask = RNA_enum_get(ptr, "mask"); /* NOTE: constructing the following string literals can be done in a less verbose way, * however the resulting strings can't be usefully translated, (via `TIP_`). */ @@ -3058,7 +3058,7 @@ void OBJECT_OT_vertex_group_lock(wmOperatorType *ot) /* api callbacks */ ot->poll = vertex_group_poll; ot->exec = vertex_group_lock_exec; - ot->get_description = vertex_group_lock_description; + ot->get_description = vertex_group_lock_get_description; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; diff --git a/source/blender/editors/render/render_opengl.cc b/source/blender/editors/render/render_opengl.cc index bcf864530c9..7b9726ecf71 100644 --- a/source/blender/editors/render/render_opengl.cc +++ b/source/blender/editors/render/render_opengl.cc @@ -1317,9 +1317,9 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static std::string screen_opengl_render_description(bContext * /*C*/, - wmOperatorType * /*ot*/, - PointerRNA *ptr) +static std::string screen_opengl_render_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { if (!RNA_boolean_get(ptr, "animation")) { return ""; @@ -1344,7 +1344,7 @@ void RENDER_OT_opengl(wmOperatorType *ot) ot->idname = "RENDER_OT_opengl"; /* api callbacks */ - ot->get_description = screen_opengl_render_description; + ot->get_description = screen_opengl_render_get_description; ot->invoke = screen_opengl_render_invoke; ot->exec = screen_opengl_render_exec; /* blocking */ ot->modal = screen_opengl_render_modal; diff --git a/source/blender/editors/space_action/action_edit.cc b/source/blender/editors/space_action/action_edit.cc index 318cc2a2643..389ae308a27 100644 --- a/source/blender/editors/space_action/action_edit.cc +++ b/source/blender/editors/space_action/action_edit.cc @@ -709,9 +709,9 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static std::string actkeys_paste_description(bContext * /*C*/, - wmOperatorType * /*ot*/, - PointerRNA *ptr) +static std::string actkeys_paste_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { /* Custom description if the 'flipped' option is used. */ if (RNA_boolean_get(ptr, "flipped")) { @@ -735,7 +735,7 @@ void ACTION_OT_paste(wmOperatorType *ot) /* api callbacks */ // ot->invoke = WM_operator_props_popup; /* Better wait for action redo panel. */ - ot->get_description = actkeys_paste_description; + ot->get_description = actkeys_paste_get_description; ot->exec = actkeys_paste_exec; ot->poll = ED_operator_action_active; diff --git a/source/blender/editors/space_clip/tracking_ops_track.cc b/source/blender/editors/space_clip/tracking_ops_track.cc index 5b927de68af..f480794f408 100644 --- a/source/blender/editors/space_clip/tracking_ops_track.cc +++ b/source/blender/editors/space_clip/tracking_ops_track.cc @@ -380,7 +380,9 @@ static int track_markers_modal(bContext *C, wmOperator * /*op*/, const wmEvent * return OPERATOR_PASS_THROUGH; } -static std::string track_markers_desc(bContext * /*C*/, wmOperatorType * /*ot*/, PointerRNA *ptr) +static std::string track_markers_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { const bool backwards = RNA_boolean_get(ptr, "backwards"); const bool sequence = RNA_boolean_get(ptr, "sequence"); @@ -414,7 +416,7 @@ void CLIP_OT_track_markers(wmOperatorType *ot) ot->invoke = track_markers_invoke; ot->modal = track_markers_modal; ot->poll = ED_space_clip_tracking_poll; - ot->get_description = track_markers_desc; + ot->get_description = track_markers_get_description; /* flags */ ot->flag = OPTYPE_UNDO; diff --git a/source/blender/editors/space_file/file_ops.cc b/source/blender/editors/space_file/file_ops.cc index a1b35772668..ca8f8358cab 100644 --- a/source/blender/editors/space_file/file_ops.cc +++ b/source/blender/editors/space_file/file_ops.cc @@ -1848,9 +1848,9 @@ static int file_external_operation_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -static std::string file_external_operation_description(bContext * /*C*/, - wmOperatorType * /*ot*/, - PointerRNA *ptr) +static std::string file_external_operation_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { const char *description = ""; RNA_enum_description(file_external_operation, RNA_enum_get(ptr, "operation"), &description); @@ -1868,7 +1868,7 @@ void FILE_OT_external_operation(wmOperatorType *ot) /* api callbacks */ ot->exec = file_external_operation_exec; - ot->get_description = file_external_operation_description; + ot->get_description = file_external_operation_get_description; /* flags */ ot->flag = OPTYPE_REGISTER; /* No undo! */ diff --git a/source/blender/editors/space_graph/graph_edit.cc b/source/blender/editors/space_graph/graph_edit.cc index e4881f0e0c4..0ab52fbd403 100644 --- a/source/blender/editors/space_graph/graph_edit.cc +++ b/source/blender/editors/space_graph/graph_edit.cc @@ -605,9 +605,9 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static std::string graphkeys_paste_description(bContext * /*C*/, - wmOperatorType * /*ot*/, - PointerRNA *ptr) +static std::string graphkeys_paste_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { /* Custom description if the 'flipped' option is used. */ if (RNA_boolean_get(ptr, "flipped")) { @@ -633,7 +633,7 @@ void GRAPH_OT_paste(wmOperatorType *ot) /* API callbacks */ // ot->invoke = WM_operator_props_popup; /* better wait for graph redo panel */ - ot->get_description = graphkeys_paste_description; + ot->get_description = graphkeys_paste_get_description; ot->exec = graphkeys_paste_exec; ot->poll = graphop_editable_keyframes_poll; diff --git a/source/blender/editors/space_graph/graph_slider_ops.cc b/source/blender/editors/space_graph/graph_slider_ops.cc index 3a36fa883d1..029f97f0b2d 100644 --- a/source/blender/editors/space_graph/graph_slider_ops.cc +++ b/source/blender/editors/space_graph/graph_slider_ops.cc @@ -565,7 +565,9 @@ static bool decimate_poll_property(const bContext * /*C*/, wmOperator *op, const return true; } -static std::string decimate_desc(bContext * /*C*/, wmOperatorType * /*ot*/, PointerRNA *ptr) +static std::string decimate_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { if (RNA_enum_get(ptr, "mode") == DECIM_ERROR) { @@ -602,7 +604,7 @@ void GRAPH_OT_decimate(wmOperatorType *ot) /* API callbacks */ ot->poll_property = decimate_poll_property; - ot->get_description = decimate_desc; + ot->get_description = decimate_get_description; ot->invoke = decimate_invoke; ot->modal = graph_slider_modal; ot->exec = decimate_exec; diff --git a/source/blender/editors/space_node/node_add.cc b/source/blender/editors/space_node/node_add.cc index 75f8c03c741..4e3a8548879 100644 --- a/source/blender/editors/space_node/node_add.cc +++ b/source/blender/editors/space_node/node_add.cc @@ -473,10 +473,10 @@ static int node_add_group_asset_invoke(bContext *C, wmOperator *op, const wmEven static std::string node_add_group_asset_get_description(bContext *C, wmOperatorType * /*ot*/, - PointerRNA *values) + PointerRNA *ptr) { const asset_system::AssetRepresentation *asset = - asset::operator_asset_reference_props_get_asset_from_all_library(*C, *values, nullptr); + asset::operator_asset_reference_props_get_asset_from_all_library(*C, *ptr, nullptr); if (!asset) { return ""; } diff --git a/source/blender/editors/space_sequencer/sequencer_add.cc b/source/blender/editors/space_sequencer/sequencer_add.cc index d663ae7cbf7..fc70f40014a 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.cc +++ b/source/blender/editors/space_sequencer/sequencer_add.cc @@ -1489,9 +1489,9 @@ static int sequencer_add_effect_strip_invoke(bContext *C, return sequencer_add_effect_strip_exec(C, op); } -static std::string sequencer_add_effect_strip_desc(bContext * /*C*/, - wmOperatorType * /*ot*/, - PointerRNA *ptr) +static std::string sequencer_add_effect_strip_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { const int type = RNA_enum_get(ptr, "type"); @@ -1554,7 +1554,7 @@ void SEQUENCER_OT_effect_strip_add(wmOperatorType *ot) ot->exec = sequencer_add_effect_strip_exec; ot->poll = ED_operator_sequencer_active_editable; ot->poll_property = seq_effect_add_properties_poll; - ot->get_description = sequencer_add_effect_strip_desc; + ot->get_description = sequencer_add_effect_strip_get_description; /* Flags. */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index f2a7c83aa38..bd6daebd385 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -3040,16 +3040,16 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op) return wm_open_mainfile__open(C, op); } -static std::string wm_open_mainfile_description(bContext * /*C*/, - wmOperatorType * /*ot*/, - PointerRNA *params) +static std::string wm_open_mainfile_get_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { - if (!RNA_struct_property_is_set(params, "filepath")) { + if (!RNA_struct_property_is_set(ptr, "filepath")) { return ""; } char filepath[FILE_MAX]; - RNA_string_get(params, "filepath", filepath); + RNA_string_get(ptr, "filepath", filepath); BLI_stat_t stats; if (BLI_stat(filepath, &stats) == -1) { @@ -3151,7 +3151,7 @@ void WM_OT_open_mainfile(wmOperatorType *ot) ot->name = "Open"; ot->idname = "WM_OT_open_mainfile"; ot->description = "Open a Blender file"; - ot->get_description = wm_open_mainfile_description; + ot->get_description = wm_open_mainfile_get_description; ot->invoke = wm_open_mainfile_invoke; ot->exec = wm_open_mainfile_exec;