Select by effectsChannel within multiMat or sub map

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2009   #1
Select by effectsChannel within multiMat or sub map

I've written this little tool to select objects by Object ID or by effects
Now I'm looking to dig through multiMaterials and submaps to look for a given effectsChannel.

My thoughts are to somehow collect all of the effectsChannel values (of each material and subs) into an array and then if finditem returns a value then collect the object... make sense? Any hints tips?

Thanks

here is the working macro for anyone who wants it

Code:
macroscript SelectByGBuffer category:"MyTools" ( try (destroyDialog ro_SelGBuff) catch() rollout ro_SelGBuff "Select by GBuffer ID" ( spinner spn_GBuffID "G Buffer ID: " type:#integer mwidth:70 button btn_SelectObjID "Select" width:100 on btn_SelectObjID pressed do ( clearselection () select (for o in objects where o.gbufferChannel == spn_GBuffID.value collect o) ) spinner spn_MattID "Material ID Ch.: " type:#integer mwidth:70 button btn_SelectMatID "Select" width:100 on btn_SelectMatID pressed do ( clearselection () allGeo = (for g in objects where g.material != undefined collect g) select (for i in allGeo where i.material.effectsChannel == spn_MattID.value collect i ) ) label lab_JCredits01 "By: me" label lab_JCredits02 "---------" ) createDialog ro_SelGBuff 180 140 )
__________________


Last edited by jonahhawk : 02 February 2009 at 04:26 AM.
 
Old 02 February 2009   #2
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.
 
Thread Closed share thread



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 05:02 AM.


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