|
@@ -74,11 +74,9 @@ int lua_MaterialParameter__gc(lua_State* state)
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter__gc - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter__gc - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -108,11 +106,9 @@ int lua_MaterialParameter_addRef(lua_State* state)
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_addRef - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_addRef - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -140,7 +136,13 @@ int lua_MaterialParameter_bindValue(lua_State* state)
|
|
|
(lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
|
|
(lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false);
|
|
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushstring(state, "Failed to convert parameter 1 to type 'Node'.");
|
|
|
|
|
+ lua_error(state);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
ScriptUtil::LuaArray<const char> param2 = ScriptUtil::getString(3, false);
|
|
ScriptUtil::LuaArray<const char> param2 = ScriptUtil::getString(3, false);
|
|
@@ -150,11 +152,9 @@ int lua_MaterialParameter_bindValue(lua_State* state)
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_bindValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_bindValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -177,177 +177,187 @@ int lua_MaterialParameter_createAnimation(lua_State* state)
|
|
|
{
|
|
{
|
|
|
case 3:
|
|
case 3:
|
|
|
{
|
|
{
|
|
|
- if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
- (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<const char> param2 = ScriptUtil::getString(3, false);
|
|
|
|
|
-
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- void* returnPtr = (void*)instance->createAnimation(param1, param2);
|
|
|
|
|
- if (returnPtr)
|
|
|
|
|
- {
|
|
|
|
|
- ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
- object->instance = returnPtr;
|
|
|
|
|
- object->owns = false;
|
|
|
|
|
- luaL_getmetatable(state, "Animation");
|
|
|
|
|
- lua_setmetatable(state, -2);
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
+ (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
- lua_pushnil(state);
|
|
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<const char> param2 = ScriptUtil::getString(3, false);
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ void* returnPtr = (void*)instance->createAnimation(param1, param2);
|
|
|
|
|
+ if (returnPtr)
|
|
|
|
|
+ {
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
+ object->instance = returnPtr;
|
|
|
|
|
+ object->owns = false;
|
|
|
|
|
+ luaL_getmetatable(state, "Animation");
|
|
|
|
|
+ lua_setmetatable(state, -2);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushnil(state);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return 1;
|
|
|
}
|
|
}
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- return 1;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
- (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Properties> param2 = ScriptUtil::getObjectPointer<Properties>(3, "Properties", false);
|
|
|
|
|
-
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- void* returnPtr = (void*)instance->createAnimation(param1, param2);
|
|
|
|
|
- if (returnPtr)
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
+ (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
- ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
- object->instance = returnPtr;
|
|
|
|
|
- object->owns = false;
|
|
|
|
|
- luaL_getmetatable(state, "Animation");
|
|
|
|
|
- lua_setmetatable(state, -2);
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushnil(state);
|
|
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ bool param2Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Properties> param2 = ScriptUtil::getObjectPointer<Properties>(3, "Properties", false, ¶m2Valid);
|
|
|
|
|
+ if (!param2Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ void* returnPtr = (void*)instance->createAnimation(param1, param2);
|
|
|
|
|
+ if (returnPtr)
|
|
|
|
|
+ {
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
+ object->instance = returnPtr;
|
|
|
|
|
+ object->owns = false;
|
|
|
|
|
+ luaL_getmetatable(state, "Animation");
|
|
|
|
|
+ lua_setmetatable(state, -2);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushnil(state);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return 1;
|
|
|
}
|
|
}
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- return 1;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_createAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_createAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
case 7:
|
|
case 7:
|
|
|
{
|
|
{
|
|
|
- if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
- lua_type(state, 3) == LUA_TNUMBER &&
|
|
|
|
|
- lua_type(state, 4) == LUA_TNUMBER &&
|
|
|
|
|
- (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- int param2 = (int)luaL_checkint(state, 3);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 3 off the stack.
|
|
|
|
|
- unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 4 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 5 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 6 off the stack.
|
|
|
|
|
- Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
|
|
|
|
|
-
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
|
|
|
|
|
- if (returnPtr)
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
+ lua_type(state, 3) == LUA_TNUMBER &&
|
|
|
|
|
+ lua_type(state, 4) == LUA_TNUMBER &&
|
|
|
|
|
+ (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
- ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
- object->instance = returnPtr;
|
|
|
|
|
- object->owns = false;
|
|
|
|
|
- luaL_getmetatable(state, "Animation");
|
|
|
|
|
- lua_setmetatable(state, -2);
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushnil(state);
|
|
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ int param2 = (int)luaL_checkint(state, 3);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 3 off the stack.
|
|
|
|
|
+ unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 4 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 5 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 6 off the stack.
|
|
|
|
|
+ Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
|
|
|
|
|
+ if (returnPtr)
|
|
|
|
|
+ {
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
+ object->instance = returnPtr;
|
|
|
|
|
+ object->owns = false;
|
|
|
|
|
+ luaL_getmetatable(state, "Animation");
|
|
|
|
|
+ lua_setmetatable(state, -2);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushnil(state);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return 1;
|
|
|
}
|
|
}
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- return 1;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_createAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_createAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
case 9:
|
|
case 9:
|
|
|
{
|
|
{
|
|
|
- if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
- lua_type(state, 3) == LUA_TNUMBER &&
|
|
|
|
|
- lua_type(state, 4) == LUA_TNUMBER &&
|
|
|
|
|
- (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- int param2 = (int)luaL_checkint(state, 3);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 3 off the stack.
|
|
|
|
|
- unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 4 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 5 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 6 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<float> param6 = ScriptUtil::getFloatPointer(7);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 7 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<float> param7 = ScriptUtil::getFloatPointer(8);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 8 off the stack.
|
|
|
|
|
- Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
|
|
|
|
|
-
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
|
|
|
|
|
- if (returnPtr)
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
+ lua_type(state, 3) == LUA_TNUMBER &&
|
|
|
|
|
+ lua_type(state, 4) == LUA_TNUMBER &&
|
|
|
|
|
+ (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
- ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
- object->instance = returnPtr;
|
|
|
|
|
- object->owns = false;
|
|
|
|
|
- luaL_getmetatable(state, "Animation");
|
|
|
|
|
- lua_setmetatable(state, -2);
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushnil(state);
|
|
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ int param2 = (int)luaL_checkint(state, 3);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 3 off the stack.
|
|
|
|
|
+ unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 4 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 5 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 6 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<float> param6 = ScriptUtil::getFloatPointer(7);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 7 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<float> param7 = ScriptUtil::getFloatPointer(8);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 8 off the stack.
|
|
|
|
|
+ Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
|
|
|
|
|
+ if (returnPtr)
|
|
|
|
|
+ {
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
+ object->instance = returnPtr;
|
|
|
|
|
+ object->owns = false;
|
|
|
|
|
+ luaL_getmetatable(state, "Animation");
|
|
|
|
|
+ lua_setmetatable(state, -2);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushnil(state);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return 1;
|
|
|
}
|
|
}
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- return 1;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_createAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_createAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -413,11 +423,9 @@ int lua_MaterialParameter_createAnimationFromBy(lua_State* state)
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -483,11 +491,9 @@ int lua_MaterialParameter_createAnimationFromTo(lua_State* state)
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -517,11 +523,9 @@ int lua_MaterialParameter_destroyAnimation(lua_State* state)
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_destroyAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_destroyAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
case 2:
|
|
case 2:
|
|
@@ -537,11 +541,9 @@ int lua_MaterialParameter_destroyAnimation(lua_State* state)
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_destroyAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_destroyAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -583,11 +585,9 @@ int lua_MaterialParameter_getAnimation(lua_State* state)
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_getAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_getAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
case 2:
|
|
case 2:
|
|
@@ -615,11 +615,9 @@ int lua_MaterialParameter_getAnimation(lua_State* state)
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_getAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_getAnimation - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -656,11 +654,9 @@ int lua_MaterialParameter_getAnimationPropertyComponentCount(lua_State* state)
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -691,18 +687,22 @@ int lua_MaterialParameter_getAnimationPropertyValue(lua_State* state)
|
|
|
int param1 = (int)luaL_checkint(state, 2);
|
|
int param1 = (int)luaL_checkint(state, 2);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
|
|
|
|
|
|
|
+ bool param2Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, ¶m2Valid);
|
|
|
|
|
+ if (!param2Valid)
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
|
|
|
|
|
+ lua_error(state);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
MaterialParameter* instance = getInstance(state);
|
|
MaterialParameter* instance = getInstance(state);
|
|
|
instance->getAnimationPropertyValue(param1, param2);
|
|
instance->getAnimationPropertyValue(param1, param2);
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -735,11 +735,9 @@ int lua_MaterialParameter_getName(lua_State* state)
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_getName - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_getName - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -772,11 +770,9 @@ int lua_MaterialParameter_getRefCount(lua_State* state)
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_getRefCount - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_getRefCount - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -818,11 +814,9 @@ int lua_MaterialParameter_getSampler(lua_State* state)
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_getSampler - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_getSampler - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -852,11 +846,9 @@ int lua_MaterialParameter_release(lua_State* state)
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_release - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_release - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -887,18 +879,22 @@ int lua_MaterialParameter_setAnimationPropertyValue(lua_State* state)
|
|
|
int param1 = (int)luaL_checkint(state, 2);
|
|
int param1 = (int)luaL_checkint(state, 2);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
|
|
|
|
|
|
|
+ bool param2Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, ¶m2Valid);
|
|
|
|
|
+ if (!param2Valid)
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
|
|
|
|
|
+ lua_error(state);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
MaterialParameter* instance = getInstance(state);
|
|
MaterialParameter* instance = getInstance(state);
|
|
|
instance->setAnimationPropertyValue(param1, param2);
|
|
instance->setAnimationPropertyValue(param1, param2);
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
case 4:
|
|
case 4:
|
|
@@ -912,7 +908,13 @@ int lua_MaterialParameter_setAnimationPropertyValue(lua_State* state)
|
|
|
int param1 = (int)luaL_checkint(state, 2);
|
|
int param1 = (int)luaL_checkint(state, 2);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
|
|
|
|
|
|
|
+ bool param2Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, ¶m2Valid);
|
|
|
|
|
+ if (!param2Valid)
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
|
|
|
|
|
+ lua_error(state);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
float param3 = (float)luaL_checknumber(state, 4);
|
|
float param3 = (float)luaL_checknumber(state, 4);
|
|
@@ -922,11 +924,9 @@ int lua_MaterialParameter_setAnimationPropertyValue(lua_State* state)
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
@@ -949,280 +949,393 @@ int lua_MaterialParameter_setValue(lua_State* state)
|
|
|
{
|
|
{
|
|
|
case 2:
|
|
case 2:
|
|
|
{
|
|
{
|
|
|
- if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- lua_type(state, 2) == LUA_TNUMBER)
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- float param1 = (float)luaL_checknumber(state, 2);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ lua_type(state, 2) == LUA_TNUMBER)
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ float param1 = (float)luaL_checknumber(state, 2);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- lua_type(state, 2) == LUA_TNUMBER)
|
|
|
|
|
- {
|
|
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- int param1 = (int)luaL_checkint(state, 2);
|
|
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<float> param1 = ScriptUtil::getFloatPointer(2);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ lua_type(state, 2) == LUA_TNUMBER)
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ int param1 = (int)luaL_checkint(state, 2);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA))
|
|
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
+
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<int> param1 = ScriptUtil::getIntPointer(2);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<float> param1 = ScriptUtil::getFloatPointer(2);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
+
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Vector2> param1 = ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<int> param1 = ScriptUtil::getIntPointer(2);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(*param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
+
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Vector2> param1 = ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Vector2> param1 = ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(*param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Vector2> param1 = ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(*param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(*param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(*param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(*param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(*param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(*param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Texture::Sampler> param1 = ScriptUtil::getObjectPointer<Texture::Sampler>(2, "TextureSampler", false);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_setValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Texture::Sampler> param1 = ScriptUtil::getObjectPointer<Texture::Sampler>(2, "TextureSampler", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_setValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
case 3:
|
|
case 3:
|
|
|
{
|
|
{
|
|
|
- if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
- lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<float> param1 = ScriptUtil::getFloatPointer(2);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
+ lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<float> param1 = ScriptUtil::getFloatPointer(2);
|
|
|
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1, param2);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
- lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
- {
|
|
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<int> param1 = ScriptUtil::getIntPointer(2);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1, param2);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1, param2);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
- lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Vector2> param1 = ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
|
|
|
|
|
+ lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<int> param1 = ScriptUtil::getIntPointer(2);
|
|
|
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1, param2);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
- lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
- {
|
|
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1, param2);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1, param2);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
- lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
+ lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Vector2> param1 = ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1, param2);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1, param2);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
- lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
+ lua_type(state, 3) == LUA_TNUMBER)
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1, param2);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- instance->setValue(param1, param2);
|
|
|
|
|
-
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
- (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
- lua_type(state, 3) == LUA_TBOOLEAN)
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- // Get parameter 1 off the stack.
|
|
|
|
|
- ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
-
|
|
|
|
|
- // Get parameter 2 off the stack.
|
|
|
|
|
- bool param2 = ScriptUtil::luaCheckBool(state, 3);
|
|
|
|
|
-
|
|
|
|
|
- MaterialParameter* instance = getInstance(state);
|
|
|
|
|
- void* returnPtr = (void*)instance->setValue(param1, param2);
|
|
|
|
|
- if (returnPtr)
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
+ lua_type(state, 3) == LUA_TNUMBER)
|
|
|
{
|
|
{
|
|
|
- ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
- object->instance = returnPtr;
|
|
|
|
|
- object->owns = false;
|
|
|
|
|
- luaL_getmetatable(state, "TextureSampler");
|
|
|
|
|
- lua_setmetatable(state, -2);
|
|
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Vector4> param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1, param2);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
|
|
+ } while (0);
|
|
|
|
|
+
|
|
|
|
|
+ do
|
|
|
|
|
+ {
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
+ lua_type(state, 3) == LUA_TNUMBER)
|
|
|
{
|
|
{
|
|
|
- lua_pushnil(state);
|
|
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ bool param1Valid;
|
|
|
|
|
+ ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false, ¶m1Valid);
|
|
|
|
|
+ if (!param1Valid)
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ instance->setValue(param1, param2);
|
|
|
|
|
+
|
|
|
|
|
+ return 0;
|
|
|
}
|
|
}
|
|
|
|
|
+ } while (0);
|
|
|
|
|
|
|
|
- return 1;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
|
|
+ do
|
|
|
{
|
|
{
|
|
|
- lua_pushstring(state, "lua_MaterialParameter_setValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
- lua_error(state);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
|
|
+ (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
|
|
|
|
|
+ lua_type(state, 3) == LUA_TBOOLEAN)
|
|
|
|
|
+ {
|
|
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
|
|
+ ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
+
|
|
|
|
|
+ // Get parameter 2 off the stack.
|
|
|
|
|
+ bool param2 = ScriptUtil::luaCheckBool(state, 3);
|
|
|
|
|
+
|
|
|
|
|
+ MaterialParameter* instance = getInstance(state);
|
|
|
|
|
+ void* returnPtr = (void*)instance->setValue(param1, param2);
|
|
|
|
|
+ if (returnPtr)
|
|
|
|
|
+ {
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
|
|
+ object->instance = returnPtr;
|
|
|
|
|
+ object->owns = false;
|
|
|
|
|
+ luaL_getmetatable(state, "TextureSampler");
|
|
|
|
|
+ lua_setmetatable(state, -2);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ lua_pushnil(state);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (0);
|
|
|
|
|
+
|
|
|
|
|
+ lua_pushstring(state, "lua_MaterialParameter_setValue - Failed to match the given parameters to a valid function signature.");
|
|
|
|
|
+ lua_error(state);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|