[Bf-committers] OpenCollada issues (was Re: Meeting minutes, feb 14, 2010)
Damien Plisson
damien.plisson at yahoo.fr
Sat Feb 20 15:44:02 CET 2010
Oups, sorry, I posted on the ML the patch as an attachment.
Here is the pasteall link:
http://www.pasteall.org/11157
Damien
Le 20 févr. 2010 à 15:35, Damien Plisson a écrit :
> Hi Arystan,
>
> Looking at the float-to-string function, it appears it does bitwise operations on long type vars. And this particular 'long' type size changes when going from 32 to 64bit !
>
> Here is a patch that replaces the long type with fixed length int32_t. It makes the cube export work well :
>
>
>
> If you confirm this fixes the issue, I'll commit the updated darwin9 lib.
>
> Cheers,
> Damien
>
> Le 20 févr. 2010 à 14:41, Arystan Dyussenov a écrit :
>
>> Damien, Ken,
>>
>> Zero-sized cube problem is fixed.
>>
>> This problem was caused by OpenCollada's own float-to-string conversion
>> functions which don't work correctly on 64-bit systems.
>>
>> The fix was to use sprintf. The disadvantage of using sprintf is that
>> precision has to be limited to N digits in fractional part.
>>
>> This patch modifies conversion functions to use sprintf with 6 digits after
>> the decimal point stripping off trailing zeros.
>>
>> The patch is on the wiki:
>> http://wiki.blender.org/index.php/File:Opencollada_ftoa_patch.diff
>> Tested on 64-bit Mac OSX 10.6.
>>
>> The original float-to-string function looks like this:
>> http://www.pasteall.org/11155/c
>> It only works on 32-bit. On 64-bit, it at minimum ignores the sign. If
>> anyone knows how to make it work on 64-bit, that'd be a real fix!
>>
>> Arystan
>>
More information about the Bf-committers
mailing list