From 27eeb89bd994553c953a0bcb5b64d28f420c5926 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sat, 26 Jan 2013 03:30:21 +0000 Subject: 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. --- source/blender/editors/space_logic/logic_ops.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/space_logic') diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index e9139271f18..f28757bb431 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -423,6 +423,10 @@ static int controller_add_exec(bContext *C, wmOperator *op) 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; } -- cgit v1.2.3