When setting numeric attribute values in a dictionary, there are 5 types that can be used depending on the range of the number to be stored:
My assumption is that you would want to use the smallest type that your value will fit into in order to minimize file size. To test this, I created a model for each of the 5 numeric types and added a single dictionary with 10,000 attributes of the same type. For example,
model-byte.skp has one attribute diction with 10,000
byte attributes set to the same value.
I had expected to see the file sizes increase in the order:
However, lookng at the file sizes on disk I see that the
byte model is nearly as large as the
175605 model-int16.skp 195577 model-byte.skp 195607 model-float.skp 195607 model-int32.skp 235607 model-double.skp
On further inspection when getting a value set as
byte, the returned type says the value is an
/// ... SUTypedValueSetByte(typed_value, 65); // ... SUTypedValueGetType(typed_value, type_ptr) // returns the int32 type
It appears that
byte types are actually being stored in the model as
int32 types. Is this a bug?