Author Topic: CoronaBitmap.filename no return?  (Read 936 times)

2020-04-20, 22:27:05

FlorianW.

  • Active Users
  • **
  • Posts: 53
    • View Profile
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()
3dsMax 2021 - Corona 5