protected UUID KeyOrName(string k, bool throwExceptionIfDoesNotExist)
{
UUID key = UUID.Zero;
// if we can parse the string as a key, use it.
if (UUID.TryParse(k, out key))
{
return key;
}
// else try to locate the name in inventory of object. found returns key,
// not found returns UUID.Zero which will translate to the default particle texture
return InventoryKey(k, throwExceptionIfDoesNotExist);
}