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
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ EnumPropertyItem modifier_type_items[] ={
|
||||
{eModifierType_Shrinkwrap, "SHRINKWRAP", ICON_MOD_SHRINKWRAP, "Shrinkwrap", ""},
|
||||
{eModifierType_SimpleDeform, "SIMPLE_DEFORM", ICON_MOD_SIMPLEDEFORM, "Simple Deform", ""},
|
||||
{eModifierType_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""},
|
||||
{eModifierType_Warp, "WARP", ICON_MOD_SUBSURF, "Warp", ""},
|
||||
{eModifierType_Warp, "WARP", ICON_MOD_SUBSURF, "Warp", ""},
|
||||
{eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
|
||||
{0, "", 0, "Simulate", ""},
|
||||
{eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""},
|
||||
|
||||
@@ -350,7 +350,7 @@ ModifierTypeInfo modifierType_Warp = {
|
||||
/* deformVerts */ deformVerts,
|
||||
/* deformMatrices */ NULL,
|
||||
/* deformVertsEM */ deformVertsEM,
|
||||
/* deformMatricesEM */ NULL,
|
||||
/* deformMatricesEM */ NULL,
|
||||
/* applyModifier */ 0,
|
||||
/* applyModifierEM */ 0,
|
||||
/* initData */ initData,
|
||||
@@ -359,7 +359,7 @@ ModifierTypeInfo modifierType_Warp = {
|
||||
/* isDisabled */ isDisabled,
|
||||
/* updateDepgraph */ updateDepgraph,
|
||||
/* dependsOnTime */ dependsOnTime,
|
||||
/* dependsOnNormals */ NULL,
|
||||
/* dependsOnNormals */ NULL,
|
||||
/* foreachObjectLink */ foreachObjectLink,
|
||||
/* foreachIDLink */ foreachIDLink,
|
||||
};
|
||||
|
||||
@@ -698,11 +698,16 @@ static void operator_enum_call_cb(struct bContext *C, void *arg1, void *arg2)
|
||||
wmOperatorType *ot= arg1;
|
||||
|
||||
if(ot) {
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user