QQ聊天

MaxScript获取元素数量的一个思路

Fn GetMeshElementsCount meshObject =
(
	exsList = #()
	sourceFaceList = #{}
	for i = 1 to getNumFaces meshObject.mesh do
	(
		curList = (meshop.getElementsUsingFace meshObject.mesh i) as array
		if curList.Count > 0 do
		(
			if exsList.Count == 0 do append exsList curList 
			isExit = true
			for tempList in exsList where  tempList[1] == curList[1] do isExit = false
			if isExit == true do append exsList curList
		)
	)
	exsList.Count
)
GetMeshElementsCount $
posted @ 2011-02-23 22:54  SITT  阅读(635)  评论(0编辑  收藏  举报
QQ聊天