mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-26 14:58:51 -06:00
Implemented Space/Time ImGui widget
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
#include <openspace/scene/scenegraphnode.h>
|
||||
|
||||
namespace openspace {
|
||||
namespace luascriptfunctions {
|
||||
|
||||
@@ -144,7 +146,7 @@ int removeVirtualProperty(lua_State* L) {
|
||||
int removeAllVirtualProperties(lua_State* L) {
|
||||
const int nArguments = lua_gettop(L);
|
||||
if (nArguments != 1) {
|
||||
return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments);
|
||||
return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments);
|
||||
}
|
||||
|
||||
std::vector<properties::Property*> ps = OsEng.virtualPropertyManager().properties();
|
||||
@@ -155,6 +157,30 @@ int removeAllVirtualProperties(lua_State* L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup LuaScripts
|
||||
* addTag()
|
||||
* Adds a Tag to a SceneGraphNode
|
||||
*/
|
||||
int addTag(lua_State* L) {
|
||||
const int nArguments = lua_gettop(L);
|
||||
if (nArguments != 2) {
|
||||
return luaL_error(L, "Expected %i arguments, got %i", 2, nArguments);
|
||||
}
|
||||
|
||||
const std::string uri = lua_tostring(L, -2);
|
||||
const std::string tag = lua_tostring(L, -1);
|
||||
|
||||
SceneGraphNode* node = OsEng.renderEngine().scene()->sceneGraphNode(uri);
|
||||
if (!node) {
|
||||
return luaL_error(L, "Unknown scene graph node type '%s'", uri.c_str());
|
||||
}
|
||||
|
||||
node->addTag(tag);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup LuaScripts
|
||||
* downloadFile():
|
||||
|
||||
Reference in New Issue
Block a user