diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2012-09-25 09:48:33 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2012-09-25 09:48:33 +0400 |
commit | f2064367a3ed257a5e0e3c769eafdfdc8cdb6d77 (patch) | |
tree | f594ae23028e2f2b70a3a2fe5670fe06311903cf /source | |
parent | b3fd195665d6d00e4ad7718c5c3c0a3135a415a7 (diff) |
fix for gibberish text in 2DFilter actuator when text unlinked through the Text Editor
(reported nowhere, I found this while testing osl custom node)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 11 |
1 files changed, 11 insertions, 0 deletions
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; |