plugin simpleObject tower_plugin_def
name:"Tower2"
classID:#(145345,543211)
category:"Scripted Primitives"
(
parameters main rollout
arams
(
height type:#worldUnits ui:height default:0
width type:#worldUnits ui:width default:0
depth type:#worldUnits ui:depth default:0
mupdate type:#boolean ui:ckb_mu default:false
)
rollout params "Two Faces Parameters"
(
spinner height "Height" type:#worldunits range:[-1000,1000,0]
spinner width "Width" type:#worldunits range:[-1000,1000,0]
spinner depth "Depth" type:#worldunits range:[-1000,1000,0]
checkButton ckb_mu "Manual Update" pos:[28,84]
)
-- on ckb_mu changed state do
on buildMesh do
(
if not mupdate do (
setMesh mesh \
verts:#([0,0,0],[width,0,0],[width,depth,0],[0,depth,0]) \
faces:#([3,2,1], [1,4,3])
extrudeFace mesh #(1,2) (height * 0.5) 40 dir:#common
extrudeFace mesh #(1,2) (height * 0.5) 50 dir:#common
)
)
tool create
(
on mousePoint click do
case click of
(
1: nodeTM.translation = gridPoint
3: #stop
)
on mouseMove click do
case click of
(
2: (width = gridDist.x; depth = gridDist.y)
3: height = gridDist.z
)
)
)