Files
gtav-src/tools_ng/dcc/debug/max2011/scripts/startup/glue_end.ms
T
2025-09-29 00:52:08 +02:00

95 lines
2.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 glue_end
name:"glue_end"
category:"GTA Building blocks"
classID:#(1644043032,1651064166)
(
parameters main rollout:params (
length type:#float ui:length default:1.77393
width type:#float ui:width default:1.68774
height type:#float ui:height default:0.824215
)
rollout params "glue_end Parameters" (
spinner length "Length" range:[0,10000,1.77393] align:#right fieldwidth:60
spinner width "Width" range:[0,10000,1.68774] align:#right fieldwidth:60
spinner height "Height" range:[0,10000,0.824215] align:#right fieldwidth:60
)
on buildMesh do
(
vp = #()
fl = #()
fs = #()
fe = #()
-- Vertex data ---------------------------
append vp [-0.84375,-0.783447,-0.412109]
append vp [-0.84375,0.886963,-0.412109]
append vp [-0.84375,-0.886963,-0.318798]
append vp [-0.84375,-0.886963,0.412106]
append vp [0.843994,-0.783447,-0.412109]
append vp [0.192383,0.254639,-0.412109]
append vp [0.843994,-0.886963,-0.318798]
append vp [0.413818,-0.886963,0.052742]
for i = 1 to 8 do (
oldpos = vp[i]
vp[i] = point3 (oldpos.x * (width/1.68774)) (oldpos.y * (length/1.77393)) (oldpos.z * (height/0.824215))
)
-- Face data ---------------------------
append fl [5,6,2]
append fl [2,1,5]
append fl [7,5,1]
append fl [1,3,7]
append fl [8,7,3]
append fl [3,4,8]
append fs 1
append fs 1
append fs 1
append fs 1
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)
setMesh mesh vertices:vp faces:fl
for i = 1 to 6 do setFaceSmoothGroup mesh i fs[i]
for i = 1 to 6 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 = 1.68774
length = 1.77393
) else (
old_width = 1.68774
width = 1.68774
length = 1.77393
height = 0.824215
)
)
3: if not ctrlKey then height = 0.824215
) -- end on case
) -- end on mouseMove
) -- end create tool
) -- end plugin