POV-Ray : Newsgroups : moray.win : Defining plugin as a group Server Time
3 May 2024 00:43:47 EDT (-0400)
  Defining plugin as a group (Message 1 to 4 of 4)  
From: Doug
Subject: Defining plugin as a group
Date: 15 Jun 2004 13:05:00
Message: <web.40cf2b199d58a590ded0eafc0@news.povray.org>
Anyway, I'm trying to make a pluging for Moray v3.5, and I want to be able
to bind other scene objects to it, as if the plugin object were a group, so
that it would then be the parent of those objects.  However, in the Moray
SDK, in plugin.h, the attribute I'd want is listed as:

#define MRY_ATTR_IS_GROUP    (0x00000100) /* not used yet */

I decided to just make sure and included it anyway (in the hopes that the
comment was old):

DEFINE_STATICS(CPhotonMagnet,"Photon Magnet","PhotonMagnet%03d",
 MRY_ATTR_CAN_BE_GROUPED   |
 MRY_ATTR_CAN_BE_CSGD   |
 MRY_ATTR_CAN_BE_REFERENCED  |
 MRY_ATTR_CAN_BE_TEXTURED  |
 MRY_ATTR_CAN_BE_XFORMED   |
 MRY_ATTR_CAN_USE_PHOTONS  |
 MRY_ATTR_IS_GROUP    |                                // <- usage of this
attribute
 MRY_ATTR_HAS_OBJ_PARAMS);


But of course doing this had no effect, so the comment indeed was speaking
the truth.  I've tried some other methods of setting this manually then, in
an effort to make the object's nObjectType = MRY_SCN_GROUP, but all this
has led to has been sporadic crashing of Moray (without it actually doing
anything useful first, of course).

Is there another way I could do this?  I have an idea of how to work around
this by changing how I'll implement my plugin, but it won't be quite as
useful.


Thanks,
Doug Kavendek


Post a reply to this message

From: Doug
Subject: Re: Defining plugin as a group
Date: 15 Jun 2004 13:30:01
Message: <web.40cf310929a9862dded0eafc0@news.povray.org>
Sorry, for some reason, the first paragraph there got cut off, so I sound
like a rude bastard starting off my post with "Anyway,"...  I originally
started it off with, "Hey, this is my first post here.  We'll see how it
goes..  I think I made the mistake of emailing mor### [at] stmuccom about this
problem before I realized I should really just ask it here.  Too late,
though..."


"Doug" <dka### [at] stevensedu> wrote:
> Anyway, I'm trying to make a pluging for Moray v3.5, and I want to be able
> to bind other scene objects to it, as if the plugin object were a group, so
> that it would then be the parent of those objects.  However, in the Moray
> SDK, in plugin.h, the attribute I'd want is listed as:
>
> #define MRY_ATTR_IS_GROUP    (0x00000100) /* not used yet */
>
> I decided to just make sure and included it anyway (in the hopes that the
> comment was old):
>
> DEFINE_STATICS(CPhotonMagnet,"Photon Magnet","PhotonMagnet%03d",
>  MRY_ATTR_CAN_BE_GROUPED   |
>  MRY_ATTR_CAN_BE_CSGD   |
>  MRY_ATTR_CAN_BE_REFERENCED  |
>  MRY_ATTR_CAN_BE_TEXTURED  |
>  MRY_ATTR_CAN_BE_XFORMED   |
>  MRY_ATTR_CAN_USE_PHOTONS  |
>  MRY_ATTR_IS_GROUP    |                                // <- usage of this
> attribute
>  MRY_ATTR_HAS_OBJ_PARAMS);
>
>
> But of course doing this had no effect, so the comment indeed was speaking
> the truth.  I've tried some other methods of setting this manually then, in
> an effort to make the object's nObjectType = MRY_SCN_GROUP, but all this
> has led to has been sporadic crashing of Moray (without it actually doing
> anything useful first, of course).
>
> Is there another way I could do this?  I have an idea of how to work around
> this by changing how I'll implement my plugin, but it won't be quite as
> useful.
>
>
> Thanks,
> Doug Kavendek


Post a reply to this message

From: Lutz Kretzschmar
Subject: Re: Defining plugin as a group
Date: 16 Jun 2004 10:58:54
Message: <7sn0d0p944n9ht99qbdsch5tpvd981504u@4ax.com>
Hi Doug, you recently wrote in moray.win:

> I think I made the mistake of emailing mor### [at] stmuccom about this
> problem before I realized I should really just ask it here.  Too late,
> though..."
It's never a mistake to email me :-) However, there is a SDK mailing
list at yahoogroups.com that I set up for this sort of question.
But since you asked here, I guess I can answer here :-)

In the current version of the SDK, you'll need to keep track of
objects that you want to reference yourself. You should monitor the
Object Deleted events to make sure to release any references to
objects that get deleted.

Regards,

- Lutz
  email : lut### [at] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

From: Doug
Subject: Re: Defining plugin as a group
Date: 16 Jun 2004 13:25:00
Message: <web.40d0813d29a9862dded0eafc0@news.povray.org>
Lutz Kretzschmar <lut### [at] stmuccom> wrote:
>
> In the current version of the SDK, you'll need to keep track of
> objects that you want to reference yourself. You should monitor the
> Object Deleted events to make sure to release any references to
> objects that get deleted.
>


Ok - good to know that it's possible.  However, I've been picking through
the code and the documentation for a while now, and I still don't even know
where to begin doing that.  Would it be a trivial thing (as in, maybe just
a couple lines of code added/modified), or will I have to really know what
I'm doing and have to work on all kinds of new things?

I've got a general idea of how to create a very simple object with simple
attributes (and have implemented it so far), but above that, I have
realized I don't know what I'm doing..


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.