Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: FlorianW. on 2020-04-20, 22:27:05

Title: CoronaBitmap.filename no return?
Post by: FlorianW. on 2020-04-20, 22:27:05
I have a script running which assigns a selected HDRI to my Environment Background. At the end of the process, i want to show the filename of the Bitmap in the caption of the button. When i plug the HDRI into a normal bitmap, i can get the filename easily, but when a coronabitmap is selected, the .filename property isn't returning anything? Anyone having a solution to this?



Code: [Select]
on MPBTN_Environment picked texmap do
(
try
(
renderers.current.bg_texmap = texmap

if (classof texmap == CoronaBitmap) == true then
(
print "Corona Bitmap"
)

if (classof texmap == Bitmaptexture) == true then
(
print "Bitmap"
)

texmappath = texmap.filename
texmappath2 = pathConfig.stripPathToLeaf texmappath

MPBTN_Environment.text = texmappath2

) catch()