View Full Version : Script for "Selecting Faces by multiple ID's"
abyjoe 05-17-2008, 04:52 PM is there a way to select faces by specifying multiple ID's
|
|
ZeBoxx2
05-17-2008, 11:15 PM
fn selectFacesByMatIDs objs matIDs = (
getFunc = undefined
setFunc = undefined
for o in objs do (
oNumFaces = o.numFaces
if (classOf o == editable_mesh) then (
getFunc = getFaceMatID
setFunc = setFaceSelection
)
else if (classOf o == editable_poly) then (
getFunc = polyOp.getFaceMatID
setFunc = polyOp.setFaceSelection
)
else ( continue )
newFaceSelection = for i = 1 to oNumFaces collect (
if (findItem matIDs (getFunc o i) != 0) then ( i ) else ( dontcollect )
)
setFunc o newFaceSelection
)
)
-- select faces material IDs 1 or 3 in the currently selected objects
selectFacesByMatIDs (getCurrentSelection()) #(1,3)
abyjoe
05-17-2008, 11:26 PM
u are a star man... thanks again
CGTalk Moderation
05-17-2008, 11:26 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.