PDA

View Full Version : Allow only point helper?


Tak Tak
02-16-2005, 06: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.

magicm
02-16-2005, 08:01 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 = val
)
else
(
-- no point helpers in current selection
messagebox "Please, select point helper!"
)
)

Regards,
Martijn

Tak Tak
02-16-2005, 08:06 PM
Oh yes. Your comments explaned all! Thanks for friendly reply.:thumbsup:

CGTalk Moderation
02-16-2006, 09:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.