fix [#27324] WindowManager.invoke_search_popup() crashes blender and does not work
also minor formatting fixes.
This commit is contained in:
@@ -35,6 +35,7 @@ import addon_utils as _addon_utils
|
||||
|
||||
_script_module_dirs = "startup", "modules"
|
||||
|
||||
|
||||
def _test_import(module_name, loaded_modules):
|
||||
use_time = _bpy.app.debug
|
||||
|
||||
|
||||
@@ -698,12 +698,17 @@ static void operator_enum_call_cb(struct bContext *C, void *arg1, void *arg2)
|
||||
wmOperatorType *ot= arg1;
|
||||
|
||||
if(ot) {
|
||||
if(ot->prop) {
|
||||
PointerRNA props_ptr;
|
||||
WM_operator_properties_create_ptr(&props_ptr, ot);
|
||||
RNA_property_enum_set(&props_ptr, ot->prop, GET_INT_FROM_POINTER(arg2));
|
||||
WM_operator_name_call(C, ot->idname, WM_OP_EXEC_DEFAULT, &props_ptr);
|
||||
WM_operator_properties_free(&props_ptr);
|
||||
}
|
||||
else {
|
||||
printf("operator_enum_call_cb: op->prop for '%s' is NULL\n", ot->idname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op)
|
||||
|
||||
Reference in New Issue
Block a user