|11 November 2013||#1|
Join Date: Oct 2013
Could someone explain me how works bitarrays ? I have a bitarray, and I need to turn off some of its item so I use only the "on" without changing their index.
I have heard I can perfectly do that with a bitarray but find no infos in the help or google :/
|11 November 2013||#2|
Sr. Character Rigger / TA
Edinburgh, United Kingdom
Join Date: Jan 2010
bit arrays as it says in the maxscript help is simply an array that contains values that are either true or false i.e. bits.
A good way to look at how they work is to make an object and set some of the transform lock flags on and off.
If you then run this:
tlf = gettransformlockflags $ --this returns a bit array
for i = 1 to tlf.count do
format ((i as string)+": "+(tlf[i] as string)+"\n")
It will show you that some of them are set to true (matching the ticks you set) or false (the ones without the tick).
So say you have a bit array of 20 items and you want the fifth and tenth to be 'off' you ensure index 5 and index 10 are set to false (as far as I'm aware anyway!)
Sr. Character Rigger
|11 November 2013||#3|
Lord of the postsportfolio
Join Date: Sep 2005
fairly simple stuff the way max displays it makes it a touch confusing
|Thread Closed share thread|