489
edits
Script 10k (talk | contribs) |
Script 10k (talk | contribs) |
||
Line 263: | Line 263: | ||
===Description=== | ===Description=== | ||
This operation allows you to update all values in a set of existing XML elements. The values differences must be space separated and contained within quotes. | |||
<tt>Usage: XmlTools --update-elements --diff-old-new-val "differences old-new values"</tt> | |||
===Example=== | ===Example=== | ||
Let's say you want to use tanker forward throw to a new character. You know that your new character has higher pelvis than the tanker, so you need to update all the heights of tanker animation to match those of your new character. | |||
We also know that difference between tanker animation (old value) and your character's (new value) is -0.7970685. | |||
'''XmlTools command:''' | |||
<pre>XmlTools --update-elements --diff-old-new-val "-0.7970685" --element-name "Height" --parent-element-name "Heights" --files "TRAMTANCOMthrow_fw.xml"</pre> | |||
{| style="margin: 1em auto 1em auto;" <!-- Centers table --> | |||
! style="width: 50%;" | XML Original | |||
! style="width: 50%;" | XML After Command | |||
|- | |||
| | |||
<Oni> | |||
<Animation> | |||
... | |||
<Heights> | |||
<Height><span style="color:blue">9.12794</span></Height> | |||
<Height><span style="color:blue">9.25521</span></Height> | |||
<Height><span style="color:blue">9.401095</span></Height> | |||
<Height><span style="color:blue">9.556288</span></Height> | |||
<Height><span style="color:blue">9.711483</span></Height> | |||
<Height><span style="color:blue">9.857368</span></Height> | |||
<Height><span style="color:blue">9.984637</span></Height> | |||
<Height><span style="color:blue">10.0839806</span></Height> | |||
... | |||
<Heights> | |||
... | |||
</Animation> | |||
</Oni> | |||
| | |||
<Oni> | |||
<Animation> | |||
... | |||
<Heights> | |||
<Height><span style="color:red">9.9250085</span></Height> | |||
<Height><span style="color:red">10.0522785</span></Height> | |||
<Height><span style="color:red">10.1981635</span></Height> | |||
<Height><span style="color:red">10.3533565</span></Height> | |||
<Height><span style="color:red">10.5085515</span></Height> | |||
<Height><span style="color:red">10.6544365</span></Height> | |||
<Height><span style="color:red">10.7817055</span></Height> | |||
<Height><span style="color:red">10.8810491</span></Height> | |||
... | |||
<Heights> | |||
... | |||
</Animation> | |||
</Oni> | |||
|} | |||
==--invert-elements== | ==--invert-elements== |
edits