CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 04-26-2013, 06:32 PM   #1
darkmoon3d
PRO
Mark
Indianapolis, USA
 
Join Date: Feb 2003
Posts: 104
Send a message via AIM to darkmoon3d Send a message via Yahoo to darkmoon3d
filter modifiers in scene

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 )

)
 
Old 04-26-2013, 06:42 PM   #2
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,623
Send a message via ICQ to denisT
Quote:
Originally Posted by darkmoon3d
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 )

)


always try to make a general case functions instead of specific:
Code:
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 */
 
Old 04-26-2013, 06:42 PM   #3
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:45 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.