"Replace" invalidates child objects
Posted: 06.01.2009, 00:42
In playing recently with the new ISS meshes discovered by Linuxman I encountered a slight problem.
The approach is to replace the default ISS with an invisible object:
then make all the individual meshes child objects of this:
The problem is that when the ISS is "replaced" the child objects do not exist in Celestia.
(ie. they are not associated with the new version of the ISS.)
If alternatively, the old ISS is disabled first and then redefined rather than "Replaced" then all works OK.
I suspect that this is due to a problem with either ...
* The order of parsing
ie.the child objects are being parsed prior to the "Replace" command so they're still associated with the original ISS, which is subsequently replaced,
or
* the Replace command itself:
ie. perhaps it needs to identify and collect any child objects and re-associate them with the new version of the ISS. (I suspect they've been orphaned when the original ISS has been replaced)
EDIT: Note that this potentially affects any addon where an object is "Replaced", not just the ISS, so I would be surprised if this bug hasn't already been reported in the past.
The approach is to replace the default ISS with an invisible object:
Code: Select all
Replace "ISS" "Sol/Earth"
{
Class "Invisible"
then make all the individual meshes child objects of this:
Code: Select all
"iss FBG Zarya" "Sol/Earth/ISS"
{
Class "Spacecraft"
Mesh "fgb-ext.cmod"
Radius 0.005
Beginning 2451138 # Zarya module launched 20 Nov 1998
...
...
}
The problem is that when the ISS is "replaced" the child objects do not exist in Celestia.
(ie. they are not associated with the new version of the ISS.)
If alternatively, the old ISS is disabled first and then redefined rather than "Replaced" then all works OK.
I suspect that this is due to a problem with either ...
* The order of parsing
ie.the child objects are being parsed prior to the "Replace" command so they're still associated with the original ISS, which is subsequently replaced,
or
* the Replace command itself:
ie. perhaps it needs to identify and collect any child objects and re-associate them with the new version of the ISS. (I suspect they've been orphaned when the original ISS has been replaced)
EDIT: Note that this potentially affects any addon where an object is "Replaced", not just the ISS, so I would be surprised if this bug hasn't already been reported in the past.