<div dir="auto">Maybe.</div><div dir="auto"><br></div><div dir="auto">Or check to see if sIdx < jIdx before doing any swapping.</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Mar 5, 2025 at 12:06 PM Bergstrom, Aaron <<a href="mailto:aaron.bergstrom@und.edu">aaron.bergstrom@und.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="m_2947328896804941129WordSection1">
<p class="MsoNormal">I suppose I could do a quick check to see if the root node in the ‘skeleton’ field has DEF=’somestring’ defined. And if so, and only then perform the flip.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">That would make it more portable.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br>
<b>Sent:</b> Wednesday, March 5, 2025 11:50 AM<br>
<b>To:</b> Bergstrom, Aaron <<a href="mailto:aaron.bergstrom@und.edu" target="_blank">aaron.bergstrom@und.edu</a>><br>
<b>Cc:</b> X3D Ecosystem public discussion <<a href="mailto:x3d-ecosystem@web3d.org" target="_blank">x3d-ecosystem@web3d.org</a>><br>
<b>Subject:</b> Re: [X3D-Ecosystem] RawKee Update - Implemented a companion export script for x3d.py<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Just to be aware, if skeleton comes before joints, then this code would flip them. You need to compare jIdx to sIdx before flipping them, AFAIK. I realize that you’ve ordered them properly elsewhere.<u></u><u></u></p>
</div></div></div><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div class="m_2947328896804941129WordSection1">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">On Wed, Mar 5, 2025 at 10:57 AM Bergstrom, Aaron <<a href="mailto:aaron.bergstrom@und.edu" target="_blank">aaron.bergstrom@und.edu</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">if nType == "HAnimHumanoid":<u></u><u></u></p>
<p class="MsoNormal" style="text-indent:.5in">
jIdx = -1<u></u><u></u></p>
<p class="MsoNormal" style="text-indent:.5in">
sIdx = -1<u></u><u></u></p>
<p class="MsoNormal" style="text-indent:.5in">
for idx in range(len(mNodeList)):<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in">
if mNodeList[idx] == "joints":<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:1.0in;text-indent:.5in">
jIdx = idx<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in">
elif mNodeList[idx] == "skeleton":<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:1.0in;text-indent:.5in">
sIdx = idx<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in">
if sIdx != -1 and jIdx != -1:<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:1.0in;text-indent:.5in">
mNodeList[jIdx] = "skeleton"<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:1.0in;text-indent:.5in">
mNodeList[sIdx] = "joints"<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote></div></div>