Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Here's a documentation question I just stumbled over:
The functions BaseList2D.Set/Del/ToggleBit() all accept a bitfield as parameter (of type int), in which several bits can be set. They work fine that way. However, there is an additional function SetAllBits() which... does the same as SetBit()? I just can't see a difference in behavior. Having such a function suggests (by its name) that the other three functions are meant to accept only a single bit as argument? So, is there a difference between SetBit() and SetAllBits() that I fail to see?
BaseList2D.Set/Del/ToggleBit()
SetAllBits()
SetBit()
The function GetBit() is documented as returning an int. It does return a bool though. (So in this case, there is a significant difference to GetAllBits() which indeed returns an int containing the full bitfield.) GetBit() accepts a bitfield with multiple bits set, just like the other "singular" functions above. The return value seems to be True when all bits from this bitfield are actually set in the object. Docs don't say so though.
GetBit()
GetAllBits()
Third, there are some flags which are dubious. BIT_OFOLD has been replaced by NBIT_OM1/2/3/4_FOLD some time ago, but the documentation still says Folded in object manager. Even in the C++ documentation. Reading on, I find the hint that this flag is now used to mark folded layers in the Layer Manager - so it's not deprecated at least. (I didn't verify this usage yet.) And what's BIT_MFOLD currently doing?
BIT_OFOLD
NBIT_OM1/2/3/4_FOLD
BIT_MFOLD
There is also still no formal constant BIT_SELECTRENDERDATA to denote selected render data entries - searching this forum yields the numeric value 0x08 so I guess that still counts as undocumented functionality. (Again, I didn't verify yet.)
0x08
Hi @Cairyn
SetBit
l_bitfeld = l_bitfeld | mask;
mask
l_bitfeld = bits;
bits
GetBit
return (bits & InputBitSetToTest) == InputBitSetToTest;
#define RENDERSETTINGS_BIT_SELECTED (1 << 3) #define RENDERSETTINGS_BIT_OPENED (1 << 4) #define RENDERSETTINGS_BIT_MPOPENED (1 << 5) #define RENDERSETTINGS_BIT_OVERRIDEBEHAVIOUR (1 << 6)
I hope I didn't miss any questions, if yes feel free to ask, Cheers, Maxime.
@m_adam Thanks for the info! I knew I was still missing a few flags