Add method llprim.ParamsSetter.extend
Tapple Gao
I'm writing a complex thing that builds up the primitive params entirely procedurally. It would be helpful to be able to compose primitive params lists together with ParamsSetter, like:
local boxPrimParams = llprim.ParamsSetter:new():primTypeBox(
PRIM_HOLE_DEFAULT, vector(0, 1), 0,
vector(0, 0), vector.one, vector.zero)
local primParams = llprim.ParamsSetter:new()
:targetLink(2):size(vector(1, 2, 3)):extend(boxPrimParams)
:targetLink(3):size(vector(3, 2, 1)):extend(boxPrimParams)
Log In
Nexii Malthus
Bonus Points if this saved memory with only one instance of the boxPrimParams.