Notifications
Clear all
[Closed] filter modifiers in scene
Apr 26, 2013 7:32 pm
Can’t figure this one out. Trying to do filter of cameras in scene with modifiers named ‘Camera Mod’.
fn camera_filter o =
(
( (for o in cameras where o.modifiers ["Camera Mod"] != undefined collect o).count > 0 )
)
1 Reply
Apr 26, 2013 7:32 pm
always try to make a general case functions instead of specific:
fn getNodesUsingModifierName name nodes: =
(
if nodes == unsupplied do nodes = objects as array
for node in nodes where node.modifiers[name] != undefined collect node
)
/*
getNodesUsingModifierName "Camera MOD" nodes:cameras
-- or
getNodesUsingModifierName #camera_mod nodes:cameras
*/