To use it, drop it in the root prim of a modifiable object, and after the script declares it is ready, take the object back into inventory, rez it again, and then select it and click from the menu bar Tools -> Set Script to Running in Selection. When this dialog says that it is finished activating all the scripts, the scripts will have already resized any minimum prim dimensions to the global variable min_size and deleted themselves from all prims. The object should then be shrinkable in edit mode.
CODE
// This script is freely available with no limitations on usage, modifications, or redistribution, and with no guarantee of support or warranty.
float min_size = 0.015;
scale() {
vector scale = llGetScale();
if (scale.x < min_size) {
scale.x = min_size;
}
if (scale.y < min_size) {
scale.y = min_size;
}
if (scale.z < min_size) {
scale.z = min_size;
}
llSetScale(scale);
}
default {
state_entry() {
if (llGetObjectPermMask(MASK_OWNER) & PERM_MODIFY) { // object can be modified
if (llGetLinkNumber() == 1) { // script is running in the root prim
if (llGetNumberOfPrims() > 1) { // 2+ prim object
integer i = 0;
integer prims = llGetNumberOfPrims();
for (i = 2; i <= prims; i++) { // pass a copy of the script to all child prims
llGiveInventory(llGetLinkKey(i), llGetScriptName());
}
scale();
llSay(0, "Loading stage finished. Take the object back into inventory, rez it again, then select it and choose from the menu Tools -> Set Script to Running in Selection. The process is complete when the dialog says all scripts have been reset.");
llRemoveInventory(llGetScriptName());
} else {
scale();
llSay(0, "One-prim object, finished.");
}
} else { // script is running in a child prim, scale prim and delete script
scale();
llRemoveInventory(llGetScriptName());
}
} else {
llSay(0, "Unmodifiable object; deleting script.");
llRemoveInventory(llGetScriptName());
}
}
}

