Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5793

Removing duplicate material names in layer panel

$
0
0

@Keith1634 wrote:

when I run this script the actual material remains unchanged in the edit panel.

	Dim arrMat
arrMat = rhino.MaterialIndices

Dim x
x = 0
For  x=0 To ubound(arrmat) - 1
	Dim matName
	matName = rhino.MaterialName(arrMat(x))
	
	Dim arrMatName
	arrMatName = rhino.MaterialsByName(matName)
	
	If isArray(arrMatName) Then
		rhino.MaterialName arrMat(x), matName & x		
	End If
Next

thx,
Keith

Posts: 5

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 5793

Trending Articles