diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-16 13:09:51 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-16 13:11:05 +0300 |
commit | f36785c26c14e00d3385a2f6ca0890eb8030439c (patch) | |
tree | 0d1548abb0fc75b2b4c99f8c1ddb9533540e6ab9 /source/blender/editors/space_buttons/buttons_ops.c | |
parent | 10813996e80cddafcd2af3d71eaee3ef4fbe796e (diff) |
Cleanup: Replace `WM_operator_name_call` by `WM_operator_name_call_ptr` where possible.
This avoids one lookup in optypes list...
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_ops.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index c73dc04538e..0b643cd7858 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -186,6 +186,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) /* useful yet irritating feature, Shift+Click to open the file * Alt+Click to browse a folder in the OS's browser */ if (event->shift || event->alt) { + wmOperatorType *ot = WM_operatortype_find("WM_OT_path_open", true); PointerRNA props_ptr; if (event->alt) { @@ -195,9 +196,9 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) } - WM_operator_properties_create(&props_ptr, "WM_OT_path_open"); + WM_operator_properties_create_ptr(&props_ptr, ot); RNA_string_set(&props_ptr, "filepath", str); - WM_operator_name_call(C, "WM_OT_path_open", WM_OP_EXEC_DEFAULT, &props_ptr); + WM_operator_name_call_ptr(C, ot, WM_OP_EXEC_DEFAULT, &props_ptr); WM_operator_properties_free(&props_ptr); MEM_freeN(str); |