- Fri Aug 28, 2015 9:48 pm
#387949
Hi Brany
Is it possible to fetch the file paths of all the RFMeshes in an MXS using Python?
I've spent a good amount of time this evening trying to find a way to do it but no luck yet. The standard getDependencies() method for finding all the textures used in a scene doesn't list RFMeshes, and so as an alternative I've tried looping through all the objects to see if the RFMesh file path property is hidden anywhere but this didn't get me anywhere either.
Here's a basic version of the script as it stands:
Is it possible to fetch the file paths of all the RFMeshes in an MXS using Python?
I've spent a good amount of time this evening trying to find a way to do it but no luck yet. The standard getDependencies() method for finding all the textures used in a scene doesn't list RFMeshes, and so as an alternative I've tried looping through all the objects to see if the RFMesh file path property is hidden anywhere but this didn't get me anywhere either.
Here's a basic version of the script as it stands:
Code: Select all
Thanks for any tips..from pymaxwell import *
mxs_path = "N:\Path\to\scene.mxs"
scene = Cmaxwell(mwcallback)
ok = scene.readMXS(mxs_path)
print ok
print scene.getDependencies() # No mentuon of RFMeshes
# Try looping through objects to get RFMeshes properties
names = scene.getObjectNames()
for obj_name in names:
print obj_name
obj = scene.getObject(obj_name)
print obj.getDependencies()