Good afternoon.
I'm trying to create a script that moves objects in a certain direction (X,Y,Z) ....
in the initial position, these objects are located inside another object
_______________________________________________________________________________________
try (DestroyDialog parent_dialog) catch()
rollout parent_dialog "Parent" width:140 height:140
(
local varDir = undefined
local arrayObj =#() -- массив выбранных объектов
checkbox XPOS "X pos."
checkbox YPOS "Y pos."
checkbox ZPOS "Z pos."
button btPrepear "Prepear"
on btPrepear pressed do
(
arrayObj = selection as array
case of
(
(XPOS.checked == true):
(
varDir = "arrayObj[t].pos.x = arrayObj[t].pos.x + 1.0"
)
(YPOS.checked == true):
(
varDir = "arrayObj[t].pos.y = arrayObj[t].pos.y + 1.0"
)
(ZPOS.checked == true):
(
varDir = "arrayObj[t].pos.z = arrayObj[t].pos.z + 1.0"
)
)
for t = 1 to arrayObj.count do
(
while (intersects arrayObj[t] $Box001 == true) do
(
execute varDir
)
)
)
)
createDialog parent_dialog pos:[1580,30] style:#(#style_titlebar, #style_border, #style_sysmenu, #style_minimizebox)
__________________________________________________________________
when I do such conversions without creating a CreateDialog everything is happening normally. But if I use CreateDialog function,an error occurs.
It seems that the script does not see the internal variable.
I attach a scene
Swordslayer · 2020-09-13