diff options
author | Hans Goudey <h.goudey@me.com> | 2020-08-03 21:00:14 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-08-03 21:00:14 +0300 |
commit | b5c737469d5544030c0b53271e24a32535d64ddc (patch) | |
tree | 671e0fa34f82cbe25058bf273bcf7858019fe664 /source | |
parent | 8356012068d08f6ee4f6c20077ab47f3dad0ea98 (diff) |
Cleanup: Avoid double operator name lookup
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index c88303daa16..ee42b61d246 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -616,11 +616,12 @@ static void view3d_lightcache_update(bContext *C) return; } - WM_operator_properties_create(&op_ptr, "SCENE_OT_light_cache_bake"); + wmOperatorType *ot = WM_operatortype_find("SCENE_OT_light_cache_bake", true); + WM_operator_properties_create_ptr(&op_ptr, ot); RNA_int_set(&op_ptr, "delay", 200); RNA_enum_set_identifier(C, &op_ptr, "subset", "DIRTY"); - WM_operator_name_call(C, "SCENE_OT_light_cache_bake", WM_OP_INVOKE_DEFAULT, &op_ptr); + WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &op_ptr); WM_operator_properties_free(&op_ptr); } |