| 437 | |
| 438 | |
| 439 | int LuaSceneNodeMgr::SetSceneNodeData(lua_State* L) { |
| 440 | LuaSceneNode* sceneNode = CheckLuaSceneNode(L, 1); |
| 441 | |
| 442 | luaL_checkany(L, 2); |
| 443 | |
| 444 | if (sceneNode == NULL) { |
| 445 | lua_settop(L, 1); |
| 446 | return 1; |
| 447 | } |
| 448 | |
| 449 | int& ref = sceneNode->renderNode.dataRef; |
| 450 | if (ref != LUA_NOREF) { |
| 451 | luaL_unref(L, LUA_REGISTRYINDEX, ref); |
| 452 | ref = LUA_NOREF; |
| 453 | } |
| 454 | |
| 455 | if (!lua_isnil(L, 2)) { |
| 456 | lua_settop(L, 2); |
| 457 | ref = luaL_ref(L, LUA_REGISTRYINDEX); |
| 458 | } |
| 459 | |
| 460 | lua_settop(L, 1); |
| 461 | return 1; |
| 462 | } |
| 463 | |
| 464 | |
| 465 | int LuaSceneNodeMgr::SetSceneNodeActive(lua_State* L) { |
nothing calls this directly
no test coverage detected