3DXI Custom User Data

Every node in 3ds Max can have user data added to it using the object properties dialog box. 3DXI can extract such data as an IGameProperty. Access to it is defined through the IGameProp.xml file. It uses the data found in the <ExportUserData> field to correctly extract the data found. Each piece of user data is contained in a <UserProperty>. The following table enumerates UserProperty elements:

<id> The unique ID for the Parameter. This has to be unique to the file
<simplename> A field that can be used for a more detailed description of the user property. This field has no relevance to 3DXI and is used only to more easily identify a UserProperty editing/examining the IGameProp.xml file.
<keyName> The name of data chunk. This can not contain spaces
<type> The data type, User data supports int, float, bool and string

In the XML file (shown below), the developer adds the following entry, so that the Property Manager can parse the data and provide access to it using the IGameProperty interface.

<ExportUserData>
- <!--
Access to the Node User Data
- <!--
The id must be unique to the file

  <UserProperty>
    <id>101</id>
    <simplename>IGameTestString</simplename>
    <keyName>string</keyName>
    <type>string</type>
  </UserProperty>
  <UserProperty>
    <id>102</id>
    <simplename>IGameTestInt</simplename>
    <keyName>int</keyName>
    <type>int</type>
  </UserProperty>
  <UserProperty>
  <id>103</id>
    <simplename>IGameTestFLoat</simplename>
    <keyName>float</keyName>
    <type>float</type>
  </UserProperty>
  <UserProperty>
    <id>104</id>
    <simplename>IGameTestBool</simplename>
    <keyName>bool</keyName>
    <type>bool</type>
  </UserProperty>
</ExportUserData>