debug object parent-child

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

debug object parent-child

Post by Virion »

I found that if the parent node is set as debug object, the child will definitely be a debug object.

Code: Select all

child->setIsDebugObject(false)
Even if I set the child as non-debug object afterward, it doesn't work, it will still be a debug object. Was this intended?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

In which places does this flag happen to have any effect? I never fully understood this feature, so it's hard to assess what should be the correct behavior. But thinking about debug objects as not existing in the final version of the app, it seems ok to have this propagate, because the missing parent will change most of the behavior anyway.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

I see. I want to put spawn point in my level editor, which I use an empty scene node for the location and a billboard icon so that I know where is the empty scene node.

billboard is the parent so empty scene node follows it. I set billboard as debug object so that it won't be saved into .irr file when using saveScene() function but I want the empty scene node to be saved, however, it didn't save into my .irr file so it must be affected by the parent and became a debug object as well.

nevermind then, I'm now using just the billboard. i'll manually hide the billboard at ingame after obtaining the position.

thanks for the reply.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yeah, as described, I'd say this seems to me to be the correct way. Btu you could simply change the order and make the billboard a child of the empty box. Then it should work as expected.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

On a somewhat related note, at some point in the future we should consider renaming debug objects to subNodes, like the GUI's subElements. We may want the possibility of compound nodes which deal with the serialization of their children, but use nodes for convenience. I can't think of an obvious example, but I'm pretty sure that the general class of "child nodes which are part of their parent" doesn't just apply to debug objects.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If debug objects are just not serialized we should call the flag non-serializable or not-serialized.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Ah, actually if Niko also uses the debug flag to exclude some mesh nodes during lightmapping then maybe both are useful. And yes, good point.. perhaps we should rename it in the GUI at some point.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply