Constraints XML Files
Last updated
Last updated
This page includes detailed step-by-step instructions on customizing constraint XML files for assets. In order to customize the marker labels, marker colors, marker sticks, and weights for an asset, a constraint XML file may be exported, customized, and loaded back into Motive. Alternately, the Constraints pane can be used to modify the marker names, color, and weight and the Builder pane can be used to customize marker sticks directly in Motive. This process has been standardized between asset types with the only exception being that marker sticks for Rigid Bodies does not work in Motive 3.0.
a) First, create an asset using the Builder pane or the 3D context menu.
b) Right-click on the asset in the Assets pane and select Export Markers. Alternately, you can click the "..." menu at the top of the Constraints pane.
c) In the export dialog window, select a directory to save the constraints XML file. Click Save to export.
a) Open the exported XML file using a text editor. It will contain corresponding marker label information under the <marker_names> section.
b) Customize the marker labels from the XML file. Under the <marker_names> section of the XML, modify labels for the name variables with the desired name, but do not change labels for old_name variables. The order of the markers should remain the same unless you would like to change the labeling order.
c) If you changed marker labels, the corresponding marker names must also be renamed within the <marker_colors> and <marker_sticks> sections as well. Otherwise, the marker colors and marker sticks will not be defined properly.
a) To customize the marker colors, sticks, or weight, open the exported XML file using a text editor and scroll down to the <marker_colors> and/or <marker_sticks> sections. If the <marker_colors> and/or <marker_sticks> sections do not exist in the exported XML file, then you could be using an old Skeleton created before Motive 1.10. Updating and exporting the old Skeleton will provide these sections in the XML.
b) You can customize the marker colors and the marker sticks in these sections. For each marker name, you must use exactly same marker labels that were defined by the <marker_names> section of the same XML file. If any marker label was changed in the <marker_names> section, the changed name must be reflected in the respective colors and sticks definitions as well. In other words, if a Custom_Name was assigned under name for a label in the <marker_names> section <marker name="Custom_Name" old_name="Name" />, the same Custom_Name must be used to rename all the respective marker names within <marker_colors> and/or <marker_sticks> sections of the XML.
Marker Colors: For each marker in a Skeleton, there will be a respective name and color definitions under the <marker_colors> section of the XML. To change corresponding marker colors for the template, edit the RGB parameter and save the XML file.
Marker Sticks: A marker stick is simply a line interconnecting two labeled markers within the Skeleton. Each marker stick definition consists of two marker labels for creating a marker stick and a RGB value for its color. To modify the marker sticks, edit the marker names and the color values. You can also define additional marker sticks by copying the format from the other marker stick definitions.
Now that you have customized the XML file, it can be loaded each time when creating new Skeletons. In the Builder pane under Skeleton creation options, select the corresponding Marker Set. Next, under the Constraints drop down menu, select "Choose File..." to find and import the XML file. When you Create the Skeleton, the custom marker labels, marker colors, and marker sticks will be applied.
If you manually added extra markers to a Skeleton, then you must import the constraint XML file after adding the extra markers or just modify the extra markers using the Constraints pane and Builder pane.
Note: For Skeletons, modified Marker XML files can only be used with the same Marker Set template. In other words, if you exported a Baseline (41) Skeleton and modified the constraints XML file, the same Baseline (41) Marker Set will need to be created in order to import the customized XML file.
You can also apply a customized constraint XML file to an existing asset using the import constraints feature. Right-click on an asset in the Assets pane (or click the "..." menu in the Constraints pane) and select Import Constraints from the menu. This will bring up a dialog window for importing a constraint XML file. Import the customized XML template and the modifications will be applied to the asset. This feature must be used if extra markers were added to the default XML template.