i was not able to find a script that select all objects in the scene based on material ID
anyone?
Forum topic · General Scripting
By W DIGITAL · 2012-11-07
i was not able to find a script that select all objects in the scene based on material ID
anyone?
miauu · 2012-11-08
tassel, the link points to this thread.
tassel · 2012-11-09
Hehe, Think it's time to jump in bed ;)
tassel · 2012-11-08
Something like this?
miauu · 2012-11-08
(
local matID = 4
local objWithMatID = #()
local poGetMatID = polyop.getFaceMatID
for obj in geometry where (classof obj) == Editable_Poly do
(
allFaces = polyop.getNumFaces obj
notFound = true
for i = 1 to allFaces while notFound where (matID == (poGetMatID obj i) ) do
(
append objWithMatID obj
notFound = false
)
)
if objWithMatID.count != 0 do select objWithMatID
)
Thnx - Short and sweet
mpowers10000 · 2021-07-08
Nice job