Is there a method for doing something along the lines of
for obj in selection where obj.name collect (collect only unique) obj
Forum topic · General Scripting
where....collect?
By JokerMartini · 2012-03-06
Forum topic · General Scripting
By JokerMartini · 2012-03-06
Is there a method for doing something along the lines of
for obj in selection where obj.name collect (collect only unique) obj
Comments (3)
Comment policy
Maybe this can help
fn collect_UniqueNames =
(
local tempArr = #(), ghv = gethashvalue
for obj in objects where (finditem tempArr (g = gethashvalue obj.name 0)) == 0 collect (append tempArr g ; obj.name)
)
uniqueNamesArr = collect_UniqueNames()
collecting by unique name?
if so, an possible way:
Yes, you just wrote it ;)