No idea to run that maxscript without running any max of course :) You could use a COM session and run a script, or then even use a COM interface to get the cameras (there is one), but it would also spawn a max as COM server, but you want a lightweight solution of course.
There is a straight, dirty option to extract the cam names from a max file without having to load the entire file at first. Max uses
structured storage as file format, in short: different streams in one file. One stream is the DocumentSummaryInformation, basically the stuff you can see in File Properties -> Contents. All you need to do is to load that small stream and search for the cams. Here is a basic python example using the "olefile" package:
#get the olefile package with "pip install olefile" first
import olefile
from sys import argv
if len(argv)<2:
print "Please specify a max file"
quit()
ole=olefile.OleFileIO(argv[1])
data=ole.openstream('\x05DocumentSummaryInformation').read()
i=0
camlist=[]
while data.find('Render Camera '+'{:02d}'.format(i))>0:
camlist.append(data[data.find('Render Camera '+'{:02d}'.format(i))+17:data.find('\x00',data.find('Render Camera '+'{:02d}'.format(i)))])
i+=1
ole.close()
print camlist
The example just searches for "Render Camera X" as a string until the next terminator (\x00) with incrementing X until it finds no more cams and stores the result in an array.
Example output:
C:\Python27>python c:\temp\ListCams.py c:\temp\temp.max
['CoronaCamera002', 'PhysCamera001_with_Spaces_and_a_Long Name#']
The package equivalent for C# to access streams in such files (assuming your mate uses C#) for example would be
https://sourceforge.net/projects/openmcdf/ it seems.
Edit: And it should be possible to do this with .net as well :)
Good Luck
« Last Edit: 2020-06-15, 20:48:10 by Frood »
![](https://forum.corona-renderer.com/Themes/Skm_Light_RC5/images/ip.gif)
Logged
Never underestimate the power of a well placed level one spell.