I see, so it isn't possible. Sometimes our clients ask us to round the weights to certain digits.
So far they've never complained when I used this old tool (that I was trying to update), so I guess this should be good enough then. Thanks. On Fri, Mar 11, 2016 at 12:45 AM, Luc-Eric Rousseau <luceri...@gmail.com> wrote: > 0.3 can't be expressed exactly in floating point numbers. > It's possible through manipulation that you can get it to a number > that the code that the function which prints the number happens to > neatly truncate back 0.3, but the value isn't actually ever stored as > 0.3. > > http://www.exploringbinary.com/floating-point-converter/ > Select Single Precision. which is what the weight maps use. > > The sliders in XSI just convert the number to text and then truncates > at a fix number of decimal, hiding the issue from you/ > > On 7 March 2016 at 06:01, Martin Yara <furik...@gmail.com> wrote: > > I wrote a tool to round weights decimals but I'm still having decimals. > > > > I get the weighs with : > > > > Obj.Envelopes(0).Weights.Array > > > > Round them and put them back with > > > > myEnvelope.Weights.Array = roundedWeights > > > > But when I check my weights after that I'm still having decimals like: > > 0.300000011920929 > > 14.1999998092651 > > 58 > > 27.5 > > > > And my roundedWeights array is just like I want them: > > 0.3 > > 14.2 > > 58 > > 27.5 > > > > I successfully did it in Maya disabling the Normalize property, but I > can't > > get it to work in Softimage. Is there any way to do this? > > > > Thanks > > > > Martin > > > > ------ > > Softimage Mailing List. > > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with > > "unsubscribe" in the subject, and reply to confirm. > ------ > Softimage Mailing List. > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with "unsubscribe" in the subject, and reply to confirm. >
------ Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.