How does this look for the layout?
I'm guessing we're creating/convert the teapots before we calculate any time, correct?
(the script below doesn’t perform any fast methods, just an example of the layout i’ll be using)
(
fn createTeapots howManyTeapots: 1000 =
(
/*
===============
Here we delete all objects, create the teapots, select them, and zoom extents, the function returns the teapot array
===============
*/
delete objects
local arrayToReturn = #()
for j = 1 to 1000 do
append arrayToReturn (teapot pos:[random -100 100, random -100 100, random 0 100])
select geometry
actionMan.executeAction 0 "311" -- Tools: Zoom Extents All Selected
clearSelection()
arrayToReturn
)
rollout roAttachSpeedTest "1000 Teapot Speed Test" width: 220
(
button btnRunSpeedTest "Run Speed Test"
group ""
(
radioButtons rbSpeedTest "Choose Test:" labels:#("Test 1", "Test 2", "Test 3") columns:1 default: 3 align:#center
)
group ""
(
radioButtons rbMeshOrPoly "Pre-Convert Teapots to" labels:#("Editable Mesh", "Editable Poly") columns:1 default:1 align:#center
)
label labSpeedTestCaption ""
on roAttachSpeedTest open do
(
if (queryBox "Reset Max scene before continuing?" beep:false) then
resetMaxFile #noprompt
actionMan.executeAction 0 "50026" -- Tools: Maximize Viewport Toggle
if objects.count != 0 then
delete objects
)
on btnRunSpeedTest pressed do
(
with undo off
(
if rbMeshOrPoly.state == 1 then
(
convertToMesh(createTeapots())
convertToPoly geometry[1]
)
else
(
convertToPoly(createTeapots())
)
gc()
if rbSpeedTest.state == 1 then
(
local theCurrTime = timeStamp()
(
messageBox "Test 1 hasn't been implimented yet." beep:false
)
local endTime = timeStamp()
labSpeedTestCaption.text = ("Test Attach 1 process took " + ((endTime - theCurrTime) as string) + "ms." )
)
if rbSpeedTest.state == 2 then
(
local theCurrTime = timeStamp()
messageBox "Test 2 hasn't been implimented yet." beep:false
local endTime = timeStamp()
labSpeedTestCaption.text = ("Test Attach 1 process took " + ((endTime - theCurrTime) as string) + "ms." )
)
if rbSpeedTest.state == 3 then
(
local theCurrTime = timeStamp()
messageBox "Test 3 hasn't been implimented yet." beep:false
local endTime = timeStamp()
labSpeedTestCaption.text = ("Test Attach 1 process took " + ((endTime - theCurrTime) as string) + "ms." )
)
)
)
)
CreateDialog roAttachSpeedTest style:#(#style_toolwindow, #style_resizing, #style_sysmenu) fgcolor:([0,255,64]) bitmap:
undefined
)