Cleanup: Avoid double operator name lookup

This commit is contained in:
Hans Goudey 2020-08-03 14:00:14 -04:00
parent 8356012068
commit b5c737469d
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}