Page 1 of 1

"Replace" invalidates child objects

Posted: 06.01.2009, 00:42
by Chuft-Captain
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:

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.

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 01:09
by Chuft-Captain
I've logged this on Sourceforge: 2493046.

I think the build I'm using is SVN4382.

BTW. as an aside, it would be quite handy if the splash screen and/or the Help->About screen included the build number rather than just the release number. Then when logging bugs I'd know exactly which build I was using at any time :wink:

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 01:41
by chris
Chuft-Captain wrote:I've logged this on Sourceforge: 2493046.

I think the build I'm using is SVN4382.

BTW. as an aside, it would be quite handy if the splash screen and/or the Help->About screen included the build number rather than just the release number. Then when logging bugs I'd know exactly which build I was using at any time :wink:

I just tried using replace and it's working fine: no child objects are eliminated. My test was replacing Jupiter with this definition:

Code: Select all

Replace "Jupiter" "Sol"
{
   Texture "jupiter.*"

   Radius 714920 # HUGE
   Oblateness 0.0649

   CustomOrbit "vsop87-jupiter"

   # IAU rotation not used for Jupiter; it is based on System III
   # (radio emissions), not the cloud positions. In Celestia, we're
   # more interested in having the Great Red Spot appear in the
   # (approximately) correct place.
   UniformRotation
   {
   Period      9.927953 # System II (for GRS)
   # Period   9.92425  # System III (radio emissions)
   Inclination   2.222461 # 1.82246 # 2.22246
   AscendingNode   -22.203  # -1.87785 # -22.203
   MeridianAngle   342      # for correct location of GRS
                            # (equal to 461 minus current W longitude of GRS)
   # MeridianAngle   305.40   # correct System III prime meridian
   }

   Albedo 0.51
}


All the moons were still there. I think that you may need to update your version of Celestia. I do remember that this problem was reported before, and I spent time working on a fix for it.

--Chris

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 01:47
by cartrite
Chuft-Captain wrote:I've logged this on Sourceforge: 2493046.

I think the build I'm using is SVN4382.

BTW. as an aside, it would be quite handy if the splash screen and/or the Help->About screen included the build number rather than just the release number. Then when logging bugs I'd know exactly which build I was using at any time :wink:
If you are using a svn executable that I built, you can right click on it and look at the properties section. The svn version number should be there. 4382 is quite old though and I'm not sure I was doing that then. The current version that is available at CM is 4585.
cartrite

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 02:06
by Chuft-Captain
cartrite wrote:
Chuft-Captain wrote:I've logged this on Sourceforge: 2493046.

I think the build I'm using is SVN4382.

BTW. as an aside, it would be quite handy if the splash screen and/or the Help->About screen included the build number rather than just the release number. Then when logging bugs I'd know exactly which build I was using at any time :wink:
If you are using a svn executable that I built, you can right click on it and look at the properties section. The svn version number should be there. 4382 is quite old though and I'm not sure I was doing that then. The current version that is available at CM is 4585.
cartrite
Cool, thanks Cartrite. (I've also got a 4391 HDR build which must have been built by you - it displays "1.6.0.4391" in the Version TAB )
The 4382 one must have been built by someone else as it just shows "1.5.0.0".

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 02:15
by cartrite
The 4382 one must have been built by someone else as it just shows "1.5.0.0".
Probably was built by someone else. I started embedding the version number with version 4259.
viewtopic.php?p=102572#p102572
You should probably update all of them to 4585. This may fix your bug too.
cartrite

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 05:53
by Chuft-Captain
Subject: "Replace" invalidates child objects

cartrite wrote:
The 4382 one must have been built by someone else as it just shows "1.5.0.0".
Probably was built by someone else. I started embedding the version number with version 4259.
http://www.celestiaproject.net/forum/viewtopic ... 72#p102572
You should probably update all of them to 4585. This may fix your bug too.
cartrite
Installed 4585 but when attempting to run it, I got this:
lua5.1.jpg

I'm on WINXP and no compiler, so I cannot build the LUA executable. (The download only has the source code)
Do you know where I might find a 5.1 Lua binary for WINDOWS?

Cheers
CC

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 06:19
by chris
Chuft-Captain wrote:Subject: "Replace" invalidates child objects

cartrite wrote:
The 4382 one must have been built by someone else as it just shows "1.5.0.0".
Probably was built by someone else. I started embedding the version number with version 4259.
viewtopic.php?p=102572#p102572
You should probably update all of them to 4585. This may fix your bug too.
cartrite
Installed 4585 but when attempting to run it, I got this:
lua5.1.jpg

I'm on WINXP and no compiler, so I cannot build the LUA executable. (The download only has the source code)
Do you know where I might find a 5.1 Lua binary for WINDOWS?
CC

If you've been running SVN versions of Celestia, you should already have lua5.1.dll in your Celestia install folder. In fact, this file was included with 1.5.1 as well.

--Chris

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 08:55
by Chuft-Captain
Of course! I forgot that Cartrite's build doesn't include any of the trappings of a full build, it's just an executable.
All I need to do is drop it into one of my existing 1.5.x builds folder.

(I'm having a blonde day :oops: )

Cheers Chris

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 09:23
by Chuft-Captain
and the problem indeed seems to be fixed in that build. Thanks guys.

One more question though....
In this build, I don't know how to get rid of this red line (which appears to mark the line of the ecliptic).
ecliptic.jpg


I've switched off all grids etc,...
settings.jpg

... but this line remains no matter what.

Can anyone explain this?

BTW: I closed the SourceForge bug Chris.

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 12:57
by cartrite
There are other files that you may need to use. You'll have to look at the readme files. I supply some of needed files with the download but you may need to download some from sourceforge or use Tortoise SVN to get all the other svn files..

I'm not sure about the red line though. It might be that it is for orbits but because you have old an config file or ssc file the red one is the only one that is showing.

Globulars will not work unless celestia.cfg is modified.
Star textures were also added in celestia.cfg. I think.
Some of the models for spacecraft were moved to a folder called extras-standard, ISS being one of them.
There have been quite a few changes.

cartrite

Re: "Replace" invalidates child objects

Posted: 08.01.2009, 16:47
by chris
The red line is the ecliptic. There's no control to toggle it in the Windows version (and it's too late to add one for 1.6.0). I'm not sure why it's showing up. You can run this one line script to get rid of it:

Code: Select all

celestia:setrenderflags{ ecliptic = false }


--Chris

Re: "Replace" invalidates child objects

Posted: 09.01.2009, 00:31
by Chuft-Captain
chris wrote:The red line is the ecliptic. There's no control to toggle it in the Windows version (and it's too late to add one for 1.6.0). I'm not sure why it's showing up. You can run this one line script to get rid of it:

Code: Select all

celestia:setrenderflags{ ecliptic = false }


--Chris
It's maybe something to do with the way I've created this version. (It's a mish-mash of a 1.5.1 installation, with Cartrite's svn4585 dropped into the directory.)
I've also modified the existing celestia.cfg as follows:

Code: Select all

#------------------------------------------------------------------------
# 1.6.0 Deep Sky Catalog changes:
#------------------------------------------------------------------------
  #DeepSkyCatalog               "data/deepsky.dsc"
  DeepSkyCatalogs            [ "data/galaxies.dsc"
                          "data/globulars.dsc" ]
#------------------------------------------------------------------------
, and dropped those new files into the data directory.
Also, I've put the 4 shaders for his HDR version in the shaders folder, although I'm not using the HDR version at present.

Maybe there's something else that I need to do.....

CC

EDIT: The script does the job, thanks Chris.

Re: "Replace" invalidates child objects

Posted: 09.01.2009, 03:07
by cartrite
To be sure you got all the files, use Tortoise SVN or another SVN client and copy the exe file along with the dll files into the Celestia SVN folder.
cartrite

Re: "Replace" invalidates child objects

Posted: 14.07.2009, 10:43
by bdm
chris wrote:The red line is the ecliptic. There's no control to toggle it in the Windows version (and it's too late to add one for 1.6.0). I'm not sure why it's showing up. You can run this one line script to get rid of it:

Code: Select all

celestia:setrenderflags{ ecliptic = false }


--Chris
To expand on this a bit:

To get this working, you need to place it in a file with a ".celx" extension, then run it with "Open Script".

It is also handy to have this accessible from the menu. To do this, place your .celx script file in the "Scripts" directory of your Celestia installation, and add a title to the top similar to this: "-- Title: Hide Ecliptic". The script is then accessible from the File > Scripts menu with the chosen title identifying the script.