Re: scripting Weights

2016-03-10 Thread Martin
Thanks Alok, that's more or less what I'm doing. I have my weights array with rounded numbers but when I put them back to the envelope, they get converted into floating point approximations. In Maya, the rounded weights get stored in the ma file, I'm not sure how Maya deal with that internally

Re: scripting Weights

2016-03-10 Thread Martin Yara
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

Re: scripting Weights

2016-03-10 Thread Luc-Eric Rousseau
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.

Re: scripting Weights

2016-03-08 Thread Matt Lind
Don't freeze the envelope weights property until after you've kicked it with SIModifyFlexEnvWght(). Matt Date: Mon, 7 Mar 2016 21:11:47 +0900 From: Martin Yara <furik...@gmail.com> Subject: Re: scripting Weights To: "softimage@listproc.autodesk.com" <softimage@listproc.aut

Re: scripting Weights

2016-03-07 Thread Martin Yara
wake up and honor the values you set. > > > Matt > > > > > Date: Mon, 7 Mar 2016 20:01:47 +0900 > From: Martin Yara <furik...@gmail.com> > Subject: scripting Weights > To: "softimage@listproc.autodesk.com" > <softimage@listproc.autodesk.com>

Re: scripting Weights

2016-03-07 Thread Matt Lind
the values you set. Matt Date: Mon, 7 Mar 2016 20:01:47 +0900 From: Martin Yara <furik...@gmail.com> Subject: scripting Weights To: "softimage@listproc.autodesk.com" <softimage@listproc.autodesk.com> Message-ID: <caexmsffu6mzcjagtdrifnkfeopf-0e4dv_ypz4bctxgdue_...@mai

scripting Weights

2016-03-07 Thread Martin Yara
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.30011920929