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 Tools Search this Thread Display Modes
  02 February 2009
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?


here is the working macro for anyone who wants it

macroscript SelectByGBuffer 
    	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.
  02 February 2009
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

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
Society of Digital Artists

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

All times are GMT. The time now is 10:40 AM.

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