[Bug] bones do not appear when .jpt file is opened

Anything related to a beta release of JPatch: Bugs, enhancements, general discussion...

[Bug] bones do not appear when .jpt file is opened

Postby paul » Fri Apr 21, 2006 4:09 am

Observed in JPatch 0.5.2.

Sometimes, when opening a .jpt file which should have bones, the bones don't appear. Examining the .jpt file in the text editor, the bones still exist, they just aren't loaded.

Here's a portion of the file that I was trying to open:
Code: Select all
                                        <point nr="228" x="0.0" y="-0.072558075" z="0.0383986"/>
                                </target>
                        </morph>
                </mesh>
                <selection name="*extruded points #1">
                        <points>-1,1452,1451</points>
                        <pointweights>1.0,1.0,1.0</pointweights>
                </selection>
                <selection name="*extruded points #3">
                        <points>740,741,739</points>
                        <pointweights>1.0,1.0,1.0</pointweights>
                </selection>
                <selection name="*mirrored extruded points #3">
                        <points>737,736,738</points>
                        <pointweights>1.0,1.0,1.0</pointweights>
                </selection>
                <skeleton>
                        <bone name="Left ankle">
                                <parent id="13"/>
                                <end x="0.3764345" y="0.070020124" z="-0.7043841"/>
                                <color r="0.0" g="0.0" b="1.0"/>

Misreading "selection" as "skeleton", I deleted the three <selection> blocks that were in the file, and the bones loaded the next time I opened it.

Repeatedly reopening the the "before" and "after" files seems to be consistent -- with the <selection>s, the bones don't load, without them, they do. That shouldn't have worked, but it did. Sometimes, it really pays not to pay attention.

Thanks,
Paul
Attachments
disappearing_bones.zip
f_a_posed_test.jpt: loads bones properly
f_a_posed_test.jpt.bkp: doesn't load bones
(47.01 KiB) Downloaded 196 times
paul
 
Posts: 7
Joined: Fri Feb 24, 2006 5:21 am

Postby sascha » Fri Apr 21, 2006 7:17 am

Thanks for that information, I have found the reason:
In the first selection (*extruded points #1), there is a controlpoint with number "-1" - so during loading the importer quits with an "ArrayIndexOutOfBoundsException" :?

It seems that this point has been deleted from the model, but not from the selection - meaning that the selection contains a point that is no longer there - and when saving the file it got the number "-1".

I'll see if I can find the bug (much of the related code will undergo changes once we merge Torfs "new hooks" implementation back into the main branch, and I'm awere of a lot of troubles, so there will definitely be an extended testing and bugfixing phase before releasing version 0.6, which should be "stable" again).
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria


Return to Beta

Who is online

Users browsing this forum: No registered users and 1 guest

cron