Standard and Physical Material fail to export texture with specific name

Hello all, I am receiving the following exception in the Maxscript listener when I “Export to USD”, from 3DS Max 2023 when using Physical Material, and a bitmap with the name “base color texture” or “base_color_texture”.

Exception with set_plug_value color: attribute base_color_map type is <class ‘str’> valueStr is base color texture:Bitmap

Similarly, experiencing the same error when using the “Standard” material as well.

Exception with set_plug_value color: attribute base_color_shader type is <class ‘str’> valueStr is base color texture:Bitmap
get_filename_from_texturemap: Unhandled Bitmap data type!!! [0,0,0], type name is MXSWrapperBase
get_filename_from_texturemap: Unhandled Bitmap data type!!! [0,0,0], type name is MXSWrapperBase
get_filename_from_texturemap: Unhandled Bitmap data type!!! [0,0,0], type name is MXSWrapperBase
can_set_plug_value: skip attribute=thin_film_IOR
WARNING: Unable to set output plug “thin_film_IOR”.
Exception with set_plug_value color: attribute base_color_shader type is <class ‘str’> valueStr is base color texture:Bitmap
get_filename_from_texturemap: Unhandled Bitmap data type!!! [0,0,0], type name is MXSWrapperBase
get_filename_from_texturemap: Unhandled Bitmap data type!!! [0,0,0], type name is MXSWrapperBase
get_filename_from_texturemap: Unhandled Bitmap data type!!! [0,0,0], type name is MXSWrapperBase
can_set_plug_value: skip attribute=thin_film_IOR
WARNING: Unable to set output plug “thin_film_IOR”.
Exception with set_plug_value color: attribute base_color_shader type is <class ‘str’> valueStr is base color texture:Bitmap
get_filename_from_texturemap: Unhandled Bitmap data type!!! [0,0,0], type name is MXSWrapperBase
get_filename_from_texturemap: Unhandled Bitmap data type!!! [0,0,0], type name is MXSWrapperBase
get_filename_from_texturemap: Unhandled Bitmap data type!!! [0,0,0], type name is MXSWrapperBase
can_set_plug_value: skip attribute=thin_film_IOR
WARNING: Unable to set output plug “thin_film_IOR”.

The issue does not occur with the MDLMaster material, is this something anyone else has been able to reproduce?

Here’s a workaround I figured out using Maxscript. It will search through your selection in max and rename all the subtextures in the material editor (it does not rename any bitmaps in the file system itself.) This resolved my issue.

(for obj in getCurrentSelection()
do
(
local mtl = obj.material
local nmaps = getNumSubTexmaps mtl

		for i = 1 to nmaps do
		(
			local currentMap = getSubTexmap mtl i
			if currentMap != undefined
				do
			(
				currentMap.name = mtl.name +" - "+(getSubTexmapSlotName mtl i)
			)
		)
	)	
)

Thank you for reporting the issue and provide us the workaround!