diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-08 16:51:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-08 16:51:05 +0400 |
commit | b43252079953e6eefad092927e578c80f695d788 (patch) | |
tree | c6e8dabec386895a6aad69c6689d73dbd36d594b | |
parent | d4e540dff398c8a438ecdd0d13f9de9acc07f46c (diff) |
fix [#27324] WindowManager.invoke_search_popup() crashes blender and does not work
also minor formatting fixes.
-rw-r--r-- | release/scripts/modules/bpy/utils.py | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_warp.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 15 |
4 files changed, 14 insertions, 8 deletions
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py index 27ac1d6ea79..a2d7b9e502f 100644 --- a/release/scripts/modules/bpy/utils.py +++ b/release/scripts/modules/bpy/utils.py @@ -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 diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 18a93b9defb..f6cc93664d6 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -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", ""}, diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index 8e629bf7365..27add27deb1 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -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, }; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 63a8ecc4043..2b8b0dd0393 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -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); + } } } |