본문 바로가기

Script/MaxScript

TRI,VERTEX Viewport Count

 

Global GW_displayText

unregisterRedrawViewsCallback GW_displayText

fn GW_displayText=
(
    obj = selection --¿ÀºêÁ§Æ® ¼±ÅÃ

    if obj!=0 then
    (
         for i=1  to obj.count do -- ¿ÀºêÁ§Æ®¼±ÅÃÇÑ ¼ö ¸¹Å­ ¹Ýº¹
        (

            tricount=(getTrimeshFaceCount obj[i])[1]  
            vertcount=(getTrimeshFaceCount obj[i])[2]
            objname=obj[i].name 

             wPos=gw.getWinsizeX()/2
             gw.wtext[wPos-100,50,0] "TRICOUNT" color:red
             gw.wtext[wPos,50*i,0] objname[i] color:red
             gw.wtext[wPos+100,50*i,0](tricount as string+" TRI") color:red
             gw.wtext[wPos+100,50*i+20,0](vertcount as string+" VERTEX") color:red

        )
     )
) 


registerRedrawViewsCallback GW_displayText
-- a= getTrimeshFaceCount $
-- a[1]
-- a[2]

 

'Script > MaxScript' 카테고리의 다른 글

Pos2VertexColor for Foliage Animation wip  (0) 2020.06.19
FBX EXPORTER & Anim for Unity  (0) 2020.05.07
pos2zero  (0) 2019.10.11
Random_Scatter_Surface  (0) 2019.10.11