EgtExecutor :
- piccole migliorie a Exe/Lua CreateSurfBezierLeaves.
This commit is contained in:
+16
-9
@@ -872,24 +872,31 @@ LuaCreateSurfBezierRational( lua_State* L)
|
||||
static int
|
||||
LuaCreateSurfBezierLeaves( lua_State* L)
|
||||
{
|
||||
// 3 parametri : ParentId, nId, nTextHeight
|
||||
// 2, 3 o 4 parametri : ParentId, nId [, nTextHeight] [, bShowTrim]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
int nSurfBzId ;
|
||||
LuaCheckParam( L, 2, nSurfBzId)
|
||||
int nTextHeight ;
|
||||
LuaCheckParam( L, 3, nTextHeight)
|
||||
bool bShowTrim ;
|
||||
LuaCheckParam( L, 4, bShowTrim)
|
||||
int nTextHeight = 50 ;
|
||||
bool bShowTrim = false ;
|
||||
if ( LuaGetParam( L, 3, nTextHeight))
|
||||
LuaGetParam( L, 4, bShowTrim) ;
|
||||
else
|
||||
LuaGetParam( L, 3, bShowTrim) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo la superficie
|
||||
int nId = ExeCreateSurfBezierLeaves( nParentId, nSurfBzId, nTextHeight, bShowTrim) ;
|
||||
int nCount = 0 ;
|
||||
int nId = ExeCreateSurfBezierLeaves( nParentId, nSurfBzId, nTextHeight, bShowTrim, &nCount) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
if ( nId != GDB_ID_NULL) {
|
||||
LuaSetParam( L, nId) ;
|
||||
else
|
||||
LuaSetParam( L, nCount) ;
|
||||
}
|
||||
else {
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
LuaSetParam( L) ;
|
||||
}
|
||||
return 2 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user