"Replace" invalidates child objects

Report bugs, bug fixes and workarounds here.
Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

"Replace" invalidates child objects

Post #1by Chuft-Captain » 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:

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.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: "Replace" invalidates child objects

Post #2by Chuft-Captain » 08.01.2009, 01:09

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:
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: "Replace" invalidates child objects

Post #3by chris » 08.01.2009, 01:41

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

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: "Replace" invalidates child objects

Post #4by cartrite » 08.01.2009, 01:47

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
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: "Replace" invalidates child objects

Post #5by Chuft-Captain » 08.01.2009, 02:06

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".
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: "Replace" invalidates child objects

Post #6by cartrite » 08.01.2009, 02:15

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
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: "Replace" invalidates child objects

Post #7by Chuft-Captain » 08.01.2009, 05:53

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
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: "Replace" invalidates child objects

Post #8by chris » 08.01.2009, 06:19

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

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: "Replace" invalidates child objects

Post #9by Chuft-Captain » 08.01.2009, 08:55

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
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: "Replace" invalidates child objects

Post #10by Chuft-Captain » 08.01.2009, 09:23

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.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: "Replace" invalidates child objects

Post #11by cartrite » 08.01.2009, 12:57

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
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: "Replace" invalidates child objects

Post #12by chris » 08.01.2009, 16:47

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

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: "Replace" invalidates child objects

Post #13by Chuft-Captain » 09.01.2009, 00:31

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.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: "Replace" invalidates child objects

Post #14by cartrite » 09.01.2009, 03:07

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
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

bdm
Posts: 461
Joined: 22.07.2005
With us: 19 years 4 months
Location: Australia

Re: "Replace" invalidates child objects

Post #15by bdm » 14.07.2009, 10:43

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.


Return to “Bugs”