[Closed] Ui statistics
By looking inside other scripts I was able to show in the active window information related to the selected object such as its sub-object.
Works well with editable poly but I can’t find how to display the subobject in editable mesh.
#1 “I’m not a programmer and I don’t have any scripting skills. Please help me with this kind of script which will be very helpful in my workflow…”
#2 “I want to learn the max scripting. I have an idea. I tried to do it this way. But failed. Please help me to make it works…”
the code I’m using to display the editable poly sub-object on the screen is this:
unRegisterRedrawViewsCallback GetEPolySelLevelfn SubselectionStatistics =(try (Name = $.GetEPolySelLevel()) catch(Name = “”)gw.wText [10,68,0] Name color:greengw.updateScreen()redrawViews())unRegisterRedrawViewsCallback SubselectionStatisticsregisterRedrawViewsCallback SubselectionStatisticsSubselectionStatistics ()forceCompleteRedraw()
You know, I do not even want to answer such a question.
This is an example of completely thoughtless use of someone else’s code. What’s the point of this?
The script doesn’t work for MESH, and POLY is used in the code. Just put two things together!
The idea is to use it with a script that I did which makes cycles of different options, key 1: move scroll key 2: change coordinates key 3: select the subobject vertex,edge,face. Displays the options that call the shortcuts
Personally, I don’t think it’s wrong to publish this question.
There is nothing wrong to ask any question on this forum. But there are several ways how to do it right…
#1 “I’m not a programmer and I don’t have any scripting skills. Please help me with this kind of script which will be very helpful in my workflow…”
#2 “I want to learn the max scripting. I have an idea. I tried to do it this way. <Show your code here>. But failed. Please help me to make it works…”
here the solution thanks to the help of jahman scriptspot user.
fn meshStatistics =
if(classof (modPanel.getCurrentObject()) == Editable_Mesh) Then
(
SOLevelName = case SubObjectLevel of
(
0: #Object
1: #Vertex
2: #Edge
3: #face
4: #Polygon
5: #Element
)
try (SOLevelName = SubObjectLevel() ) catch(MaterialName = “”)
gw.wText [10,100,0] SOLevelName color:green
gw.updateScreen()
forceCompleteRedraw()
)
unRegisterRedrawViewsCallback meshStatistics
registerRedrawViewsCallback meshStatistics
meshStatistics ()