I am looking to write a simple script that would allow me to select a group of Xmesh loaders, and change the viewport display type en masse. Is there a way to access this? I tried “showInterface XMeshLoaderUtils” but it didn’t list this property.
I am still working on that tool which will do that, but for now what you need to look for is show $. This will show the properties of the XMesh Loader if one is selected:
show $
.showIcon : boolean
.iconSize : worldUnits
.meshScale : float
.keepMeshInMemory : boolean
.writeVelocityMapChannel : boolean
.velocityMapChannel : integer
.renderSequence : filename
.proxySequence : filename
.autogenProxyPath : boolean
.loadSingleFrame : boolean
.frameOffset : integer
.limitToRange : boolean
.rangeFirstFrame : integer
.rangeLastFrame : integer
.enablePlaybackGraph : boolean
.playbackGraphTime : float
.beforeRangeBehavior : integer
.afterRangeBehavior : integer
.loadMode : integer
.enableViewportMesh : boolean
.renderSequenceID : integer
.viewportSequenceID : integer
.displayMode : integer
.displayPercent : float
.useFileLengthUnit : boolean
.lengthUnit : integer
.ignoreMissingViewportSequenceOnRenderNode : integer
Then you can write a script that sets a property in all XMesh Loaders in the scene.
For example,
theLoaders = getClassInstances XMeshLoader --get all loader baseobjects
theLoaders.displayMode = 2 --set the display of all XMesh Loaders to Verts
or shorter
(getClassInstances XMeshLoader).displayMode = 2
Thanks Bobo!