Export List of Layers and it's Subobjects to CSV File

Export List of Layers and it's Subobjects to CSV File

dominik.pfaff
Observer Observer
329 Views
0 Replies
Message 1 of 1

Export List of Layers and it's Subobjects to CSV File

dominik.pfaff
Observer
Observer

Hello guys,

 

I am looking for a way to export the layer names of my scene and it's sub-objects into a CSV file in an organized way.

Ideally the output would look like this:

 

 

2022-11-23 08_18_45-Window.png

 

Since I have no idea how to use MaxScript this is really difficult for me to do.

 

So far all I could do was create an endless list of objects and layers but not in an organized way:


output_name = getSaveFileName caption:"CSV File" types:"CSV (*.csv)|*.csv|"
if output_name != undefined then
(
output_file = createfile output_name
for i = 0 to layerManager.count - 1 do
(
local nodes
local ilayer = layerManager.getLayer i
format "%, %\n" ilayer.name (ilayer.nodes &nodes; nodes.count) to:output_file
)
for vObj in Objects do
(
format "%\n" vObj.name to:output_file
)
close output_file
)

I would be so happy if anybody could help me.

0 Likes
330 Views
0 Replies
Replies (0)