About this site
ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Comments
Variant 1
rollout test "Populator" (
multilistbox lsx "Objects"
checkbox ch_sp "Spheres"
checkbox ch_cn "Cones"
on ch_sp changed thestate do
(
if TheState == true do
(
tmp_arr = #()
for o in objects do if classof o == Sphere do append tmp_arr o.name
lsx.items = tmp_arr
)
if theState == false do
(
tmp_arr = #()
for i = 1 to lsx.items.count do
(
n = getnodebyname lsx.items[i]
if classof n == sphere do append tmp_arr i
)
for t = tmp_arr.count to 1 by -1 do deleteItem lsx.items tmp_arr[t]
lsx.items = lsx.items
)
)
on ch_cn changed thestate do
(
if TheState == true do
(
tmp_arr = #()
for o in objects do if classof o == Cone do append tmp_arr o.name
lsx.items = join lsx.items tmp_arr
)
if theState == false do
(
tmp_arr = #()
for i = 1 to lsx.items.count do
(
n = getnodebyname lsx.items[i]
if classof n == Cone do append tmp_arr i
)
for t = tmp_arr.count to 1 by -1 do deleteItem lsx.items tmp_arr[t]
lsx.items = lsx.items
)
)
)
createdialog test
Well this is one way.. may be a li'l slow though...
..aut inveniam viam aut faciam..
..aut inveniam viam aut faciam..
Thanks, but what I meant is
Thanks, but what I meant is to populate it by these:
Constructors
objects -- all the objects
geometry -- the standard 3ds Max categories...
lights
cameras
helpers
shapes
systems
spacewarps
selection -- the current selection
How can test to see if an item is a geometry or lights or a camera?
Thanks
Alex,
Alex,
Check out the following functions in the online reference:
classOf
superClassOf
isKindOf
Select an object (a box in this example) and evaluate the following commands:
classOf $ -- returns Box
superClassOf $ -- returns GeometryClass
isKindOf $ Box -- returns true
Cheers,
Martijn
Thanks.
Thanks.