From 588bc74a8842ea388f951c82db89e6a53c0774b9 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 15 Apr 2016 09:52:08 -0400 Subject: [PATCH] Enable subdirectories for modules Move newhorizons scene modules into subdirectories --- .gitignore | 49 ++++--- data/scene/default_nh.scene | 31 ++--- .../callistoprojection.data | 0 .../callistoprojection/callistoprojection.mod | 0 .../textures/Callisto-Text.png | Bin .../textures/defaultProj.png | Bin .../europaprojection/europaprojection.data | 0 .../europaprojection/europaprojection.mod | 0 .../europaprojection/textures/Europa-Text.png | Bin .../europaprojection/textures/defaultProj.png | Bin .../ganymedeprojection.data | 0 .../ganymedeprojection/ganymedeprojection.mod | 0 .../textures/Ganymede-Text.png | Bin .../textures/defaultProj.png | Bin .../jupiter}/ioprojection/ioprojection.data | 0 .../jupiter}/ioprojection/ioprojection.mod | 0 .../ioprojection/textures/Io-Text.png | Bin .../ioprojection/textures/defaultProj.png | Bin .../ProjectionsOfInterest.torrent | 0 .../jupiterprojection/jupiterprojection.data | 0 .../jupiterprojection/jupiterprojection.mod | 0 .../jupiter}/jupiterprojection/textures/1.jpg | Bin .../jupiter}/jupiterprojection/textures/2.jpg | Bin .../jupiter}/jupiterprojection/textures/3.jpg | Bin .../textures/Jupiter-text.png | Bin .../textures/defaultProj.png | Bin .../textures/defaultProj2.png | Bin .../textures/europaRise1.jpg | Bin .../textures/europaRise2.jpg | Bin .../jupiterprojection/textures/grid.jpg | Bin .../jupiterprojection/textures/jupiter.jpg | Bin .../textures/jupiterFlipped.jpg | Bin .../textures/jupiterFlipped_low.jpg | Bin .../lor_0034817584_0x630_sci_1.fit.jpg | Bin .../lor_0034817654_0x630_sci_1.fit.jpg | Bin .../textures/lor_0034817724_0x630_sci_1.jpg | Bin .../lor_0034817794_0x630_sci_1.fit.jpg | Bin .../jupiterprojection/textures/lorriTest1.jpg | Bin .../jupiterprojection/textures/lorriTest2.jpg | Bin .../jupiterprojection/textures/scope.png | Bin .../jupiterprojection/textures/show.jpg | Bin .../jupiterprojection/textures/show_3072.jpg | Bin .../jupiterprojection/textures/small.jpg | Bin .../jupiterprojection/textures/small.png | Bin .../jupiterprojection/textures/test.jpg | Bin .../NewHorizonsKernels.torrent | Bin .../{ => newhorizons}/jup260.bsp.torrent | Bin .../{ => newhorizons}/newhorizons.data | 0 .../{ => newhorizons}/newhorizons.mod | 4 +- .../newhorizonsfov/newhorizonsfov.mod | 0 .../newhorizonsfov/textures/glare.png | Bin .../newhorizonsfov/textures/glare_blue.png | Bin .../newhorizonspath/newhorizonspath.mod | 0 .../newhorizonspath/textures/glare.png | Bin .../newhorizonspath/textures/glare_blue.png | Bin .../newhorizonstrail/newhorizonstrail.mod | 0 .../newhorizonstrail/textures/glare.png | Bin .../newhorizonstrail/textures/glare_blue.png | Bin .../charonprojection/charonprojection.data | 0 .../charonprojection/charonprojection.mod | 0 .../{ => newhorizons/pluto}/hydra/hydra.mod | 0 .../pluto}/hydra/textures/Hydra-Text.png | Bin .../pluto}/hydra/textures/gray.jpg | Bin .../pluto}/kerberos/kerberos.mod | 0 .../kerberos/textures/Kerberos-Text.png | Bin .../pluto}/kerberos/textures/gray.jpg | Bin .../scene/{ => newhorizons/pluto}/nix/nix.mod | 0 .../pluto}/nix/textures/Nix-Text.png | Bin .../pluto}/nix/textures/gray.jpg | Bin .../plutoprojectionhybrid.data | 0 .../plutoprojectionhybrid.mod | 0 .../{ => newhorizons/pluto}/styx/styx.mod | 0 .../pluto}/styx/textures/Styx-Text.png | Bin .../pluto}/styx/textures/gray.jpg | Bin ext/ghoul | 2 +- src/scene/scenegraph.cpp | 123 ++++++++++-------- 76 files changed, 108 insertions(+), 101 deletions(-) rename data/scene/{ => newhorizons/jupiter}/callistoprojection/callistoprojection.data (100%) rename data/scene/{ => newhorizons/jupiter}/callistoprojection/callistoprojection.mod (100%) rename data/scene/{ => newhorizons/jupiter}/callistoprojection/textures/Callisto-Text.png (100%) rename data/scene/{ => newhorizons/jupiter}/callistoprojection/textures/defaultProj.png (100%) rename data/scene/{ => newhorizons/jupiter}/europaprojection/europaprojection.data (100%) rename data/scene/{ => newhorizons/jupiter}/europaprojection/europaprojection.mod (100%) rename data/scene/{ => newhorizons/jupiter}/europaprojection/textures/Europa-Text.png (100%) rename data/scene/{ => newhorizons/jupiter}/europaprojection/textures/defaultProj.png (100%) rename data/scene/{ => newhorizons/jupiter}/ganymedeprojection/ganymedeprojection.data (100%) rename data/scene/{ => newhorizons/jupiter}/ganymedeprojection/ganymedeprojection.mod (100%) rename data/scene/{ => newhorizons/jupiter}/ganymedeprojection/textures/Ganymede-Text.png (100%) rename data/scene/{ => newhorizons/jupiter}/ganymedeprojection/textures/defaultProj.png (100%) rename data/scene/{ => newhorizons/jupiter}/ioprojection/ioprojection.data (100%) rename data/scene/{ => newhorizons/jupiter}/ioprojection/ioprojection.mod (100%) rename data/scene/{ => newhorizons/jupiter}/ioprojection/textures/Io-Text.png (100%) rename data/scene/{ => newhorizons/jupiter}/ioprojection/textures/defaultProj.png (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/ProjectionsOfInterest.torrent (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/jupiterprojection.data (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/jupiterprojection.mod (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/1.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/2.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/3.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/Jupiter-text.png (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/defaultProj.png (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/defaultProj2.png (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/europaRise1.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/europaRise2.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/grid.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/jupiter.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/jupiterFlipped.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/jupiterFlipped_low.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/lor_0034817584_0x630_sci_1.fit.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/lor_0034817654_0x630_sci_1.fit.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/lor_0034817724_0x630_sci_1.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/lor_0034817794_0x630_sci_1.fit.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/lorriTest1.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/lorriTest2.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/scope.png (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/show.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/show_3072.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/small.jpg (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/small.png (100%) rename data/scene/{ => newhorizons/jupiter}/jupiterprojection/textures/test.jpg (100%) rename data/scene/newhorizons/{ => newhorizons}/NewHorizonsKernels.torrent (100%) rename data/scene/newhorizons/{ => newhorizons}/jup260.bsp.torrent (100%) rename data/scene/newhorizons/{ => newhorizons}/newhorizons.data (100%) rename data/scene/newhorizons/{ => newhorizons}/newhorizons.mod (97%) rename data/scene/{ => newhorizons}/newhorizonsfov/newhorizonsfov.mod (100%) rename data/scene/{ => newhorizons}/newhorizonsfov/textures/glare.png (100%) rename data/scene/{ => newhorizons}/newhorizonsfov/textures/glare_blue.png (100%) rename data/scene/{ => newhorizons}/newhorizonspath/newhorizonspath.mod (100%) rename data/scene/{ => newhorizons}/newhorizonspath/textures/glare.png (100%) rename data/scene/{ => newhorizons}/newhorizonspath/textures/glare_blue.png (100%) rename data/scene/{ => newhorizons}/newhorizonstrail/newhorizonstrail.mod (100%) rename data/scene/{ => newhorizons}/newhorizonstrail/textures/glare.png (100%) rename data/scene/{ => newhorizons}/newhorizonstrail/textures/glare_blue.png (100%) rename data/scene/{ => newhorizons/pluto}/charonprojection/charonprojection.data (100%) rename data/scene/{ => newhorizons/pluto}/charonprojection/charonprojection.mod (100%) rename data/scene/{ => newhorizons/pluto}/hydra/hydra.mod (100%) rename data/scene/{ => newhorizons/pluto}/hydra/textures/Hydra-Text.png (100%) rename data/scene/{ => newhorizons/pluto}/hydra/textures/gray.jpg (100%) rename data/scene/{ => newhorizons/pluto}/kerberos/kerberos.mod (100%) rename data/scene/{ => newhorizons/pluto}/kerberos/textures/Kerberos-Text.png (100%) rename data/scene/{ => newhorizons/pluto}/kerberos/textures/gray.jpg (100%) rename data/scene/{ => newhorizons/pluto}/nix/nix.mod (100%) rename data/scene/{ => newhorizons/pluto}/nix/textures/Nix-Text.png (100%) rename data/scene/{ => newhorizons/pluto}/nix/textures/gray.jpg (100%) rename data/scene/{ => newhorizons/pluto}/plutoprojectionhybrid/plutoprojectionhybrid.data (100%) rename data/scene/{ => newhorizons/pluto}/plutoprojectionhybrid/plutoprojectionhybrid.mod (100%) rename data/scene/{ => newhorizons/pluto}/styx/styx.mod (100%) rename data/scene/{ => newhorizons/pluto}/styx/textures/Styx-Text.png (100%) rename data/scene/{ => newhorizons/pluto}/styx/textures/gray.jpg (100%) diff --git a/.gitignore b/.gitignore index c1004bfa33..150deb205c 100644 --- a/.gitignore +++ b/.gitignore @@ -40,16 +40,15 @@ gui/externaltimecontrol/CMakeLists.txt gui/externaltimecontrol/main.cpp gui/externaltimecontrol/mainwindow.cpp gui/externaltimecontrol/mainwindow.h -include/openspace/version.h data/scene/67P/obj/67P_rotated_5_130.obj data/spice/NewHorizonsKernels/ data/spice/RosettaKernels/ -data/scene/plutoprojectionhybrid/textures/ -data/scene/plutoprojectionhybrid/textures/Shenk_180.jpg -data/scene/plutoprojectionhybrid/textures/barycenter.png -data/scene/plutoprojectionhybrid/textures/defaultProj.png -data/scene/plutoprojectionhybrid/textures/pluto_highres_180.jpg -data/scene/plutoprojectionhybrid/utcEvents.txt +data/scene/newhorizons/pluto/plutoprojectionhybrid/textures/ +data/scene/newhorizons/pluto/plutoprojectionhybrid/textures/Shenk_180.jpg +data/scene/newhorizons/pluto/plutoprojectionhybrid/textures/barycenter.png +data/scene/newhorizons/pluto/plutoprojectionhybrid/textures/defaultProj.png +data/scene/newhorizons/pluto/plutoprojectionhybrid/textures/pluto_highres_180.jpg +data/scene/newhorizons/pluto/plutoprojectionhybrid/utcEvents.txt data/scene/rosetta/obj/mainbodyros.obj data/scene/rosetta/obj/solarpanelleft.obj data/scene/rosetta/obj/solarpanelright.obj @@ -69,7 +68,7 @@ data/scene/uranus/textures/uranus.jpg data/scene/venus/textures/venus.jpg data/scene/vestaprojection/VestaComet/VestaComet_5000.obj data/spice/DawnKernels/ -data/scene/jupiterprojection/ProjectionsOfInterest/ +data/scene/newhorizons/jupiter/jupiterprojection/ProjectionsOfInterest/ data/scene/67P/textures/black.jpg data/scene/67P/textures/defaultProj.jpg data/scene/67P/textures/gray.jpg @@ -77,12 +76,12 @@ data/scene/67P/textures/gray.png data/scene/67P/textures/texmapflipped.jpg data/scene/67P/textures/white.jpg data/scene/67P/textures/white.png -data/scene/callistoprojection/textures/callisto.jpg +data/scene/newhorizons/jupiter/callistoprojection/textures/callisto.jpg data/scene/ceres/textures/gray.png -data/scene/charonprojection/textures/Charon-Text.png -data/scene/charonprojection/textures/charon_highres.jpg -data/scene/charonprojection/textures/charon_highres_annotated.jpg -data/scene/charonprojection/textures/defaultProj.png +data/scene/newhorizons/pluto/charonprojection/textures/Charon-Text.png +data/scene/newhorizons/pluto/charonprojection/textures/charon_highres.jpg +data/scene/newhorizons/pluto/charonprojection/textures/charon_highres_annotated.jpg +data/scene/newhorizons/pluto/charonprojection/textures/defaultProj.png data/scene/dawn/obj/mainbodydawn.obj data/scene/dawn/obj/solarpanelleft.obj data/scene/dawn/obj/solarpanelright.obj @@ -93,25 +92,25 @@ data/scene/earth/textures/earth_bluemarble.jpg data/scene/earth/textures/earth_bluemarble_height.jpg data/scene/earth/textures/earth_night.jpg data/scene/earth/textures/marker.png -data/scene/europaprojection/textures/europa.jpg -data/scene/ganymedeprojection/textures/ganymede.jpg -data/scene/ioprojection/textures/io.jpg +data/scene/newhorizons/jupiter/europaprojection/textures/europa.jpg +data/scene/newhorizons/jupiter/ganymedeprojection/textures/ganymede.jpg +data/scene/newhorizons/jupiter/ioprojection/textures/io.jpg data/scene/jupiter/textures/jupiter.jpg data/scene/mars/textures/mars.jpg data/scene/mercury/textures/mercury.jpg data/scene/milkyway/textures/DarkUniverse_mellinger_8k.jpg data/scene/neptune/textures/neptune.jpg -data/scene/newhorizons/models/Labels.obj -data/scene/newhorizons/models/NewHorizonsCleanModel.obj -data/scene/newhorizons/textures/NHTextureFlipCol.jpg -data/scene/newhorizons/textures/goldfoilbump.tif -data/scene/newhorizons/textures/labels.png +data/scene/newhorizons/newhorizons/models/Labels.obj +data/scene/newhorizons/newhorizons/models/NewHorizonsCleanModel.obj +data/scene/newhorizons/newhorizons/textures/NHTextureFlipCol.jpg +data/scene/newhorizons/newhorizons/textures/goldfoilbump.tif +data/scene/newhorizons/newhorizons/textures/labels.png data/scene/pluto/textures/ data/scene/pluto/textures/Shenk_180.jpg data/scene/pluto/textures/pluto_highres_180.jpg -data/scene/plutoprojectionhybrid/assets/core_v9h_obs_getmets_v8_time_fix_nofrcd_mld.txt -data/scene/plutoprojectionhybrid/textures/3.jpg -data/scene/plutoprojectionhybrid/textures/Pluto-Text.png +data/scene/newhorizons/pluto/plutoprojectionhybrid/assets/core_v9h_obs_getmets_v8_time_fix_nofrcd_mld.txt +data/scene/newhorizons/pluto/plutoprojectionhybrid/textures/3.jpg +data/scene/newhorizons/pluto/plutoprojectionhybrid/textures/Pluto-Text.png data/scene/vestaprojection/VestaComet/VestaComet.mtl data/scene/vestaprojection/textures/defaultProj_backup.png data/scene/vestaprojection/textures/dummy.jpg @@ -120,4 +119,4 @@ data/scene/vestaprojection/textures/projectMe.png data/spice/MAR063.BSP data/spice/de430_1850-2150.bsp data/spice/jup260.bsp -data/scene/plutoprojectionhybrid/images +data/scene/newhorizons/pluto/plutoprojectionhybrid/images diff --git a/data/scene/default_nh.scene b/data/scene/default_nh.scene index 7eda34bb0f..07cd84a34f 100644 --- a/data/scene/default_nh.scene +++ b/data/scene/default_nh.scene @@ -16,29 +16,24 @@ return { "saturn", "uranus", "neptune", - "plutoprojectionhybrid", - "charonprojection", - "kerberos", - "nix", - "styx", - "hydra", + "newhorizons/pluto/plutoprojectionhybrid", + "newhorizons/pluto/charonprojection", + "newhorizons/pluto/kerberos", + "newhorizons/pluto/nix", + "newhorizons/pluto/styx", + "newhorizons/pluto/hydra", "stars", -- "stars-denver", "milkyway", -- "milkyway-eso", "imageplane", - --"constellationbounds", - --"io", - --"europa", - --"ganymede", - --"callisto", - "jupiterprojection", - "ioprojection", - "europaprojection", - "ganymedeprojection", - "callistoprojection", - "newhorizons", - "newhorizonsfov", + "newhorizons/jupiter/jupiterprojection", + "newhorizons/jupiter/ioprojection", + "newhorizons/jupiter/europaprojection", + "newhorizons/jupiter/ganymedeprojection", + "newhorizons/jupiter/callistoprojection", + "newhorizons/newhorizons", + "newhorizons/newhorizonsfov", } } diff --git a/data/scene/callistoprojection/callistoprojection.data b/data/scene/newhorizons/jupiter/callistoprojection/callistoprojection.data similarity index 100% rename from data/scene/callistoprojection/callistoprojection.data rename to data/scene/newhorizons/jupiter/callistoprojection/callistoprojection.data diff --git a/data/scene/callistoprojection/callistoprojection.mod b/data/scene/newhorizons/jupiter/callistoprojection/callistoprojection.mod similarity index 100% rename from data/scene/callistoprojection/callistoprojection.mod rename to data/scene/newhorizons/jupiter/callistoprojection/callistoprojection.mod diff --git a/data/scene/callistoprojection/textures/Callisto-Text.png b/data/scene/newhorizons/jupiter/callistoprojection/textures/Callisto-Text.png similarity index 100% rename from data/scene/callistoprojection/textures/Callisto-Text.png rename to data/scene/newhorizons/jupiter/callistoprojection/textures/Callisto-Text.png diff --git a/data/scene/callistoprojection/textures/defaultProj.png b/data/scene/newhorizons/jupiter/callistoprojection/textures/defaultProj.png similarity index 100% rename from data/scene/callistoprojection/textures/defaultProj.png rename to data/scene/newhorizons/jupiter/callistoprojection/textures/defaultProj.png diff --git a/data/scene/europaprojection/europaprojection.data b/data/scene/newhorizons/jupiter/europaprojection/europaprojection.data similarity index 100% rename from data/scene/europaprojection/europaprojection.data rename to data/scene/newhorizons/jupiter/europaprojection/europaprojection.data diff --git a/data/scene/europaprojection/europaprojection.mod b/data/scene/newhorizons/jupiter/europaprojection/europaprojection.mod similarity index 100% rename from data/scene/europaprojection/europaprojection.mod rename to data/scene/newhorizons/jupiter/europaprojection/europaprojection.mod diff --git a/data/scene/europaprojection/textures/Europa-Text.png b/data/scene/newhorizons/jupiter/europaprojection/textures/Europa-Text.png similarity index 100% rename from data/scene/europaprojection/textures/Europa-Text.png rename to data/scene/newhorizons/jupiter/europaprojection/textures/Europa-Text.png diff --git a/data/scene/europaprojection/textures/defaultProj.png b/data/scene/newhorizons/jupiter/europaprojection/textures/defaultProj.png similarity index 100% rename from data/scene/europaprojection/textures/defaultProj.png rename to data/scene/newhorizons/jupiter/europaprojection/textures/defaultProj.png diff --git a/data/scene/ganymedeprojection/ganymedeprojection.data b/data/scene/newhorizons/jupiter/ganymedeprojection/ganymedeprojection.data similarity index 100% rename from data/scene/ganymedeprojection/ganymedeprojection.data rename to data/scene/newhorizons/jupiter/ganymedeprojection/ganymedeprojection.data diff --git a/data/scene/ganymedeprojection/ganymedeprojection.mod b/data/scene/newhorizons/jupiter/ganymedeprojection/ganymedeprojection.mod similarity index 100% rename from data/scene/ganymedeprojection/ganymedeprojection.mod rename to data/scene/newhorizons/jupiter/ganymedeprojection/ganymedeprojection.mod diff --git a/data/scene/ganymedeprojection/textures/Ganymede-Text.png b/data/scene/newhorizons/jupiter/ganymedeprojection/textures/Ganymede-Text.png similarity index 100% rename from data/scene/ganymedeprojection/textures/Ganymede-Text.png rename to data/scene/newhorizons/jupiter/ganymedeprojection/textures/Ganymede-Text.png diff --git a/data/scene/ganymedeprojection/textures/defaultProj.png b/data/scene/newhorizons/jupiter/ganymedeprojection/textures/defaultProj.png similarity index 100% rename from data/scene/ganymedeprojection/textures/defaultProj.png rename to data/scene/newhorizons/jupiter/ganymedeprojection/textures/defaultProj.png diff --git a/data/scene/ioprojection/ioprojection.data b/data/scene/newhorizons/jupiter/ioprojection/ioprojection.data similarity index 100% rename from data/scene/ioprojection/ioprojection.data rename to data/scene/newhorizons/jupiter/ioprojection/ioprojection.data diff --git a/data/scene/ioprojection/ioprojection.mod b/data/scene/newhorizons/jupiter/ioprojection/ioprojection.mod similarity index 100% rename from data/scene/ioprojection/ioprojection.mod rename to data/scene/newhorizons/jupiter/ioprojection/ioprojection.mod diff --git a/data/scene/ioprojection/textures/Io-Text.png b/data/scene/newhorizons/jupiter/ioprojection/textures/Io-Text.png similarity index 100% rename from data/scene/ioprojection/textures/Io-Text.png rename to data/scene/newhorizons/jupiter/ioprojection/textures/Io-Text.png diff --git a/data/scene/ioprojection/textures/defaultProj.png b/data/scene/newhorizons/jupiter/ioprojection/textures/defaultProj.png similarity index 100% rename from data/scene/ioprojection/textures/defaultProj.png rename to data/scene/newhorizons/jupiter/ioprojection/textures/defaultProj.png diff --git a/data/scene/jupiterprojection/ProjectionsOfInterest.torrent b/data/scene/newhorizons/jupiter/jupiterprojection/ProjectionsOfInterest.torrent similarity index 100% rename from data/scene/jupiterprojection/ProjectionsOfInterest.torrent rename to data/scene/newhorizons/jupiter/jupiterprojection/ProjectionsOfInterest.torrent diff --git a/data/scene/jupiterprojection/jupiterprojection.data b/data/scene/newhorizons/jupiter/jupiterprojection/jupiterprojection.data similarity index 100% rename from data/scene/jupiterprojection/jupiterprojection.data rename to data/scene/newhorizons/jupiter/jupiterprojection/jupiterprojection.data diff --git a/data/scene/jupiterprojection/jupiterprojection.mod b/data/scene/newhorizons/jupiter/jupiterprojection/jupiterprojection.mod similarity index 100% rename from data/scene/jupiterprojection/jupiterprojection.mod rename to data/scene/newhorizons/jupiter/jupiterprojection/jupiterprojection.mod diff --git a/data/scene/jupiterprojection/textures/1.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/1.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/1.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/1.jpg diff --git a/data/scene/jupiterprojection/textures/2.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/2.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/2.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/2.jpg diff --git a/data/scene/jupiterprojection/textures/3.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/3.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/3.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/3.jpg diff --git a/data/scene/jupiterprojection/textures/Jupiter-text.png b/data/scene/newhorizons/jupiter/jupiterprojection/textures/Jupiter-text.png similarity index 100% rename from data/scene/jupiterprojection/textures/Jupiter-text.png rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/Jupiter-text.png diff --git a/data/scene/jupiterprojection/textures/defaultProj.png b/data/scene/newhorizons/jupiter/jupiterprojection/textures/defaultProj.png similarity index 100% rename from data/scene/jupiterprojection/textures/defaultProj.png rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/defaultProj.png diff --git a/data/scene/jupiterprojection/textures/defaultProj2.png b/data/scene/newhorizons/jupiter/jupiterprojection/textures/defaultProj2.png similarity index 100% rename from data/scene/jupiterprojection/textures/defaultProj2.png rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/defaultProj2.png diff --git a/data/scene/jupiterprojection/textures/europaRise1.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/europaRise1.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/europaRise1.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/europaRise1.jpg diff --git a/data/scene/jupiterprojection/textures/europaRise2.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/europaRise2.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/europaRise2.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/europaRise2.jpg diff --git a/data/scene/jupiterprojection/textures/grid.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/grid.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/grid.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/grid.jpg diff --git a/data/scene/jupiterprojection/textures/jupiter.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/jupiter.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/jupiter.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/jupiter.jpg diff --git a/data/scene/jupiterprojection/textures/jupiterFlipped.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/jupiterFlipped.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/jupiterFlipped.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/jupiterFlipped.jpg diff --git a/data/scene/jupiterprojection/textures/jupiterFlipped_low.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/jupiterFlipped_low.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/jupiterFlipped_low.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/jupiterFlipped_low.jpg diff --git a/data/scene/jupiterprojection/textures/lor_0034817584_0x630_sci_1.fit.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/lor_0034817584_0x630_sci_1.fit.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/lor_0034817584_0x630_sci_1.fit.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/lor_0034817584_0x630_sci_1.fit.jpg diff --git a/data/scene/jupiterprojection/textures/lor_0034817654_0x630_sci_1.fit.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/lor_0034817654_0x630_sci_1.fit.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/lor_0034817654_0x630_sci_1.fit.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/lor_0034817654_0x630_sci_1.fit.jpg diff --git a/data/scene/jupiterprojection/textures/lor_0034817724_0x630_sci_1.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/lor_0034817724_0x630_sci_1.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/lor_0034817724_0x630_sci_1.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/lor_0034817724_0x630_sci_1.jpg diff --git a/data/scene/jupiterprojection/textures/lor_0034817794_0x630_sci_1.fit.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/lor_0034817794_0x630_sci_1.fit.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/lor_0034817794_0x630_sci_1.fit.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/lor_0034817794_0x630_sci_1.fit.jpg diff --git a/data/scene/jupiterprojection/textures/lorriTest1.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/lorriTest1.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/lorriTest1.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/lorriTest1.jpg diff --git a/data/scene/jupiterprojection/textures/lorriTest2.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/lorriTest2.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/lorriTest2.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/lorriTest2.jpg diff --git a/data/scene/jupiterprojection/textures/scope.png b/data/scene/newhorizons/jupiter/jupiterprojection/textures/scope.png similarity index 100% rename from data/scene/jupiterprojection/textures/scope.png rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/scope.png diff --git a/data/scene/jupiterprojection/textures/show.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/show.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/show.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/show.jpg diff --git a/data/scene/jupiterprojection/textures/show_3072.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/show_3072.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/show_3072.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/show_3072.jpg diff --git a/data/scene/jupiterprojection/textures/small.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/small.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/small.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/small.jpg diff --git a/data/scene/jupiterprojection/textures/small.png b/data/scene/newhorizons/jupiter/jupiterprojection/textures/small.png similarity index 100% rename from data/scene/jupiterprojection/textures/small.png rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/small.png diff --git a/data/scene/jupiterprojection/textures/test.jpg b/data/scene/newhorizons/jupiter/jupiterprojection/textures/test.jpg similarity index 100% rename from data/scene/jupiterprojection/textures/test.jpg rename to data/scene/newhorizons/jupiter/jupiterprojection/textures/test.jpg diff --git a/data/scene/newhorizons/NewHorizonsKernels.torrent b/data/scene/newhorizons/newhorizons/NewHorizonsKernels.torrent similarity index 100% rename from data/scene/newhorizons/NewHorizonsKernels.torrent rename to data/scene/newhorizons/newhorizons/NewHorizonsKernels.torrent diff --git a/data/scene/newhorizons/jup260.bsp.torrent b/data/scene/newhorizons/newhorizons/jup260.bsp.torrent similarity index 100% rename from data/scene/newhorizons/jup260.bsp.torrent rename to data/scene/newhorizons/newhorizons/jup260.bsp.torrent diff --git a/data/scene/newhorizons/newhorizons.data b/data/scene/newhorizons/newhorizons/newhorizons.data similarity index 100% rename from data/scene/newhorizons/newhorizons.data rename to data/scene/newhorizons/newhorizons/newhorizons.data diff --git a/data/scene/newhorizons/newhorizons.mod b/data/scene/newhorizons/newhorizons/newhorizons.mod similarity index 97% rename from data/scene/newhorizons/newhorizons.mod rename to data/scene/newhorizons/newhorizons/newhorizons.mod index a58b2f73f5..61f9dae0cc 100644 --- a/data/scene/newhorizons/newhorizons.mod +++ b/data/scene/newhorizons/newhorizons/newhorizons.mod @@ -89,7 +89,7 @@ return { Body = "NEW HORIZONS", Geometry = { Type = "MultiModelGeometry", - GeometryFile = "${OPENSPACE_DATA}/scene/newhorizons/models/NewHorizonsCleanModel.obj", + GeometryFile = "models/NewHorizonsCleanModel.obj", Magnification = 4, }, Textures = { @@ -151,7 +151,7 @@ return { Body = "NEW HORIZONS", Geometry = { Type = "MultiModelGeometry", - GeometryFile = "${OPENSPACE_DATA}/scene/newhorizons/models/Labels.obj", + GeometryFile = "models/Labels.obj", Magnification = 4, }, Textures = { diff --git a/data/scene/newhorizonsfov/newhorizonsfov.mod b/data/scene/newhorizons/newhorizonsfov/newhorizonsfov.mod similarity index 100% rename from data/scene/newhorizonsfov/newhorizonsfov.mod rename to data/scene/newhorizons/newhorizonsfov/newhorizonsfov.mod diff --git a/data/scene/newhorizonsfov/textures/glare.png b/data/scene/newhorizons/newhorizonsfov/textures/glare.png similarity index 100% rename from data/scene/newhorizonsfov/textures/glare.png rename to data/scene/newhorizons/newhorizonsfov/textures/glare.png diff --git a/data/scene/newhorizonsfov/textures/glare_blue.png b/data/scene/newhorizons/newhorizonsfov/textures/glare_blue.png similarity index 100% rename from data/scene/newhorizonsfov/textures/glare_blue.png rename to data/scene/newhorizons/newhorizonsfov/textures/glare_blue.png diff --git a/data/scene/newhorizonspath/newhorizonspath.mod b/data/scene/newhorizons/newhorizonspath/newhorizonspath.mod similarity index 100% rename from data/scene/newhorizonspath/newhorizonspath.mod rename to data/scene/newhorizons/newhorizonspath/newhorizonspath.mod diff --git a/data/scene/newhorizonspath/textures/glare.png b/data/scene/newhorizons/newhorizonspath/textures/glare.png similarity index 100% rename from data/scene/newhorizonspath/textures/glare.png rename to data/scene/newhorizons/newhorizonspath/textures/glare.png diff --git a/data/scene/newhorizonspath/textures/glare_blue.png b/data/scene/newhorizons/newhorizonspath/textures/glare_blue.png similarity index 100% rename from data/scene/newhorizonspath/textures/glare_blue.png rename to data/scene/newhorizons/newhorizonspath/textures/glare_blue.png diff --git a/data/scene/newhorizonstrail/newhorizonstrail.mod b/data/scene/newhorizons/newhorizonstrail/newhorizonstrail.mod similarity index 100% rename from data/scene/newhorizonstrail/newhorizonstrail.mod rename to data/scene/newhorizons/newhorizonstrail/newhorizonstrail.mod diff --git a/data/scene/newhorizonstrail/textures/glare.png b/data/scene/newhorizons/newhorizonstrail/textures/glare.png similarity index 100% rename from data/scene/newhorizonstrail/textures/glare.png rename to data/scene/newhorizons/newhorizonstrail/textures/glare.png diff --git a/data/scene/newhorizonstrail/textures/glare_blue.png b/data/scene/newhorizons/newhorizonstrail/textures/glare_blue.png similarity index 100% rename from data/scene/newhorizonstrail/textures/glare_blue.png rename to data/scene/newhorizons/newhorizonstrail/textures/glare_blue.png diff --git a/data/scene/charonprojection/charonprojection.data b/data/scene/newhorizons/pluto/charonprojection/charonprojection.data similarity index 100% rename from data/scene/charonprojection/charonprojection.data rename to data/scene/newhorizons/pluto/charonprojection/charonprojection.data diff --git a/data/scene/charonprojection/charonprojection.mod b/data/scene/newhorizons/pluto/charonprojection/charonprojection.mod similarity index 100% rename from data/scene/charonprojection/charonprojection.mod rename to data/scene/newhorizons/pluto/charonprojection/charonprojection.mod diff --git a/data/scene/hydra/hydra.mod b/data/scene/newhorizons/pluto/hydra/hydra.mod similarity index 100% rename from data/scene/hydra/hydra.mod rename to data/scene/newhorizons/pluto/hydra/hydra.mod diff --git a/data/scene/hydra/textures/Hydra-Text.png b/data/scene/newhorizons/pluto/hydra/textures/Hydra-Text.png similarity index 100% rename from data/scene/hydra/textures/Hydra-Text.png rename to data/scene/newhorizons/pluto/hydra/textures/Hydra-Text.png diff --git a/data/scene/hydra/textures/gray.jpg b/data/scene/newhorizons/pluto/hydra/textures/gray.jpg similarity index 100% rename from data/scene/hydra/textures/gray.jpg rename to data/scene/newhorizons/pluto/hydra/textures/gray.jpg diff --git a/data/scene/kerberos/kerberos.mod b/data/scene/newhorizons/pluto/kerberos/kerberos.mod similarity index 100% rename from data/scene/kerberos/kerberos.mod rename to data/scene/newhorizons/pluto/kerberos/kerberos.mod diff --git a/data/scene/kerberos/textures/Kerberos-Text.png b/data/scene/newhorizons/pluto/kerberos/textures/Kerberos-Text.png similarity index 100% rename from data/scene/kerberos/textures/Kerberos-Text.png rename to data/scene/newhorizons/pluto/kerberos/textures/Kerberos-Text.png diff --git a/data/scene/kerberos/textures/gray.jpg b/data/scene/newhorizons/pluto/kerberos/textures/gray.jpg similarity index 100% rename from data/scene/kerberos/textures/gray.jpg rename to data/scene/newhorizons/pluto/kerberos/textures/gray.jpg diff --git a/data/scene/nix/nix.mod b/data/scene/newhorizons/pluto/nix/nix.mod similarity index 100% rename from data/scene/nix/nix.mod rename to data/scene/newhorizons/pluto/nix/nix.mod diff --git a/data/scene/nix/textures/Nix-Text.png b/data/scene/newhorizons/pluto/nix/textures/Nix-Text.png similarity index 100% rename from data/scene/nix/textures/Nix-Text.png rename to data/scene/newhorizons/pluto/nix/textures/Nix-Text.png diff --git a/data/scene/nix/textures/gray.jpg b/data/scene/newhorizons/pluto/nix/textures/gray.jpg similarity index 100% rename from data/scene/nix/textures/gray.jpg rename to data/scene/newhorizons/pluto/nix/textures/gray.jpg diff --git a/data/scene/plutoprojectionhybrid/plutoprojectionhybrid.data b/data/scene/newhorizons/pluto/plutoprojectionhybrid/plutoprojectionhybrid.data similarity index 100% rename from data/scene/plutoprojectionhybrid/plutoprojectionhybrid.data rename to data/scene/newhorizons/pluto/plutoprojectionhybrid/plutoprojectionhybrid.data diff --git a/data/scene/plutoprojectionhybrid/plutoprojectionhybrid.mod b/data/scene/newhorizons/pluto/plutoprojectionhybrid/plutoprojectionhybrid.mod similarity index 100% rename from data/scene/plutoprojectionhybrid/plutoprojectionhybrid.mod rename to data/scene/newhorizons/pluto/plutoprojectionhybrid/plutoprojectionhybrid.mod diff --git a/data/scene/styx/styx.mod b/data/scene/newhorizons/pluto/styx/styx.mod similarity index 100% rename from data/scene/styx/styx.mod rename to data/scene/newhorizons/pluto/styx/styx.mod diff --git a/data/scene/styx/textures/Styx-Text.png b/data/scene/newhorizons/pluto/styx/textures/Styx-Text.png similarity index 100% rename from data/scene/styx/textures/Styx-Text.png rename to data/scene/newhorizons/pluto/styx/textures/Styx-Text.png diff --git a/data/scene/styx/textures/gray.jpg b/data/scene/newhorizons/pluto/styx/textures/gray.jpg similarity index 100% rename from data/scene/styx/textures/gray.jpg rename to data/scene/newhorizons/pluto/styx/textures/gray.jpg diff --git a/ext/ghoul b/ext/ghoul index ad456dd4b2..5bfff36b5d 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit ad456dd4b273bd9db5a5f7f8f50915fef01b5469 +Subproject commit 5bfff36b5d26e16418da62adf64d6c523a64e6f8 diff --git a/src/scene/scenegraph.cpp b/src/scene/scenegraph.cpp index 825c6224a1..c9462023db 100644 --- a/src/scene/scenegraph.cpp +++ b/src/scene/scenegraph.cpp @@ -175,9 +175,14 @@ bool SceneGraph::loadFromFile(const std::string& sceneDescription) { std::sort(keys.begin(), keys.end()); ghoul::filesystem::Directory oldDirectory = FileSys.currentDirectory(); for (const std::string& key : keys) { - std::string moduleName = moduleDictionary.value(key); - std::string modulePath = FileSys.pathByAppendingComponent(sceneDirectory, moduleName); - + std::string fullModuleName = moduleDictionary.value(key); + std::string modulePath = FileSys.pathByAppendingComponent(sceneDirectory, fullModuleName); + + std::string moduleName = fullModuleName; + std::string::size_type pos = fullModuleName.find_last_of(FileSys.PathSeparator); + if (pos != std::string::npos) + moduleName = fullModuleName.substr(pos + 1); + if (!FileSys.directoryExists(modulePath)) { LERROR("Could not load module '" << moduleName << "'. Directory did not exist"); continue; @@ -188,70 +193,78 @@ bool SceneGraph::loadFromFile(const std::string& sceneDescription) { moduleName + _moduleExtension ); - if (!FileSys.fileExists(moduleFile)) { - LERROR("Could not load module file '" << moduleFile << "'. File did not exist"); - continue; - } - - ghoul::Dictionary moduleDictionary; - try { - ghoul::lua::loadDictionaryFromFile(moduleFile, moduleDictionary, state); - } - catch (...) { - continue; - } - - std::vector keys = moduleDictionary.keys(); - for (const std::string& key : keys) { - if (!moduleDictionary.hasValue(key)) { - LERROR("SceneGraphNode '" << key << "' is not a table in module '" - << moduleFile << "'"); + std::vector moduleDictionaries; + if (FileSys.fileExists(moduleFile)) { + // We have a module file, so it is a direct include + try { + ghoul::Dictionary moduleDictionary; + ghoul::lua::loadDictionaryFromFile(moduleFile, moduleDictionary, state); + moduleDictionaries.push_back(std::move(moduleDictionary)); + } + catch (...) { continue; } + } +// else { +// // If we do not have a module file, we have to include all subdirectories +// ghoul::filesystem:: +// ghoul::filesystem::Directory d = modulePath; + +// } + + for (const ghoul::Dictionary& moduleDictionary : moduleDictionaries) { + std::vector keys = moduleDictionary.keys(); + for (const std::string& key : keys) { + if (!moduleDictionary.hasValue(key)) { + LERROR("SceneGraphNode '" << key << "' is not a table in module '" + << moduleFile << "'"); + continue; + } - ghoul::Dictionary element; - std::string nodeName; - std::string parentName; + ghoul::Dictionary element; + std::string nodeName; + std::string parentName; - moduleDictionary.getValue(key, element); - element.setValue(KeyPathModule, modulePath); + moduleDictionary.getValue(key, element); + element.setValue(KeyPathModule, modulePath); - element.getValue(SceneGraphNode::KeyName, nodeName); - element.getValue(SceneGraphNode::KeyParentName, parentName); + element.getValue(SceneGraphNode::KeyName, nodeName); + element.getValue(SceneGraphNode::KeyParentName, parentName); - FileSys.setCurrentDirectory(modulePath); - SceneGraphNode* node = SceneGraphNode::createFromDictionary(element); - if (node == nullptr) { - LERROR("Error loading SceneGraphNode '" << nodeName << "' in module '" << moduleName << "'"); - continue; - //clear(); - //return false; - } + FileSys.setCurrentDirectory(modulePath); + SceneGraphNode* node = SceneGraphNode::createFromDictionary(element); + if (node == nullptr) { + LERROR("Error loading SceneGraphNode '" << nodeName << "' in module '" << moduleName << "'"); + continue; + //clear(); + //return false; + } - dependencies[nodeName].push_back(parentName); - parents[nodeName] = parentName; - // Also include loaded dependencies + dependencies[nodeName].push_back(parentName); + parents[nodeName] = parentName; + // Also include loaded dependencies - if (element.hasKey(SceneGraphNode::KeyDependencies)) { - if (element.hasValue(SceneGraphNode::KeyDependencies)) { - ghoul::Dictionary nodeDependencies; - element.getValue(SceneGraphNode::KeyDependencies, nodeDependencies); + if (element.hasKey(SceneGraphNode::KeyDependencies)) { + if (element.hasValue(SceneGraphNode::KeyDependencies)) { + ghoul::Dictionary nodeDependencies; + element.getValue(SceneGraphNode::KeyDependencies, nodeDependencies); - std::vector keys = nodeDependencies.keys(); - for (const std::string& key : keys) { - std::string value = nodeDependencies.value(key); - dependencies[nodeName].push_back(value); + std::vector keys = nodeDependencies.keys(); + for (const std::string& key : keys) { + std::string value = nodeDependencies.value(key); + dependencies[nodeName].push_back(value); + } + } + else { + LERROR("Dependencies did not have the corrent type"); } } - else { - LERROR("Dependencies did not have the corrent type"); - } + + + SceneGraphNodeInternal* internalNode = new SceneGraphNodeInternal; + internalNode->node = node; + _nodes.push_back(internalNode); } - - - SceneGraphNodeInternal* internalNode = new SceneGraphNodeInternal; - internalNode->node = node; - _nodes.push_back(internalNode); } } ghoul::lua::destroyLuaState(state);