|
Is there a way to get an open floater to open another floater (on a button pressed action)?
I keep getting a compile error with I simply have:
on sets_export_sets_button pressed do
(
createDialog modal_collada_rollout modal:true
) --end if want to export
I get “No outer local variable references permitted here: modal_collada_rollout “
===================
I searched the all-knowing-and-seeing internet and came up with this:
-- create several rollouts , save them in a dir .eg:
-- rollout xxx1 “xxx1” (button lanhaibo “lanhaibo1” )
-- rollout xxx2 “xxx2” (button lanhaibo “lanhaibo2” )
-- rollout xxx3 “xxx3” (button lanhaibo “lanhaibo3” )
--....
-- then save them as d:\test\test_1.ms .... test_2.ms .... test_3.ms
-- below is the new script to collect the old ones into a newRolloutFloater.
theOldRollouts = getfiles “d:\\test\\*.ms”—collect old rollouts .
for i in theOldRollouts do filein i—filein them .
newFloater = newRolloutFloater “collect old rollouts “ 200 400—create a new container.
addrollout xxx1 newfloater
addrollout xxx2 newfloater
addrollout xxx3 newfloater
--…
this came via : http://forums.cgsociety.org/showthread.php?t=413386
=====================
so then I took my rollout definition out to another file as the instructions say and changed my code accordingly to this:
----------------------------------------------------------------------
global bhg_xporterDials = #("$max\\scripts\\bhg_collada_shell.ms")—declare location of external dialogs
for d in bhg_xporterDials do
(
filein d
)
function add_collada_exporter =
(
ColladaFloater = newRolloutFloater “Collada Options” 552 232
addrollout modal_collada_rollout ColladaFloater
)—end add_collada_exporter function
AND LOWER DOWN THE FILE:
on sets_export_sets_button pressed do
(
add_collada_exporter()
) --end if want to export
================================================
To which I get this error now: “No outer local variable references permitted here: add_collada_exporter”
I basically have a scripted utility that launches a floater, this floater needs to launch other modal floaters.
MB
|