diff --git a/src/osgPlugins/lua/LuaScriptEngine.cpp b/src/osgPlugins/lua/LuaScriptEngine.cpp index 9826f4fbc..c81b64d99 100644 --- a/src/osgPlugins/lua/LuaScriptEngine.cpp +++ b/src/osgPlugins/lua/LuaScriptEngine.cpp @@ -52,7 +52,6 @@ public: { outputParameters.insert(outputParameters.begin(), _lse->popParameterObject()); } - return true; } @@ -133,18 +132,18 @@ static int callClassMethod(lua_State* _lua) const LuaScriptEngine* lse = reinterpret_cast(lua_topointer(_lua, lua_upvalueindex(1))); std::string methodName = lua_tostring(_lua, lua_upvalueindex(2)); int n = lua_gettop(_lua); /* number of arguments */ - OSG_NOTICE<<"callClassMethod(), n = "<=1 && lua_type(_lua, 1)==LUA_TTABLE) { osg::Object* object = lse->getObjectFromTable(1); const std::string compoundClassName = lse->getObjectCompoundClassName(1); // object->getCompoundClassName(); - OSG_NOTICE<<"callClassMethod() on "<className()<<" method name "<className()<<" method name "<popParameterObject()); } @@ -154,12 +153,17 @@ static int callClassMethod(lua_State* _lua) itr != outputParameters.end(); ++itr) { - OSG_NOTICE<<" pushing return "<<(*itr)->className()<className()<pushParameter(itr->get()); } return outputParameters.size(); } } + else + { + OSG_NOTICE<<"Warning: lua method called without passing object, use object::method() convention."<(this)); lua_pushstring(_lua, propertyName.c_str()); lua_pushcclosure(_lua, callClassMethod, 2); @@ -728,7 +732,6 @@ int LuaScriptEngine::setPropertyFromStack(osg::Object* object, const std::string { int ref = luaL_ref(_lua, LUA_REGISTRYINDEX); - OSG_NOTICE<<"LuaScriptEngine::setPropertyFromStack("< libraryName="<(objects[0].get()); - OSG_NOTICE<<"readObject form script, have one object "<className()<<" "<