mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Merge remote-tracking branch 'origin/master' into feature/documentation-overhaul
# Conflicts: # src/properties/propertyowner.cpp # src/scripting/scriptengine.cpp
This commit is contained in:
73
CITATION.cff
Normal file
73
CITATION.cff
Normal file
@@ -0,0 +1,73 @@
|
||||
cff-version: 1.2.0
|
||||
message: "If you use this software, please cite it as below."
|
||||
authors:
|
||||
- family-names: "Bock"
|
||||
given-names: "Alexander"
|
||||
orcid: "https://orcid.org/0000-0002-2849-6146"
|
||||
- family-names: "Axelsson"
|
||||
given-names: "Emil"
|
||||
- family-names: "Costa"
|
||||
given-names: "Jonathas"
|
||||
orcid: "https://orcid.org/0000-0002-5008-5685"
|
||||
- family-names: "Payne"
|
||||
given-names: "Gene"
|
||||
orcid: "https://orcid.org/0000-0001-8022-4781"
|
||||
- family-names: "Acinapura"
|
||||
given-names: "Micah"
|
||||
- family-names: "Trakinski"
|
||||
given-names: "Vivian"
|
||||
- family-names: "Emmart"
|
||||
given-names: "Carter"
|
||||
- family-names: "Silva"
|
||||
given-names: "Claudio"
|
||||
orcid: "https://orcid.org/0000-0003-2452-2295"
|
||||
- family-names: "Hansen"
|
||||
given-names: "Charles"
|
||||
orcid: "https://orcid.org/0000-0002-8480-2152"
|
||||
- family-names: "Ynnerman"
|
||||
given-names: "Anders"
|
||||
orcid: "https://orcid.org/0000-0002-9466-9826"
|
||||
title: "OpenSpace"
|
||||
version: 0.18.2
|
||||
doi: 10.1109/TVCG.2019.2934259
|
||||
date-released: 2022-12-24
|
||||
url: "https://github.com/OpenSpace/OpenSpace"
|
||||
preferred-citation:
|
||||
scope: "If you use this software, please cite it as below"
|
||||
type: article
|
||||
authors:
|
||||
- family-names: "Bock"
|
||||
given-names: "Alexander"
|
||||
orcid: "https://orcid.org/0000-0002-2849-6146"
|
||||
- family-names: "Axelsson"
|
||||
given-names: "Emil"
|
||||
- family-names: "Costa"
|
||||
given-names: "Jonathas"
|
||||
orcid: "https://orcid.org/0000-0002-5008-5685"
|
||||
- family-names: "Payne"
|
||||
given-names: "Gene"
|
||||
orcid: "https://orcid.org/0000-0001-8022-4781"
|
||||
- family-names: "Acinapura"
|
||||
given-names: "Micah"
|
||||
- family-names: "Trakinski"
|
||||
given-names: "Vivian"
|
||||
- family-names: "Emmart"
|
||||
given-names: "Carter"
|
||||
- family-names: "Silva"
|
||||
given-names: "Claudio"
|
||||
orcid: "https://orcid.org/0000-0003-2452-2295"
|
||||
- family-names: "Hansen"
|
||||
given-names: "Charles"
|
||||
orcid: "https://orcid.org/0000-0002-8480-2152"
|
||||
- family-names: "Ynnerman"
|
||||
given-names: "Anders"
|
||||
orcid: "https://orcid.org/0000-0002-9466-9826"
|
||||
doi: 10.1109/TVCG.2019.2934259
|
||||
journal: "IEEE Transactions on Visualization and Computer Graphics"
|
||||
month: 1
|
||||
start: 633
|
||||
end: 642
|
||||
title: "OpenSpace: A System for Astrographics"
|
||||
issue: 1
|
||||
volume: 26
|
||||
year: 2020
|
||||
103
CMakeLists.txt
103
CMakeLists.txt
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2022 #
|
||||
# Copyright (c) 2014-2023 #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
|
||||
# software and associated documentation files (the "Software"), to deal in the Software #
|
||||
@@ -22,28 +22,22 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
|
||||
cmake_policy(SET CMP0120 NEW)
|
||||
cmake_minimum_required(VERSION 3.25 FATAL_ERROR)
|
||||
cmake_policy(VERSION 3.25)
|
||||
|
||||
project(OpenSpace)
|
||||
|
||||
set(OPENSPACE_VERSION_MAJOR 0)
|
||||
set(OPENSPACE_VERSION_MINOR 18)
|
||||
set(OPENSPACE_VERSION_MINOR 19)
|
||||
set(OPENSPACE_VERSION_PATCH 0)
|
||||
set(OPENSPACE_VERSION_STRING "Beta-11")
|
||||
set(OPENSPACE_VERSION_STRING "<dev>")
|
||||
|
||||
set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}")
|
||||
set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake")
|
||||
set(GHOUL_BASE_DIR "${OPENSPACE_BASE_DIR}/ext/ghoul")
|
||||
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/module_common.cmake)
|
||||
include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake)
|
||||
include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake)
|
||||
include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/module_common.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/message_macros.cmake)
|
||||
|
||||
begin_header("Configuring OpenSpace project")
|
||||
|
||||
# Bail out if the user tries to generate a 32 bit project.
|
||||
# Bail out if the user tries to generate a 32 bit project
|
||||
if (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
message(FATAL_ERROR "OpenSpace can only be generated for 64 bit architectures.")
|
||||
endif ()
|
||||
@@ -51,9 +45,7 @@ endif ()
|
||||
##########################################################################################
|
||||
# Cleanup project #
|
||||
##########################################################################################
|
||||
set(OPENSPACE_APPS_DIR "${OPENSPACE_BASE_DIR}/apps")
|
||||
|
||||
if (NOT EXISTS "${OPENSPACE_BASE_DIR}/ext/ghoul/CMakeLists.txt")
|
||||
if (NOT EXISTS "${PROJECT_SOURCE_DIR}/ext/ghoul/CMakeLists.txt")
|
||||
message(FATAL_ERROR "Git submodules are missing. Please run "
|
||||
"git submodule update --init --recursive to download the missing dependencies."
|
||||
)
|
||||
@@ -68,11 +60,13 @@ mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BUILD_TYPE CMAKE_DEBUG_POST
|
||||
)
|
||||
|
||||
# Set build output directories
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OPENSPACE_CMAKE_EXT_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OPENSPACE_BASE_DIR}/bin)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/support/cmake)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
|
||||
|
||||
# "OpenSpace Helper" is not a valid CMake target name under OLD
|
||||
cmake_policy(SET CMP0037 NEW)
|
||||
if (MSVC)
|
||||
# Force all builds to be multi-threaded and increase number of sections in obj files
|
||||
add_definitions(/MP /bigobj)
|
||||
endif ()
|
||||
|
||||
##########################################################################################
|
||||
# Main #
|
||||
@@ -106,8 +100,6 @@ else ()
|
||||
set(OPENSPACE_GIT_STATUS "")
|
||||
endif ()
|
||||
|
||||
option(OPENSPACE_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF)
|
||||
|
||||
if (MSVC)
|
||||
option(OPENSPACE_BREAK_ON_FLOATING_POINT_EXCEPTION "Raise exceptions when encountering Inf's or Nan's in floating point numbers" OFF)
|
||||
|
||||
@@ -134,31 +126,26 @@ if (MSVC)
|
||||
set(GHOUL_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS ${OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS} CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
|
||||
if (UNIX)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi")
|
||||
else ()
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
#Can set to "RelWithDebInfo" or "Debug" also, but problems occur if this is blank by default
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Default build type" FORCE)
|
||||
endif ()
|
||||
if (NOT DEFINED CMAKE_CXX_FLAGS OR CMAKE_CXX_FLAGS MATCHES "")
|
||||
set(CMAKE_CXX_FLAGS " ")
|
||||
endif ()
|
||||
STRING(FIND ${CMAKE_CXX_FLAGS} "GLM_ENABLE_EXPERIMENTAL" GLM_FLAG_POS)
|
||||
if (${GLM_FLAG_POS} EQUAL -1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLM_ENABLE_EXPERIMENTAL" CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
set(OpenGL_GL_PREFERENCE "GLVND" CACHE STRING "OpenGL Preference setting necessary for linux" FORCE)
|
||||
#Fix for gcc tolerating space in target name
|
||||
if (NOT DEFINED CMAKE_C_FLAGS OR CMAKE_C_FLAGS MATCHES "")
|
||||
set(CMAKE_C_FLAGS " ")
|
||||
endif ()
|
||||
STRING(FIND ${CMAKE_C_FLAGS} "_GNU_SOURCE" GNUSOURCE_FLAG_POS)
|
||||
if (${GNUSOURCE_FLAG_POS} EQUAL -1)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE" CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
if (UNIX AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
# Can set to "RelWithDebInfo" or "Debug" also, but problems occur if this is blank by default
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Default build type" FORCE)
|
||||
endif ()
|
||||
if (NOT DEFINED CMAKE_CXX_FLAGS OR CMAKE_CXX_FLAGS MATCHES "")
|
||||
set(CMAKE_CXX_FLAGS " ")
|
||||
endif ()
|
||||
STRING(FIND ${CMAKE_CXX_FLAGS} "GLM_ENABLE_EXPERIMENTAL" GLM_FLAG_POS)
|
||||
if (${GLM_FLAG_POS} EQUAL -1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLM_ENABLE_EXPERIMENTAL" CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
set(OpenGL_GL_PREFERENCE "GLVND" CACHE STRING "OpenGL Preference setting necessary for linux" FORCE)
|
||||
# Fix for GCC tolerating space in target name
|
||||
if (NOT DEFINED CMAKE_C_FLAGS OR CMAKE_C_FLAGS MATCHES "")
|
||||
set(CMAKE_C_FLAGS " ")
|
||||
endif ()
|
||||
STRING(FIND ${CMAKE_C_FLAGS} "_GNU_SOURCE" GNUSOURCE_FLAG_POS)
|
||||
if (${GNUSOURCE_FLAG_POS} EQUAL -1)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE" CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -176,12 +163,12 @@ add_custom_target(
|
||||
add_dependencies(run_codegen codegen)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/__codegen.h"
|
||||
COMMAND codegen ARGS "${OPENSPACE_BASE_DIR}/modules" "${OPENSPACE_BASE_DIR}/src"
|
||||
COMMAND codegen ARGS "${PROJECT_SOURCE_DIR}/modules" "${PROJECT_SOURCE_DIR}/src"
|
||||
VERBATIM
|
||||
)
|
||||
set_folder_location(codegen-lib "support")
|
||||
set_folder_location(codegen "support")
|
||||
set_folder_location(run_codegen "support")
|
||||
set_target_properties(codegen-lib PROPERTIES FOLDER "support")
|
||||
set_target_properties(codegen PROPERTIES FOLDER "support")
|
||||
set_target_properties(run_codegen PROPERTIES FOLDER "support")
|
||||
|
||||
|
||||
# Qt
|
||||
@@ -218,12 +205,12 @@ end_header("End: Configuring Modules")
|
||||
|
||||
|
||||
add_subdirectory(support/coding/codegen/tests)
|
||||
set_folder_location(run_test_codegen "Unit Tests/support")
|
||||
set_folder_location(codegentest "Unit Tests")
|
||||
set_target_properties(run_test_codegen PROPERTIES FOLDER "Unit Tests/support")
|
||||
set_target_properties(codegentest PROPERTIES FOLDER "Unit Tests")
|
||||
|
||||
|
||||
begin_header("Configuring Applications")
|
||||
add_subdirectory("${OPENSPACE_APPS_DIR}")
|
||||
add_subdirectory(apps)
|
||||
end_header("End: Configuring Applications")
|
||||
|
||||
|
||||
@@ -235,7 +222,7 @@ endif ()
|
||||
option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON)
|
||||
if (OPENSPACE_HAVE_TESTS)
|
||||
begin_header("Generating OpenSpace unit test")
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/tests")
|
||||
add_subdirectory(tests)
|
||||
end_header()
|
||||
endif (OPENSPACE_HAVE_TESTS)
|
||||
|
||||
@@ -250,7 +237,7 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
set(PROJECT_ARCH "x86_64")
|
||||
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
@@ -266,6 +253,6 @@ endif ()
|
||||
##########################################################################################
|
||||
|
||||
# Manage the CPack packaging
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/packaging.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/packaging.cmake)
|
||||
|
||||
end_header("End: Configuring OpenSpace project")
|
||||
|
||||
@@ -27,7 +27,7 @@ Project maintainers have the right and responsibility to remove, edit, or reject
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at alexander.bock@me.com or vivian@amnh.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at alex@openspaceproject.com or vivian@amnh.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2014-2022
|
||||
Copyright (c) 2014-2023
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
software and associated documentation files (the "Software"), to deal in the Software
|
||||
@@ -15,4 +15,4 @@ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@@ -37,7 +37,7 @@ OpenSpace requires at least support for [OpenGL](https://www.opengl.org/) versio
|
||||
This repository contains the source code and example profiles for OpenSpace, but does not contain any data. To build and install the application, please check out the [GitHub Wiki](https://github.com/OpenSpace/OpenSpace/wiki). Here, you will find two pages, a [build instruction](https://github.com/OpenSpace/OpenSpace/wiki/Compiling) for all operating systems and then additional instructions for [Windows](https://github.com/OpenSpace/OpenSpace/wiki/Compiling-Windows), [Linux (Ubuntu)](https://github.com/OpenSpace/OpenSpace/wiki/Compiling-Ubuntu), and [MacOS](https://github.com/OpenSpace/OpenSpace/wiki/Compiling-MacOS). Please note that the Apple Silicon series of chips do not support OpenGL natively and Metal 2 does not support `double` precision accuracy (see [here](https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf) Section 2.1), therefore only the Intel processors for MacOS are supported and maintained.
|
||||
|
||||
Requirements for compiling are:
|
||||
- CMake version 3.10 or above
|
||||
- CMake version 3.25 or above
|
||||
- C++ compiler supporting C++20 (MSVC 19.31, GCC11, Clang14, AppleClang 13.1.6)
|
||||
- [Boost](http://www.boost.org/)
|
||||
- [Qt](http://www.qt.io/download)
|
||||
@@ -45,3 +45,6 @@ Requirements for compiling are:
|
||||
Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:openspace@amnh.org?subject=OpenSpace:). Regarding any issues, you are very welcome on our [Slack support channel](https://openspacesupport.slack.com) to which you can freely [sign-up](https://join.slack.com/t/openspacesupport/shared_invite/zt-37niq6y9-T0JaCIk4UoFLI4VF5U9Vsw).
|
||||
|
||||

|
||||
|
||||
# License
|
||||
The contents of this repository is under an [MIT license](https://github.com/OpenSpace/OpenSpace/blob/master/LICENSE.md).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2022 #
|
||||
# Copyright (c) 2014-2023 #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
|
||||
# software and associated documentation files (the "Software"), to deal in the Software #
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake)
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/copy_shared_libraries.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/application_definition.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/global_variables.cmake)
|
||||
|
||||
set(MACOSX_BUNDLE_ICON_FILE openspace.icns)
|
||||
|
||||
@@ -57,7 +57,7 @@ target_link_libraries(OpenSpace-MinVR PUBLIC openspace-core MinVR)
|
||||
# target as of July 2017, which is needed.
|
||||
if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace-MinVR/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2022 #
|
||||
# Copyright (c) 2014-2023 #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
|
||||
# software and associated documentation files (the "Software"), to deal in the Software #
|
||||
@@ -22,9 +22,8 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake)
|
||||
include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake)
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/message_macros.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/application_definition.cmake)
|
||||
|
||||
# We are getting all_enabled_modules from the handle_applications.cmake file which gets
|
||||
# it from the main CMakeLists file
|
||||
@@ -43,14 +42,14 @@ if (OPENSPACE_OPENVR_SUPPORT)
|
||||
if (WIN32)
|
||||
find_path(SGCT_OPENVR_INCLUDE_DIRECTORY
|
||||
NAMES SGCTOpenVR.h
|
||||
PATHS ${OPENSPACE_BASE_DIR}/ext/sgct/additional_includes/openvr NO_DEFAULT_PATH
|
||||
PATHS ${PROJECT_SOURCE_DIR}/ext/sgct/additional_includes/openvr NO_DEFAULT_PATH
|
||||
REQUIRED
|
||||
)
|
||||
else ()
|
||||
find_path(SGCT_OPENVR_INCLUDE_DIRECTORY
|
||||
NAMES SGCTOpenVR.h
|
||||
PATH_SUFFIXES SGCTOpenVR
|
||||
PATHS ${OPENSPACE_BASE_DIR}/ext/sgct/additional_includes/openvr
|
||||
PATHS ${PROJECT_SOURCE_DIR}/ext/sgct/additional_includes/openvr
|
||||
REQUIRED
|
||||
)
|
||||
endif ()
|
||||
@@ -115,19 +114,14 @@ set(SGCT_TEXT OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_FREETYPE OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_FMT OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_SCN OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_CATCH2 OFF CACHE BOOL "" FORCE)
|
||||
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct)
|
||||
target_link_libraries(OpenSpace PRIVATE sgct)
|
||||
|
||||
set_folder_location(sgct "External")
|
||||
set_folder_location(glfw "External")
|
||||
set_folder_location(miniziplibstatic "External")
|
||||
set_folder_location(png16_static "External")
|
||||
set_folder_location(quat "External")
|
||||
set_folder_location(tinyxml2static "External")
|
||||
set_folder_location(vrpn "External")
|
||||
set_folder_location(zlibstatic "External")
|
||||
set_folder_location(SGCTTest "Unit Tests")
|
||||
set_target_properties(sgct PROPERTIES FOLDER "External")
|
||||
set_target_properties(glfw PROPERTIES FOLDER "External")
|
||||
set_target_properties(SGCTTest PROPERTIES FOLDER "External")
|
||||
|
||||
if (UNIX AND (NOT APPLE))
|
||||
target_link_libraries(OpenSpace PRIVATE Xcursor Xinerama X11)
|
||||
@@ -161,7 +155,7 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
set(PROJECT_ARCH "x86_64")
|
||||
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2022 #
|
||||
# Copyright (c) 2014-2023 #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
|
||||
# software and associated documentation files (the "Software"), to deal in the Software #
|
||||
@@ -22,7 +22,7 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/set_openspace_compile_settings.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/set_openspace_compile_settings.cmake)
|
||||
|
||||
set(HEADER_FILES
|
||||
include/filesystemaccess.h
|
||||
@@ -113,8 +113,9 @@ target_include_directories(
|
||||
openspace-ui-launcher
|
||||
PUBLIC
|
||||
include
|
||||
${OPENSPACE_APPS_DIR}/OpenSpace/ext/sgct/include
|
||||
${OPENSPACE_APPS_DIR}/OpenSpace/ext/sgct/sgct/ext/glm
|
||||
# @TODO: This should be handled in a better way
|
||||
../sgct/include
|
||||
../sgct/sgct/ext/glm
|
||||
)
|
||||
target_link_libraries(
|
||||
openspace-ui-launcher
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -33,6 +33,7 @@ class QCheckBox;
|
||||
class QComboBox;
|
||||
class QDialogButtonBox;
|
||||
class QGridLayout;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QListWidget;
|
||||
class QPushButton;
|
||||
@@ -58,7 +59,7 @@ private:
|
||||
void clearActionFields();
|
||||
void actionRejected();
|
||||
void chooseScripts();
|
||||
void appendScriptsToTextfield(std::string scripts);
|
||||
void appendScriptsToTextfield(std::vector<std::string> scripts);
|
||||
|
||||
openspace::Profile::Keybinding* selectedKeybinding();
|
||||
void keybindingAdd();
|
||||
@@ -77,6 +78,7 @@ private:
|
||||
struct {
|
||||
QListWidget* list = nullptr;
|
||||
QLineEdit* identifier = nullptr;
|
||||
QLabel* infoText = nullptr;
|
||||
QLineEdit* name = nullptr;
|
||||
QLineEdit* guiPath = nullptr;
|
||||
QLineEdit* documentation = nullptr;
|
||||
@@ -100,6 +102,8 @@ private:
|
||||
QPushButton* removeButton = nullptr;
|
||||
QDialogButtonBox* saveButtons = nullptr;
|
||||
} _keybindingWidgets;
|
||||
|
||||
QDialogButtonBox* _mainButton = nullptr;
|
||||
};
|
||||
|
||||
#endif // __OPENSPACE_UI_LAUNCHER___ACTIONDIALOG___H__
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
*
|
||||
* \param scripts #std::string scripts to be appended
|
||||
*/
|
||||
void appendScriptsToTextfield(std::string scripts);
|
||||
void appendScriptsToTextfield(std::vector<std::string> scripts);
|
||||
|
||||
std::vector<std::string>* _scripts = nullptr;
|
||||
std::vector<std::string> _scriptsData;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -58,9 +58,7 @@ private:
|
||||
void listItemRemove();
|
||||
void parseSelections();
|
||||
|
||||
std::vector<QListWidgetItem*> _markedNodesListItems;
|
||||
std::vector<std::string>* _markedNodes;
|
||||
std::vector<std::string> _markedNodesData;
|
||||
|
||||
QListWidget* _list = nullptr;
|
||||
QPushButton* _removeButton = nullptr;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -34,10 +34,10 @@ class QPushButton;
|
||||
class ScriptlogDialog final : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ScriptlogDialog(QWidget* parent);
|
||||
ScriptlogDialog(QWidget* parent, std::string filter = "");
|
||||
|
||||
signals:
|
||||
void scriptsSelected(std::string script);
|
||||
void scriptsSelected(std::vector<std::string> script);
|
||||
|
||||
private:
|
||||
void createWidgets();
|
||||
@@ -50,7 +50,10 @@ private:
|
||||
QListWidget* _scriptlogList = nullptr;
|
||||
QLineEdit* _filter = nullptr;
|
||||
QPushButton* _reloadFile = nullptr;
|
||||
std::string _scriptLogFile;
|
||||
std::vector<std::string> _scripts;
|
||||
|
||||
std::string _fixedFilter;
|
||||
};
|
||||
|
||||
#endif // __OPENSPACE_UI_LAUNCHER___SCRIPTLOGDIALOG___H__
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <openspace/scene/profile.h>
|
||||
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class QDateTimeEdit;
|
||||
class QLabel;
|
||||
@@ -63,6 +64,7 @@ private:
|
||||
QDateTimeEdit* _absoluteEdit = nullptr;
|
||||
QLabel* _relativeLabel = nullptr;
|
||||
QLineEdit* _relativeEdit = nullptr;
|
||||
QCheckBox* _startPaused = nullptr;
|
||||
};
|
||||
|
||||
#endif // __OPENSPACE_UI_LAUNCHER___TIMEDIALOG___H__
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -81,10 +81,10 @@ private:
|
||||
|
||||
std::vector<QRectF> _monitorDimensionsScaled;
|
||||
std::array<QRectF, 4> _windowRendering = {
|
||||
QRectF{ 0.f, 0.f, 0.f, 0.f },
|
||||
QRectF{ 0.f, 0.f, 0.f, 0.f },
|
||||
QRectF{ 0.f, 0.f, 0.f, 0.f },
|
||||
QRectF{ 0.f, 0.f, 0.f, 0.f }
|
||||
QRectF(0.f, 0.f, 0.f, 0.f),
|
||||
QRectF(0.f, 0.f, 0.f, 0.f),
|
||||
QRectF(0.f, 0.f, 0.f, 0.f),
|
||||
QRectF(0.f, 0.f, 0.f, 0.f)
|
||||
};
|
||||
int _nWindows = 1;
|
||||
const std::array<QColor, 4> _colorsForWindows;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
bool showUiOnFirstWindow() const;
|
||||
|
||||
private:
|
||||
sgct::quat _orientationValue = { 0.f, 0.f, 0.f, 0.f };
|
||||
sgct::quat _orientationValue = sgct::quat(0.f, 0.f, 0.f, 0.f);
|
||||
QCheckBox* _checkBoxVsync = nullptr;
|
||||
QCheckBox* _showUiOnFirstWindow = nullptr;
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -158,7 +158,7 @@ namespace {
|
||||
std::ofstream outFile;
|
||||
try {
|
||||
outFile.open(path, std::ofstream::out);
|
||||
sgct::config::GeneratorVersion genEntry = {
|
||||
sgct::config::GeneratorVersion genEntry = sgct::config::GeneratorVersion{
|
||||
"OpenSpace",
|
||||
OPENSPACE_VERSION_MAJOR,
|
||||
OPENSPACE_VERSION_MINOR
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -75,62 +75,58 @@ ActionDialog::ActionDialog(QWidget* parent,
|
||||
}
|
||||
|
||||
void ActionDialog::createWidgets() {
|
||||
// Column 0 Column 1 Column 2
|
||||
// *----------------------*---------------*----------------*
|
||||
// | Actions | Row 0
|
||||
// | | Identifier | [oooooooooooo] | Row 1
|
||||
// | | Name | [oooooooooooo] | Row 2
|
||||
// | | GUI Path | [oooooooooooo] | Row 3
|
||||
// | | Documentation | [oooooooooooo] | Row 4
|
||||
// | | Is Local | [] [choosescr] | Row 5
|
||||
// | | Script | [oooooooooooo] | Row 6
|
||||
// *----------------------*---------------*----------------*
|
||||
// | [+] [-] | | <Save> <Cancel>| Row 7
|
||||
// *----------------------*---------------*----------------*
|
||||
// |=======================================================| Row 8
|
||||
// | Keybindings | Row 9
|
||||
// *----------------------*---------------*----------------|
|
||||
// | | Modifier | []S []C []A | Row 10
|
||||
// | | Key | DDDDDDDDDDDD> | Row 11
|
||||
// | | Add actions | DDDDDDDDDDDD> | Row 12
|
||||
// | | Action | [oooooooooooo] | Row 13
|
||||
// *----------------------*---------------*----------------*
|
||||
// | [+] [-] | | <Save> <Cancel>| Row 14
|
||||
// *----------------------*---------------*----------------*
|
||||
// |=======================================================| Row 14
|
||||
// *----------------------*---------------*----------------*
|
||||
// | | <Save> <Cancel>| Row 15
|
||||
// *----------------------*---------------*----------------*
|
||||
// Column 0 Column 1 Column 2 Col3
|
||||
// *----------------------*---------------*----------|------*
|
||||
// | Actions | Row 0
|
||||
// | | Identifier | [oooooo] | Info | Row 1
|
||||
// | | Name | [ooooooooooooo] | Row 2
|
||||
// | | GUI Path | [ooooooooooooo] | Row 3
|
||||
// | | Documentation | [ooooooooooooo] | Row 4
|
||||
// | | Is Local | [] [choosescr] | Row 5
|
||||
// | | Script | [ooooooooooooo] | Row 6
|
||||
// *----------------------*---------------*-----------------*
|
||||
// | [+] [-] | | <Save> <Cancel> | Row 7
|
||||
// *----------------------*---------------*-----------------*
|
||||
// |========================================================| Row 8
|
||||
// | Keybindings | Row 9
|
||||
// *----------------------*---------------*-----------------|
|
||||
// | | Modifier | []S []C []A | Row 10
|
||||
// | | Key | DDDDDDDDDDDD> | Row 11
|
||||
// | | Add actions | DDDDDDDDDDDD> | Row 12
|
||||
// | | Action | [ooooooooooooo] | Row 13
|
||||
// *----------------------*---------------*-----------------*
|
||||
// | [+] [-] | | <Save> <Cancel> | Row 14
|
||||
// *----------------------*---------------*-----------------*
|
||||
// |========================================================| Row 16
|
||||
// *----------------------*---------------*-----------------*
|
||||
// | | <Save> <Cancel> | Row 17
|
||||
// *----------------------*---------------*-----------------*
|
||||
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
|
||||
createActionWidgets(layout);
|
||||
clearActionFields();
|
||||
|
||||
layout->addWidget(new Line, 8, 0, 1, 3);
|
||||
layout->addWidget(new Line, 8, 0, 1, 4);
|
||||
|
||||
createKeyboardWidgets(layout);
|
||||
clearKeybindingFields();
|
||||
|
||||
layout->addWidget(new Line, 16, 0, 1, 3);
|
||||
|
||||
QDialogButtonBox* buttonBox = new QDialogButtonBox;
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Save | QDialogButtonBox::Cancel);
|
||||
layout->addWidget(new Line, 16, 0, 1, 4);
|
||||
|
||||
_mainButton = new QDialogButtonBox;
|
||||
_mainButton->setStandardButtons(QDialogButtonBox::Close);
|
||||
QObject::connect(
|
||||
buttonBox, &QDialogButtonBox::accepted,
|
||||
this, &ActionDialog::applyChanges
|
||||
);
|
||||
QObject::connect(
|
||||
buttonBox, &QDialogButtonBox::rejected,
|
||||
_mainButton, &QDialogButtonBox::rejected,
|
||||
this, &ActionDialog::reject
|
||||
);
|
||||
layout->addWidget(buttonBox, 17, 2, Qt::AlignRight);
|
||||
layout->addWidget(_mainButton, 17, 2, Qt::AlignRight);
|
||||
}
|
||||
|
||||
void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
QLabel* title = new QLabel("Actions");
|
||||
title->setObjectName("heading");
|
||||
layout->addWidget(title, 0, 0, 1, 3);
|
||||
layout->addWidget(title, 0, 0, 1, 4);
|
||||
|
||||
_actionWidgets.list = new QListWidget;
|
||||
_actionWidgets.list->setToolTip(
|
||||
@@ -161,8 +157,31 @@ void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
"separated hierarchical structure is suggested to prevent name clashes"
|
||||
);
|
||||
_actionWidgets.identifier->setEnabled(false);
|
||||
connect(
|
||||
_actionWidgets.identifier, &QLineEdit::textEdited,
|
||||
[this]() {
|
||||
// Check if the identifier is legal
|
||||
std::string identifier = _actionWidgets.identifier->text().toStdString();
|
||||
bool isLegal = identifier.find_first_of("\t\n. ") == std::string::npos;
|
||||
if (isLegal) {
|
||||
_actionWidgets.infoText->clear();
|
||||
_actionWidgets.infoText->setHidden(true);
|
||||
}
|
||||
else {
|
||||
_actionWidgets.infoText->setText(
|
||||
"Identifier must not contain whitespace or ."
|
||||
);
|
||||
_actionWidgets.infoText->setHidden(false);
|
||||
}
|
||||
}
|
||||
);
|
||||
layout->addWidget(_actionWidgets.identifier, 1, 2);
|
||||
|
||||
_actionWidgets.infoText = new QLabel;
|
||||
_actionWidgets.infoText->setHidden(true);
|
||||
_actionWidgets.infoText->setObjectName("error-message");
|
||||
layout->addWidget(_actionWidgets.infoText, 1, 3);
|
||||
|
||||
layout->addWidget(new QLabel("Name"), 2, 1);
|
||||
_actionWidgets.name = new QLineEdit;
|
||||
_actionWidgets.name->setToolTip(
|
||||
@@ -170,7 +189,7 @@ void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
"name should be as concise and informative as possible"
|
||||
);
|
||||
_actionWidgets.name->setEnabled(false);
|
||||
layout->addWidget(_actionWidgets.name, 2, 2);
|
||||
layout->addWidget(_actionWidgets.name, 2, 2, 1, 2);
|
||||
|
||||
layout->addWidget(new QLabel("GUI Path"), 3, 1);
|
||||
_actionWidgets.guiPath = new QLineEdit;
|
||||
@@ -180,7 +199,7 @@ void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
"character that denotes the root folder"
|
||||
);
|
||||
_actionWidgets.guiPath->setEnabled(false);
|
||||
layout->addWidget(_actionWidgets.guiPath, 3, 2);
|
||||
layout->addWidget(_actionWidgets.guiPath, 3, 2, 1, 2);
|
||||
|
||||
layout->addWidget(new QLabel("Documentation"), 4, 1);
|
||||
_actionWidgets.documentation = new QLineEdit;
|
||||
@@ -191,7 +210,7 @@ void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
"parameters that that action can consume"
|
||||
);
|
||||
_actionWidgets.documentation->setEnabled(false);
|
||||
layout->addWidget(_actionWidgets.documentation, 4, 2);
|
||||
layout->addWidget(_actionWidgets.documentation, 4, 2, 1, 2);
|
||||
|
||||
layout->addWidget(new QLabel("Is Local"), 5, 1);
|
||||
_actionWidgets.isLocal = new QCheckBox;
|
||||
@@ -204,7 +223,7 @@ void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
"instances as well"
|
||||
);
|
||||
_actionWidgets.isLocal->setEnabled(false);
|
||||
layout->addWidget(_actionWidgets.isLocal, 5, 2);
|
||||
layout->addWidget(_actionWidgets.isLocal, 5, 2, 1, 2);
|
||||
|
||||
_actionWidgets.chooseScripts = new QPushButton("Choose Scripts");
|
||||
_actionWidgets.chooseScripts->setToolTip(
|
||||
@@ -215,7 +234,7 @@ void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
this, &ActionDialog::chooseScripts
|
||||
);
|
||||
_actionWidgets.chooseScripts->setEnabled(false);
|
||||
layout->addWidget(_actionWidgets.chooseScripts, 5, 2, Qt::AlignRight);
|
||||
layout->addWidget(_actionWidgets.chooseScripts, 5, 2, 1, 2, Qt::AlignRight);
|
||||
|
||||
layout->addWidget(new QLabel("Script"), 6, 1);
|
||||
_actionWidgets.script = new QTextEdit;
|
||||
@@ -226,7 +245,7 @@ void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
"variable does not exist"
|
||||
);
|
||||
_actionWidgets.script->setEnabled(false);
|
||||
layout->addWidget(_actionWidgets.script, 6, 2);
|
||||
layout->addWidget(_actionWidgets.script, 6, 2, 1, 2);
|
||||
|
||||
|
||||
// + / - buttons
|
||||
@@ -270,13 +289,13 @@ void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
_actionWidgets.saveButtons, &QDialogButtonBox::rejected,
|
||||
this, &ActionDialog::actionRejected
|
||||
);
|
||||
layout->addWidget(_actionWidgets.saveButtons, 7, 2, Qt::AlignRight);
|
||||
layout->addWidget(_actionWidgets.saveButtons, 7, 2, 1, 2, Qt::AlignRight);
|
||||
}
|
||||
|
||||
void ActionDialog::createKeyboardWidgets(QGridLayout* layout) {
|
||||
QLabel* title = new QLabel("Keybindings");
|
||||
title->setObjectName("heading");
|
||||
layout->addWidget(title);
|
||||
layout->addWidget(title, 9, 0, 1, 4);
|
||||
|
||||
_keybindingWidgets.list = new QListWidget;
|
||||
_keybindingWidgets.list->setToolTip(
|
||||
@@ -311,7 +330,7 @@ void ActionDialog::createKeyboardWidgets(QGridLayout* layout) {
|
||||
_keybindingWidgets.altModifier = new QCheckBox("Alt");
|
||||
_keybindingWidgets.altModifier->setEnabled(false);
|
||||
containerLayout->addWidget(_keybindingWidgets.altModifier);
|
||||
layout->addWidget(container, 10, 2);
|
||||
layout->addWidget(container, 10, 2, 1, 2);
|
||||
}
|
||||
|
||||
layout->addWidget(new QLabel("Key"), 11, 1);
|
||||
@@ -342,7 +361,7 @@ void ActionDialog::createKeyboardWidgets(QGridLayout* layout) {
|
||||
);
|
||||
}
|
||||
);
|
||||
layout->addWidget(_keybindingWidgets.key, 11, 2);
|
||||
layout->addWidget(_keybindingWidgets.key, 11, 2, 1, 2);
|
||||
|
||||
layout->addWidget(new QLabel("Action chooser"), 12, 1);
|
||||
_keybindingWidgets.action = new QComboBox;
|
||||
@@ -361,7 +380,7 @@ void ActionDialog::createKeyboardWidgets(QGridLayout* layout) {
|
||||
);
|
||||
|
||||
_keybindingWidgets.action->setEnabled(false);
|
||||
layout->addWidget(_keybindingWidgets.action, 12, 2);
|
||||
layout->addWidget(_keybindingWidgets.action, 12, 2, 1, 2);
|
||||
|
||||
layout->addWidget(new QLabel("Action"), 13, 1);
|
||||
_keybindingWidgets.actionText = new QLineEdit;
|
||||
@@ -376,7 +395,7 @@ void ActionDialog::createKeyboardWidgets(QGridLayout* layout) {
|
||||
"at startup"
|
||||
);
|
||||
_keybindingWidgets.actionText->setEnabled(false);
|
||||
layout->addWidget(_keybindingWidgets.actionText, 13, 2);
|
||||
layout->addWidget(_keybindingWidgets.actionText, 13, 2, 1, 2);
|
||||
|
||||
|
||||
// +/- buttons
|
||||
@@ -424,13 +443,7 @@ void ActionDialog::createKeyboardWidgets(QGridLayout* layout) {
|
||||
this, &ActionDialog::keybindingRejected
|
||||
);
|
||||
|
||||
layout->addWidget(_keybindingWidgets.saveButtons, 14, 2, Qt::AlignRight);
|
||||
}
|
||||
|
||||
void ActionDialog::applyChanges() {
|
||||
*_actions = std::move(_actionData);
|
||||
*_keybindings = std::move(_keybindingsData);
|
||||
accept();
|
||||
layout->addWidget(_keybindingWidgets.saveButtons, 14, 2, 1, 2, Qt::AlignRight);
|
||||
}
|
||||
|
||||
Profile::Action* ActionDialog::selectedAction() {
|
||||
@@ -476,6 +489,10 @@ void ActionDialog::actionRemove() {
|
||||
_keybindingsData.erase(_keybindingsData.begin() + i);
|
||||
delete _keybindingWidgets.list->takeItem(static_cast<int>(i));
|
||||
i--;
|
||||
//Save the updated keybindings to the profile
|
||||
if (_keybindings) {
|
||||
*_keybindings = _keybindingsData;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// If the user chooses 'No' at least once, we have to bail
|
||||
@@ -494,6 +511,10 @@ void ActionDialog::actionRemove() {
|
||||
_keybindingWidgets.action->addItem(QString::fromStdString(a.identifier));
|
||||
}
|
||||
clearKeybindingFields();
|
||||
//Save the updated actions to the profile
|
||||
if (_actions) {
|
||||
*_actions = _actionData;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -523,12 +544,21 @@ void ActionDialog::actionSelected() {
|
||||
_actionWidgets.addButton->setEnabled(false);
|
||||
_actionWidgets.removeButton->setEnabled(true);
|
||||
_actionWidgets.saveButtons->setEnabled(true);
|
||||
if (_mainButton) {
|
||||
_mainButton->setEnabled(false);
|
||||
}
|
||||
_actionWidgets.list->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
// No action selected
|
||||
_actionWidgets.addButton->setEnabled(true);
|
||||
_actionWidgets.removeButton->setEnabled(false);
|
||||
_actionWidgets.saveButtons->setEnabled(false);
|
||||
//Keybinding panel must also be in valid state to re-enable main start button
|
||||
if (_mainButton && !_keybindingWidgets.saveButtons->isEnabled()) {
|
||||
_mainButton->setEnabled(true);
|
||||
}
|
||||
_actionWidgets.list->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,7 +617,11 @@ void ActionDialog::actionSaved() {
|
||||
|
||||
|
||||
action->name = _actionWidgets.name->text().toStdString();
|
||||
action->guiPath = _actionWidgets.guiPath->text().toStdString();
|
||||
std::string guiPath = _actionWidgets.guiPath->text().toStdString();
|
||||
if (!guiPath.starts_with('/')) {
|
||||
guiPath = "/" + guiPath;
|
||||
}
|
||||
action->guiPath = guiPath;
|
||||
action->documentation = _actionWidgets.documentation->text().toStdString();
|
||||
action->isLocal = _actionWidgets.isLocal->isChecked();
|
||||
action->script = _actionWidgets.script->toPlainText().toStdString();
|
||||
@@ -599,6 +633,10 @@ void ActionDialog::actionSaved() {
|
||||
for (const Profile::Action& a : _actionData) {
|
||||
_keybindingWidgets.action->addItem(QString::fromStdString(a.identifier));
|
||||
}
|
||||
//Save the updated actions to the profile
|
||||
if (_actions) {
|
||||
*_actions = _actionData;
|
||||
}
|
||||
clearKeybindingFields();
|
||||
clearActionFields();
|
||||
}
|
||||
@@ -607,6 +645,8 @@ void ActionDialog::clearActionFields() {
|
||||
_actionWidgets.list->setCurrentRow(-1);
|
||||
_actionWidgets.identifier->clear();
|
||||
_actionWidgets.identifier->setEnabled(false);
|
||||
_actionWidgets.infoText->clear();
|
||||
_actionWidgets.infoText->setHidden(true);
|
||||
_actionWidgets.name->clear();
|
||||
_actionWidgets.name->setEnabled(false);
|
||||
_actionWidgets.guiPath->clear();
|
||||
@@ -619,6 +659,7 @@ void ActionDialog::clearActionFields() {
|
||||
_actionWidgets.script->clear();
|
||||
_actionWidgets.script->setEnabled(false);
|
||||
_actionWidgets.saveButtons->setEnabled(false);
|
||||
_actionWidgets.list->setEnabled(true);
|
||||
}
|
||||
|
||||
void ActionDialog::actionRejected() {
|
||||
@@ -633,12 +674,17 @@ void ActionDialog::actionRejected() {
|
||||
|
||||
void ActionDialog::chooseScripts() {
|
||||
ScriptlogDialog d(this);
|
||||
connect(&d, &ScriptlogDialog::scriptsSelected, this, &ActionDialog::appendScriptsToTextfield);
|
||||
connect(
|
||||
&d, &ScriptlogDialog::scriptsSelected,
|
||||
this, &ActionDialog::appendScriptsToTextfield
|
||||
);
|
||||
d.exec();
|
||||
}
|
||||
|
||||
void ActionDialog::appendScriptsToTextfield(std::string scripts) {
|
||||
_actionWidgets.script->append(QString::fromStdString(std::move(scripts)));
|
||||
void ActionDialog::appendScriptsToTextfield(std::vector<std::string> scripts) {
|
||||
for (std::string script : scripts) {
|
||||
_actionWidgets.script->append(QString::fromStdString(std::move(script)));
|
||||
}
|
||||
}
|
||||
|
||||
Profile::Keybinding* ActionDialog::selectedKeybinding() {
|
||||
@@ -664,6 +710,10 @@ void ActionDialog::keybindingRemove() {
|
||||
clearKeybindingFields();
|
||||
_keybindingsData.erase(_keybindingsData.begin() + i);
|
||||
delete _keybindingWidgets.list->takeItem(static_cast<int>(i));
|
||||
//Save the updated keybindings to the profile
|
||||
if (_keybindings) {
|
||||
*_keybindings = _keybindingsData;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -705,12 +755,21 @@ void ActionDialog::keybindingSelected() {
|
||||
_keybindingWidgets.saveButtons->button(QDialogButtonBox::Save)->setEnabled(
|
||||
_keybindingWidgets.key->currentIndex() > 0
|
||||
);
|
||||
if (_mainButton) {
|
||||
_mainButton->setEnabled(false);
|
||||
}
|
||||
_keybindingWidgets.list->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
// No keybinding selected
|
||||
_keybindingWidgets.addButton->setEnabled(true);
|
||||
_keybindingWidgets.removeButton->setEnabled(false);
|
||||
_keybindingWidgets.saveButtons->setEnabled(false);
|
||||
//Action panel must also be in valid state to re-enable main start button
|
||||
if (_mainButton && !_actionWidgets.saveButtons->isEnabled()) {
|
||||
_mainButton->setEnabled(true);
|
||||
}
|
||||
_keybindingWidgets.list->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -719,6 +778,16 @@ void ActionDialog::keybindingActionSelected(int) {
|
||||
}
|
||||
|
||||
void ActionDialog::keybindingSaved() {
|
||||
if (_keybindingWidgets.key->currentIndex() == -1) {
|
||||
QMessageBox::critical(this, "Missing key", "Key must have an assignment");
|
||||
return;
|
||||
}
|
||||
//A selection can be made from the combo box without typing text, but selecting from
|
||||
//the combo will fill the text, so using the text box as criteria covers both cases.
|
||||
if (_keybindingWidgets.actionText->text().isEmpty()) {
|
||||
QMessageBox::critical(this, "Missing action", "Key action must not be empty");
|
||||
return;
|
||||
}
|
||||
Profile::Keybinding* keybinding = selectedKeybinding();
|
||||
ghoul_assert(keybinding, "There must be a selected keybinding at this point");
|
||||
|
||||
@@ -738,6 +807,10 @@ void ActionDialog::keybindingSaved() {
|
||||
keybinding->action = _keybindingWidgets.actionText->text().toStdString();
|
||||
|
||||
updateListItem(_keybindingWidgets.list->currentItem(), *keybinding);
|
||||
//Save the updated keybindings to the profile
|
||||
if (_keybindings) {
|
||||
*_keybindings = _keybindingsData;
|
||||
}
|
||||
clearKeybindingFields();
|
||||
}
|
||||
|
||||
@@ -755,8 +828,15 @@ void ActionDialog::clearKeybindingFields() {
|
||||
_keybindingWidgets.action->setEnabled(false);
|
||||
_keybindingWidgets.actionText->clear();
|
||||
_keybindingWidgets.actionText->setEnabled(false);
|
||||
_keybindingWidgets.list->setEnabled(true);
|
||||
}
|
||||
|
||||
void ActionDialog::keybindingRejected() {
|
||||
bool isKeyEmpty = (_keybindingsData.back().key.key == Key::Unknown);
|
||||
bool isActionEmpty = _keybindingsData.back().action.empty();
|
||||
if (isKeyEmpty || isActionEmpty) {
|
||||
delete _keybindingWidgets.list->takeItem(_keybindingWidgets.list->count() - 1);
|
||||
_keybindingsData.erase(_keybindingsData.begin() + _keybindingsData.size() - 1);
|
||||
}
|
||||
clearKeybindingFields();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -109,6 +109,8 @@ void AdditionalScriptsDialog::chooseScripts() {
|
||||
d.exec();
|
||||
}
|
||||
|
||||
void AdditionalScriptsDialog::appendScriptsToTextfield(std::string scripts) {
|
||||
_textScripts->append(QString::fromStdString(std::move(scripts)));
|
||||
void AdditionalScriptsDialog::appendScriptsToTextfield(std::vector<std::string> scripts) {
|
||||
for (std::string script : scripts) {
|
||||
_textScripts->append(QString::fromStdString(std::move(script)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -156,7 +156,10 @@ void AssetTreeModel::importModelData(const std::string& assetBasePath,
|
||||
std::string assetList = assets.useQtFileSystemModelToTraverseDir(assetBasePath);
|
||||
assetList += assets.useQtFileSystemModelToTraverseDir(userAssetBasePath, true);
|
||||
std::istringstream iss(assetList);
|
||||
ImportElement rootElem = { "", 0, false };
|
||||
ImportElement rootElem = {
|
||||
.line = "",
|
||||
.level = 0,
|
||||
};
|
||||
|
||||
if (importGetNextLine(rootElem, iss)) {
|
||||
importInsertItem(iss, _rootItem.get(), rootElem, 0);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -384,11 +384,11 @@ void CameraDialog::approved() {
|
||||
!_navState.upY->text().isEmpty() &&
|
||||
!_navState.upZ->text().isEmpty())
|
||||
{
|
||||
glm::dvec3 u = {
|
||||
glm::dvec3 u = glm::dvec3(
|
||||
_navState.upX->text().toDouble(),
|
||||
_navState.upY->text().toDouble(),
|
||||
_navState.upZ->text().toDouble()
|
||||
};
|
||||
);
|
||||
nav.up = u;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -457,8 +457,8 @@ bool HorizonsDialog::isValidInput() {
|
||||
// Range 1 to 2147483647 (max of 32 bit int).
|
||||
// Horizons read the step size into a 32 bit int, but verifies the input on their
|
||||
// website as a uint32_t. If step size over 32 bit int is sent, this error message is
|
||||
// recived: Cannot read numeric value -- re-enter
|
||||
if (step < 1 || step > std::numeric_limits<int32_t>::max()) {
|
||||
// received: Cannot read numeric value -- re-enter
|
||||
if (step < 1) {
|
||||
_errorMsg->setText(QString::fromStdString(fmt::format(
|
||||
"Step size is outside valid range 1 to '{}'",
|
||||
std::numeric_limits<int32_t>::max()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -38,7 +38,6 @@
|
||||
MarkNodesDialog::MarkNodesDialog(QWidget* parent, std::vector<std::string>* markedNodes)
|
||||
: QDialog(parent)
|
||||
, _markedNodes(markedNodes)
|
||||
, _markedNodesData(*_markedNodes)
|
||||
{
|
||||
setWindowTitle("Mark Interesting Nodes");
|
||||
createWidgets();
|
||||
@@ -55,13 +54,13 @@ void MarkNodesDialog::createWidgets() {
|
||||
);
|
||||
_list->setAlternatingRowColors(true);
|
||||
_list->setMovement(QListView::Free);
|
||||
_list->setDragDropMode(QListView::InternalMove);
|
||||
_list->setResizeMode(QListView::Adjust);
|
||||
|
||||
for (size_t i = 0; i < _markedNodesData.size(); ++i) {
|
||||
_markedNodesListItems.push_back(
|
||||
new QListWidgetItem(QString::fromStdString(_markedNodesData[i]))
|
||||
);
|
||||
_list->addItem(_markedNodesListItems[i]);
|
||||
for (size_t i = 0; i < _markedNodes->size(); ++i) {
|
||||
QListWidgetItem* item =
|
||||
new QListWidgetItem(QString::fromStdString(_markedNodes->at(i)));
|
||||
_list->addItem(item);
|
||||
}
|
||||
layout->addWidget(_list);
|
||||
|
||||
@@ -102,23 +101,11 @@ void MarkNodesDialog::listItemAdded() {
|
||||
}
|
||||
|
||||
std::string itemToAdd = _newNode->text().toStdString();
|
||||
const auto it = std::find(
|
||||
_markedNodesData.cbegin(), _markedNodesData.cend(),
|
||||
itemToAdd
|
||||
);
|
||||
if (it != _markedNodesData.end()) {
|
||||
_list->setCurrentRow(
|
||||
static_cast<int>(std::distance(_markedNodesData.cbegin(), it))
|
||||
);
|
||||
}
|
||||
else {
|
||||
_markedNodesData.push_back(itemToAdd);
|
||||
_markedNodesListItems.push_back(new QListWidgetItem(_newNode->text()));
|
||||
_list->addItem(_markedNodesListItems.back());
|
||||
QListWidgetItem* item = new QListWidgetItem(_newNode->text());
|
||||
_list->addItem(item);
|
||||
|
||||
// Scroll down to that blank line highlighted
|
||||
_list->setCurrentItem(_markedNodesListItems.back());
|
||||
}
|
||||
// Scroll down to that blank line highlighted
|
||||
_list->setCurrentItem(item);
|
||||
|
||||
// Blank-out entry again
|
||||
_newNode->clear();
|
||||
@@ -127,18 +114,16 @@ void MarkNodesDialog::listItemAdded() {
|
||||
void MarkNodesDialog::listItemRemove() {
|
||||
QListWidgetItem* item = _list->currentItem();
|
||||
int index = _list->row(item);
|
||||
|
||||
if (index < 0 || index >= static_cast<int>(_markedNodesListItems.size())) {
|
||||
return;
|
||||
}
|
||||
|
||||
_list->takeItem(index);
|
||||
_markedNodesData.erase(_markedNodesData.begin() + index);
|
||||
_markedNodesListItems.erase(_markedNodesListItems.begin() + index);
|
||||
}
|
||||
|
||||
void MarkNodesDialog::parseSelections() {
|
||||
*_markedNodes = std::move(_markedNodesData);
|
||||
std::vector<std::string> nodes;
|
||||
for (int i = 0; i < _list->count(); i++) {
|
||||
QString node = _list->item(i)->text();
|
||||
nodes.push_back(node.toStdString());
|
||||
}
|
||||
*_markedNodes = std::move(nodes);
|
||||
accept();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -37,7 +37,11 @@
|
||||
using namespace openspace;
|
||||
|
||||
namespace {
|
||||
const Profile::Module Blank = { "", "", "" };
|
||||
const Profile::Module Blank = {
|
||||
.name = "",
|
||||
.loadedInstruction = std::nullopt,
|
||||
.notLoadedInstruction = std::nullopt
|
||||
};
|
||||
} // namespace
|
||||
|
||||
ModulesDialog::ModulesDialog(QWidget* parent,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -184,9 +184,8 @@ void ProfileEdit::createWidgets(const std::string& profileName) {
|
||||
QGridLayout* container = new QGridLayout;
|
||||
container->setColumnStretch(1, 1);
|
||||
|
||||
_keybindingsLabel = new QLabel("Keybindings");
|
||||
_keybindingsLabel = new QLabel("Actions & Keybindings");
|
||||
_keybindingsLabel->setObjectName("heading");
|
||||
_keybindingsLabel->setWordWrap(true);
|
||||
container->addWidget(_keybindingsLabel, 0, 0);
|
||||
|
||||
QPushButton* keybindingsProperties = new QPushButton("Edit");
|
||||
@@ -345,7 +344,9 @@ void ProfileEdit::initSummaryTextForEachCategory() {
|
||||
QString::fromStdString(summarizeProperties(_profile.properties))
|
||||
);
|
||||
|
||||
_keybindingsLabel->setText(labelText(_profile.keybindings.size(), "Keybindings"));
|
||||
_keybindingsLabel->setText(
|
||||
labelText(_profile.keybindings.size(), "Actions & Keybindings")
|
||||
);
|
||||
_keybindingsEdit->setText(QString::fromStdString(
|
||||
summarizeKeybindings(_profile.keybindings, _profile.actions)
|
||||
));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "profile/propertiesdialog.h"
|
||||
|
||||
#include "profile/line.h"
|
||||
#include "profile/scriptlogdialog.h"
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include <QComboBox>
|
||||
#include <QDialogButtonBox>
|
||||
@@ -92,17 +93,17 @@ void PropertiesDialog::createWidgets() {
|
||||
|
||||
box->addStretch();
|
||||
|
||||
layout->addLayout(box);
|
||||
}
|
||||
layout->addWidget(new Line);
|
||||
{
|
||||
_fillFromScriptLog = new QPushButton("Fill from ScriptLog");
|
||||
connect(
|
||||
_fillFromScriptLog, &QPushButton::clicked,
|
||||
this, &PropertiesDialog::selectLineFromScriptLog
|
||||
);
|
||||
layout->addWidget(_fillFromScriptLog);
|
||||
box->addWidget(_fillFromScriptLog);
|
||||
|
||||
layout->addLayout(box);
|
||||
}
|
||||
layout->addWidget(new Line);
|
||||
{
|
||||
_commandLabel = new QLabel("Property Set Command");
|
||||
layout->addWidget(_commandLabel);
|
||||
|
||||
@@ -339,7 +340,6 @@ void PropertiesDialog::transitionFromEditMode() {
|
||||
}
|
||||
|
||||
void PropertiesDialog::editBoxDisabled(bool disabled) {
|
||||
_fillFromScriptLog->setDisabled(disabled);
|
||||
_commandLabel->setDisabled(disabled);
|
||||
_commandCombo->setDisabled(disabled);
|
||||
_propertyLabel->setDisabled(disabled);
|
||||
@@ -374,91 +374,52 @@ void PropertiesDialog::keyPressEvent(QKeyEvent* evt) {
|
||||
}
|
||||
|
||||
void PropertiesDialog::selectLineFromScriptLog() {
|
||||
QComboBox* comboBox = new QComboBox;
|
||||
|
||||
QFile file(QString::fromStdString(absPath("${LOGS}/scriptLog.txt").string()));
|
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream in(&file);
|
||||
while (!in.atEnd()) {
|
||||
QString line = in.readLine();
|
||||
// removing return from a few statments
|
||||
// these are usually generated by gui panels
|
||||
line.remove(QRegularExpression("^return "));
|
||||
|
||||
if (line.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!line.startsWith("openspace.setPropertyValue")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
comboBox->addItem(line);
|
||||
}
|
||||
}
|
||||
|
||||
QDialog dialog;
|
||||
|
||||
ScriptlogDialog d(this, "openspace.setPropertyValue");
|
||||
connect(
|
||||
&dialog, &QDialog::finished,
|
||||
[this, comboBox](int result) {
|
||||
if (result == QDialog::Rejected) {
|
||||
return;
|
||||
&d, &ScriptlogDialog::scriptsSelected,
|
||||
[this](std::vector<std::string> scripts) {
|
||||
for (const std::string& script : scripts) {
|
||||
listItemAdded();
|
||||
|
||||
QString text = QString::fromStdString(script);
|
||||
if (!text.startsWith("openspace.setPropertyValue")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We have a string that is of the form:
|
||||
// openspace.setPropertyValue('prop', value);
|
||||
if (text.startsWith("openspace.setPropertyValueSingle")) {
|
||||
_commandCombo->setCurrentIndex(0);
|
||||
std::string_view prefix = "openspace.setPropertyValueSingle";
|
||||
text = text.mid(static_cast<int>(prefix.size()) + 1); // +1 for (
|
||||
}
|
||||
else {
|
||||
// command == "openspace.setPropertyValue"
|
||||
_commandCombo->setCurrentIndex(1);
|
||||
std::string_view prefix = "openspace.setPropertyValue";
|
||||
text = text.mid(static_cast<int>(prefix.size()) + 1); // +1 for (
|
||||
}
|
||||
|
||||
// Remove everything past the closing brace
|
||||
text = text.left(text.indexOf(")"));
|
||||
QStringList textList = text.split(",");
|
||||
|
||||
if (textList.size() < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove the string markers around the property
|
||||
QString property = textList[0].mid(1, textList[0].size() - 2);
|
||||
|
||||
textList.removeFirst();
|
||||
QString value = textList.join(",");
|
||||
|
||||
|
||||
_propertyEdit->setText(property.trimmed());
|
||||
_valueEdit->setText(value.trimmed());
|
||||
listItemSave();
|
||||
}
|
||||
|
||||
QString text = comboBox->currentText();
|
||||
if (!text.startsWith("openspace.setPropertyValue")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We have a string that is of the form:
|
||||
// openspace.setPropertyValue('prop', value);
|
||||
|
||||
if (text.startsWith("openspace.setPropertyValueSingle")) {
|
||||
_commandCombo->setCurrentIndex(0);
|
||||
std::string_view prefix = "openspace.setPropertyValueSingle";
|
||||
text = text.mid(static_cast<int>(prefix.size()) + 1); // +1 for (
|
||||
}
|
||||
else {
|
||||
// command == "openspace.setPropertyValue"
|
||||
_commandCombo->setCurrentIndex(1);
|
||||
std::string_view prefix = "openspace.setPropertyValue";
|
||||
text = text.mid(static_cast<int>(prefix.size()) + 1); // +1 for (
|
||||
}
|
||||
|
||||
// Remove everything past the closing brace
|
||||
text = text.left(text.indexOf(")"));
|
||||
QStringList textList = text.split(",");
|
||||
|
||||
if (textList.size() < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove the string markers around the property
|
||||
QString property = textList[0].mid(1, textList[0].size() - 2);
|
||||
|
||||
textList.removeFirst();
|
||||
QString value = textList.join(",");
|
||||
|
||||
|
||||
_propertyEdit->setText(property.trimmed());
|
||||
_valueEdit->setText(value.trimmed());
|
||||
}
|
||||
);
|
||||
|
||||
QLayout* layout = new QVBoxLayout;
|
||||
QLabel* label = new QLabel("Select a line from the Script Log to add");
|
||||
layout->addWidget(label);
|
||||
|
||||
layout->addWidget(comboBox);
|
||||
|
||||
QDialogButtonBox* bb = new QDialogButtonBox(
|
||||
QDialogButtonBox::Ok | QDialogButtonBox::Cancel
|
||||
);
|
||||
connect(bb, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
|
||||
connect(bb, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
||||
layout->addWidget(bb);
|
||||
|
||||
dialog.setLayout(layout);
|
||||
dialog.exec();
|
||||
d.exec();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <ghoul/fmt.h>
|
||||
#include <QGridLayout>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFileDialog>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QListWidget>
|
||||
@@ -39,8 +40,10 @@
|
||||
#include <QPushButton>
|
||||
#include <QTextStream>
|
||||
|
||||
ScriptlogDialog::ScriptlogDialog(QWidget* parent)
|
||||
ScriptlogDialog::ScriptlogDialog(QWidget* parent, std::string filter)
|
||||
: QDialog(parent)
|
||||
, _scriptLogFile(openspace::global::configuration->scriptLog)
|
||||
, _fixedFilter(std::move(filter))
|
||||
{
|
||||
setWindowTitle("Scriptlog");
|
||||
createWidgets();
|
||||
@@ -63,10 +66,31 @@ void ScriptlogDialog::createWidgets() {
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
{
|
||||
QLabel* heading = new QLabel(QString::fromStdString(fmt::format(
|
||||
"Choose commands from \"{}\"", openspace::global::configuration->scriptLog
|
||||
"Choose commands from \"{}\"", _scriptLogFile
|
||||
)));
|
||||
heading->setObjectName("heading");
|
||||
layout->addWidget(heading, 0, 0, 1, 2);
|
||||
|
||||
QPushButton* open = new QPushButton;
|
||||
open->setIcon(open->style()->standardIcon(QStyle::SP_FileIcon));
|
||||
connect(
|
||||
open, &QPushButton::clicked,
|
||||
[this, heading]() {
|
||||
QString file = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
"Select log file",
|
||||
"",
|
||||
"*.txt"
|
||||
);
|
||||
_scriptLogFile = file.toStdString();
|
||||
|
||||
heading->setText(QString::fromStdString(fmt::format(
|
||||
"Choose commands from \"{}\"", _scriptLogFile
|
||||
)));
|
||||
loadScriptFile();
|
||||
}
|
||||
);
|
||||
layout->addWidget(open, 0, 1, Qt::AlignRight);
|
||||
}
|
||||
|
||||
_filter = new QLineEdit;
|
||||
@@ -100,7 +124,9 @@ void ScriptlogDialog::createWidgets() {
|
||||
}
|
||||
|
||||
void ScriptlogDialog::loadScriptFile() {
|
||||
std::string log = absPath(openspace::global::configuration->scriptLog).string();
|
||||
_scripts.clear();
|
||||
|
||||
std::string log = absPath(_scriptLogFile).string();
|
||||
QFile file(QString::fromStdString(log));
|
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream in(&file);
|
||||
@@ -126,7 +152,10 @@ void ScriptlogDialog::updateScriptList() {
|
||||
int index = -1;
|
||||
_scriptlogList->clear();
|
||||
for (const std::string& script : _scripts) {
|
||||
if (script.find(filter) != std::string::npos) {
|
||||
bool foundDynamic = script.find(filter) != std::string::npos;
|
||||
bool foundStatic =
|
||||
_fixedFilter.empty() ? true : script.find(_fixedFilter) != std::string::npos;
|
||||
if (foundDynamic && foundStatic) {
|
||||
if (script == selection && index == -1) {
|
||||
index = _scriptlogList->count();
|
||||
}
|
||||
@@ -136,15 +165,11 @@ void ScriptlogDialog::updateScriptList() {
|
||||
}
|
||||
|
||||
void ScriptlogDialog::saveChosenScripts() {
|
||||
std::string chosenScripts;
|
||||
std::vector<std::string> chosenScripts;
|
||||
QList<QListWidgetItem*> itemList = _scriptlogList->selectedItems();
|
||||
for (int i = 0; i < itemList.size(); ++i) {
|
||||
chosenScripts += itemList.at(i)->text().toStdString();
|
||||
if (i < itemList.size()) {
|
||||
chosenScripts += "\n";
|
||||
}
|
||||
for (QListWidgetItem* item : _scriptlogList->selectedItems()) {
|
||||
chosenScripts.push_back(item->text().toStdString());
|
||||
}
|
||||
emit scriptsSelected(chosenScripts);
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "profile/timedialog.h"
|
||||
|
||||
#include "profile/line.h"
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QDateTimeEdit>
|
||||
#include <QDialogButtonBox>
|
||||
@@ -52,7 +53,8 @@ TimeDialog::TimeDialog(QWidget* parent, std::optional<openspace::Profile::Time>*
|
||||
if (_timeData.value.empty()) {
|
||||
_timeData.value = "0d";
|
||||
}
|
||||
_relativeEdit->setSelection(0, _relativeEdit->text().length());
|
||||
int len = static_cast<int>(_relativeEdit->text().length());
|
||||
_relativeEdit->setSelection(0, len);
|
||||
}
|
||||
else {
|
||||
_absoluteEdit->setSelectedSection(QDateTimeEdit::YearSection);
|
||||
@@ -62,6 +64,8 @@ TimeDialog::TimeDialog(QWidget* parent, std::optional<openspace::Profile::Time>*
|
||||
_timeData.type = Profile::Time::Type::Relative;
|
||||
_timeData.value = "0d";
|
||||
}
|
||||
_startPaused->setChecked(_timeData.startPaused);
|
||||
|
||||
_initializedAsAbsolute = (_timeData.type == Profile::Time::Type::Absolute);
|
||||
enableAccordingToType(static_cast<int>(_timeData.type));
|
||||
}
|
||||
@@ -97,6 +101,14 @@ void TimeDialog::createWidgets() {
|
||||
);
|
||||
layout->addWidget(_relativeEdit);
|
||||
}
|
||||
{
|
||||
_startPaused = new QCheckBox("Start with time paused");
|
||||
_startPaused->setChecked(false);
|
||||
_startPaused->setToolTip(
|
||||
"If this is checked, the profile will start with the delta time paused"
|
||||
);
|
||||
layout->addWidget(_startPaused);
|
||||
}
|
||||
layout->addWidget(new Line);
|
||||
{
|
||||
QDialogButtonBox* buttons = new QDialogButtonBox;
|
||||
@@ -152,6 +164,7 @@ void TimeDialog::approved() {
|
||||
Profile::Time t;
|
||||
t.type = Profile::Time::Type::Relative;
|
||||
t.value = _relativeEdit->text().toStdString();
|
||||
t.startPaused = _startPaused->isChecked();
|
||||
*_time = t;
|
||||
}
|
||||
}
|
||||
@@ -163,6 +176,7 @@ void TimeDialog::approved() {
|
||||
_absoluteEdit->date().toString("yyyy-MM-dd").toStdString(),
|
||||
_absoluteEdit->time().toString().toStdString()
|
||||
);
|
||||
t.startPaused = _startPaused->isChecked();
|
||||
*_time = t;
|
||||
}
|
||||
accept();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -49,7 +49,8 @@ void DisplayWindowUnion::createWidgets(int nMaxWindows,
|
||||
{
|
||||
// Add all window controls (some will be hidden from GUI initially)
|
||||
for (int i = 0; i < nMaxWindows; ++i) {
|
||||
const int monitorNumForThisWindow = (nMaxWindows > 3 && i >= 2) ? 1 : 0;
|
||||
const int monitorNumForThisWindow =
|
||||
(monitorResolutions.size() > 1 && i >= 2) ? 1 : 0;
|
||||
|
||||
WindowControl* ctrl = new WindowControl(
|
||||
monitorNumForThisWindow,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -31,7 +31,7 @@ namespace {
|
||||
constexpr int WindowOpacity = 170;
|
||||
|
||||
QRectF computeUnion(const std::vector<QRect>& monitorResolutions) {
|
||||
QRectF res = { 0.f, 0.f, 0.f, 0.f };
|
||||
QRectF res = QRectF(0.f, 0.f, 0.f, 0.f);
|
||||
for (const QRect& m : monitorResolutions) {
|
||||
res |= m;
|
||||
}
|
||||
@@ -145,12 +145,12 @@ void MonitorBox::paintEvent(QPaintEvent*) {
|
||||
void MonitorBox::windowDimensionsChanged(unsigned int mIdx, unsigned int wIdx,
|
||||
const QRectF& newDimensions)
|
||||
{
|
||||
_windowRendering[wIdx] = {
|
||||
_windowRendering[wIdx] = QRectF(
|
||||
_monitorDimensionsScaled[mIdx].x() + newDimensions.left() * _monitorScaleFactor,
|
||||
_monitorDimensionsScaled[mIdx].y() + newDimensions.top() * _monitorScaleFactor,
|
||||
newDimensions.width() * _monitorScaleFactor,
|
||||
newDimensions.height() * _monitorScaleFactor
|
||||
};
|
||||
);
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <filesystem>
|
||||
|
||||
namespace {
|
||||
constexpr QRect MonitorWidgetSize = { 0, 0, 500, 500 };
|
||||
constexpr QRect MonitorWidgetSize = QRect(0, 0, 500, 500);
|
||||
constexpr int MaxNumberWindows = 4;
|
||||
|
||||
// Returns true if the windows are not ordered correctly. 'Correct' in this means that
|
||||
@@ -48,10 +48,10 @@ namespace {
|
||||
// https://github.com/OpenSpace/OpenSpace/issues/507
|
||||
// is fixed
|
||||
bool hasWindowIssues(const sgct::config::Cluster& cluster) {
|
||||
sgct::ivec2 size = {
|
||||
sgct::ivec2 size = sgct::ivec2(
|
||||
std::numeric_limits<int>::max(),
|
||||
std::numeric_limits<int>::max()
|
||||
};
|
||||
);
|
||||
for (const sgct::config::Window& window : cluster.nodes.front().windows) {
|
||||
if (window.size.x <= size.x && window.size.y <= size.y) {
|
||||
size = window.size;
|
||||
@@ -96,7 +96,7 @@ void SgctEdit::createWidgets(const std::vector<QRect>& monitorSizes) {
|
||||
QBoxLayout* layout = new QVBoxLayout(this);
|
||||
layout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
sgct::quat orientation = { 0.f, 0.f, 0.f, 0.f };
|
||||
sgct::quat orientation = sgct::quat(0.f, 0.f, 0.f, 0.f);
|
||||
if (_cluster.scene.has_value() && _cluster.scene->orientation.has_value()) {
|
||||
orientation = *_cluster.scene->orientation;
|
||||
}
|
||||
@@ -283,7 +283,7 @@ sgct::config::Cluster SgctEdit::generateConfiguration() const {
|
||||
|
||||
sgct::config::User user;
|
||||
user.eyeSeparation = 0.065f;
|
||||
user.position = { 0.f, 0.f, 4.f };
|
||||
user.position = sgct::vec3(0.f, 0.f, 4.f);
|
||||
cluster.users = { user };
|
||||
|
||||
return cluster;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -52,10 +52,10 @@ namespace {
|
||||
};
|
||||
|
||||
constexpr std::array<QRectF, 4> DefaultWindowSizes = {
|
||||
QRectF{ 50.f, 50.f, 1280.f, 720.f },
|
||||
QRectF{ 150.f, 150.f, 1280.f, 720.f },
|
||||
QRectF{ 50.f, 50.f, 1280.f, 720.f },
|
||||
QRectF{ 150.f, 150.f, 1280.f, 720.f }
|
||||
QRectF(50.f, 50.f, 1280.f, 720.f),
|
||||
QRectF(150.f, 150.f, 1280.f, 720.f),
|
||||
QRectF(50.f, 50.f, 1280.f, 720.f),
|
||||
QRectF(150.f, 150.f, 1280.f, 720.f)
|
||||
};
|
||||
|
||||
constexpr int LineEditWidthFixedWindowSize = 50;
|
||||
@@ -707,17 +707,17 @@ sgct::config::Projections WindowControl::generateProjectionInformation() const {
|
||||
|
||||
sgct::config::Window WindowControl::generateWindowInformation() const {
|
||||
sgct::config::Window window;
|
||||
window.size = { _sizeX->text().toInt(), _sizeY->text().toInt() };
|
||||
window.size = sgct::ivec2(_sizeX->text().toInt(), _sizeY->text().toInt());
|
||||
QRect resolution = _monitorResolutions[_monitor->currentIndex()];
|
||||
window.pos = {
|
||||
window.pos = sgct::ivec2(
|
||||
resolution.x() + _offsetX->text().toInt(),
|
||||
resolution.y() + _offsetY->text().toInt()
|
||||
};
|
||||
);
|
||||
|
||||
sgct::config::Viewport vp;
|
||||
vp.isTracked = true;
|
||||
vp.position = { 0.f, 0.f };
|
||||
vp.size = { 1.f, 1.f };
|
||||
vp.position = sgct::vec2(0.f, 0.f);
|
||||
vp.size = sgct::vec2(1.f, 1.f);
|
||||
vp.projection = generateProjectionInformation();
|
||||
window.viewports.push_back(vp);
|
||||
|
||||
|
||||
Submodule apps/OpenSpace/ext/sgct updated: f48a48307f...d470316f85
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <ghoul/fmt.h>
|
||||
#include <ghoul/glm.h>
|
||||
#include <ghoul/cmdparser/commandlineparser.h>
|
||||
#include <ghoul/cmdparser/multiplecommand.h>
|
||||
#include <ghoul/cmdparser/singlecommand.h>
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include <ghoul/logging/visualstudiooutputlog.h>
|
||||
@@ -52,7 +53,7 @@
|
||||
#include <sgct/user.h>
|
||||
#include <sgct/window.h>
|
||||
#include <stb_image.h>
|
||||
#include <Tracy.hpp>
|
||||
#include <tracy/Tracy.hpp>
|
||||
#include <iostream>
|
||||
#include <string_view>
|
||||
|
||||
@@ -274,7 +275,7 @@ bool isGuiWindow(sgct::Window* window) {
|
||||
// Init function
|
||||
//
|
||||
void mainInitFunc(GLFWwindow*) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
LTRACE("main::mainInitFunc(begin)");
|
||||
|
||||
@@ -391,7 +392,7 @@ void mainInitFunc(GLFWwindow*) {
|
||||
|
||||
|
||||
void mainPreSyncFunc() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
LTRACE("main::mainPreSyncFunc(begin)");
|
||||
|
||||
try {
|
||||
@@ -411,7 +412,7 @@ void mainPreSyncFunc() {
|
||||
|
||||
|
||||
void mainPostSyncPreDrawFunc() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
#ifdef OPENSPACE_HAS_NVTOOLS
|
||||
nvtxRangePush("postSyncPreDraw");
|
||||
@@ -437,7 +438,7 @@ void mainPostSyncPreDrawFunc() {
|
||||
|
||||
|
||||
void mainRenderFunc(const sgct::RenderData& data) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
#ifdef OPENSPACE_HAS_NVTOOLS
|
||||
nvtxRangePush("render");
|
||||
@@ -525,7 +526,7 @@ void mainRenderFunc(const sgct::RenderData& data) {
|
||||
|
||||
|
||||
void mainDraw2DFunc(const sgct::RenderData& data) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
LTRACE("main::mainDraw2DFunc(begin)");
|
||||
|
||||
currentWindow = &data.window;
|
||||
@@ -550,7 +551,7 @@ void mainDraw2DFunc(const sgct::RenderData& data) {
|
||||
|
||||
|
||||
void mainPostDrawFunc() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
LTRACE("main::mainPostDrawFunc(begin)");
|
||||
|
||||
#ifdef OPENVR_SUPPORT
|
||||
@@ -570,7 +571,7 @@ void mainPostDrawFunc() {
|
||||
void mainKeyboardCallback(sgct::Key key, sgct::Modifier modifiers, sgct::Action action,
|
||||
int, sgct::Window* window)
|
||||
{
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
LTRACE("main::mainKeyboardCallback(begin)");
|
||||
|
||||
const openspace::Key k = openspace::Key(key);
|
||||
@@ -588,7 +589,7 @@ void mainKeyboardCallback(sgct::Key key, sgct::Modifier modifiers, sgct::Action
|
||||
void mainMouseButtonCallback(sgct::MouseButton key, sgct::Modifier modifiers,
|
||||
sgct::Action action, sgct::Window* window)
|
||||
{
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
LTRACE("main::mainMouseButtonCallback(begin)");
|
||||
|
||||
const openspace::MouseButton k = openspace::MouseButton(key);
|
||||
@@ -604,7 +605,7 @@ void mainMouseButtonCallback(sgct::MouseButton key, sgct::Modifier modifiers,
|
||||
|
||||
|
||||
void mainMousePosCallback(double x, double y, sgct::Window* window) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
const IsGuiWindow isGui = IsGuiWindow(isGuiWindow(window));
|
||||
global::openSpaceEngine->mousePositionCallback(x, y, isGui);
|
||||
}
|
||||
@@ -612,7 +613,7 @@ void mainMousePosCallback(double x, double y, sgct::Window* window) {
|
||||
|
||||
|
||||
void mainMouseScrollCallback(double posX, double posY, sgct::Window* window) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
LTRACE("main::mainMouseScrollCallback(begin");
|
||||
|
||||
const IsGuiWindow isGui = IsGuiWindow(isGuiWindow(window));
|
||||
@@ -624,7 +625,7 @@ void mainMouseScrollCallback(double posX, double posY, sgct::Window* window) {
|
||||
|
||||
|
||||
void mainCharCallback(unsigned int codepoint, int modifiers, sgct::Window* window) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
const KeyModifier m = KeyModifier(modifiers);
|
||||
const IsGuiWindow isGui = IsGuiWindow(isGuiWindow(window));
|
||||
@@ -646,7 +647,7 @@ void mainDropCallback(int amount, const char** paths) {
|
||||
|
||||
|
||||
std::vector<std::byte> mainEncodeFun() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
LTRACE("main::mainEncodeFun(begin)");
|
||||
|
||||
std::vector<std::byte> data = global::openSpaceEngine->encode();
|
||||
@@ -657,8 +658,8 @@ std::vector<std::byte> mainEncodeFun() {
|
||||
|
||||
|
||||
|
||||
void mainDecodeFun(const std::vector<std::byte>& data, unsigned int) {
|
||||
ZoneScoped
|
||||
void mainDecodeFun(const std::vector<std::byte>& data) {
|
||||
ZoneScoped;
|
||||
LTRACE("main::mainDecodeFun(begin)");
|
||||
|
||||
global::openSpaceEngine->decode(data);
|
||||
@@ -669,7 +670,7 @@ void mainDecodeFun(const std::vector<std::byte>& data, unsigned int) {
|
||||
|
||||
|
||||
void mainLogCallback(Log::Level level, std::string_view message) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
switch (level) {
|
||||
case Log::Level::Debug:
|
||||
@@ -693,54 +694,52 @@ void setSgctDelegateFunctions() {
|
||||
WindowDelegate& sgctDelegate = *global::windowDelegate;
|
||||
sgctDelegate.terminate = []() { Engine::instance().terminate(); };
|
||||
sgctDelegate.setBarrier = [](bool enabled) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
sgct::Window::setBarrier(enabled);
|
||||
};
|
||||
sgctDelegate.setSynchronization = [](bool enabled) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
sgct::ClusterManager::instance().setUseIgnoreSync(enabled);
|
||||
};
|
||||
sgctDelegate.windowHasResized = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return currentWindow->isWindowResized();
|
||||
};
|
||||
sgctDelegate.averageDeltaTime = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return Engine::instance().statistics().avgDt(
|
||||
Engine::instance().currentFrameNumber()
|
||||
);
|
||||
return Engine::instance().statistics().avgDt();
|
||||
};
|
||||
sgctDelegate.minDeltaTime = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return Engine::instance().statistics().minDt();
|
||||
};
|
||||
sgctDelegate.maxDeltaTime = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return Engine::instance().statistics().maxDt();
|
||||
};
|
||||
sgctDelegate.deltaTime = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return Engine::instance().statistics().dt();
|
||||
};
|
||||
sgctDelegate.applicationTime = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return sgct::Engine::getTime();
|
||||
return time();
|
||||
};
|
||||
sgctDelegate.currentWindowSize = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return glm::ivec2(currentWindow->resolution().x, currentWindow->resolution().y);
|
||||
};
|
||||
sgctDelegate.currentSubwindowSize = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
if (currentWindow->viewports().size() > 1) {
|
||||
const Viewport& viewport = *currentWindow->viewports().front();
|
||||
@@ -770,7 +769,7 @@ void setSgctDelegateFunctions() {
|
||||
}
|
||||
};
|
||||
sgctDelegate.currentDrawBufferResolution = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
Viewport* viewport = currentWindow->viewports().front().get();
|
||||
if (viewport != nullptr) {
|
||||
@@ -792,7 +791,7 @@ void setSgctDelegateFunctions() {
|
||||
return glm::ivec2(-1, -1);
|
||||
};
|
||||
sgctDelegate.currentViewportSize = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
if (currentViewport != nullptr) {
|
||||
vec2 size = currentViewport->size();
|
||||
@@ -801,13 +800,13 @@ void setSgctDelegateFunctions() {
|
||||
return glm::ivec2(-1, -1);
|
||||
};
|
||||
sgctDelegate.dpiScaling = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
vec2 scale = currentWindow->scale();
|
||||
return glm::vec2(scale.x, scale.y);
|
||||
};
|
||||
sgctDelegate.osDpiScaling = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
// Detect which DPI scaling to use
|
||||
// 1. If there is a GUI window, use the GUI window's content scale value
|
||||
@@ -837,7 +836,7 @@ void setSgctDelegateFunctions() {
|
||||
return scale.x;
|
||||
};
|
||||
sgctDelegate.hasGuiWindow = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
for (const std::unique_ptr<Window>& window : Engine::instance().windows()) {
|
||||
if (window->hasTag("GUI")) {
|
||||
@@ -847,76 +846,82 @@ void setSgctDelegateFunctions() {
|
||||
return false;
|
||||
};
|
||||
sgctDelegate.isGuiWindow = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return currentWindow->hasTag("GUI");
|
||||
};
|
||||
sgctDelegate.isMaster = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return Engine::instance().isMaster();
|
||||
};
|
||||
sgctDelegate.modelMatrix = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return currentModelMatrix;
|
||||
};
|
||||
sgctDelegate.setNearFarClippingPlane = [](float nearPlane, float farPlane) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
Engine::instance().setNearAndFarClippingPlanes(nearPlane, farPlane);
|
||||
};
|
||||
sgctDelegate.isFisheyeRendering = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return dynamic_cast<FisheyeProjection*>(
|
||||
currentWindow->viewports().front()->nonLinearProjection()
|
||||
) != nullptr;
|
||||
};
|
||||
sgctDelegate.takeScreenshot = [](bool applyWarping, std::vector<int> windowIds) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
Settings::instance().setCaptureFromBackBuffer(applyWarping);
|
||||
Engine::instance().takeScreenshot(std::move(windowIds));
|
||||
return Engine::instance().screenShotNumber();
|
||||
};
|
||||
sgctDelegate.resetScreenshotNumber = []() {
|
||||
ZoneScoped;
|
||||
Engine::instance().resetScreenshotNumber();
|
||||
};
|
||||
sgctDelegate.swapBuffer = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
GLFWwindow* w = glfwGetCurrentContext();
|
||||
glfwSwapBuffers(w);
|
||||
glfwPollEvents();
|
||||
};
|
||||
sgctDelegate.nWindows = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return static_cast<int>(Engine::instance().windows().size());
|
||||
};
|
||||
sgctDelegate.currentWindowId = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return currentWindow->id();
|
||||
};
|
||||
sgctDelegate.openGLProcedureAddress = [](const char* func) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return glfwGetProcAddress(func);
|
||||
};
|
||||
sgctDelegate.getHorizFieldOfView = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return static_cast<double>(
|
||||
Engine::instance().windows().front()->horizFieldOfViewDegrees()
|
||||
);
|
||||
};
|
||||
sgctDelegate.setHorizFieldOfView = [](float hFovDeg) {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
Engine::instance().windows().front()->setHorizFieldOfView(hFovDeg);
|
||||
for (std::unique_ptr<sgct::Window> const& w : Engine::instance().windows()) {
|
||||
w->setHorizFieldOfView(hFovDeg);
|
||||
}
|
||||
};
|
||||
#ifdef WIN32
|
||||
sgctDelegate.getNativeWindowHandle = [](size_t windowIndex) -> void* {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
Window* w = Engine::instance().windows()[windowIndex].get();
|
||||
if (w) {
|
||||
@@ -927,7 +932,7 @@ void setSgctDelegateFunctions() {
|
||||
};
|
||||
#endif // WIN32
|
||||
sgctDelegate.frustumMode = []() {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
switch (currentFrustumMode) {
|
||||
default:
|
||||
@@ -937,7 +942,7 @@ void setSgctDelegateFunctions() {
|
||||
}
|
||||
};
|
||||
sgctDelegate.swapGroupFrameNumber = []() -> uint64_t {
|
||||
ZoneScoped
|
||||
ZoneScoped;
|
||||
|
||||
return currentWindow->swapGroupFrameNumber();
|
||||
};
|
||||
@@ -1074,7 +1079,6 @@ int main(int argc, char* argv[]) {
|
||||
LogMgr.addLog(std::make_unique<ghoul::logging::VisualStudioOutputLog>());
|
||||
}
|
||||
#endif // WIN32
|
||||
|
||||
}
|
||||
|
||||
ghoul::initialize();
|
||||
@@ -1106,7 +1110,7 @@ int main(int argc, char* argv[]) {
|
||||
"current working directory"
|
||||
));
|
||||
|
||||
parser.addCommand(std::make_unique<ghoul::cmdparser::SingleCommand<std::string>>(
|
||||
parser.addCommand(std::make_unique<ghoul::cmdparser::MultipleCommand<std::string>>(
|
||||
commandlineArguments.configurationOverride, "--config", "-c",
|
||||
"Provides the ability to pass arbitrary Lua code to the application that will be "
|
||||
"evaluated after the configuration file has been loaded but before the other "
|
||||
@@ -1179,10 +1183,14 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
// Loading configuration from disk
|
||||
LDEBUG("Loading configuration from disk");
|
||||
std::string override;
|
||||
for (const std::string& arg : commandlineArguments.configurationOverride) {
|
||||
override += arg + ";";
|
||||
}
|
||||
*global::configuration = configuration::loadConfigurationFromFile(
|
||||
configurationFilePath.string(),
|
||||
size,
|
||||
commandlineArguments.configurationOverride
|
||||
override
|
||||
);
|
||||
|
||||
// Determining SGCT configuration file
|
||||
@@ -1192,12 +1200,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
catch (const documentation::SpecificationError& e) {
|
||||
LFATALC("main", "Loading of configuration file failed");
|
||||
for (const documentation::TestResult::Offense& o : e.result.offenses) {
|
||||
LERRORC(o.offender, ghoul::to_string(o.reason));
|
||||
}
|
||||
for (const documentation::TestResult::Warning& w : e.result.warnings) {
|
||||
LWARNINGC(w.offender, ghoul::to_string(w.reason));
|
||||
}
|
||||
logError(e);
|
||||
ghoul::deinitialize();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@@ -1364,7 +1367,7 @@ int main(int argc, char* argv[]) {
|
||||
Engine::instance().setSyncParameters(false, 15.f * 60.f);
|
||||
|
||||
LINFO("Starting rendering loop");
|
||||
Engine::instance().render();
|
||||
Engine::instance().exec();
|
||||
LINFO("Ending rendering loop");
|
||||
|
||||
global::openSpaceEngine->deinitializeGL();
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/application_definition.cmake)
|
||||
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
|
||||
@@ -47,7 +47,7 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE")
|
||||
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/application_definition.cmake)
|
||||
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
|
||||
@@ -47,7 +47,7 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE")
|
||||
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
71
config/single_gui_with_graphics.json
Normal file
71
config/single_gui_with_graphics.json
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"version": 1,
|
||||
"masteraddress": "localhost",
|
||||
"externalcontrolport": 20500,
|
||||
"settings": {
|
||||
"display": {
|
||||
"swapinterval": 0
|
||||
}
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"address": "localhost",
|
||||
"port": 20401,
|
||||
"windows": [
|
||||
{
|
||||
"name": "GUI",
|
||||
"tags": [ "GUI" ],
|
||||
"fullscreen": false,
|
||||
"draw3d": false,
|
||||
"blitwindowid": 1,
|
||||
"stereo": "none",
|
||||
"pos": { "x": 50, "y": 50 },
|
||||
"size": { "x": 1280, "y": 720 },
|
||||
"viewports": [
|
||||
{
|
||||
"pos": { "x": 0.0, "y": 0.0 },
|
||||
"size": { "x": 1.0, "y": 1.0 },
|
||||
"projection": {
|
||||
"type": "PlanarProjection",
|
||||
"fov": {
|
||||
"hfov": 80.0,
|
||||
"vfov": 50.534015846724
|
||||
},
|
||||
"orientation": { "yaw": 0.0, "pitch": 0.0, "roll": 0.0 }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OpenSpace",
|
||||
"fullscreen": false,
|
||||
"draw2d": false,
|
||||
"stereo": "none",
|
||||
"pos": { "x": 50, "y": 50 },
|
||||
"size": { "x": 1280, "y": 720 },
|
||||
"viewports": [
|
||||
{
|
||||
"tracked": true,
|
||||
"pos": { "x": 0.0, "y": 0.0 },
|
||||
"size": { "x": 1.0, "y": 1.0 },
|
||||
"projection": {
|
||||
"type": "PlanarProjection",
|
||||
"fov": {
|
||||
"hfov": 80.0,
|
||||
"vfov": 50.534015846724
|
||||
},
|
||||
"orientation": { "yaw": 0.0, "pitch": 0.0, "roll": 0.0 }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"users": [
|
||||
{
|
||||
"eyeseparation": 0.065,
|
||||
"pos": { "x": 0.0, "y": 0.0, "z": 0.0 }
|
||||
}
|
||||
]
|
||||
}
|
||||
70
data/assets/actions/trails/on_off_all_minor_moons.asset
Normal file
70
data/assets/actions/trails/on_off_all_minor_moons.asset
Normal file
@@ -0,0 +1,70 @@
|
||||
local minormoons_on = {
|
||||
Identifier = "os_default.minormoons_on",
|
||||
Name = "Turn ON minor moons and trails",
|
||||
Command = [[
|
||||
local trails = openspace.getProperty('{moonTrail_minor}.Renderable.Enabled');
|
||||
local trails_fade = openspace.getProperty('{moonTrail_minor}.Renderable.Fade');
|
||||
|
||||
local moons = openspace.getProperty('{moon_minor}.Renderable.Enabled');
|
||||
local moons_fade = openspace.getProperty('{moon_minor}.Renderable.Fade');
|
||||
|
||||
for i, v in pairs(trails_fade) do
|
||||
openspace.setPropertyValueSingle(trails[i], true)
|
||||
openspace.setPropertyValueSingle(v, 1, 2, 'Linear')
|
||||
end
|
||||
|
||||
for i, v in pairs(moons_fade) do
|
||||
openspace.setPropertyValueSingle(moons[i], true)
|
||||
openspace.setPropertyValueSingle(v, 1, 2, 'Linear')
|
||||
end
|
||||
]],
|
||||
Documentation = "Turn ON minor moons and their trails for all planets in the solar system",
|
||||
GuiPath = "/Solar System/Minor Moons",
|
||||
IsLocal = true
|
||||
}
|
||||
|
||||
local minormoons_off = {
|
||||
Identifier = "os_default.minormoons_off",
|
||||
Name = "Turn OFF minor moons and trails",
|
||||
Command = [[
|
||||
local trails = openspace.getProperty('{moonTrail_minor}.Renderable.Enabled');
|
||||
local trails_fade = openspace.getProperty('{moonTrail_minor}.Renderable.Fade');
|
||||
|
||||
local moons = openspace.getProperty('{moon_minor}.Renderable.Enabled');
|
||||
local moons_fade = openspace.getProperty('{moon_minor}.Renderable.Fade');
|
||||
|
||||
for i, v in pairs(trails_fade) do
|
||||
openspace.setPropertyValueSingle(v, 0, 2, 'Linear', "openspace.setPropertyValueSingle('" .. trails[i] .. "', false)" )
|
||||
end
|
||||
|
||||
for i, v in pairs(moons_fade) do
|
||||
openspace.setPropertyValueSingle(v, 0, 2, 'Linear', "openspace.setPropertyValueSingle('" .. moons[i] .. "', false)" )
|
||||
end
|
||||
]],
|
||||
Documentation = "Turn OFF minor moons and their trails for all planets in the solar system",
|
||||
GuiPath = "/Solar System/Minor Moons",
|
||||
IsLocal = true
|
||||
}
|
||||
|
||||
asset.export("minormoons_on", minormoons_on.Identifier)
|
||||
asset.export("minormoons_off", minormoons_off.Identifier)
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(minormoons_on)
|
||||
openspace.action.registerAction(minormoons_off)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(minormoons_off)
|
||||
openspace.action.removeAction(minormoons_on)
|
||||
end)
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Actions - Turn ON/OFF all Minor Moons",
|
||||
Version = "1.0",
|
||||
Description = "Asset providing actions to turn ON/OFF all minor moons and their trails",
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
local toggle_minormoon_trails = {
|
||||
Identifier = "os_default.toggle_minormoon_trails",
|
||||
Name = "Toggle Minor Moon Trails",
|
||||
Command = [[
|
||||
local list = openspace.getProperty('{moonTrail_minor}.Renderable.Enabled');
|
||||
for _,v in pairs(list) do
|
||||
openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v))
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle on/off minor moon trails for all planets in the solar system",
|
||||
GuiPath = "/Trails",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("toggle_minormoon_trails", toggle_minormoon_trails.Identifier)
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(toggle_minormoon_trails)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(toggle_minormoon_trails)
|
||||
end)
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Actions - Toggle Minor Moon Trails",
|
||||
Version = "1.0",
|
||||
Description = "Asset providing actions to toggle all minor moon trails on and off",
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -4,10 +4,6 @@
|
||||
|
||||
asset.require("./base_blank")
|
||||
|
||||
-- Modules and component settings
|
||||
asset.require("modules/exoplanets/exoplanets")
|
||||
asset.require("modules/skybrowser/skybrowser")
|
||||
|
||||
-- Specifying which other assets should be loaded in this scene
|
||||
asset.require("scene/solarsystem/sun/sun")
|
||||
asset.require("scene/solarsystem/sun/glare")
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
-- This is a blank scene that that just sets up the default menus/dasboard/keys, etc.
|
||||
|
||||
local propertyHelper = asset.require("util/property_helper")
|
||||
|
||||
-- Specifying which other assets should be loaded in this scene
|
||||
asset.require("spice/base")
|
||||
|
||||
@@ -18,6 +16,12 @@ asset.require("util/dpiscaling")
|
||||
-- Load the images required for the launcher to show up
|
||||
asset.require("util/launcher_images")
|
||||
|
||||
-- Modules and component settings
|
||||
asset.require("modules/exoplanets/exoplanets")
|
||||
asset.require("modules/skybrowser/skybrowser")
|
||||
asset.require("modules/touch/default_settings")
|
||||
|
||||
|
||||
asset.onInitialize(function ()
|
||||
webGui.setCefRoute("onscreen")
|
||||
openspace.setDefaultGuiSorting()
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Group (optional),Name (required),Globe (optional),Lat (required if globe),Lon (required if globe),Altitude (optional if globe),x (required if not globe),y (required if not globe),z (required if not globe),Scale (optional),LineWidth (optional)
|
||||
NASA,Kenedy Space Center,Earth,28.6658276,-80.70282839,,,,,,
|
||||
NASA,Kennedy Space Center,Earth,28.6658276,-80.70282839,,,,,,
|
||||
|
||||
|
@@ -65,12 +65,36 @@ local updatePositionAction = {
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
local resetPositionAction = {
|
||||
Identifier = "os.reset_eiffel_tower",
|
||||
Name = "Reset Eiffel Tower position",
|
||||
Command = [[
|
||||
-- same position as above
|
||||
local lat = 48.85824
|
||||
local lon = 2.29448
|
||||
local globe = ']] .. earthAsset.Earth.Identifier .. [['
|
||||
openspace.setParent('eiffelTower', globe)
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Globe', globe);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Latitude', lat);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Longitude', lon);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Globe', globe);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Latitude', lat);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Longitude', lon);
|
||||
]],
|
||||
Documentation = "Updates the Eiffel Tower position based on the globe location of the camera",
|
||||
GuiPath = "/Scale Objects",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(eiffelTower)
|
||||
openspace.action.registerAction(updatePositionAction)
|
||||
openspace.action.registerAction(resetPositionAction)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(resetPositionAction)
|
||||
openspace.action.removeAction(updatePositionAction)
|
||||
openspace.removeSceneGraphNode(eiffelTower)
|
||||
end)
|
||||
|
||||
@@ -58,6 +58,11 @@ local elapsed_time = {
|
||||
ReferenceTime = "2022-10-12 12:00:00"
|
||||
}
|
||||
|
||||
local input_state = {
|
||||
Type = "DashboardItemInputState",
|
||||
Identifier = "InputState"
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.dashboard.addDashboardItem(angle)
|
||||
openspace.dashboard.addDashboardItem(date)
|
||||
@@ -68,9 +73,11 @@ asset.onInitialize(function()
|
||||
openspace.dashboard.addDashboardItem(mission)
|
||||
openspace.dashboard.addDashboardItem(property_value)
|
||||
openspace.dashboard.addDashboardItem(elapsed_time)
|
||||
openspace.dashboard.addDashboardItem(input_state)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.dashboard.removeDashboardItem(input_state)
|
||||
openspace.dashboard.removeDashboardItem(elapsed_time)
|
||||
openspace.dashboard.removeDashboardItem(property_value)
|
||||
openspace.dashboard.removeDashboardItem(mission)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
local bookmarkHelper = asset.require("util/generate_bookmarks")
|
||||
|
||||
-- Most of the local bookmarks we are loading are relative to the Earth so we should
|
||||
-- ensure that it is loaded first
|
||||
asset.require("scene/solarsystem/planets/earth/earth")
|
||||
|
||||
local nodes = bookmarkHelper.getBookmarks("Local Bookmarks", "${ASSETS}/customization/localbookmarks.csv")
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
for _, n in ipairs(nodes) do
|
||||
openspace.addSceneGraphNode(n)
|
||||
local success, error = pcall(openspace.addSceneGraphNode, n)
|
||||
if not success then
|
||||
openspace.printError(error)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
for _, n in ipairs(nodes) do
|
||||
openspace.removeSceneGraphNode(n)
|
||||
if openspace.hasSceneGraphNode(n.Identifier) then
|
||||
openspace.removeSceneGraphNode(n)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
19
data/assets/modules/touch/default_settings.asset
Normal file
19
data/assets/modules/touch/default_settings.asset
Normal file
@@ -0,0 +1,19 @@
|
||||
asset.onInitialize(function ()
|
||||
openspace.setPropertyValueSingle("Modules.Touch.EnableTouchInteraction", true)
|
||||
|
||||
-- A list of renderable types that apply the "direct manipulation". Works best for
|
||||
-- things with a sperical-ish shape and an intearction sphere of about the same size
|
||||
-- as the bounding sphere.
|
||||
-- Can also be set for each scene graph node using the "IsDirectlyTouchable" property
|
||||
local directTouchList = { "RenderableGlobe" }
|
||||
openspace.setPropertyValueSingle("Modules.Touch.DefaultDirectTouchRenderableTypes", directTouchList)
|
||||
end)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Touch Module Default Settings",
|
||||
Version = "1.0",
|
||||
Description = "Some default settings related to the touch module",
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -17,9 +17,10 @@ local speck = asset.syncedResource({
|
||||
Name = "Grids Speck Files",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "digitaluniverse_grids_speck",
|
||||
Version = 2
|
||||
Version = 3
|
||||
})
|
||||
|
||||
local lightHour = 1.0792528488E12
|
||||
local lightDay = 2.59020684E13
|
||||
local lightMonth = 7.771E14
|
||||
local lightYear = 9.4605284E15
|
||||
@@ -236,6 +237,37 @@ local galacticLabels = {
|
||||
}
|
||||
}
|
||||
|
||||
local plane1lh = {
|
||||
Identifier = "1lhGrid",
|
||||
Parent = transforms.SolarSystemBarycenter.Name,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = eclipticRotationMatrix
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGrid",
|
||||
Enabled = false,
|
||||
Labels = {
|
||||
File = speck .. "1lh.label",
|
||||
Color = { 0.0, 0.2, 0.5 },
|
||||
Size = 9.5,
|
||||
MinMaxSize = { 0, 30 },
|
||||
Unit = "Km"
|
||||
},
|
||||
Opacity = 0.4,
|
||||
Color = { 0.1, 0.5, 0.6 },
|
||||
LineWidth = 2.0,
|
||||
Segments = { 20, 20 },
|
||||
Size = { 2*lightHour, 2*lightHour }
|
||||
},
|
||||
GUI = {
|
||||
Name = "1lh Grid",
|
||||
Path = "/Other/Grids"
|
||||
}
|
||||
}
|
||||
|
||||
local plane1ld = {
|
||||
Identifier = "1ldGrid",
|
||||
Parent = transforms.SolarSystemBarycenter.Name,
|
||||
@@ -585,7 +617,7 @@ local plane20Gly = {
|
||||
|
||||
local nodes = {
|
||||
radio, oort, ecliptic, eclipticLabels, equatorial, equatorialLabels,
|
||||
galactic, galacticLabels, plane1ld, plane1lm, plane1ly, plane10ly,
|
||||
galactic, galacticLabels, plane1lh, plane1ld, plane1lm, plane1ly, plane10ly,
|
||||
plane100ly, plane1kly, plane10kly, plane100kly, plane1Mly, plane10Mly, plane100Mly,
|
||||
plane20Gly
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ local plane = {
|
||||
},
|
||||
GUI = {
|
||||
Name = "Milky Way Galaxy Image",
|
||||
Path = "/Universe/Galaxies",
|
||||
Path = "/Milky Way",
|
||||
Description = [[Census: 1 image. DU Version 2.2. <br> The exterior view of the
|
||||
Milky Way is simply a two-dimensional image. The image is that of NGC 1232, a
|
||||
galaxy thought to resemble our Milky Way. The image has been properly sized
|
||||
|
||||
@@ -31,7 +31,7 @@ local plane = {
|
||||
},
|
||||
GUI = {
|
||||
Name = "Milky Way Arms Labels",
|
||||
Path = "/Universe/Galaxies",
|
||||
Path = "/Milky Way",
|
||||
Description = [[Census: 1 image. DU Version: 1.2. This image contains labels for
|
||||
the Milky Way's spiral arms. We label them in this manner ("hard coding" the
|
||||
labels into an image rather than having native labels) so that they can retain
|
||||
|
||||
@@ -34,7 +34,7 @@ local gaia_abundance_apogee = {
|
||||
ColorRange = { { -0.8, 0.6 } },
|
||||
-- ShapeTexture = textures .. "disc.png",
|
||||
ColorMap = colormaps .. "colorbv.cmap",
|
||||
OtherDataColorMap = colormaps .. "RainbowGradient.cmap",
|
||||
OtherDataColorMap = colormaps .. "rainbowgradient.cmap",
|
||||
StaticFilter = -9999,
|
||||
StaticFilterReplacement = 0.0,
|
||||
DataMapping = {
|
||||
|
||||
@@ -5,12 +5,14 @@ local gaia618Destination = asset.syncedResource({
|
||||
Name = "Gaia DR2 618M Octree",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "gaia_stars_618M_octree",
|
||||
Version = 1
|
||||
Version = 1,
|
||||
UnzipFiles = true,
|
||||
UnzipFilesDestination = "data"
|
||||
})
|
||||
local gaia618DestinationExtracted = gaia618Destination .. "data";
|
||||
|
||||
-- Download the full DR2 dataset with 24 values per star (preprocessed with theReadFitsTask (gaia_read.task) into 8 binary files).
|
||||
-- From these files new subsets can be created with the ConstructOctreeTask (gaia_octree.task).
|
||||
-- From these files new subsets can be created with the ConstructOctreeTask (gaia_octree.task).
|
||||
-- Total size of download is 151 GB.
|
||||
local gaiaFull = asset.syncedResource({
|
||||
Name = "Gaia DR2 Full Raw",
|
||||
@@ -19,13 +21,6 @@ local gaiaFull = asset.syncedResource({
|
||||
Version = 1
|
||||
})
|
||||
|
||||
asset.onInitialize(function()
|
||||
if not openspace.directoryExists(gaia618DestinationExtracted) then
|
||||
openspace.printInfo("Extracted Gaia dataset")
|
||||
openspace.unzipFile(gaia618Destination .. "DR2_full_Octree[50kSPN,500dist]_50,50.zip", gaia618DestinationExtracted, true)
|
||||
end
|
||||
end)
|
||||
|
||||
asset.export("GaiaDR2_618M", gaia618DestinationExtracted)
|
||||
asset.export("GaiaFullDataset", gaiaFull)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ local gaia_abundance_galah = {
|
||||
ColorOption = "Other Data",
|
||||
OtherData = "FeH",
|
||||
ColorMap = colormaps .. "colorbv.cmap",
|
||||
OtherDataColorMap = colormaps .. "RainbowGradient.cmap",
|
||||
OtherDataColorMap = colormaps .. "rainbowgradient.cmap",
|
||||
ColorRange = { { -0.8, 0.6 } },
|
||||
StaticFilter = -9999,
|
||||
StaticFilterReplacement = 0.0,
|
||||
|
||||
@@ -50,11 +50,38 @@ local Charon = {
|
||||
}
|
||||
}
|
||||
|
||||
local CharonLabel = {
|
||||
Identifier = "CharonLabel",
|
||||
Parent = Charon.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Charon",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 500.0 },
|
||||
FadeWidths = { 150.0, 250.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Charon Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Charon"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Charon)
|
||||
openspace.addSceneGraphNode(CharonLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(CharonLabel)
|
||||
openspace.removeSceneGraphNode(Charon)
|
||||
end)
|
||||
|
||||
|
||||
@@ -52,12 +52,39 @@ local HydraTrail = {
|
||||
}
|
||||
}
|
||||
|
||||
local HydraLabel = {
|
||||
Identifier = "HydraLabel",
|
||||
Parent = Hydra.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Hydra",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 1000.0 },
|
||||
FadeWidths = { 150.0, 500.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Cheron Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Hydra"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Hydra)
|
||||
openspace.addSceneGraphNode(HydraTrail)
|
||||
openspace.addSceneGraphNode(HydraLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(HydraLabel)
|
||||
openspace.removeSceneGraphNode(HydraTrail)
|
||||
openspace.removeSceneGraphNode(Hydra)
|
||||
end)
|
||||
|
||||
@@ -51,12 +51,39 @@ local KerberosTrail = {
|
||||
}
|
||||
}
|
||||
|
||||
local KerberosLabel = {
|
||||
Identifier = "KerberosLabel",
|
||||
Parent = Kerberos.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Kerberos",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 1000.0 },
|
||||
FadeWidths = { 150.0, 500.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Cheron Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Kerberos"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Kerberos)
|
||||
openspace.addSceneGraphNode(KerberosTrail)
|
||||
openspace.addSceneGraphNode(KerberosLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(KerberosLabel)
|
||||
openspace.removeSceneGraphNode(KerberosTrail)
|
||||
openspace.removeSceneGraphNode(Kerberos)
|
||||
end)
|
||||
|
||||
@@ -51,12 +51,39 @@ local NixTrail = {
|
||||
}
|
||||
}
|
||||
|
||||
local NixLabel = {
|
||||
Identifier = "NixLabel",
|
||||
Parent = Nix.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Nix",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 1000.0 },
|
||||
FadeWidths = { 150.0, 500.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Cheron Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Nix"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Nix)
|
||||
openspace.addSceneGraphNode(NixTrail)
|
||||
openspace.addSceneGraphNode(NixLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(NixLabel)
|
||||
openspace.removeSceneGraphNode(NixTrail)
|
||||
openspace.removeSceneGraphNode(Nix)
|
||||
end)
|
||||
|
||||
@@ -50,12 +50,39 @@ local StyxTrail = {
|
||||
}
|
||||
}
|
||||
|
||||
local StyxLabel = {
|
||||
Identifier = "StyxLabel",
|
||||
Parent = Styx.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Styx",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 1000.0 },
|
||||
FadeWidths = { 150.0, 500.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Cheron Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Styx"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Styx)
|
||||
openspace.addSceneGraphNode(StyxTrail)
|
||||
openspace.addSceneGraphNode(StyxLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(StyxLabel)
|
||||
openspace.removeSceneGraphNode(StyxTrail)
|
||||
openspace.removeSceneGraphNode(Styx)
|
||||
end)
|
||||
|
||||
@@ -57,10 +57,14 @@ local PlutoLabel = {
|
||||
Type = "RenderableLabel",
|
||||
Text = "Pluto",
|
||||
FontSize = 70.0,
|
||||
Size = 9.05,
|
||||
Size = 9.10,
|
||||
MinMaxSize = { 1, 100 },
|
||||
BlendMode = "Additive",
|
||||
OrientationOption = "Camera View Direction"
|
||||
OrientationOption = "Camera View Direction",
|
||||
EnableFading = true,
|
||||
FadeUnit = "au",
|
||||
FadeDistances = { 2.0, 120.0 },
|
||||
FadeWidths = { 1.0, 150.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels" },
|
||||
GUI = {
|
||||
|
||||
@@ -12,9 +12,16 @@ local fieldlineData = asset.syncedResource({
|
||||
Name = "Fieldlines Data BATSRUS",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "sun_earth_event_july_2012-batsrus",
|
||||
Version = 1
|
||||
Version = 1,
|
||||
UnzipFiles = true
|
||||
})
|
||||
|
||||
local unzippedDataDestination = {
|
||||
openClosed = fieldlineData .. "magnetic_fieldlines-open_closed",
|
||||
velocityFlow = fieldlineData .. "velocity_flowlines-upstream",
|
||||
asherStatic = fieldlineData .. "ashers_static_seeds"
|
||||
}
|
||||
|
||||
local loop = {
|
||||
Documentation = "Sets time to start of data, sets higher delta time and loops back from start, when at end of data",
|
||||
GuiPath = "2012July",
|
||||
@@ -30,12 +37,6 @@ local batsrusCurrentColorTable = transferFunctions .. "batsrus_current2.txt"
|
||||
local batsrusVelocityColorTable = transferFunctions .. "batsrus_velocity.txt"
|
||||
local batsrusTopologyColorTable = transferFunctions .. "batsrus_topology.txt"
|
||||
|
||||
local unzippedDataDestination = {
|
||||
openClosed = fieldlineData .. "magnetic_fieldlines-open_closed",
|
||||
velocityFlow = fieldlineData .. "velocity_flowlines-upstream",
|
||||
asherStatic = fieldlineData .. "ashers_static_seeds"
|
||||
}
|
||||
|
||||
local colorRanges = {
|
||||
{ 0, 100000000 },
|
||||
{ 0, 60 },
|
||||
@@ -131,19 +132,6 @@ local BatsrusAsherStaticSeedsFlowLines = {
|
||||
asset.onInitialize(function ()
|
||||
openspace.action.registerAction(loop)
|
||||
|
||||
if not openspace.directoryExists(unzippedDataDestination.openClosed) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from Batsrus model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "magnetic_fieldlines-open_closed.zip", unzippedDataDestination.openClosed, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.velocityFlow) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from Batsrus model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "velocity_flowlines-upstream.zip", unzippedDataDestination.velocityFlow, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.asherStatic) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from Batsrus model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "ashers_static_seeds.zip", unzippedDataDestination.asherStatic, true)
|
||||
end
|
||||
|
||||
openspace.addSceneGraphNode(BatsrusJ12OpenClosed)
|
||||
openspace.addSceneGraphNode(BatsrusJ12FlowLines)
|
||||
openspace.addSceneGraphNode(BatsrusAsherStaticSeedsFlowLines)
|
||||
|
||||
@@ -8,11 +8,12 @@ local transferFunctions = asset.syncedResource({
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local fieldlineData = asset.syncedResource({
|
||||
local fieldlineData = asset.syncedResource({
|
||||
Name = "Fieldlines Data ENLIL",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "sun_earth_event_july_2012-enlil",
|
||||
Version = 1
|
||||
Version = 1,
|
||||
UnzipFiles = true
|
||||
})
|
||||
|
||||
local loop = {
|
||||
@@ -187,31 +188,6 @@ local ENLILStereoA = {
|
||||
asset.onInitialize(function ()
|
||||
openspace.action.registerAction(loop)
|
||||
|
||||
if not openspace.directoryExists(unzippedDataDestination.EqPlane011AU1) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "011AU_eq_plane_1.zip", unzippedDataDestination.EqPlane011AU1, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.EqPlane011AU2) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "011AU_eq_plane_2.zip", unzippedDataDestination.EqPlane011AU2, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.Lat4011AU1) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "011AU_lat4_1.zip", unzippedDataDestination.Lat4011AU1, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.Lat4011AU2) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "011AU_lat4_2.zip", unzippedDataDestination.Lat4011AU2, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.Earth) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "earth.zip", unzippedDataDestination.Earth, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.StereoA) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "stereoa.zip", unzippedDataDestination.StereoA, true)
|
||||
end
|
||||
|
||||
openspace.addSceneGraphNode(ENLILSliceEqPlane11AU1)
|
||||
openspace.addSceneGraphNode(ENLILSliceEqPlane11AU2)
|
||||
openspace.addSceneGraphNode(ENLILSliceLat411AU1)
|
||||
|
||||
@@ -11,7 +11,8 @@ local fieldlineData = asset.syncedResource({
|
||||
Name = "Fieldlines Data PFSS",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "sun_earth_event_july_2012-pfss",
|
||||
Version = 1
|
||||
Version = 1,
|
||||
UnzipFiles = true
|
||||
})
|
||||
|
||||
local darkenSun = {
|
||||
@@ -64,11 +65,6 @@ local PFSS = {
|
||||
asset.onInitialize(function ()
|
||||
openspace.action.registerAction(darkenSun)
|
||||
|
||||
if not openspace.directoryExists(PFSSPaths.SolarSoft) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from PFSS model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "leilas_solar_soft.zip", PFSSPaths.SolarSoft, true)
|
||||
end
|
||||
|
||||
openspace.addSceneGraphNode(PFSS)
|
||||
|
||||
-- openspace.setPropertyValueSingle("Scene.FL_PFSS.Renderable.FlowEnabled", true)
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
local bastilleday_setup_startofcme = {
|
||||
Identifier = "os.events.bastilleday.setup.startofcme",
|
||||
Name = "Reset to start of CME, no loop",
|
||||
Command = [[
|
||||
openspace.time.setTime('2000-JUL-14 10:03:00.00');
|
||||
openspace.scriptScheduler.clear();
|
||||
]],
|
||||
Documentation = "Button to reset to the the start of the CME",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
local bastilleday_setup_shortloop = {
|
||||
Identifier = "os.events.bastilleday.setup.shortloop",
|
||||
Name = "Loop 10:03 - 10:16, at 2 min/second",
|
||||
Command = [[
|
||||
local EndtimeShortLoop = "2000 JUL 14 10:16:00";
|
||||
local starttimescriptslowloop = "openspace.time.setTime('2000 JUL 14 10:03:00')";
|
||||
openspace.scriptScheduler.clear();
|
||||
openspace.time.setDeltaTime(120);
|
||||
openspace.time.setTime('2000-JUL-14 10:03:00.00');
|
||||
openspace.scriptScheduler.loadScheduledScript(EndtimeShortLoop, starttimescriptslowloop);
|
||||
]],
|
||||
Documentation = "New loop: Restarts time at 10:03 and stops at 10:16, sets delta time to 2 min/second (120 seconds/second)",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
local bastilleday_setup_standardloop = {
|
||||
Identifier = "os.events.bastilleday.setup.standardloop",
|
||||
Name = "Loop 10:03 - 11:00, at 4 min/second",
|
||||
Command = [[
|
||||
local starttimescriptslowloop = "openspace.time.setTime('2000 JUL 14 10:03:00')";
|
||||
openspace.scriptScheduler.clear();
|
||||
openspace.time.setDeltaTime(240);
|
||||
openspace.time.setTime('2000-JUL-14 10:03:00.00');
|
||||
openspace.scriptScheduler.loadScheduledScript('2000 JUL 14 11:00:00', starttimescriptslowloop);
|
||||
]],
|
||||
Documentation = "New loop: Restarts time at 10:03 and stops at 11:00, delta time to 4 min/second (240 seconds/second)",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
local bastilleday_setup_fastloop = {
|
||||
Identifier = "os.events.bastilleday.setup.fastloop",
|
||||
Name = "Loop 10:03 - 11.48, at 15 min/second",
|
||||
Command = [[
|
||||
local starttimescriptfastloop = "openspace.time.setTime('2000 JUL 14 10:03:00')";
|
||||
openspace.scriptScheduler.clear();
|
||||
openspace.time.setDeltaTime(900);
|
||||
openspace.time.setTime('2000-JUL-14 10:03:00.00');
|
||||
openspace.scriptScheduler.loadScheduledScript('2000 JUL 14 11:48:00', starttimescriptfastloop);
|
||||
]],
|
||||
Documentation = "Fast loop: Starts from 10:03 and sets delta time to 15 min/second (900 seconds/second)",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
local bastilleday_setup_longloop = {
|
||||
Identifier = "os.events.bastilleday.setup.longloop",
|
||||
Name = "Loop 09:30 - 13:00, at 4 min/second",
|
||||
Command = [[
|
||||
local starttimescriptlongloop = "openspace.time.setTime('2000 JUL 14 09:30:00')";
|
||||
openspace.scriptScheduler.clear();
|
||||
openspace.time.setDeltaTime(240);
|
||||
openspace.time.setTime('2000-JUL-14 09:30:00.00');
|
||||
openspace.scriptScheduler.loadScheduledScript('2000 JUL 14 13:00:00', starttimescriptlongloop);
|
||||
]],
|
||||
Documentation = "Long loop: Restarts time at 09:30 and stops at 11:50, delta time to 4 min/second (240 seconds/second)",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(bastilleday_setup_startofcme)
|
||||
openspace.action.registerAction(bastilleday_setup_shortloop)
|
||||
openspace.action.registerAction(bastilleday_setup_standardloop)
|
||||
openspace.action.registerAction(bastilleday_setup_fastloop)
|
||||
openspace.action.registerAction(bastilleday_setup_longloop)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(bastilleday_setup_longloop)
|
||||
openspace.action.removeAction(bastilleday_setup_fastloop)
|
||||
openspace.action.removeAction(bastilleday_setup_standardloop)
|
||||
openspace.action.removeAction(bastilleday_setup_shortloop)
|
||||
openspace.action.removeAction(bastilleday_setup_startofcme)
|
||||
end)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Bastille day actions",
|
||||
Version = "1.0",
|
||||
Description = "Asset with actions related to Bastille day",
|
||||
Author = "CCMC, OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -49,7 +49,7 @@ local densityVolume = {
|
||||
}
|
||||
|
||||
local toggle_volume = {
|
||||
Identifier = "density_volume.toggle_volume",
|
||||
Identifier = "os.events.bastilleday.densityvolume.togglevolume",
|
||||
Name = "Toggle volume",
|
||||
Command = propertyHelper.invert("Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Enabled"),
|
||||
Documentation = "Toggle volume rendering of CME",
|
||||
@@ -72,7 +72,7 @@ asset.export(densityVolume)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Predictive Science Inc. Volume Rendering Bastille Day",
|
||||
Version = "1.0",
|
||||
Version = "1.1",
|
||||
Description = "Volumetric rendering for the bastille day CME event",
|
||||
Author = "CCMC, OpenSpace team",
|
||||
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
|
||||
|
||||
@@ -48,7 +48,7 @@ local fieldlines = {
|
||||
}
|
||||
|
||||
local toggle_fieldlines = {
|
||||
Identifier = "fieldlines.toggle_fieldlines",
|
||||
Identifier = "os.events.bastilleday.fieldlines.togglefieldlines",
|
||||
Name = "Toggle Fieldlines",
|
||||
Command = propertyHelper.invert("Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Enabled"),
|
||||
Documentation = "Toggle fieldline rendering of CME",
|
||||
@@ -70,7 +70,7 @@ asset.export(fieldlines)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Predictive Science Inc. Fieldlines Bastille Day",
|
||||
Version = "1.0",
|
||||
Version = "1.1",
|
||||
Description = "Magnetic fieldlines for the bastille day CME event",
|
||||
Author = "CCMC, Jonathan Grangien, Matthias Berg",
|
||||
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
|
||||
|
||||
@@ -33,7 +33,7 @@ local fluxNodes = {
|
||||
}
|
||||
|
||||
local toggle_fluxnodes = {
|
||||
Identifier = "fluxnodes.toggle_fluxnodes",
|
||||
Identifier = "os.events.bastilleday.fluxnodes.togglefluxnodes",
|
||||
Name = "Toggle flux nodes",
|
||||
Command = propertyHelper.invert("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled"),
|
||||
Documentation = "Toggle flux node rendering of CME",
|
||||
@@ -56,7 +56,7 @@ asset.export(fluxNodes)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Predictive Science Inc. Flux nodes Bastille Day",
|
||||
Version = "1.0",
|
||||
Version = "1.1",
|
||||
Description = "Flux nodes for the bastille day CME event",
|
||||
Author = "CCMC, Christian Adamsson, Emilie Ho",
|
||||
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
|
||||
|
||||
@@ -70,7 +70,7 @@ local MeridialCutplane = {
|
||||
}
|
||||
|
||||
local toggle_equatorial = {
|
||||
Identifier = "fluxnodescutplane.toggle_equatorial",
|
||||
Identifier = "os.events.bastilleday.fluxnodescutplane.toggleequatorial",
|
||||
Name = "Toggle equatorial cutplane",
|
||||
Command = propertyHelper.invert("Scene.EquatorialCutplane-bastille-day-2000.Renderable.Enabled"),
|
||||
Documentation = "Toggle equatorial cutplane of CME",
|
||||
@@ -78,7 +78,7 @@ local toggle_equatorial = {
|
||||
IsLocal = false
|
||||
}
|
||||
local toggle_meridial = {
|
||||
Identifier = "fluxnodescutplane.toggle_meridial",
|
||||
Identifier = "os.events.bastilleday.fluxnodescutplane.togglemeridial",
|
||||
Name = "Toggle meridial cutplane",
|
||||
Command = propertyHelper.invert("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled"),
|
||||
Documentation = "Toggle meridial cutplane of CME",
|
||||
@@ -106,7 +106,7 @@ asset.export(MeridialCutplane)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Predictive Science Inc. Cutplanes Bastille Days",
|
||||
Version = "1.0",
|
||||
Version = "1.1",
|
||||
Description = "Cutplanes for the bastille day CME event",
|
||||
Author = "CCMC, Christian Adamsson, Emilie Ho",
|
||||
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
|
||||
|
||||
@@ -16,7 +16,7 @@ local legend = {
|
||||
}
|
||||
|
||||
local show_legend = {
|
||||
Identifier = "fluxnodelegend.show_legend",
|
||||
Identifier = "os.events.bastilleday.fluxnodelegend.showlegend",
|
||||
Name = "Show the legend image",
|
||||
Command = [[
|
||||
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Opacity", 0.0);
|
||||
@@ -27,8 +27,9 @@ local show_legend = {
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
local hide_legend = {
|
||||
Identifier = "fluxnodelegend.hide_legend",
|
||||
Identifier = "os.events.bastilleday.fluxnodelegend.hidelegend",
|
||||
Name = "Hides the legend image",
|
||||
Command = [[openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Opacity", 0.0, 2)]],
|
||||
Documentation = "Hides the legend image",
|
||||
@@ -52,7 +53,7 @@ end)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Predictive Science Inc. Flux nodes legend for Bastille Days",
|
||||
Version = "1.0",
|
||||
Version = "1.1",
|
||||
Description = [[Screen space renderable image legend of flux nodes for the bastille day
|
||||
CME event]],
|
||||
Author = "Christian Adamsson, Emilie Ho",
|
||||
|
||||
@@ -5,7 +5,7 @@ local magnetogramDirectory = asset.require("./magnetogram").TexturesPath;
|
||||
local magnetograms;
|
||||
|
||||
local switch_color_layer = {
|
||||
Identifier = "magnetogram_texture.switch_color_layer",
|
||||
Identifier = "os.events.bastilleday.magnetogramtexture.switchcolorlayer",
|
||||
Name = "Next sun texture",
|
||||
Command = [[
|
||||
local textureList = openspace.globebrowsing.getLayers("Sun", "ColorLayers");
|
||||
@@ -59,7 +59,7 @@ end)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Bastille Day magnetogram textures",
|
||||
Version = "1.0",
|
||||
Version = "1.1",
|
||||
Description = [[This asset adds multiple magnetogram textures to the Sun. In addition
|
||||
it provides an action to cycle through the textures. See magnetogram.asset for details
|
||||
of the textures]],
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user