PDA

View Full Version : filtering selection


loran
04-08-2008, 03:41 PM
hey all,
I just want to filter geometry with particulars material applies from a selection set.
I ve done that yet but I apply the filter on each function and I am not able to set this globally over the functiun.

spinner smpl "Samples:" range:[4,128,16]
on smpl changed val do
(for i in mysel where superClassOf i == GeometryClass and (classof i.material) == Arch___Design__mi do i.material.opts_ao_samples = val)

on every button or spinner I past that entire filter. How to tell this just once?
thank you for help

davestewart
04-08-2008, 03:47 PM
Put the code into a function:

fn updateMaterial =
(
for i in mysel where superClassOf i == GeometryClass and (classof i.material) == Arch___Design__mi do i.material.opts_ao_samples = val
)

spinner smpl "Samples:" range:[4,128,16]

on smpl changed val do updateMaterial()

I think that's what your asking, oui!?

loran
04-08-2008, 04:25 PM
thank you Dave
That s not really what I expect...

I have many others spinner, your code need to create a function by spinner

I want the following filter to be applied globally over the script...
maybe with a global?

"where superClassOf i == GeometryClass and (classof i.material) == Arch___Design__mi"

EricDLegare
04-08-2008, 05:30 PM
Or create a filter function...

function FilterFunction Obj =
(
return ((superClassOf Obj == GeometryClass) and ((classof Obj.material) == Arch___Design__mi))
)



like

for obj in mysel where (FilterFunction(obj)) do obj.material.opts_ao_samples = val

Hope it helps...

CGTalk Moderation
04-08-2008, 05:30 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.