3ds Max to CSV file

"Hi, is there a way to export a CSV file in 3ds Max using a script? The CSV should have two columns: '3D Object Name' and 'Material Name', listing only the file names of the selected 3D objects along with their corresponding material names." Thank you in Advance

CSV example screenshot.

AttachmentSize
max_to_csv.jpg17.55 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

A bit late, but:

(
	csvFilePath = @"D:\myCSVFile.csv"
	outFile = createFile csvFilePath
	for o in selection do
	(
		format "%,%\n" o.name (if (mat = o.mat) != undefined then o.mat.name else "NO MATERIAL") to:outFile
	)
	close outFile
)
polbolotsoro's picture

How about if the Object has multiple material names on it.

Hi, thank you very much.

However, what if the object has multiple material names on it, like the example screenshot I provided? Currently, the script lists the multi/sub-object materials, which shouldn't be included in the CSV.

Is it possible to create a CSV format similar to the one in the screenshot I provided? I really appreciate your help in advance.

AttachmentSize
multiple_material_names_in_a_single_object.jpg 151.5 KB
polbolotsoro's picture

NVM! I got it working Thank you so much

I got it working

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.