Revision: 54103 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54103 Author: dfelinto Date: 2013-01-26 03:30:21 +0000 (Sat, 26 Jan 2013) Log Message: ----------- real fix for Logic Bricks UI smart controller (#33746) previous commit (54102) actually reintroduces an old bug where Blender sigfaults when the sensor and controllers are not from the active object.
The real fix for report #33746 is to clear the "object" property after the operator ran. I'm not sure why when I call the operator from command line the property is cleared, but not when I called it from C. Either way all should be working now. Modified Paths: -------------- trunk/blender/source/blender/editors/interface/interface_handlers.c trunk/blender/source/blender/editors/space_logic/logic_ops.c Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c =================================================================== --- trunk/blender/source/blender/editors/interface/interface_handlers.c 2013-01-26 02:46:07 UTC (rev 54102) +++ trunk/blender/source/blender/editors/interface/interface_handlers.c 2013-01-26 03:30:21 UTC (rev 54103) @@ -880,6 +880,7 @@ RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr); WM_operator_properties_create(&props_ptr, "LOGIC_OT_controller_add"); + RNA_string_set(&props_ptr, "object", ob->id.name + 2); /* (3) add a new controller */ if (WM_operator_name_call(C, "LOGIC_OT_controller_add", WM_OP_EXEC_DEFAULT, &props_ptr) & OPERATOR_FINISHED) { Modified: trunk/blender/source/blender/editors/space_logic/logic_ops.c =================================================================== --- trunk/blender/source/blender/editors/space_logic/logic_ops.c 2013-01-26 02:46:07 UTC (rev 54102) +++ trunk/blender/source/blender/editors/space_logic/logic_ops.c 2013-01-26 03:30:21 UTC (rev 54103) @@ -423,6 +423,10 @@ ob->scaflag |= OB_SHOWCONT; WM_event_add_notifier(C, NC_LOGIC, NULL); + + /* prevent the operator to get stuck with the "object" of the previous call - + * it only happens when it's called from the "smart controller", see bug #54102 */ + RNA_string_set(op->ptr, "object", ""); return OPERATOR_FINISHED; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs