Make it possible to choose in the asset whether the domain filtering in a fieldline sequence. Apply the change to the Juice fieldlines (closes #3437)

This commit is contained in:
Alexander Bock
2024-09-25 10:24:15 +02:00
parent acc6e41f3d
commit 4f58eff235
2 changed files with 7 additions and 1 deletions

View File

@@ -25,7 +25,8 @@ local GanymedeMagnetosphere = {
Color = { 0.03, 0.0, 0.0, 1.0 },
ParticleSpacing = 42.0,
ParticleSize = 30.0,
FlowColor = { 1.0, 1.0, 1.0, 0.1 }
FlowColor = { 1.0, 1.0, 1.0, 0.1 },
DomainEnabled = false
},
GUI = {

View File

@@ -266,6 +266,9 @@ namespace {
// masked by. Should be entered as {min value, max value} per range
std::optional<std::vector<glm::vec2>> maskingRanges;
// [[codegen::verbatim(DomainEnabledInfo.description)]]
std::optional<bool> domainEnabled;
// Value should be path to folder where states are saved. Specifying this
// makes it use file type converter
// (JSON/CDF input => osfls output & oslfs input => JSON output)
@@ -478,6 +481,8 @@ RenderableFieldlinesSequence::RenderableFieldlinesSequence(
_maskingRanges.push_back(glm::vec2(-100000.f, 100000.f)); // some default values
}
_domainEnabled = p.domainEnabled.value_or(_domainEnabled);
_outputFolderPath = p.outputFolder.value_or(_outputFolderPath);
if (!_outputFolderPath.empty() && !std::filesystem::is_directory(_outputFolderPath)) {
_outputFolderPath.clear();