Files
2025-09-29 00:52:08 +02:00

327 lines
8.8 KiB
Plaintext
Executable File

-- Scripted object plugin - generated by Plug-O-Matic v1.1 (martin@breidt.net)
--
-- Run this script or place it script in the $scripts\startup directory.
-- This will create a new object under Geometry>Plug-O-Matic
-- Click and drag to create a new object. Hold Ctrl do constrain the new object
-- to the original proportions.
--
-- Export options used: Material IDs - false Smoothing Groups - true Edge Visibility - true
plugin simpleObject steps_straight
name:"steps_straight"
category:"GTA Building blocks"
classID:#(1304161178,1639363037)
(
parameters main rollout:params (
length type:#float ui:length default:3.97546
width type:#float ui:width default:5.09949
height type:#float ui:height default:3.50469
)
rollout params "steps_straight Parameters" (
spinner length "Length" range:[0,10000,3.97546] align:#right fieldwidth:60
spinner width "Width" range:[0,10000,5.09949] align:#right fieldwidth:60
spinner height "Height" range:[0,10000,3.50469] align:#right fieldwidth:60
)
on buildMesh do
(
vp = #()
fl = #()
fs = #()
fe = #()
-- Vertex data ---------------------------
append vp [-2.54968,-1.98779,-1.5333]
append vp [-2.54968,1.98767,-1.5333]
append vp [-2.5498,1.98767,-1.75234]
append vp [-2.5498,-1.98779,-1.75234]
append vp [-2.23108,-1.98779,-1.5333]
append vp [-2.23108,1.98767,-1.5333]
append vp [-2.23108,-1.98779,-1.31426]
append vp [-2.23108,1.98767,-1.31426]
append vp [-1.91235,-1.98779,-1.31426]
append vp [-1.91235,1.98767,-1.31426]
append vp [-1.91235,-1.98779,-1.09522]
append vp [-1.91235,1.98767,-1.09522]
append vp [-1.59363,-1.98779,-1.09522]
append vp [-1.59363,1.98767,-1.09522]
append vp [-1.59363,-1.98779,-0.876173]
append vp [-1.59363,1.98767,-0.876173]
append vp [-1.2749,-1.98779,-0.876172]
append vp [-1.2749,1.98767,-0.876172]
append vp [-1.2749,-1.98779,-0.657129]
append vp [-1.2749,1.98767,-0.657129]
append vp [-0.956177,-1.98779,-0.657129]
append vp [-0.956177,1.98767,-0.657129]
append vp [-0.956177,-1.98779,-0.438087]
append vp [-0.956177,1.98767,-0.438087]
append vp [-0.637451,-1.98779,-0.438087]
append vp [-0.637451,1.98767,-0.438087]
append vp [-0.637451,-1.98779,-0.219044]
append vp [-0.637451,1.98767,-0.219044]
append vp [-0.318726,-1.98779,-0.219044]
append vp [-0.318726,1.98767,-0.219044]
append vp [-0.318726,-1.98779,-9.53674e-007]
append vp [-0.318726,1.98767,-9.53674e-007]
append vp [0,-1.98779,0]
append vp [-0.00012207,1.98767,-9.53674e-007]
append vp [0,-1.98779,0.219043]
append vp [0,1.98767,0.219043]
append vp [0.318726,-1.98779,0.219043]
append vp [0.318604,1.98767,0.219043]
append vp [0.318726,-1.98779,0.438085]
append vp [0.318726,1.98767,0.438085]
append vp [0.637451,-1.98779,0.438084]
append vp [0.637451,1.98767,0.438084]
append vp [0.637451,-1.98779,0.657126]
append vp [0.637451,1.98767,0.657126]
append vp [0.956055,-1.98779,0.657127]
append vp [0.956177,1.98767,0.657127]
append vp [0.956177,-1.98779,0.876171]
append vp [0.956177,1.98767,0.876171]
append vp [1.27478,-1.98779,0.876172]
append vp [1.2749,1.98767,0.876172]
append vp [1.2749,-1.98779,1.09521]
append vp [1.2749,1.98767,1.09521]
append vp [1.59351,-1.98779,1.09521]
append vp [1.59363,1.98767,1.09521]
append vp [1.59363,-1.98779,1.31426]
append vp [1.59363,1.98767,1.31426]
append vp [1.91223,-1.98779,1.31426]
append vp [1.91223,1.98767,1.31426]
append vp [1.91235,-1.98779,1.5333]
append vp [1.91235,1.98767,1.5333]
append vp [2.23096,-1.98779,1.5333]
append vp [2.23096,1.98767,1.5333]
append vp [2.23108,-1.98779,1.75234]
append vp [2.23108,1.98767,1.75234]
append vp [2.54968,-1.98779,1.75234]
append vp [2.54968,1.98767,1.75234]
for i = 1 to 66 do (
oldpos = vp[i]
vp[i] = point3 (oldpos.x * (width/5.09949)) (oldpos.y * (length/3.97546)) (oldpos.z * (height/3.50469))
)
-- Face data ---------------------------
append fl [1,2,3]
append fl [3,4,1]
append fl [5,6,2]
append fl [2,1,5]
append fl [7,8,6]
append fl [6,5,7]
append fl [9,10,8]
append fl [8,7,9]
append fl [11,12,10]
append fl [10,9,11]
append fl [13,14,12]
append fl [12,11,13]
append fl [15,16,14]
append fl [14,13,15]
append fl [17,18,16]
append fl [16,15,17]
append fl [19,20,18]
append fl [18,17,19]
append fl [21,22,20]
append fl [20,19,21]
append fl [23,24,22]
append fl [22,21,23]
append fl [25,26,24]
append fl [24,23,25]
append fl [27,28,26]
append fl [26,25,27]
append fl [29,30,28]
append fl [28,27,29]
append fl [31,32,30]
append fl [30,29,31]
append fl [33,34,32]
append fl [32,31,33]
append fl [35,36,34]
append fl [34,33,35]
append fl [37,38,36]
append fl [36,35,37]
append fl [39,40,38]
append fl [38,37,39]
append fl [41,42,40]
append fl [40,39,41]
append fl [43,44,42]
append fl [42,41,43]
append fl [45,46,44]
append fl [44,43,45]
append fl [47,48,46]
append fl [46,45,47]
append fl [49,50,48]
append fl [48,47,49]
append fl [51,52,50]
append fl [50,49,51]
append fl [53,54,52]
append fl [52,51,53]
append fl [55,56,54]
append fl [54,53,55]
append fl [57,58,56]
append fl [56,55,57]
append fl [59,60,58]
append fl [58,57,59]
append fl [61,62,60]
append fl [60,59,61]
append fl [63,64,62]
append fl [62,61,63]
append fl [65,66,64]
append fl [64,63,65]
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fs 2
append fs 2
append fs 1
append fs 1
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
append fe #(true, true, false)
setMesh mesh vertices:vp faces:fl
for i = 1 to 64 do setFaceSmoothGroup mesh i fs[i]
for i = 1 to 64 do (
for j = 1 to 3 do (setEdgeVis mesh i j fe[i][j]))
) -- end on buildmesh
tool create prompt:"Click and drag to begin creation process. Hold Ctrl for original object proportions." (
on mousePoint click do (
case click of (
1: nodeTM.translation = gridPoint
3: #stop
)
)
on mouseMove click do (
case click of (
2: (
if not ctrlKey then (
width = 5.09949
length = 3.97546
) else (
old_width = 5.09949
width = 5.09949
length = 3.97546
height = 3.50469
)
)
3: if not ctrlKey then height = 3.50469
) -- end on case
) -- end on mouseMove
) -- end create tool
) -- end plugin