PDA

View Full Version : How to find all noise controllers.


mustan9
02-13-2007, 04:06 PM
Is there a collection for controllers. Like the "lights" or "objects" collections.

I need to search the scene and find all the noise controllers.

d3coy
02-13-2007, 06:03 PM
You'll have to construct your own collection to obtain all the noise controllers. You may want to ask yourself whether you are interested in noise_position, noise_rotation, noise_scale, noise_point3, noise_float, or all of them. Then you can narrow your search down and perhaps only loop through the lights objectset to obtain lights with a noise_float controller on their multiplier track, and append that controller to a collection for your convenience. If you're only looking for position, rotation, or scale noise controllers then likewise you can loop through the objects objectset and test against their animation tracks. Several ways to skin this cat.

kees
02-13-2007, 06:49 PM
No need to loop anybodies tracks for this one:


noiseConts = #()

join noiseConts (getClassInstances position_noise)
join noiseConts (getClassInstances rotation_noise)
<... repeat for all noise controller classes you are interested in...>

noiseConts will now hold an array of ALL noise controllers in the scene.


-Kees

mustan9
02-13-2007, 06:52 PM
wohoo!

Thanks kees! That was actually what I was looking for.

d3coy
02-13-2007, 07:20 PM
wow, I've never seen that method before, thanks kees

doctorx256
02-15-2007, 09:41 AM
Thanks Kees. Cool one, i had never thought of that but...
i think there is a small typographic error...

it should be...
join noiseConts (getClassInstances noise_position)

and not...
join noiseConts (getClassInstances position_noise)

Have fun maxxing...

JHaywood
02-15-2007, 03:59 PM
That's a great tip Kees. One of these days I'm going to have to actually read through the MaxScript reference. :)

d3coy
02-15-2007, 04:25 PM
haha, that's exactly what I was thinking... I've been scripting for over two years and never saw that method. It makes me paranoid that there is some other great method hidden in there that I've been scripting circles around??

luigi
02-16-2007, 12:04 PM
Really useful ones :) thanks for the tip :).

Going to rea the help to to know more about it too.

rdg
02-16-2007, 01:33 PM
In this context I would like to be evocative of
sloft's great article about Maxecipt References [1]

Georg

[1] http://www.sloft.com/2005/11/26/maxscript-references/

JHaywood
02-16-2007, 03:13 PM
Thanks for the great link, now I've got even more reading to do. :)

CGTalk Moderation
02-16-2007, 03:13 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.