[split] Buffer Exchange cleanup script


RE: Simple LDCad script
#9
(2022-12-28, 23:14)N. W. Perry Wrote: Is there a way to loop through all subfiles of a model, so that the script can work recursively?

You can get submodels trough the ref obect's getSubfile function.

But in the current alpha there is no (easy) way to know if it is a part or submodel.

The upcoming 1.7 Beta 1 has a whole bunch of type information functions though.

Quick copy/paste from the current code:

Code:
     
static int luaCB_isPart(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 0, true); }
static int luaCB_isRealPart(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 1, true); }
static int luaCB_isColourPart(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 2, true); }
static int luaCB_isShortCut(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 3, true); }
static int luaCB_isModel(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 4, true); }
static int luaCB_isGenerated(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 5, true); }
static int luaCB_isOfficialPart(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 6, true); }
static int luaCB_isMoved(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 7, true); }
static int luaCB_isAliasPart(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 8, true); }
static int luaCB_isMissing(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 9, true); }
static int luaCB_isRedirectedPart(lua_State *luaState) { return singleBoolParamIO(luaState, luaTypeName, 10, true); }
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: Simple LDCad script - by Roland Melkert - 2022-04-02, 19:47
RE: Simple LDCad script - by N. W. Perry - 2022-12-24, 14:25
RE: Simple LDCad script - by Roland Melkert - 2022-12-28, 22:00
RE: Simple LDCad script - by N. W. Perry - 2022-12-28, 23:14
RE: Simple LDCad script - by Roland Melkert - 2022-12-29, 19:28
RE: Simple LDCad script - by N. W. Perry - 2022-12-30, 0:25
RE: Simple LDCad script - by N. W. Perry - 2022-04-03, 3:16

Forum Jump:


Users browsing this thread: 1 Guest(s)