HostService Reference

The hostservice interface provides access to the list of available SDK, known as ‘’servers’’. This includes both built-in servers that are part of modo itself and any externally loaded modules. The most useful application of this to scripts is to provide a list of loaders and savers.

Servers with names starting with dollar signs, such as loader/$LXOB and ‘’saver/$Targa’’, are built-in servers. All other servers, such as loader/freeimage and ‘’saver/PNG’’, are plug-in servers.


Querying the hostservice ScriptQuery interface reveals the following attributes:

  • classes

  • class.???

  • servers

  • server.???

  • defaultPath

{{SQAttributeTable |classes|Get a list of all available server classes. No selection is required. Lists of servers within those classes can be obtained with the. server.??? series of attributes. |string |query hostservice classes ? |’’[list of all classes by name]’’ }}

{{SQAttributeTable |class.servers|The only attribute in the class.??? group, class.servers returns a list of all servers within a specific class. The selector must be one of the strings returned by ‘’classes’’. |string |query hostservice class.servers ? loader |’’[list of all servers of the loader class]’’ }}

servers And server Attributes

{{SQAttributeTable |servers|’’’servers’’’ requires no selection. It returns a full list of all available servers, which can then be used with the server attributes. |string |query hostservice servers ? |’’[list of all servers by name]’’ }}

The ‘server’ series of attributes provide information about specific servers. Each requires a selector returned by servers or class.servers unless otherwise noted.

{{SQAttributeTable ||Get the internal name of a server. |string |query hostservice ? loader/$LWO2 |’’$LWO2’’ }}

{{SQAttributeTable |server.userName|Get the human-readable name of a server. |string |query hostservice server.userName ? loader/$LWO2 |’’Lightwave Object (LWO2)’’ }}

{{SQAttributeTable |server.class|Get the class of a server. This class can be used as a selector for the class.servers attribute. |string |query hostservice server.class ? loader/$LWO2 |’’loader’’ }}

{{SQAttributeTable |server.module|Get the path to the file that the server exists in. If this is a built-in server, an empty list is returned. |string |query hostservice server.userName ? loader/mayaAscii |’’C:Program FilesLuxologymodofmtmayama.lx’’ }}

{{SQAttributeTable |server.infoTag|Get the value of serve tag. Tags can be any simple static information the server wants to provide to the application. Some of these are particularly useful to scripts, such as loader.dosPattern and ‘’saver.dosPattern’’, which define the file extensions of loaders and savers.

The selector is the tag to be retrieved. Note that tags are ‘’’case sensitive’’’. Before using this attribute, a specific server must have previously been “selected” with or one of the other server attributes. |string |query hostservice ? loader/$LWO2 query hostservice server.infoTag ? loader.dosPattern |’’*.lwo’’ }}

defaultPath Attribute

{{SQAttributeTable |defaultPath|Returns the external server search path. It requires no selection. This is also available through PlatformsService Reference interface by passing hosts as the selector to the path.path attribute. |string |query hostservice defaultPath ? |’’C:Program FilesLuxologymodo’’ }}