From f2064367a3ed257a5e0e3c769eafdfdc8cdb6d77 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 25 Sep 2012 05:48:33 +0000 Subject: fix for gibberish text in 2DFilter actuator when text unlinked through the Text Editor (reported nowhere, I found this while testing osl custom node) --- source/blender/blenkernel/intern/text.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/blender/blenkernel/intern/text.c') diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 1f1d609ae42..05d0705107d 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -48,6 +48,7 @@ #include "DNA_constraint_types.h" #include "DNA_controller_types.h" +#include "DNA_actuator_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" @@ -528,6 +529,7 @@ void BKE_text_unlink(Main *bmain, Text *text) SpaceLink *sl; Object *ob; bController *cont; + bActuator *act; bConstraint *con; short update; @@ -541,6 +543,15 @@ void BKE_text_unlink(Main *bmain, Text *text) if (pc->text == text) pc->text = NULL; } } + /* game actuators */ + for (act = ob->actuators.first; act; act = act->next) { + if (act->type == ACT_2DFILTER) { + bTwoDFilterActuator *tfa; + + tfa = act->data; + if (tfa->text == text) tfa->text = NULL; + } + } /* pyconstraints */ update = 0; -- cgit v1.2.3