Blender Git Commit Log

Git Commits -> Revision 80485c2

Revision 80485c2 by Kester Maddock (master)
April 8, 2004, 11:36 (GMT)
In NaN times I suggested a python function to get the subject of a
Message using a python function of the MessageSensor.

Thats a nice thing if you want complex message handling in one python
script. Just get all messages, check the subject and do what you
want. In the current situation you end up with several MessageSensors
connected to the python script, instead of one Sensor and a smart
script.

Some developer (cant remember who) did implement that function, but
however not the way I wanted (maybe I was not clear enough) ;-) So the
getSubject() function will return whats entered in the "Subject:"
filter field of the MessageSensor. Quite useless IMHO.

So I added a new function getSubjects() which is similar to
getBodies(), in fact I stole the code from there ;-)

I left the getSubject() alone, because of backward compatibility
(never saw someone using that function, but...)


The future:

In conjunction with a wildcard subject: filter field the getSubjects()
function will be even more usefull.

i.e. Player* will filter for PlayerScore, PlayerKill etc.

-- Carsten Wartmann

Commit Details:

Full Hash: 80485c2926a518b5de9db3d737abd4afb80be5a7
SVN Revision: 2273
Parent Commit: 5398f1b
Lines Changed: +36, -4

2 Modified Paths:

/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp (+34, -4) (Diff)
/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h (+2, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021