mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 02:48:25 -05:00
Add additional Lua functions that make use of regular expressions to match against fully qualified property identifiers
- Making the GUI use the new function setPropertyValueSingle to not incur the overhead of compiling the regex - The default setPropertyValue Lua function uses a wildcard, which replaces a * with the correct regex (.*) for ease of use - The setPropertyValueRegex Lua function allows a full regular expression to be used Closing #108
This commit is contained in:
@@ -96,4 +96,31 @@ properties::Property* property(const std::string& uri) {
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<properties::Property*> allProperties() {
|
||||
std::vector<properties::Property*> properties;
|
||||
|
||||
auto p = OsEng.globalPropertyOwner().propertiesRecursive();
|
||||
|
||||
properties.insert(
|
||||
properties.end(),
|
||||
p.begin(),
|
||||
p.end()
|
||||
);
|
||||
|
||||
const Scene* graph = sceneGraph();
|
||||
std::vector<SceneGraphNode*> nodes = graph->allSceneGraphNodes();
|
||||
|
||||
for (SceneGraphNode* n : nodes) {
|
||||
auto p = n->propertiesRecursive();
|
||||
properties.insert(
|
||||
properties.end(),
|
||||
p.begin(),
|
||||
p.end()
|
||||
);
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user