EgtInterface 1.6d3 :

- costanti stringa sostituite con costanti numeriche
- modificate funzioni API e LUA per scansione pezzi e layer
- aggiunta pulizia memoria al caricamento messaggi (necessario al cambio lingua)
- migliorie varie a funzioni Lua.
This commit is contained in:
Dario Sassi
2015-04-20 08:43:10 +00:00
parent fd718143e6
commit 9d3dc5e537
38 changed files with 810 additions and 824 deletions
+8 -19
View File
@@ -15,6 +15,7 @@
#include "stdafx.h"
#include "API.h"
#include "API_Macro.h"
#include "AuxTools.h"
#include "/EgtDev/Include/EInAPI.h"
#include "/EgtDev/Include/EGkStringUtils3d.h"
#include "/EgtDev/Include/EGnStringConverter.h"
@@ -167,21 +168,17 @@ EgtSetStatus( const INTVECTOR& vIds, int nStat)
if ( bCurrPartOff)
EgtResetCurrPartLayer() ;
else if ( bCurrLayerOff)
EgtSetCurrPartLayer( nCurrPartId, EgtGetFirstVisibleLayer( nCurrPartId)) ;
EgtSetCurrPartLayer( nCurrPartId, EgtGetFirstLayer( nCurrPartId, true)) ;
// dichiaro progetto modificato
EgtSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sIds ;
for ( size_t i = 0 ; i < vIds.size() ; ++ i)
sIds += ( vIds[i] != GDB_ID_SEL ? ToString( vIds[i]) : "GDB_ID_SEL") + "," ;
sIds.pop_back() ;
string sStat = "'ON'" ;
string sStat = "GDB_ST.ON" ;
if ( nStat == GDB_ST_SEL)
sStat = "'SEL'" ;
sStat = "GDB_ST.SEL" ;
else if ( nStat == GDB_ST_OFF)
sStat = "'OFF'" ;
string sLua = "EgtSetStatus({" + sIds + "}," +
sStat = "GDB_ST.OFF" ;
string sLua = "EgtSetStatus({" + IdListToString( vIds) + "}," +
sStat + ")" +
" -- Ok=" + ToString( bOk) ;
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
@@ -383,11 +380,7 @@ EgtSetAlpha( const INTVECTOR& vIds, int nAlpha)
EgtSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sIds ;
for ( size_t i = 0 ; i < vIds.size() ; ++ i)
sIds += ( vIds[i] != GDB_ID_SEL ? ToString( vIds[i]) : "GDB_ID_SEL") + "," ;
sIds.pop_back() ;
string sLua = "EgtSetAlpha({" + sIds + "}," +
string sLua = "EgtSetAlpha({" + IdListToString( vIds) + "}," +
ToString( nAlpha) + ")" +
" -- Ok=" + ToString( bOk) ;
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
@@ -427,11 +420,7 @@ EgtResetColor( const INTVECTOR& vIds)
EgtSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sIds ;
for ( size_t i = 0 ; i < vIds.size() ; ++ i)
sIds += ( vIds[i] != GDB_ID_SEL ? ToString( vIds[i]) : "GDB_ID_SEL") + "," ;
sIds.pop_back() ;
string sLua = "EgtResetColor({" + sIds + "})" +
string sLua = "EgtResetColor({" + IdListToString( vIds) + "})" +
" -- Ok=" + ToString( bOk) ;
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
}