On pe, 2010-03-12 at 15:03 -0800, Carlos wrote:
> Thanks a lot for your clarify explanation.
Did you get it working somehow?
I later recalled there is a kind of stupid but simple and working
solution that people use: send chat messages from objects to others,
same as what people do with LSL which is limited to a single piece of
code working with one scene object only. You can use some channel code
like -3133 for the messages to not show.
I tried to see for an example of this now, but the place where I thought
it would be used is actually using this trick I mentioned earlier, which
is nicer 'cause you then have a ref to the py object so can read it's
attributes and call methods with all kinds of args etc, and not just
send chat messages:
> > If rexscript doesn't provide this, you can perhaps use normal python
> > stuff to share references. E.g. make an own module (file, defines a
> > import scene
> > class A(rxactor.Actor):
> > def __init__(self, id):
> > scene.a = self
Instead of making an own scene module like here, the example I found is
using the MyWorld object that the rx Actors already have:
class A(rxactor.Actor):
def EventCreated(self):
super(self.__class__, self).EventCreated()
self.MyWorld.a = self
Then all rxactors can do self.MyWorld.a to get that instance. If you do
it this way, you want to use a name that certainly doesn't conflict with
anything existing in the world object. Making the own something.py
module which I showed earlier has the good feature that it's your own
namespace so no danger of conflicts.
We should make something that supports this a feature and document it
with examples etc. later, also something to keep in mind with the
upcoming Opensim scene refactor. Well, OTOH it already works with what
Python provides so perhaps we don't have to do anything but some working
example in the samples dir.
~Toni
--
http://groups.google.com/group/realxtend
http://www.realxtend.org
To unsubscribe from this group, send email to
realxtend+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.