View Single Post
Old 14th November 2022, 03:08 PM   #1
osmith
Junior Member
Junior member
 
Join Date: Nov 2022
Posts: 2
Default Revamped palette tool

My annoyance at the numbered material labels in the palette has finally increased to the point that I have dived into the tcl code to see what could be done to improve it.

The palette was already incorporated into a folding frame, so I made better use of the vertical space (control panel was already vertically scrollable) by arranging the materials vertically instead of horizontally. This allowed them to be the full width of the control panel which made room for the material name to be used for the label instead of just the index.

It seems to work well except I couldn't figure out how to trigger a refresh upon opening a file, but it can be manually be refreshed by folding/unfolding the palette.

I also made the label easier to read by setting the text color to black or white depending on the background color so it contrasts better.

See attached image for result.

Affected files are in the attached zip file (based on AC3D 9.0.22):

/scripts/mat_names.tcl << new file, copy to scripts folder
/tcl/ac3dpalette.tcl << modified, backup original then copy to tcl folder
/tcl/ac3dwidget.tcl << modified, backup original then copy to tcl folder
Attached Images
 
Attached Files
File Type: zip mat_names.zip (17.3 KB, 205 views)
osmith is offline   Reply With Quote