Notifications
Clear all
[Closed] Allow only point helper?
Feb 16, 2005 6:37 pm
Hi,
I don’t know how I can solve this problem so please give me some advice.
I want to know how I can tell script that I want allow only point helpers for my selection. I think “classOf selection” is my problem, but don’t know what is right way…
on adjust_spn changed val do if classOf selection==point then $.size = adjust_spn.value else messagebox "Please, select point helper!"
Thanks for helping.
2 Replies
Feb 16, 2005 6:37 pm
Hi Tak Tak,
Here’s an example, I hope my comments explain it well
on adjust_spn changed val do
(
-- collect all point helpers from selection into an array called 'thePoints'
local thePoints = for obj in selection where classof obj == point collect obj
-- any point helpers found in current selection?
if thePoints.count > 0 then
(
-- change size of all selected point helpers
thePoints.size = [b]val[/b]
)
else
(
-- no point helpers in current selection
messagebox "Please, select point helper!"
)
)
Regards,
Martijn