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>2014-07-11 09:07:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-07-11 09:07:55 +0400
commitd419e2e90cc3bb3fd6aa89baab8b4f4caa2001e1 (patch)
treebe24f0e46feb17e37569f260c21dad4561a91a5b /source/blender/editors/space_file/file_ops.c
parentdd9a33dc83f912c89947a149a76e374ee3bba13e (diff)
WM: add WM_operator_properties_create_ptr
Call operator types directly and avoid a lookup when their known.
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r--source/blender/editors/space_file/file_ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 1d3013bd8b4..27d6fabba4e 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1277,8 +1277,9 @@ void file_directory_enter_handle(bContext *C, void *UNUSED(arg_unused), void *UN
const char *lastdir = folderlist_peeklastdir(sfile->folders_prev);
/* if not, ask to create it and enter if confirmed */
+ wmOperatorType *ot = WM_operatortype_find("FILE_OT_directory_new", false);
PointerRNA ptr;
- WM_operator_properties_create(&ptr, "FILE_OT_directory_new");
+ WM_operator_properties_create_ptr(&ptr, ot);
RNA_string_set(&ptr, "directory", sfile->params->dir);
RNA_boolean_set(&ptr, "open", true);
@@ -1286,7 +1287,7 @@ void file_directory_enter_handle(bContext *C, void *UNUSED(arg_unused), void *UN
BLI_strncpy(sfile->params->dir, lastdir, sizeof(sfile->params->dir));
- WM_operator_name_call(C, "FILE_OT_directory_new", WM_OP_INVOKE_DEFAULT, &ptr);
+ WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &ptr);
WM_operator_properties_free(&ptr);
}