[Closed] implementing dialog icons within script
I was wondering what do you guys thing would be the best way to implement 3 icons within a script I want to use as image buttons. They are all three 24px x 24px.
Do you think creating the bitmaps using the bitmap functions and operators on “dialog open” to create them within functions and then from there use them as image buttons?
I really want to embed the icons within the script so I do not have to worry about people extracting them to the correct place.
hi john, there is a method to make max bitmaps via the ‘bitmap values’ topic in the max help.
If you are using dotnet controls, check out this script as it uses Base64 encoded strings to build the icons dynamically when the script is first run.
This is packaged into a struct so that you can append it to any script.
for a background tutorial into base64 in max check here
I’ve created some image icons in the past using the create bitmap values. I’m aware the 64based stuff is more efficient and better. That’s what I was hoping to use. I sent you an email with the attached files showing you the odd result I was getting using the 64based stuff.
I simply just need them to but buttons with images. Whether they are dotnet or not does not matter.
JokerMartini
john, a max image button would expect an 8-bit black and white image as the mask bitmap, so that’s why you are getting a strange result. If you make an alpha map from the png and create a base64 encoded string from that, you will get the correct outcome.
Best way (and the intended use for the Base64 function) is to use a dotnet button which will handle the alpha on the first encoded string correctly.
I used the 64base encoding to create the alpha and that imaged I had emailed you is actually the result of that exact setup. I’m not clear on why that would be the case if I’m creating both the bitmap and the alpha for it. It should display properly.
If i use the dotnet button how do I set its properties to look like the standard max buttons with with an image?
When i set the button to flatstyle system it no longer displays the image on it.
john, you hadnt set the other alpha image up –
(
Struct LR_IconArrayStruct
(
fn ConvertBase64StringToImage string filepath =
(
if not doesfileexist filepath then
(
bytearr = (dotnetclass "system.convert").FromBase64String string
memstream = dotnetobject "System.IO.MemoryStream" bytearr
DecodedImg = (dotnetclass "system.drawing.image").fromstream memstream
DecodedImg.Save filepath (dotnetclass "System.Drawing.Imaging.ImageFormat").png
memstream.close()
(dotnetclass "System.GC").Collect()
true
)
else false
),
on create do
(
AssetDir = ((getdir #scripts) + "\\Ingenuity\\Assets\\Icons\\")
Base64Array = #("iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACHDwAAjA8AAP1SAACBQAAAf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5Rgs1jb5nyISFGVlG/Bl2b8D1pY2cI0j190fPUi80oa0a8+wuLSCnNw8Esh3LSxJ4MluaW2Hf3VdE0srq6jreo+EyxbEF1vgHvfC9twu26N5D0LZUpOTT2JoeARr69/Q/8GLJudYAOW1vThe2oqjFxqhu27D8NQiJqdmoBNqE0X00fqvXi9JSUlBp92OH5tb6Bn2oMriRsWTgcDofDeP7xubcDi6kZaezuJ8BGM2vlP+wsLCANGCz4ef29uB0eFwwGQySd1nxFxZlcCe8sfxolGCstdUFJ+FHT3/A4r8P3p2pn7kAAAAAElFTkSuQmCC",
"Qk32BgAAAAAAADYAAAAoAAAAGAAAABgAAAABABgAAAAAAAAAAAASCwAAEgsAAAAAAAAAAAAA////////////////////////////////////////////8/PzlpaWSEhIGBgYAAAAGBgYRUVFkJCQ8/Pz////////////////////////////////////////////////////////rq6uGBgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAFRUVq6ur////////////////////////////////////////////////kJCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhISE////////////////////////////////////////sbGxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqKio////////////////////////////////9vb2GxsbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBgY8/Pz////////////////////////////mZmZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlpaW////////////////////////////S0tLAAAAAAAAAAAAAAAAAAAAAAAARUVFmZmZRUVFAAAAAAAAAAAAAAAAAAAAAAAAQkJC////////////////////////////JCQkAAAAAAAAAAAAAAAAAAAASEhI////////////VFRUAAAAAAAAAAAAAAAAAAAAGBgY////////////////////////////////////////h4eHAAAAAAAAjY2N////////////jY2NAAAAAAAAAAAAAAAAAAAAAwMD/////////////////////Pz8XV1dAAAAeHh4////n5+fAAAAAAAASEhI////////////SEhIAAAAAAAAAAAAAAAAAAAAFRUV////////////////////ioqKAAAAAAAAPDw8////5+fnDAwMAAAAAAAAQkJCk5OTRUVFAAAAAAAAAAAAAAAAAAAAAAAAPz8/////////////////5OTkDAwMAAAAAAAAAwMD29vb////nJycAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkJCQ////////////////UVFRAAAAAAAAAAAAAAAATk5O////////mZmZDAwMAAAAAAAAAAAADAwMmZmZurq6GBgYAAAAGxsb8/Pz////////////rq6uAAAAAAAAAAAAAAAAAAAAAAAAbGxs+fn5////5+fntLS0mZmZtLS05+fn////////4eHhGxsbsbGx////////////5+fnEhISAAAAAAAAAAAAAAAAAAAAAAAAAAAALS0t0tLS////////////////////7e3tWlpa5OTk8PDw/////////////Pz8SEhIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKioqXV1dhISEWlpajY2N////cnJyOTk5////////////5OTkVFRUAAAAAAAAAAAAe3t7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtLS0////+fn5ISEhsbGx////////AAAAAAAAAAAAAwMDlpaW////LS0tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQkJ9vb2////////e3t7aWlp////////AAAAAAAAGxsbt7e3////////k5OTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARUVF////////////gYGBUVFR////////JycneHh48PDw////////////9vb2GxsbAAAAAAAAAAAAAAAAAAAAAAAAAAAACQkJDw8PY2Njvb29t7e3GBgYkJCQ////////////////////////////////////sbGxAAAAAAAAAAAAAAAAAAAAAAAAAAAAn5+f5+fnY2NjGBgYBgYGZmZm+fn5////////////////////////////////////////////////Hh4eAAAAEhIS////////////////////////////////////////////////////////////////////////////////////dXV1AAAAcnJy////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////",
"iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACHDwAAjA8AAP1SAAC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A2WkHQaVKkXQAAAAASUVORK5CYII=",
"iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAfNJREFUSEu1lU/HAlEUxntFRMQQEdEqItpGq4hWEdGqVUS0iogYWkWriGgVrVpFRKvoA/QBWrWKaNUqIk4913unmbpz596X95DSnHue8+d3z/zQy3z/aRBQtU6ng2So3W6rHiGfsufLMR6PMwHDMJSPeQqsVisW1O0zm83ofD5TvV6naDRKgUCAGo0G3e93lgQTSCaT1O126Xq9OjK73W4Ui8WkAsFgkMLhMBPYbre02WyY0Gg0egvw7BAMDtzG47E0OD9XKBQcifX7fSqXy98COOD3+2kymbCH6XRaSQBVoFpuvV6Pms3mW+B0OlGlUnEEg5Os95/P1us1C4jeJxIJwuysGeDH4/GgYrGoFdQuwjMGwtls1qrGQRFoAII6mXNfIIzgmCM6wu0L0+Vy6SmQz+eFPrlcjiFrN+E9AAGyKhBgPp9TJBKx/ACHfdCuFeABSgyFQq4ifGa4N+g9kgFxInO9ycPhUCqQyWRov9+zmPheLBZ6AqCqVqsJRRh+v+uj1Wp9bQDPGQhT+fjTPiOsBsxEq0X2LFWxBV2Hw8GbIosAyRZ1E8U2NU3TIkq6rlUzF/lVq1XnqhD27w8VYHVPp1P3m+wgQFMA1F0uF/UZyGiytyWVStFut9OnyEsA74HBYGC9HrUxlQmUSiU6Ho+eV+YJXrfAIUBnS5IAAAAASUVORK5CYII=")
if not doesfileexist AssetDir then makedir AssetDir
arrIconPath = #((AssetDir + "GrindRender.png"),(AssetDir + "GrindRenderAlpha.png"),(AssetDir + "PreviewRender.png"),(AssetDir + "SubmitRender.png"),(AssetDir + "SubmitRenderAlpha.png"))
for i = 1 to arrIconPath.count do ConvertBase64StringToImage Base64Array[i] arrIconPath[i]
)--end create
)-- end LR_IconArrayStruct
-- build the icons, unless they already exist.
LR_IconArrayStruct()
try(destroyDialog ::rlImages)catch()
rollout rlImages "base64-bit Images"
(
local AssetDir = ((getdir #scripts) + "\\Ingenuity\\Assets\\Icons\\")
local GrindRender = (AssetDir + @"GrindRender.png")
local GrindRenderA = (AssetDir + @"GrindRenderAlpha.png")
local PreviewRender = (AssetDir + @"PreviewRender.png")
local SubmitRender = (AssetDir + @"SubmitRender.png")
local SubmitRenderA = (AssetDir + @"SubmitRenderAlpha.png")
button theButtonA "Press To Render!" width:180 height:40 pos:[10,10] images:#(GrindRender, GrindRenderA, 1,1,1,1,1 )
button theButtonB "Press To Render!" width:180 height:40 pos:[10,55] images:#(PreviewRender, undefined, 1,1,1,1,1 )
button theButtonC "Press To Render!" width:180 height:40 pos:[10,100] images:#(SubmitRender, SubmitRenderA, 1,1,1,1,1 )
)
createDialog rlImages 200 150
)
I had done it locally in the version i had. The icon seems unpremulted. That is one of the issues I’m having with it.
could just be how the max button displays it – for image display they are not as good as dotnetcontrols. use this with dotnetcontrols, you’ll get the correct result then.
try
(dotNetclass "System.Windows.Forms.FlatStyle").popup
to get more ‘maxlike’ buttons with images.